Merge pull request #2692 from wemyss/patch-1

Fix ts typing for loadAnimation parameter
diff --git a/.babelrc.json b/.babelrc.json
new file mode 100644
index 0000000..9c09f88
--- /dev/null
+++ b/.babelrc.json
@@ -0,0 +1,3 @@
+{
+  "presets": [["@babel/env", { "modules": false }]]
+}
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
index 2e5633f..8c7c96f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -6,8 +6,8 @@
         "airbnb-base"
     ],
     "parserOptions": {
-        "ecmaVersion": 5,
-        "sourceType": "script",
+        "ecmaVersion": 2015,
+        "sourceType": "module",
         "ecmaFeatures" : {
             "globalReturn": false
         }
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b6477e..e2e85dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+## V 5.9.1
+- FIX: navigator validation for SSR
+
+## V 5.9.0
+- FEATURE: Added support for using shapes as animated characters
+- FIX: added methods used by expressions to an array to prevent treeshaking
+- DEV: Migrated code to imports
+- DEV: Use Rollup for build process
+
 ## V 5.8.1
 - FEATURE: added more methods available for the lottie worker player
 
diff --git a/History.md b/History.md
index e5bf2c2..b92d688 100644
--- a/History.md
+++ b/History.md
@@ -1,3 +1,12 @@
+## V 5.9.1
+- FIX: navigator validation for SSR
+
+## V 5.9.0
+- FEATURE: Added support for using shapes as animated characters
+- FIX: added methods used by expressions to an array to prevent treeshaking
+- DEV: Migrated code to imports
+- DEV: Use Rollup for build process
+
 ## V 5.8.1
 - FEATURE: added more methods available for the lottie worker player
 
diff --git a/README.md b/README.md
index 3cc63c8..24b7031 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@
 
 ### Option 2:
 **Or get it from the adobe store**
-https://creative.adobe.com/addons/products/12557
+https://exchange.adobe.com/creativecloud.details.12557.html
 CC 2014 and up.
 
 ## Other installation options:
diff --git a/build/extension/bodymovin.zxp b/build/extension/bodymovin.zxp
index d5e8d92..3456139 100644
--- a/build/extension/bodymovin.zxp
+++ b/build/extension/bodymovin.zxp
Binary files differ
diff --git a/build/player/lottie.js b/build/player/lottie.js
index c106ac3..a6755c8 100644
--- a/build/player/lottie.js
+++ b/build/player/lottie.js
@@ -1,1911 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* global svgNS */
-/* exported createNS */
-
-function createNS(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElementNS(svgNS, type);
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$6(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1913,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$5(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6774,8212 +1620,6062 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$4(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,
-CVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */
-
-function CanvasRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.renderConfig = {
-    clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
-    context: (config && config.context) || null,
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.renderConfig.dpr = (config && config.dpr) || 1;
-  if (this.animationItem.wrapper) {
-    this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
-  }
-  this.renderedFrame = -1;
-  this.globalData = {
-    frameNum: -1,
-    _mdf: false,
-    renderConfig: this.renderConfig,
-    currentGlobalAlpha: -1,
+
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
+
+    if (expressionsPlugin) {
+      expressionsPlugin.initExpressions(this);
+    }
+
+    this.loadNextSegment();
   };
-  this.contextData = new CVContextData();
-  this.elements = [];
-  this.pendingElements = [];
-  this.transformMat = new Matrix();
-  this.completeLayers = false;
-  this.rendererType = 'canvas';
-}
-extendPrototype([BaseRenderer], CanvasRenderer);
 
-CanvasRenderer.prototype.createShape = function (data) {
-  return new CVShapeElement(data, this.globalData, this);
-};
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
 
-CanvasRenderer.prototype.createText = function (data) {
-  return new CVTextElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createImage = function (data) {
-  return new CVImageElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createComp = function (data) {
-  return new CVCompElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createSolid = function (data) {
-  return new CVSolidElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-CanvasRenderer.prototype.ctxTransform = function (props) {
-  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
-    return;
-  }
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
-    return;
-  }
-  this.transformMat.cloneFromProps(props);
-  var cProps = this.contextData.cTr.props;
-  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]);
-  // 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]);
-  this.contextData.cTr.cloneFromProps(this.transformMat.props);
-  var trProps = this.contextData.cTr.props;
-  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
-};
-
-CanvasRenderer.prototype.ctxOpacity = function (op) {
-  /* if(op === 1){
-        return;
-    } */
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-    return;
-  }
-  this.contextData.cO *= op < 0 ? 0 : op;
-  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
-    this.canvasContext.globalAlpha = this.contextData.cO;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-  }
-};
-
-CanvasRenderer.prototype.reset = function () {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  this.contextData.reset();
-};
-
-CanvasRenderer.prototype.save = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.save();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.save();
-  }
-  var props = this.contextData.cTr.props;
-  if (this.contextData._length <= this.contextData.cArrPos) {
-    this.contextData.duplicate();
-  }
-  var i;
-  var arr = this.contextData.saved[this.contextData.cArrPos];
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = props[i];
-  }
-  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
-  this.contextData.cArrPos += 1;
-};
-
-CanvasRenderer.prototype.restore = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.restore();
-    this.globalData.blendMode = 'source-over';
-  }
-  this.contextData.cArrPos -= 1;
-  var popped = this.contextData.saved[this.contextData.cArrPos];
-  var i;
-  var arr = this.contextData.cTr.props;
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = popped[i];
-  }
-  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
-  popped = this.contextData.savedOp[this.contextData.cArrPos];
-  this.contextData.cO = popped;
-  if (this.globalData.currentGlobalAlpha !== popped) {
-    this.canvasContext.globalAlpha = popped;
-    this.globalData.currentGlobalAlpha = popped;
-  }
-};
-
-CanvasRenderer.prototype.configAnimation = function (animData) {
-  if (this.animationItem.wrapper) {
-    this.animationItem.container = createTag('canvas');
-    var containerStyle = this.animationItem.container.style;
-    containerStyle.width = '100%';
-    containerStyle.height = '100%';
-    var origin = '0px 0px 0px';
-    containerStyle.transformOrigin = origin;
-    containerStyle.mozTransformOrigin = origin;
-    containerStyle.webkitTransformOrigin = origin;
-    containerStyle['-webkit-transform'] = origin;
-    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
-    this.animationItem.wrapper.appendChild(this.animationItem.container);
-    this.canvasContext = this.animationItem.container.getContext('2d');
-    if (this.renderConfig.className) {
-      this.animationItem.container.setAttribute('class', this.renderConfig.className);
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-    if (this.renderConfig.id) {
-      this.animationItem.container.setAttribute('id', this.renderConfig.id);
-    }
-  } else {
-    this.canvasContext = this.renderConfig.context;
-  }
-  this.data = animData;
-  this.layers = animData.layers;
-  this.transformCanvas = {
-    w: animData.w,
-    h: animData.h,
-    sx: 0,
-    sy: 0,
-    tx: 0,
-    ty: 0,
+
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
   };
-  this.setupGlobalData(animData, document.body);
-  this.globalData.canvasContext = this.canvasContext;
-  this.globalData.renderer = this;
-  this.globalData.isDashed = false;
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.globalData.transformCanvas = this.transformCanvas;
-  this.elements = createSizedArray(animData.layers.length);
 
-  this.updateContainerSize();
-};
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-CanvasRenderer.prototype.updateContainerSize = function () {
-  this.reset();
-  var elementWidth;
-  var elementHeight;
-  if (this.animationItem.wrapper && this.animationItem.container) {
-    elementWidth = this.animationItem.wrapper.offsetWidth;
-    elementHeight = this.animationItem.wrapper.offsetHeight;
-    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
-    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
-  } else {
-    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
-    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
-  }
-  var elementRel;
-  var animationRel;
-  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
-    var par = this.renderConfig.preserveAspectRatio.split(' ');
-    var fillType = par[1] || 'meet';
-    var pos = par[0] || 'xMidYMid';
-    var xPos = pos.substr(0, 4);
-    var yPos = pos.substr(4);
-    elementRel = elementWidth / elementHeight;
-    animationRel = this.transformCanvas.w / this.transformCanvas.h;
-    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
-      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    } else {
-      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
 
-    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
-    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.tx = 0;
-    }
-    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
-    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.ty = 0;
-    }
-  } else if (this.renderConfig.preserveAspectRatio === 'none') {
-    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  } else {
-    this.transformCanvas.sx = this.renderConfig.dpr;
-    this.transformCanvas.sy = this.renderConfig.dpr;
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  }
-  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];
-  /* var i, len = this.elements.length;
-    for(i=0;i<len;i+=1){
-        if(this.elements[i] && this.elements[i].data.ty === 0){
-            this.elements[i].resize(this.globalData.transformCanvas);
-        }
-    } */
-  this.ctxTransform(this.transformCanvas.props);
-  this.canvasContext.beginPath();
-  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-  this.canvasContext.closePath();
-  this.canvasContext.clip();
-
-  this.renderFrame(this.renderedFrame, true);
-};
-
-CanvasRenderer.prototype.destroy = function () {
-  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.globalData.canvasContext = null;
-  this.animationItem.container = null;
-  this.destroyed = true;
-};
-
-CanvasRenderer.prototype.renderFrame = function (num, forceRender) {
-  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
-    return;
-  }
-  this.renderedFrame = num;
-  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
-  this.globalData.frameId += 1;
-  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
-  this.globalData.projectInterface.currentFrame = num;
-
-  // console.log('--------');
-  // console.log('NEW: ',num);
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    if (this.renderConfig.clearCanvas === true) {
-      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-    } else {
-      this.save();
-    }
-    for (i = len - 1; i >= 0; i -= 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-    if (this.renderConfig.clearCanvas !== true) {
-      this.restore();
-    }
-  }
-};
-
-CanvasRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  var element = this.createItem(this.layers[pos], this, this.globalData);
-  elements[pos] = element;
-  element.initExpressions();
-  /* if(this.layers[pos].ty === 0){
-        element.resize(this.globalData.transformCanvas);
-    } */
-};
-
-CanvasRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-CanvasRenderer.prototype.hide = function () {
-  this.animationItem.container.style.display = 'none';
-};
-
-CanvasRenderer.prototype.show = function () {
-  this.animationItem.container.style.display = 'block';
-};
-
-/* global extendPrototype, BaseRenderer, SVGRenderer, SVGShapeElement, HShapeElement, SVGTextLottieElement,
-HTextElement, HCameraElement, IImageElement, HImageElement, SVGCompElement, HCompElement, ISolidElement,
-HSolidElement, styleDiv, createTag, createNS */
-
-function HybridRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.renderConfig = {
-    className: (config && config.className) || '',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    hideOnTransparent: !(config && config.hideOnTransparent === false),
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '400%',
-      height: (config && config.filterSize && config.filterSize.height) || '400%',
-      x: (config && config.filterSize && config.filterSize.x) || '-100%',
-      y: (config && config.filterSize && config.filterSize.y) || '-100%',
-    },
+    this.loadNextSegment();
   };
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    renderConfig: this.renderConfig,
+
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
   };
-  this.pendingElements = [];
-  this.elements = [];
-  this.threeDElements = [];
-  this.destroyed = false;
-  this.camera = null;
-  this.supports3d = true;
-  this.rendererType = 'html';
-}
 
-extendPrototype([BaseRenderer], HybridRenderer);
-
-HybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;
-
-HybridRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-HybridRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newDOMElement = element.getBaseElement();
-  if (!newDOMElement) {
-    return;
-  }
-  var layer = this.layers[pos];
-  if (!layer.ddd || !this.supports3d) {
-    if (this.threeDElements) {
-      this.addTo3dContainer(newDOMElement, pos);
-    } else {
-      var i = 0;
-      var nextDOMElement;
-      var nextLayer;
-      var tmpDOMElement;
-      while (i < pos) {
-        if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
-          nextLayer = this.elements[i];
-          tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
-          nextDOMElement = tmpDOMElement || nextDOMElement;
-        }
-        i += 1;
-      }
-      if (nextDOMElement) {
-        if (!layer.ddd || !this.supports3d) {
-          this.layerElement.insertBefore(newDOMElement, nextDOMElement);
-        }
-      } else if (!layer.ddd || !this.supports3d) {
-        this.layerElement.appendChild(newDOMElement);
-      }
-    }
-  } else {
-    this.addTo3dContainer(newDOMElement, pos);
-  }
-};
-
-HybridRenderer.prototype.createShape = function (data) {
-  if (!this.supports3d) {
-    return new SVGShapeElement(data, this.globalData, this);
-  }
-  return new HShapeElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createText = function (data) {
-  if (!this.supports3d) {
-    return new SVGTextLottieElement(data, this.globalData, this);
-  }
-  return new HTextElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createCamera = function (data) {
-  this.camera = new HCameraElement(data, this.globalData, this);
-  return this.camera;
-};
-
-HybridRenderer.prototype.createImage = function (data) {
-  if (!this.supports3d) {
-    return new IImageElement(data, this.globalData, this);
-  }
-  return new HImageElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createComp = function (data) {
-  if (!this.supports3d) {
-    return new SVGCompElement(data, this.globalData, this);
-  }
-  return new HCompElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createSolid = function (data) {
-  if (!this.supports3d) {
-    return new ISolidElement(data, this.globalData, this);
-  }
-  return new HSolidElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-HybridRenderer.prototype.getThreeDContainerByPos = function (pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
-      return this.threeDElements[i].perspectiveElem;
-    }
-    i += 1;
-  }
-  return null;
-};
-
-HybridRenderer.prototype.createThreeDContainer = function (pos, type) {
-  var perspectiveElem = createTag('div');
-  var style;
-  var containerStyle;
-  styleDiv(perspectiveElem);
-  var container = createTag('div');
-  styleDiv(container);
-  if (type === '3d') {
-    style = perspectiveElem.style;
-    style.width = this.globalData.compSize.w + 'px';
-    style.height = this.globalData.compSize.h + 'px';
-    var center = '50% 50%';
-    style.webkitTransformOrigin = center;
-    style.mozTransformOrigin = center;
-    style.transformOrigin = center;
-    containerStyle = container.style;
-    var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-    containerStyle.transform = matrix;
-    containerStyle.webkitTransform = matrix;
-  }
-
-  perspectiveElem.appendChild(container);
-  // this.resizerElem.appendChild(perspectiveElem);
-  var threeDContainerData = {
-    container: container,
-    perspectiveElem: perspectiveElem,
-    startPos: pos,
-    endPos: pos,
-    type: type,
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
   };
-  this.threeDElements.push(threeDContainerData);
-  return threeDContainerData;
-};
 
-HybridRenderer.prototype.build3dContainers = function () {
-  var i;
-  var len = this.layers.length;
-  var lastThreeDContainerData;
-  var currentContainer = '';
-  for (i = 0; i < len; i += 1) {
-    if (this.layers[i].ddd && this.layers[i].ty !== 3) {
-      if (currentContainer !== '3d') {
-        currentContainer = '3d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '3d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
-    } else {
-      if (currentContainer !== '2d') {
-        currentContainer = '2d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '2d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
     }
-  }
-  len = this.threeDElements.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
-  }
-};
 
-HybridRenderer.prototype.addTo3dContainer = function (elem, pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (pos <= this.threeDElements[i].endPos) {
-      var j = this.threeDElements[i].startPos;
-      var nextElement;
-      while (j < pos) {
-        if (this.elements[j] && this.elements[j].getBaseElement) {
-          nextElement = this.elements[j].getBaseElement();
-        }
-        j += 1;
-      }
-      if (nextElement) {
-        this.threeDElements[i].container.insertBefore(elem, nextElement);
+    try {
+      this.animationData = animData;
+
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        this.threeDElements[i].container.appendChild(elem);
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
       }
-      break;
+
+      this.renderer.configAnimation(animData);
+
+      if (!animData.assets) {
+        animData.assets = [];
+      }
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
+      }
+    } catch (error) {
+      this.triggerConfigError(error);
     }
-    i += 1;
-  }
-};
+  };
 
-HybridRenderer.prototype.configAnimation = function (animData) {
-  var resizerElem = createTag('div');
-  var wrapper = this.animationItem.wrapper;
-  var style = resizerElem.style;
-  style.width = animData.w + 'px';
-  style.height = animData.h + 'px';
-  this.resizerElem = resizerElem;
-  styleDiv(resizerElem);
-  style.transformStyle = 'flat';
-  style.mozTransformStyle = 'flat';
-  style.webkitTransformStyle = 'flat';
-  if (this.renderConfig.className) {
-    resizerElem.setAttribute('class', this.renderConfig.className);
-  }
-  wrapper.appendChild(resizerElem);
-
-  style.overflow = 'hidden';
-  var svg = createNS('svg');
-  svg.setAttribute('width', '1');
-  svg.setAttribute('height', '1');
-  styleDiv(svg);
-  this.resizerElem.appendChild(svg);
-  var defs = createNS('defs');
-  svg.appendChild(defs);
-  this.data = animData;
-  // Mask animation
-  this.setupGlobalData(animData, svg);
-  this.globalData.defs = defs;
-  this.layers = animData.layers;
-  this.layerElement = this.resizerElem;
-  this.build3dContainers();
-  this.updateContainerSize();
-};
-
-HybridRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.animationItem.container = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    this.elements[i].destroy();
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
-
-HybridRenderer.prototype.updateContainerSize = function () {
-  var elementWidth = this.animationItem.wrapper.offsetWidth;
-  var elementHeight = this.animationItem.wrapper.offsetHeight;
-  var elementRel = elementWidth / elementHeight;
-  var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
-  var sx;
-  var sy;
-  var tx;
-  var ty;
-  if (animationRel > elementRel) {
-    sx = elementWidth / (this.globalData.compSize.w);
-    sy = elementWidth / (this.globalData.compSize.w);
-    tx = 0;
-    ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2);
-  } else {
-    sx = elementHeight / (this.globalData.compSize.h);
-    sy = elementHeight / (this.globalData.compSize.h);
-    tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
-    ty = 0;
-  }
-  var style = this.resizerElem.style;
-  style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
-  style.transform = style.webkitTransform;
-};
-
-HybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
-
-HybridRenderer.prototype.hide = function () {
-  this.resizerElem.style.display = 'none';
-};
-
-HybridRenderer.prototype.show = function () {
-  this.resizerElem.style.display = 'block';
-};
-
-HybridRenderer.prototype.initItems = function () {
-  this.buildAllItems();
-  if (this.camera) {
-    this.camera.setup();
-  } else {
-    var cWidth = this.globalData.compSize.w;
-    var cHeight = this.globalData.compSize.h;
-    var i;
-    var len = this.threeDElements.length;
-    for (i = 0; i < len; i += 1) {
-      var style = this.threeDElements[i].perspectiveElem.style;
-      style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
-      style.perspective = style.webkitPerspective;
-    }
-  }
-};
-
-HybridRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  var floatingContainer = createTag('div');
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
-    }
-  }
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
     }
 
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
     } else {
-      rect = null;
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
+      }
+    }
+  };
+
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
+
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
+
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
+
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
     }
 
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
+    }
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
+      }
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
     } else {
-      count += 1;
+      this.pause();
+    }
+  };
 
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
 
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      } else {
-        feMorph = null;
-        x = null;
-      }
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
 
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
 
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
-      }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
-      }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name.cm === markerName) {
+        return marker;
       }
     }
-  }
 
-  this.maskElement = createNS(maskType);
+    return null;
+  };
 
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
-
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
     }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
-    }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
       }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
         } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
+      if (!this.checkSegments(nextValue % this.totalFrames)) {
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
           }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
+      }
+    } else {
+      this.setCurrentRawFrameValue(nextValue);
+    }
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$4(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
         }
       }
     }
-  }
-};
 
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
+    function freeze() {
+      _isFrozen = true;
+    }
 
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
 
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
+    function setVolume(val, animation) {
+      var i;
 
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
       }
-      viewData.elem.setAttribute('d', pathShapeValue);
     }
-    viewData.lastPath = pathString;
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
   }
-};
 
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
+  var bez = bezFunction();
 
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
 
-function HierarchyElement() {}
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
 
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-  },
-};
 
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
 
-function FrameElement() {}
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
 
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
           this._mdf = true;
         }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
+      } else {
+        var i = 0;
+        var len = this.v.length;
 
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
         while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
           }
+
           i += 1;
         }
       }
+    }
 
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
         return;
       }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
       }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
       this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-/* global createNS */
-
-function SVGStyleData(data, level) {
-  this.data = data;
-  this.type = data.ty;
-  this.d = '';
-  this.lvl = level;
-  this._mdf = false;
-  this.closed = data.hd === true;
-  this.pElem = createNS('path');
-  this.msElem = null;
-}
-
-SVGStyleData.prototype.reset = function () {
-  this.d = '';
-  this._mdf = false;
-};
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-}
 
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
 
-/* exported SVGTransformData */
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
 
-function SVGTransformData(mProps, op, container) {
-  this.transform = {
-    mProps: mProps,
-    op: op,
-    container: container,
-  };
-  this.elements = [];
-  this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
-}
-
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-  this._isAnimated = !!this._isAnimated;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
-
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
-
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
-
-function SVGGradientFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.initGradientData(elem, data, styleOb);
-}
-
-SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
-  this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);
-  this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);
-  this.g = new GradientProperty(elem, data.g, this);
-  this.style = styleOb;
-  this.stops = [];
-  this.setGradientData(styleOb.pElem, data);
-  this.setGradientOpacity(data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-};
-
-SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
-  var gradientId = createElementID();
-  var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-  gfill.setAttribute('id', gradientId);
-  gfill.setAttribute('spreadMethod', 'pad');
-  gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
-  var stops = [];
-  var stop;
-  var j;
-  var jLen;
-  jLen = data.g.p * 4;
-  for (j = 0; j < jLen; j += 4) {
-    stop = createNS('stop');
-    gfill.appendChild(stop);
-    stops.push(stop);
-  }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
-  this.gf = gfill;
-  this.cst = stops;
-};
-
-SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
-  if (this.g._hasOpacity && !this.g._collapsable) {
-    var stop;
-    var j;
-    var jLen;
-    var mask = createNS('mask');
-    var maskElement = createNS('path');
-    mask.appendChild(maskElement);
-    var opacityId = createElementID();
-    var maskId = createElementID();
-    mask.setAttribute('id', maskId);
-    var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-    opFill.setAttribute('id', opacityId);
-    opFill.setAttribute('spreadMethod', 'pad');
-    opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
-    jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
-    var stops = this.stops;
-    for (j = data.g.p * 4; j < jLen; j += 2) {
-      stop = createNS('stop');
-      stop.setAttribute('stop-color', 'rgb(255,255,255)');
-      opFill.appendChild(stop);
-      stops.push(stop);
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
-    if (data.ty === 'gs') {
-      maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-      maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-      if (data.lj === 1) {
-        maskElement.setAttribute('stroke-miterlimit', data.ml);
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
       }
     }
-    this.of = opFill;
-    this.ms = mask;
-    this.ost = stops;
-    this.maskId = maskId;
-    styleOb.msElem = maskElement;
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
   }
-};
 
-extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
 
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
 
-function SVGGradientStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.initGradientData(elem, data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-}
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
 
-extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
 
-/* global createNS */
-/* exported ShapeGroupData */
+    return animationManager.loadAnimation(params);
+  }
 
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
 
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
 
-var SVGElementsRenderer = (function () {
-  var _identityMatrix = new Matrix();
-  var _matrixHelper = new Matrix();
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
 
-  var ob = {
-    createRenderFunction: createRenderFunction,
-  };
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
 
-  function createRenderFunction(data) {
-    switch (data.ty) {
-      case 'fl':
-        return renderFill;
-      case 'gf':
-        return renderGradient;
-      case 'gs':
-        return renderGradientStroke;
-      case 'st':
-        return renderStroke;
-      case 'sh':
-      case 'el':
-      case 'rc':
-      case 'sr':
-        return renderPath;
-      case 'tr':
-        return renderContentTransform;
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
       default:
         return null;
     }
   }
 
-  function renderContentTransform(styleData, itemData, isFirstFrame) {
-    if (isFirstFrame || itemData.transform.op._mdf) {
-      itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
-    }
-    if (isFirstFrame || itemData.transform.mProps._mdf) {
-      itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
-    }
-  }
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
 
-  function renderPath(styleData, itemData, isFirstFrame) {
-    var j;
-    var jLen;
-    var pathStringTransformed;
-    var redraw;
-    var pathNodes;
-    var l;
-    var lLen = itemData.styles.length;
-    var lvl = itemData.lvl;
-    var paths;
-    var mat;
-    var props;
-    var iterations;
-    var k;
-    for (l = 0; l < lLen; l += 1) {
-      redraw = itemData.sh._mdf || isFirstFrame;
-      if (itemData.styles[l].lvl < lvl) {
-        mat = _matrixHelper.reset();
-        iterations = lvl - itemData.styles[l].lvl;
-        k = itemData.transformers.length - 1;
-        while (!redraw && iterations > 0) {
-          redraw = itemData.transformers[k].mProps._mdf || redraw;
-          iterations -= 1;
-          k -= 1;
-        }
-        if (redraw) {
-          iterations = lvl - itemData.styles[l].lvl;
-          k = itemData.transformers.length - 1;
-          while (iterations > 0) {
-            props = itemData.transformers[k].mProps.v.props;
-            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]);
-            iterations -= 1;
-            k -= 1;
-          }
-        }
-      } else {
-        mat = _identityMatrix;
-      }
-      paths = itemData.sh.paths;
-      jLen = paths._length;
-      if (redraw) {
-        pathStringTransformed = '';
-        for (j = 0; j < jLen; j += 1) {
-          pathNodes = paths.shapes[j];
-          if (pathNodes && pathNodes._length) {
-            pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
-          }
-        }
-        itemData.caches[l] = pathStringTransformed;
-      } else {
-        pathStringTransformed = itemData.caches[l];
-      }
-      itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
-      itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
-    }
-  }
-
-  function renderFill(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
 
-    if (itemData.c._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
     }
   }
 
-  function renderGradientStroke(styleData, itemData, isFirstFrame) {
-    renderGradient(styleData, itemData, isFirstFrame);
-    renderStroke(styleData, itemData, isFirstFrame);
-  }
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
 
-  function renderGradient(styleData, itemData, isFirstFrame) {
-    var gfill = itemData.gf;
-    var hasOpacity = itemData.g._hasOpacity;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
 
-    if (itemData.o._mdf || isFirstFrame) {
-      var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
-      itemData.style.pElem.setAttribute(attr, itemData.o.v);
-    }
-    if (itemData.s._mdf || isFirstFrame) {
-      var attr1 = styleData.t === 1 ? 'x1' : 'cx';
-      var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
-      gfill.setAttribute(attr1, pt1[0]);
-      gfill.setAttribute(attr2, pt1[1]);
-      if (hasOpacity && !itemData.g._collapsable) {
-        itemData.of.setAttribute(attr1, pt1[0]);
-        itemData.of.setAttribute(attr2, pt1[1]);
-      }
-    }
-    var stops;
-    var i;
-    var len;
-    var stop;
-    if (itemData.g._cmdf || isFirstFrame) {
-      stops = itemData.cst;
-      var cValues = itemData.g.c;
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        stop.setAttribute('offset', cValues[i * 4] + '%');
-        stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
-      }
-    }
-    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
-      var oValues = itemData.g.o;
-      if (itemData.g._collapsable) {
-        stops = itemData.cst;
-      } else {
-        stops = itemData.ost;
-      }
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        if (!itemData.g._collapsable) {
-          stop.setAttribute('offset', oValues[i * 2] + '%');
-        }
-        stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
-      }
-    }
-    if (styleData.t === 1) {
-      if (itemData.e._mdf || isFirstFrame) {
-        gfill.setAttribute('x2', pt2[0]);
-        gfill.setAttribute('y2', pt2[1]);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('x2', pt2[0]);
-          itemData.of.setAttribute('y2', pt2[1]);
-        }
-      }
-    } else {
-      var rad;
-      if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
-        rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        gfill.setAttribute('r', rad);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('r', rad);
-        }
-      }
-      if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
-        if (!rad) {
-          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        }
-        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-        var percent = itemData.h.v;
-        if (percent >= 1) {
-          percent = 0.99;
-        } else if (percent <= -1) {
-          percent = -0.99;
-        }
-        var dist = rad * percent;
-        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-        gfill.setAttribute('fx', x);
-        gfill.setAttribute('fy', y);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('fx', x);
-          itemData.of.setAttribute('fy', y);
-        }
-      }
-      // gfill.setAttribute('fy','200');
-    }
-  }
-
-  function renderStroke(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
-    var d = itemData.d;
-    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
-      styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
-      styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
-    }
-    if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
-      styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
-    }
-    if (itemData.w._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
-      if (styleElem.msElem) {
-        styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
-      }
-    }
-  }
-
-  return ob;
-}());
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global ShapePropertyFactory, SVGShapeData */
-
-function CVShapeData(element, data, styles, transformsManager) {
-  this.styledShapes = [];
-  this.tr = [0, 0, 0, 0, 0, 0];
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
-  var i;
-  var len = styles.length;
-  var styledShape;
-  for (i = 0; i < len; i += 1) {
-    if (!styles[i].closed) {
-      styledShape = {
-        transforms: transformsManager.addTransformSequence(styles[i].transforms),
-        trNodes: [],
-      };
-      this.styledShapes.push(styledShape);
-      styles[i].elements.push(styledShape);
-    }
-  }
-}
-
-CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
-
-function FootageElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.footageData = globalData.imageLoader.getAsset(this.assetData);
-  this.initBaseData(data, globalData, comp);
-}
-
-FootageElement.prototype.prepareFrame = function () {
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
-
-FootageElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-FootageElement.prototype.renderFrame = function () {
-};
-
-FootageElement.prototype.destroy = function () {
-};
-
-FootageElement.prototype.initExpressions = function () {
-  this.layerInterface = FootageInterface(this);
-};
-
-FootageElement.prototype.getFootageData = function () {
-  return this.footageData;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
-
-function SVGCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = true;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
-
-function SVGTextLottieElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.renderType = 'svg';
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
-
-SVGTextLottieElement.prototype.createContent = function () {
-  if (this.data.singleShape && !this.globalData.fontManager.chars) {
-    this.textContainer = createNS('text');
-  }
-};
-
-SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
-  var i = 0;
-  var len = textArray.length;
-  var textContents = [];
-  var currentTextContent = '';
-  while (i < len) {
-    if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
-      textContents.push(currentTextContent);
-      currentTextContent = '';
-    } else {
-      currentTextContent += textArray[i];
-    }
-    i += 1;
-  }
-  textContents.push(currentTextContent);
-  return textContents;
-};
-
-SVGTextLottieElement.prototype.buildNewText = function () {
-  var i;
-  var len;
-
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
-  if (documentData.fc) {
-    this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
-  } else {
-    this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
-  }
-  if (documentData.sc) {
-    this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
-    this.layerElement.setAttribute('stroke-width', documentData.sw);
-  }
-  this.layerElement.setAttribute('font-size', documentData.finalSize);
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (fontData.fClass) {
-    this.layerElement.setAttribute('class', fontData.fClass);
-  } else {
-    this.layerElement.setAttribute('font-family', fontData.fFamily);
-    var fWeight = documentData.fWeight;
-    var fStyle = documentData.fStyle;
-    this.layerElement.setAttribute('font-style', fStyle);
-    this.layerElement.setAttribute('font-weight', fWeight);
-  }
-  this.layerElement.setAttribute('aria-label', documentData.t);
-
-  var letters = documentData.l || [];
-  var usesGlyphs = !!this.globalData.fontManager.chars;
-  len = letters.length;
-
-  var tSpan;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var singleShape = this.data.singleShape;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  if (singleShape && !usesGlyphs && !documentData.sz) {
-    var tElement = this.textContainer;
-    var justify = 'start';
-    switch (documentData.j) {
-      case 1:
-        justify = 'end';
-        break;
-      case 2:
-        justify = 'middle';
-        break;
-      default:
-        justify = 'start';
-        break;
-    }
-    tElement.setAttribute('text-anchor', justify);
-    tElement.setAttribute('letter-spacing', trackingOffset);
-    var textContent = this.buildTextContents(documentData.finalText);
-    len = textContent.length;
-    yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
-    for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
-      tSpan.textContent = textContent[i];
-      tSpan.setAttribute('x', 0);
-      tSpan.setAttribute('y', yPos);
-      tSpan.style.display = 'inherit';
-      tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
-      yPos += documentData.finalLineHeight;
-    }
-
-    this.layerElement.appendChild(tElement);
-  } else {
-    var cachedSpansLength = this.textSpans.length;
-    var shapeData;
-    var charData;
-    for (i = 0; i < len; i += 1) {
-      if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
-        if (cachedSpansLength <= i) {
-          tSpan.setAttribute('stroke-linecap', 'butt');
-          tSpan.setAttribute('stroke-linejoin', 'round');
-          tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
-          this.layerElement.appendChild(tSpan);
-        }
-        tSpan.style.display = 'inherit';
-      }
-
-      matrixHelper.reset();
-      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-      if (singleShape) {
-        if (letters[i].n) {
-          xPos = -trackingOffset;
-          yPos += documentData.yOffset;
-          yPos += firstLine ? 1 : 0;
-          firstLine = false;
-        }
-        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-        xPos += letters[i].l || 0;
-        // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-        xPos += trackingOffset;
-      }
-      if (usesGlyphs) {
-        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
-        } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
-        }
-      } else {
-        if (singleShape) {
-          tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
-        }
-        tSpan.textContent = letters[i].val;
-        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      }
-      //
-    }
-    if (singleShape && tSpan) {
-      tSpan.setAttribute('d', shapeStr);
-    }
-  }
-  while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
-    i += 1;
-  }
-
-  this._sizeChanged = true;
-};
-
-SVGTextLottieElement.prototype.sourceRectAtTime = function () {
-  this.prepareFrame(this.comp.renderedFrame - this.data.st);
-  this.renderInnerContent();
-  if (this._sizeChanged) {
-    this._sizeChanged = false;
-    var textBox = this.layerElement.getBBox();
-    this.bbox = {
-      top: textBox.y,
-      left: textBox.x,
-      width: textBox.width,
-      height: textBox.height,
-    };
-  }
-  return this.bbox;
-};
-
-SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-    if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
-      this._sizeChanged = true;
-      var i;
-      var len;
-      var renderedLetters = this.textAnimator.renderedLetters;
-
-      var letters = this.textProperty.currentData.l;
-
-      len = letters.length;
-      var renderedLetter;
-      var textSpan;
-      for (i = 0; i < len; i += 1) {
-        if (!letters[i].n) {
-          renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
-          if (renderedLetter._mdf.m) {
-            textSpan.setAttribute('transform', renderedLetter.m);
-          }
-          if (renderedLetter._mdf.o) {
-            textSpan.setAttribute('opacity', renderedLetter.o);
-          }
-          if (renderedLetter._mdf.sw) {
-            textSpan.setAttribute('stroke-width', renderedLetter.sw);
-          }
-          if (renderedLetter._mdf.sc) {
-            textSpan.setAttribute('stroke', renderedLetter.sc);
-          }
-          if (renderedLetter._mdf.fc) {
-            textSpan.setAttribute('fill', renderedLetter.fc);
-          }
-        }
-      }
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global createNS */
-
-function SVGTintFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  feColorMatrix.setAttribute('result', 'f2');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-  if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
-    var feMerge = createNS('feMerge');
-    filter.appendChild(feMerge);
-    var feMergeNode;
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'SourceGraphic');
-    feMerge.appendChild(feMergeNode);
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'f2');
-    feMerge.appendChild(feMergeNode);
-  }
-}
-
-SVGTintFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var colorBlack = this.filterManager.effectElements[0].p.v;
-    var colorWhite = this.filterManager.effectElements[1].p.v;
-    var opacity = this.filterManager.effectElements[2].p.v / 100;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGFillFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-}
-SVGFillFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color = this.filterManager.effectElements[2].p.v;
-    var opacity = this.filterManager.effectElements[6].p.v;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGGaussianBlurEffect(filter, filterManager) {
-  // Outset the filter region by 100% on all sides to accommodate blur expansion.
-  filter.setAttribute('x', '-100%');
-  filter.setAttribute('y', '-100%');
-  filter.setAttribute('width', '300%');
-  filter.setAttribute('height', '300%');
-
-  this.filterManager = filterManager;
-  var feGaussianBlur = createNS('feGaussianBlur');
-  filter.appendChild(feGaussianBlur);
-  this.feGaussianBlur = feGaussianBlur;
-}
-
-SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    // Empirical value, matching AE's blur appearance.
-    var kBlurrinessToSigma = 0.3;
-    var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
-
-    // Dimensions mapping:
-    //
-    //   1 -> horizontal & vertical
-    //   2 -> horizontal only
-    //   3 -> vertical only
-    //
-    var dimensions = this.filterManager.effectElements[1].p.v;
-    var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq
-    var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq
-
-    this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);
-
-    // Repeat edges mapping:
-    //
-    //   0 -> off -> duplicate
-    //   1 -> on  -> wrap
-    var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
-    this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
-  }
-};
-
-/* global createNS, createElementID, locationHref, bmFloor */
-
-function SVGStrokeEffect(elem, filterManager) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.elem = elem;
-  this.paths = [];
-}
-
-SVGStrokeEffect.prototype.initialize = function () {
-  var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-  var path;
-  var groupPath;
-  var i;
-  var len;
-  if (this.filterManager.effectElements[1].p.v === 1) {
-    len = this.elem.maskManager.masksProperties.length;
-    i = 0;
-  } else {
-    i = this.filterManager.effectElements[0].p.v - 1;
-    len = i + 1;
-  }
-  groupPath = createNS('g');
-  groupPath.setAttribute('fill', 'none');
-  groupPath.setAttribute('stroke-linecap', 'round');
-  groupPath.setAttribute('stroke-dashoffset', 1);
-  for (i; i < len; i += 1) {
-    path = createNS('path');
-    groupPath.appendChild(path);
-    this.paths.push({ p: path, m: i });
-  }
-  if (this.filterManager.effectElements[10].p.v === 3) {
-    var mask = createNS('mask');
-    var id = createElementID();
-    mask.setAttribute('id', id);
-    mask.setAttribute('mask-type', 'alpha');
-    mask.appendChild(groupPath);
-    this.elem.globalData.defs.appendChild(mask);
-    var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-    while (elemChildren[0]) {
-      g.appendChild(elemChildren[0]);
-    }
-    this.elem.layerElement.appendChild(g);
-    this.masker = mask;
-    groupPath.setAttribute('stroke', '#fff');
-  } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (this.filterManager.effectElements[10].p.v === 2) {
-      elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-      while (elemChildren.length) {
-        this.elem.layerElement.removeChild(elemChildren[0]);
-      }
-    }
-    this.elem.layerElement.appendChild(groupPath);
-    this.elem.layerElement.removeAttribute('mask');
-    groupPath.setAttribute('stroke', '#fff');
-  }
-  this.initialized = true;
-  this.pathMasker = groupPath;
-};
-
-SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
-  if (!this.initialized) {
-    this.initialize();
-  }
-  var i;
-  var len = this.paths.length;
-  var mask;
-  var path;
-  for (i = 0; i < len; i += 1) {
-    if (this.paths[i].m !== -1) {
-      mask = this.elem.maskManager.viewData[this.paths[i].m];
-      path = this.paths[i].p;
-      if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
-        path.setAttribute('d', mask.lastPath);
-      }
-      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) {
-        var dasharrayValue;
-        if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
-          var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var l = path.getTotalLength();
-          dasharrayValue = '0 0 0 ' + l * s + ' ';
-          var lineLength = l * (e - s);
-          var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-          var units = Math.floor(lineLength / segment);
-          var j;
-          for (j = 0; j < units; j += 1) {
-            dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
-          }
-          dasharrayValue += '0 ' + l * 10 + ' 0 0';
-        } else {
-          dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-        }
-        path.setAttribute('stroke-dasharray', dasharrayValue);
-      }
-    }
-  }
-  if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-    this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
-  }
-
-  if (forceRender || this.filterManager.effectElements[6].p._mdf) {
-    this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
-  }
-  if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (forceRender || this.filterManager.effectElements[3].p._mdf) {
-      var color = this.filterManager.effectElements[3].p.v;
-      this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
-    }
-  }
-};
-
-/* global createNS */
-
-function SVGTritoneFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  var feComponentTransfer = createNS('feComponentTransfer');
-  feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-  filter.appendChild(feComponentTransfer);
-  this.matrixFilter = feComponentTransfer;
-  var feFuncR = createNS('feFuncR');
-  feFuncR.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncR);
-  this.feFuncR = feFuncR;
-  var feFuncG = createNS('feFuncG');
-  feFuncG.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncG);
-  this.feFuncG = feFuncG;
-  var feFuncB = createNS('feFuncB');
-  feFuncB.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncB);
-  this.feFuncB = feFuncB;
-}
-
-SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color1 = this.filterManager.effectElements[0].p.v;
-    var color2 = this.filterManager.effectElements[1].p.v;
-    var color3 = this.filterManager.effectElements[2].p.v;
-    var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
-    var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
-    var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
-    this.feFuncR.setAttribute('tableValues', tableR);
-    this.feFuncG.setAttribute('tableValues', tableG);
-    this.feFuncB.setAttribute('tableValues', tableB);
-    // var opacity = this.filterManager.effectElements[2].p.v/100;
-    // 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');
-  }
-};
-
-/* global createNS */
-
-function SVGProLevelsFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var effectElements = this.filterManager.effectElements;
-  var feComponentTransfer = createNS('feComponentTransfer');
-
-  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) {
-    this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
-  }
-  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) {
-    this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
-  }
-  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) {
-    this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-  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) {
-    this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
-  }
-
-  if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    feComponentTransfer = createNS('feComponentTransfer');
-  }
-
-  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) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
-    this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
-    this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-}
-
-SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
-  var feFunc = createNS(type);
-  feFunc.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFunc);
-  return feFunc;
-};
-
-SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
-  var cnt = 0;
-  var segments = 256;
-  var perc;
-  var min = Math.min(inputBlack, inputWhite);
-  var max = Math.max(inputBlack, inputWhite);
-  var table = Array.call(null, { length: segments });
-  var colorValue;
-  var pos = 0;
-  var outputDelta = outputWhite - outputBlack;
-  var inputDelta = inputWhite - inputBlack;
-  while (cnt <= 256) {
-    perc = cnt / 256;
-    if (perc <= min) {
-      colorValue = inputDelta < 0 ? outputWhite : outputBlack;
-    } else if (perc >= max) {
-      colorValue = inputDelta < 0 ? outputBlack : outputWhite;
-    } else {
-      colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
-    }
-    table[pos] = colorValue;
-    pos += 1;
-    cnt += 256 / (segments - 1);
-  }
-  return table.join(' ');
-};
-
-SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var val;
-    var effectElements = this.filterManager.effectElements;
-    if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
-      val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
-      this.feFuncRComposed.setAttribute('tableValues', val);
-      this.feFuncGComposed.setAttribute('tableValues', val);
-      this.feFuncBComposed.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
-      val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
-      this.feFuncR.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
-      val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
-      this.feFuncG.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
-      val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
-      this.feFuncB.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
-      val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
-      this.feFuncA.setAttribute('tableValues', val);
-    }
-  }
-};
-
-/* global createNS, rgbToHex, degToRads */
-
-function SVGDropShadowEffect(filter, filterManager) {
-  var filterSize = filterManager.container.globalData.renderConfig.filterSize;
-  filter.setAttribute('x', filterSize.x);
-  filter.setAttribute('y', filterSize.y);
-  filter.setAttribute('width', filterSize.width);
-  filter.setAttribute('height', filterSize.height);
-  this.filterManager = filterManager;
-
-  var feGaussianBlur = createNS('feGaussianBlur');
-  feGaussianBlur.setAttribute('in', 'SourceAlpha');
-  feGaussianBlur.setAttribute('result', 'drop_shadow_1');
-  feGaussianBlur.setAttribute('stdDeviation', '0');
-  this.feGaussianBlur = feGaussianBlur;
-  filter.appendChild(feGaussianBlur);
-
-  var feOffset = createNS('feOffset');
-  feOffset.setAttribute('dx', '25');
-  feOffset.setAttribute('dy', '0');
-  feOffset.setAttribute('in', 'drop_shadow_1');
-  feOffset.setAttribute('result', 'drop_shadow_2');
-  this.feOffset = feOffset;
-  filter.appendChild(feOffset);
-  var feFlood = createNS('feFlood');
-  feFlood.setAttribute('flood-color', '#00ff00');
-  feFlood.setAttribute('flood-opacity', '1');
-  feFlood.setAttribute('result', 'drop_shadow_3');
-  this.feFlood = feFlood;
-  filter.appendChild(feFlood);
-
-  var feComposite = createNS('feComposite');
-  feComposite.setAttribute('in', 'drop_shadow_3');
-  feComposite.setAttribute('in2', 'drop_shadow_2');
-  feComposite.setAttribute('operator', 'in');
-  feComposite.setAttribute('result', 'drop_shadow_4');
-  filter.appendChild(feComposite);
-
-  var feMerge = createNS('feMerge');
-  filter.appendChild(feMerge);
-  var feMergeNode;
-  feMergeNode = createNS('feMergeNode');
-  feMerge.appendChild(feMergeNode);
-  feMergeNode = createNS('feMergeNode');
-  feMergeNode.setAttribute('in', 'SourceGraphic');
-  this.feMergeNode = feMergeNode;
-  this.feMerge = feMerge;
-  this.originalNodeAdded = false;
-  feMerge.appendChild(feMergeNode);
-}
-
-SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-      this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
-    }
-    if (forceRender || this.filterManager.effectElements[0].p._mdf) {
-      var col = this.filterManager.effectElements[0].p.v;
-      this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
-    }
-    if (forceRender || this.filterManager.effectElements[1].p._mdf) {
-      this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
-    }
-    if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
-      var distance = this.filterManager.effectElements[3].p.v;
-      var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
-      var x = distance * Math.cos(angle);
-      var y = distance * Math.sin(angle);
-      this.feOffset.setAttribute('dx', x);
-      this.feOffset.setAttribute('dy', y);
-    }
-    /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
-            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
-                this.feMerge.removeChild(this.feMergeNode);
-                this.originalNodeAdded = false;
-            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
-                this.feMerge.appendChild(this.feMergeNode);
-                this.originalNodeAdded = true;
-            }
-        } */
-  }
-};
-
-/* global createElementID, createNS */
-
-var _svgMatteSymbols = [];
-
-function SVGMatte3Effect(filterElem, filterManager, elem) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.filterElem = filterElem;
-  this.elem = elem;
-  elem.matteElement = createNS('g');
-  elem.matteElement.appendChild(elem.layerElement);
-  elem.matteElement.appendChild(elem.transformedElement);
-  elem.baseElement = elem.matteElement;
-}
-
-SVGMatte3Effect.prototype.findSymbol = function (mask) {
-  var i = 0;
-  var len = _svgMatteSymbols.length;
-  while (i < len) {
-    if (_svgMatteSymbols[i] === mask) {
-      return _svgMatteSymbols[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
-  var parentNode = mask.layerElement.parentNode;
-  if (!parentNode) {
-    return;
-  }
-  var children = parentNode.children;
-  var i = 0;
-  var len = children.length;
-  while (i < len) {
-    if (children[i] === mask.layerElement) {
-      break;
-    }
-    i += 1;
-  }
-  var nextChild;
-  if (i <= len - 2) {
-    nextChild = children[i + 1];
-  }
-  var useElem = createNS('use');
-  useElem.setAttribute('href', '#' + symbolId);
-  if (nextChild) {
-    parentNode.insertBefore(useElem, nextChild);
-  } else {
-    parentNode.appendChild(useElem);
-  }
-};
-
-SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
-  if (!this.findSymbol(mask)) {
-    var symbolId = createElementID();
-    var masker = createNS('mask');
-    masker.setAttribute('id', mask.layerId);
-    masker.setAttribute('mask-type', 'alpha');
-    _svgMatteSymbols.push(mask);
-    var defs = elem.globalData.defs;
-    defs.appendChild(masker);
-    var symbol = createNS('symbol');
-    symbol.setAttribute('id', symbolId);
-    this.replaceInParent(mask, symbolId);
-    symbol.appendChild(mask.layerElement);
-    defs.appendChild(symbol);
-    var useElem = createNS('use');
-    useElem.setAttribute('href', '#' + symbolId);
-    masker.appendChild(useElem);
-    mask.data.hd = false;
-    mask.show();
-  }
-  elem.setMatte(mask.layerId);
-};
-
-SVGMatte3Effect.prototype.initialize = function () {
-  var ind = this.filterManager.effectElements[0].p.v;
-  var elements = this.elem.comp.elements;
-  var i = 0;
-  var len = elements.length;
-  while (i < len) {
-    if (elements[i] && elements[i].data.ind === ind) {
-      this.setElementAsMask(this.elem, elements[i]);
-    }
-    i += 1;
-  }
-  this.initialized = true;
-};
-
-SVGMatte3Effect.prototype.renderFrame = function () {
-  if (!this.initialized) {
-    this.initialize();
-  }
-};
-
-/* global createElementID, filtersFactory, SVGTintFilter, SVGFillFilter, SVGStrokeEffect, SVGTritoneFilter,
-SVGProLevelsFilter, SVGDropShadowEffect, SVGMatte3Effect, SVGGaussianBlurEffect, locationHref */
-
-function SVGEffects(elem) {
-  var i;
-  var len = elem.data.ef ? elem.data.ef.length : 0;
-  var filId = createElementID();
-  var fil = filtersFactory.createFilter(filId, true);
-  var count = 0;
-  this.filters = [];
-  var filterManager;
-  for (i = 0; i < len; i += 1) {
-    filterManager = null;
-    if (elem.data.ef[i].ty === 20) {
-      count += 1;
-      filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 21) {
-      count += 1;
-      filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 22) {
-      filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 23) {
-      count += 1;
-      filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 24) {
-      count += 1;
-      filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 25) {
-      count += 1;
-      filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 28) {
-      // count += 1;
-      filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
-    } else if (elem.data.ef[i].ty === 29) {
-      count += 1;
-      filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
-    }
-    if (filterManager) {
-      this.filters.push(filterManager);
-    }
-  }
-  if (count) {
-    elem.globalData.defs.appendChild(fil);
-    elem.layerElement.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-  }
-  if (this.filters.length) {
-    elem.addRenderableComponent(this);
-  }
-}
-
-SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
-  var i;
-  var len = this.filters.length;
-  for (i = 0; i < len; i += 1) {
-    this.filters[i].renderFrame(_isFirstFrame);
-  }
-};
-
-/* global Matrix, createTypedArray */
-
-function CVContextData() {
-  this.saved = [];
-  this.cArrPos = 0;
-  this.cTr = new Matrix();
-  this.cO = 1;
-  var i;
-  var len = 15;
-  this.savedOp = createTypedArray('float32', len);
-  for (i = 0; i < len; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = len;
-}
-
-CVContextData.prototype.duplicate = function () {
-  var newLength = this._length * 2;
-  var currentSavedOp = this.savedOp;
-  this.savedOp = createTypedArray('float32', newLength);
-  this.savedOp.set(currentSavedOp);
-  var i = 0;
-  for (i = this._length; i < newLength; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = newLength;
-};
-
-CVContextData.prototype.reset = function () {
-  this.cArrPos = 0;
-  this.cTr.reset();
-  this.cO = 1;
-};
-
-/* global CVEffects, getBlendMode, CVMaskElement, Matrix */
-
-function CVBaseElement() {
-}
-
-CVBaseElement.prototype = {
-  createElements: function () {},
-  initRendererElement: function () {},
-  createContainerElements: function () {
-    this.canvasContext = this.globalData.canvasContext;
-    this.renderableEffectsManager = new CVEffects(this);
-  },
-  createContent: function () {},
-  setBlendMode: function () {
-    var globalData = this.globalData;
-    if (globalData.blendMode !== this.data.bm) {
-      globalData.blendMode = this.data.bm;
-      var blendModeValue = getBlendMode(this.data.bm);
-      globalData.canvasContext.globalCompositeOperation = blendModeValue;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new CVMaskElement(this.data, this);
-  },
-  hideElement: function () {
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-      this.hidden = true;
-    }
-  },
-  showElement: function () {
-    if (this.isInRange && !this.isTransparent) {
-      this.hidden = false;
-      this._isFirstFrame = true;
-      this.maskManager._isFirstFrame = true;
-    }
-  },
-  renderFrame: function () {
-    if (this.hidden || this.data.hd) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.setBlendMode();
-    var forceRealStack = this.data.ty === 0;
-    this.globalData.renderer.save(forceRealStack);
-    this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
-    this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
-    this.renderInnerContent();
-    this.globalData.renderer.restore(forceRealStack);
-    if (this.maskManager.hasMasks) {
-      this.globalData.renderer.restore(true);
-    }
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.canvasContext = null;
-    this.data = null;
-    this.globalData = null;
-    this.maskManager.destroy();
-  },
-  mHelper: new Matrix(),
-};
-CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
-CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement,HierarchyElement, FrameElement,
-RenderableElement, SVGShapeElement, IImageElement, createTag */
-
-function CVImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.img = globalData.imageLoader.getAsset(this.assetData);
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
-
-CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVImageElement.prototype.createContent = function () {
-  if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
-    var canvas = createTag('canvas');
-    canvas.width = this.assetData.w;
-    canvas.height = this.assetData.h;
-    var ctx = canvas.getContext('2d');
-
-    var imgW = this.img.width;
-    var imgH = this.img.height;
-    var imgRel = imgW / imgH;
-    var canvasRel = this.assetData.w / this.assetData.h;
-    var widthCrop;
-    var heightCrop;
-    var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
-    if ((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) {
-      heightCrop = imgH;
-      widthCrop = heightCrop * canvasRel;
-    } else {
-      widthCrop = imgW;
-      heightCrop = widthCrop / canvasRel;
-    }
-    ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
-    this.img = canvas;
-  }
-};
-
-CVImageElement.prototype.renderInnerContent = function () {
-  this.canvasContext.drawImage(this.img, 0, 0);
-};
-
-CVImageElement.prototype.destroy = function () {
-  this.img = null;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */
-
-function CVCompElement(data, globalData, comp) {
-  this.completeLayers = false;
-  this.layers = data.layers;
-  this.pendingElements = [];
-  this.elements = createSizedArray(this.layers.length);
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
-
-CVCompElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.beginPath();
-  ctx.moveTo(0, 0);
-  ctx.lineTo(this.data.w, 0);
-  ctx.lineTo(this.data.w, this.data.h);
-  ctx.lineTo(0, this.data.h);
-  ctx.lineTo(0, 0);
-  ctx.clip();
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-CVCompElement.prototype.destroy = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.layers = null;
-  this.elements = null;
-};
-
-/* global createSizedArray, ShapePropertyFactory, MaskElement */
-
-function CVMaskElement(data, element) {
-  this.data = data;
-  this.element = element;
-  this.masksProperties = this.data.masksProperties || [];
-  this.viewData = createSizedArray(this.masksProperties.length);
-  var i;
-  var len = this.masksProperties.length;
-  var hasMasks = false;
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      hasMasks = true;
-    }
-    this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
-  }
-  this.hasMasks = hasMasks;
-  if (hasMasks) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-CVMaskElement.prototype.renderFrame = function () {
-  if (!this.hasMasks) {
-    return;
-  }
-  var transform = this.element.finalTransform.mat;
-  var ctx = this.element.canvasContext;
-  var i;
-  var len = this.masksProperties.length;
-  var pt;
-  var pts;
-  var data;
-  ctx.beginPath();
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.masksProperties[i].inv) {
-        ctx.moveTo(0, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
-        ctx.lineTo(0, this.element.globalData.compSize.h);
-        ctx.lineTo(0, 0);
-      }
-      data = this.viewData[i].v;
-      pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
-      ctx.moveTo(pt[0], pt[1]);
-      var j;
-      var jLen = data._length;
-      for (j = 1; j < jLen; j += 1) {
-        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
-        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-      }
-      pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
-      ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-    }
-  }
-  this.element.globalData.renderer.save(true);
-  ctx.clip();
-};
-
-CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
-
-CVMaskElement.prototype.destroy = function () {
-  this.element = null;
-};
-
-/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,
-HierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,
-DashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */
-
-function CVShapeElement(data, globalData, comp) {
-  this.shapes = [];
-  this.shapesData = data.shapes;
-  this.stylesList = [];
-  this.itemsData = [];
-  this.prevViewData = [];
-  this.shapeModifiers = [];
-  this.processedElements = [];
-  this.transformsManager = new ShapeTransformManager();
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
-
-CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
-
-CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false };
-
-CVShapeElement.prototype.dashResetter = [];
-
-CVShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-};
-
-CVShapeElement.prototype.createStyleElement = function (data, transforms) {
-  var styleElem = {
-    data: data,
-    type: data.ty,
-    preTransforms: this.transformsManager.addTransformSequence(transforms),
-    transforms: [],
-    elements: [],
-    closed: data.hd === true,
-  };
-  var elementData = {};
-  if (data.ty === 'fl' || data.ty === 'st') {
-    elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
-    if (!elementData.c.k) {
-      styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
-    }
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
-    elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
-    elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this);
-    elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this);
-    elementData.g = new GradientProperty(this, data.g, this);
-  }
-  elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
-  if (data.ty === 'st' || data.ty === 'gs') {
-    styleElem.lc = lineCapEnum[data.lc || 2];
-    styleElem.lj = lineJoinEnum[data.lj || 2];
-    if (data.lj == 1) { // eslint-disable-line eqeqeq
-      styleElem.ml = data.ml;
-    }
-    elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
-    if (!elementData.w.k) {
-      styleElem.wi = elementData.w.v;
-    }
-    if (data.d) {
-      var d = new DashProperty(this, data.d, 'canvas', this);
-      elementData.d = d;
-      if (!elementData.d.k) {
-        styleElem.da = elementData.d.dashArray;
-        styleElem.do = elementData.d.dashoffset[0];
-      }
-    }
-  } else {
-    styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
-  }
-  this.stylesList.push(styleElem);
-  elementData.style = styleElem;
-  return elementData;
-};
-
-CVShapeElement.prototype.createGroupElement = function () {
-  var elementData = {
-    it: [],
-    prevViewData: [],
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createTransformElement = function (data) {
-  var elementData = {
-    transform: {
-      opacity: 1,
-      _opMdf: false,
-      key: this.transformsManager.getNewKey(),
-      op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
-      mProps: TransformPropertyFactory.getTransformProperty(this, data, this),
-    },
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createShapeElement = function (data) {
-  var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
-
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  return elementData;
-};
-
-CVShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-};
-
-CVShapeElement.prototype.addTransformToStyleList = function (transform) {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.push(transform);
-    }
-  }
-};
-
-CVShapeElement.prototype.removeTransformFromStyleList = function () {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.pop();
-    }
-  }
-};
-
-CVShapeElement.prototype.closeStyles = function (styles) {
-  var i;
-  var len = styles.length;
-  for (i = 0; i < len; i += 1) {
-    styles[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var processedPos;
-  var modifier;
-  var currentTransform;
-  var ownTransforms = [].concat(transforms);
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._shouldRender = shouldRender;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        currentTransform = this.createTransformElement(arr[i]);
-        itemsData[i] = currentTransform;
-      }
-      ownTransforms.push(itemsData[i]);
-      this.addTransformToStyleList(itemsData[i]);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i]);
-      }
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        shouldRender = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  this.removeTransformFromStyleList();
-  this.closeStyles(ownStyles);
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.renderInnerContent = function () {
-  this.transformHelper.opacity = 1;
-  this.transformHelper._opMdf = false;
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-  this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
-};
-
-CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
-  if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
-    groupTransform.opacity = parentTransform.opacity;
-    groupTransform.opacity *= groupTransform.op.v;
-    groupTransform._opMdf = true;
-  }
-};
-
-CVShapeElement.prototype.drawLayer = function () {
-  var i;
-  var len = this.stylesList.length;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var elems;
-  var nodes;
-  var renderer = this.globalData.renderer;
-  var ctx = this.globalData.canvasContext;
-  var type;
-  var currentStyle;
-  for (i = 0; i < len; i += 1) {
-    currentStyle = this.stylesList[i];
-    type = currentStyle.type;
-
-    // Skipping style when
-    // Stroke width equals 0
-    // style should not be rendered (extra unused repeaters)
-    // current opacity equals 0
-    // global opacity equals 0
-    if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
-      renderer.save();
-      elems = currentStyle.elements;
-      if (type === 'st' || type === 'gs') {
-        ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
-        ctx.lineWidth = currentStyle.wi;
-        ctx.lineCap = currentStyle.lc;
-        ctx.lineJoin = currentStyle.lj;
-        ctx.miterLimit = currentStyle.ml || 0;
-      } else {
-        ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
-      }
-      renderer.ctxOpacity(currentStyle.coOp);
-      if (type !== 'st' && type !== 'gs') {
-        ctx.beginPath();
-      }
-      renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
-      jLen = elems.length;
-      for (j = 0; j < jLen; j += 1) {
-        if (type === 'st' || type === 'gs') {
-          ctx.beginPath();
-          if (currentStyle.da) {
-            ctx.setLineDash(currentStyle.da);
-            ctx.lineDashOffset = currentStyle.do;
-          }
-        }
-        nodes = elems[j].trNodes;
-        kLen = nodes.length;
-
-        for (k = 0; k < kLen; k += 1) {
-          if (nodes[k].t === 'm') {
-            ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
-          } else if (nodes[k].t === 'c') {
-            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]);
-          } else {
-            ctx.closePath();
-          }
-        }
-        if (type === 'st' || type === 'gs') {
-          ctx.stroke();
-          if (currentStyle.da) {
-            ctx.setLineDash(this.dashResetter);
-          }
-        }
-      }
-      if (type !== 'st' && type !== 'gs') {
-        ctx.fill(currentStyle.r);
-      }
-      renderer.restore();
-    }
-  }
-};
-
-CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
-  var i;
-  var len = items.length - 1;
-  var groupTransform;
-  groupTransform = parentTransform;
-  for (i = len; i >= 0; i -= 1) {
-    if (items[i].ty === 'tr') {
-      groupTransform = data[i].transform;
-      this.renderShapeTransform(parentTransform, groupTransform);
-    } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
-      this.renderPath(items[i], data[i]);
-    } else if (items[i].ty === 'fl') {
-      this.renderFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'st') {
-      this.renderStroke(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
-      this.renderGradientFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gr') {
-      this.renderShape(groupTransform, items[i].it, data[i].it);
-    } else if (items[i].ty === 'tm') {
-      //
-    }
-  }
-  if (isMain) {
-    this.drawLayer();
-  }
-};
-
-CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
-  if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
-    var shapeNodes = styledShape.trNodes;
-    var paths = shape.paths;
-    var i;
-    var len;
-    var j;
-    var jLen = paths._length;
-    shapeNodes.length = 0;
-    var groupTransformMat = styledShape.transforms.finalTransform;
-    for (j = 0; j < jLen; j += 1) {
-      var pathNodes = paths.shapes[j];
-      if (pathNodes && pathNodes.v) {
-        len = pathNodes._length;
-        for (i = 1; i < len; i += 1) {
-          if (i === 1) {
-            shapeNodes.push({
-              t: 'm',
-              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-            });
-          }
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]),
-          });
-        }
-        if (len === 1) {
-          shapeNodes.push({
-            t: 'm',
-            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-          });
-        }
-        if (pathNodes.c && len) {
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]),
-          });
-          shapeNodes.push({
-            t: 'z',
-          });
-        }
-      }
-    }
-    styledShape.trNodes = shapeNodes;
-  }
-};
-
-CVShapeElement.prototype.renderPath = function (pathData, itemData) {
-  if (pathData.hd !== true && pathData._shouldRender) {
-    var i;
-    var len = itemData.styledShapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
-    }
-  }
-};
-
-CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb('
-        + bmFloor(itemData.c.v[0]) + ','
-        + bmFloor(itemData.c.v[1]) + ','
-        + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-};
-
-CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var grd;
-  if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {
-    var ctx = this.globalData.canvasContext;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
-    if (styleData.t === 1) {
-      grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
-    } else {
-      var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-      var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-      var percent = itemData.h.v;
-      if (percent >= 1) {
-        percent = 0.99;
-      } else if (percent <= -1) {
-        percent = -0.99;
-      }
-      var dist = rad * percent;
-      var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-      var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-      grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
-    }
-
-    var i;
-    var len = styleData.g.p;
-    var cValues = itemData.g.c;
-    var opacity = 1;
-
-    for (i = 0; i < len; i += 1) {
-      if (itemData.g._hasOpacity && itemData.g._collapsable) {
-        opacity = itemData.g.o[i * 2 + 1];
-      }
-      grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
-    }
-    styleElem.grd = grd;
-  }
-  styleElem.coOp = itemData.o.v * groupTransform.opacity;
-};
-
-CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var d = itemData.d;
-  if (d && (d._mdf || this._isFirstFrame)) {
-    styleElem.da = d.dashArray;
-    styleElem.do = d.dashoffset[0];
-  }
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-  if (itemData.w._mdf || this._isFirstFrame) {
-    styleElem.wi = itemData.w.v;
-  }
-};
-
-CVShapeElement.prototype.destroy = function () {
-  this.shapesData = null;
-  this.globalData = null;
-  this.canvasContext = null;
-  this.stylesList.length = 0;
-  this.itemsData.length = 0;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,
-SVGShapeElement, IImageElement */
-
-function CVSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
-
-CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVSolidElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.fillStyle = this.data.sc;
-  ctx.fillRect(0, 0, this.data.sw, this.data.sh);
-  //
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement,
-RenderableElement, ITextElement, createTag, createSizedArray */
-
-function CVTextElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.yOffset = 0;
-  this.fillColorAnim = false;
-  this.strokeColorAnim = false;
-  this.strokeWidthAnim = false;
-  this.stroke = false;
-  this.fill = false;
-  this.justifyOffset = 0;
-  this.currentRender = null;
-  this.renderType = 'canvas';
-  this.values = {
-    fill: 'rgba(0,0,0,0)',
-    stroke: 'rgba(0,0,0,0)',
-    sWidth: 0,
-    fValue: '',
-  };
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
-
-CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
-
-CVTextElement.prototype.buildNewText = function () {
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
-
-  var hasFill = false;
-  if (documentData.fc) {
-    hasFill = true;
-    this.values.fill = this.buildColor(documentData.fc);
-  } else {
-    this.values.fill = 'rgba(0,0,0,0)';
-  }
-  this.fill = hasFill;
-  var hasStroke = false;
-  if (documentData.sc) {
-    hasStroke = true;
-    this.values.stroke = this.buildColor(documentData.sc);
-    this.values.sWidth = documentData.sw;
-  }
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  var i;
-  var len;
-  var letters = documentData.l;
-  var matrixHelper = this.mHelper;
-  this.stroke = hasStroke;
-  this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
-  len = documentData.finalText.length;
-  // this.tHelper.font = this.values.fValue;
-  var charData;
-  var shapeData;
-  var k;
-  var kLen;
-  var shapes;
-  var j;
-  var jLen;
-  var pathNodes;
-  var commands;
-  var pathArr;
-  var singleShape = this.data.singleShape;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var cnt = 0;
-  for (i = 0; i < len; i += 1) {
-    charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-    shapeData = (charData && charData.data) || {};
-    matrixHelper.reset();
-    if (singleShape && letters[i].n) {
-      xPos = -trackingOffset;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      firstLine = false;
-    }
-
-    shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-    jLen = shapes.length;
-    matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-    if (singleShape) {
-      this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-    }
-    commands = createSizedArray(jLen);
-    for (j = 0; j < jLen; j += 1) {
-      kLen = shapes[j].ks.k.i.length;
-      pathNodes = shapes[j].ks.k;
-      pathArr = [];
-      for (k = 1; k < kLen; k += 1) {
-        if (k === 1) {
-          pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
-        }
-        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));
-      }
-      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));
-      commands[j] = pathArr;
-    }
-    if (singleShape) {
-      xPos += letters[i].l;
-      xPos += trackingOffset;
-    }
-    if (this.textSpans[cnt]) {
-      this.textSpans[cnt].elem = commands;
-    } else {
-      this.textSpans[cnt] = { elem: commands };
-    }
-    cnt += 1;
-  }
-};
-
-CVTextElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.font = this.values.fValue;
-  ctx.lineCap = 'butt';
-  ctx.lineJoin = 'miter';
-  ctx.miterLimit = 4;
-
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-  }
-
-  var i;
-  var len;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var renderedLetters = this.textAnimator.renderedLetters;
-
-  var letters = this.textProperty.currentData.l;
-
-  len = letters.length;
-  var renderedLetter;
-  var lastFill = null;
-  var lastStroke = null;
-  var lastStrokeW = null;
-  var commands;
-  var pathArr;
-  for (i = 0; i < len; i += 1) {
-    if (!letters[i].n) {
-      renderedLetter = renderedLetters[i];
-      if (renderedLetter) {
-        this.globalData.renderer.save();
-        this.globalData.renderer.ctxTransform(renderedLetter.p);
-        this.globalData.renderer.ctxOpacity(renderedLetter.o);
-      }
-      if (this.fill) {
-        if (renderedLetter && renderedLetter.fc) {
-          if (lastFill !== renderedLetter.fc) {
-            lastFill = renderedLetter.fc;
-            ctx.fillStyle = renderedLetter.fc;
-          }
-        } else if (lastFill !== this.values.fill) {
-          lastFill = this.values.fill;
-          ctx.fillStyle = this.values.fill;
-        }
-        commands = this.textSpans[i].elem;
-        jLen = commands.length;
-        this.globalData.canvasContext.beginPath();
-        for (j = 0; j < jLen; j += 1) {
-          pathArr = commands[j];
-          kLen = pathArr.length;
-          this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
-          for (k = 2; k < kLen; k += 6) {
-            this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
-          }
-        }
-        this.globalData.canvasContext.closePath();
-        this.globalData.canvasContext.fill();
-        /// ctx.fillText(this.textSpans[i].val,0,0);
-      }
-      if (this.stroke) {
-        if (renderedLetter && renderedLetter.sw) {
-          if (lastStrokeW !== renderedLetter.sw) {
-            lastStrokeW = renderedLetter.sw;
-            ctx.lineWidth = renderedLetter.sw;
-          }
-        } else if (lastStrokeW !== this.values.sWidth) {
-          lastStrokeW = this.values.sWidth;
-          ctx.lineWidth = this.values.sWidth;
-        }
-        if (renderedLetter && renderedLetter.sc) {
-          if (lastStroke !== renderedLetter.sc) {
-            lastStroke = renderedLetter.sc;
-            ctx.strokeStyle = renderedLetter.sc;
-          }
-        } else if (lastStroke !== this.values.stroke) {
-          lastStroke = this.values.stroke;
-          ctx.strokeStyle = this.values.stroke;
-        }
-        commands = this.textSpans[i].elem;
-        jLen = commands.length;
-        this.globalData.canvasContext.beginPath();
-        for (j = 0; j < jLen; j += 1) {
-          pathArr = commands[j];
-          kLen = pathArr.length;
-          this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
-          for (k = 2; k < kLen; k += 6) {
-            this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
-          }
-        }
-        this.globalData.canvasContext.closePath();
-        this.globalData.canvasContext.stroke();
-        /// ctx.strokeText(letters[i].val,0,0);
-      }
-      if (renderedLetter) {
-        this.globalData.renderer.restore();
-      }
-    }
-  }
-};
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, createNS, styleDiv, CVEffects, MaskElement, SVGBaseElement, HybridRenderer */
-
-function HBaseElement() {}
-HBaseElement.prototype = {
-  checkBlendMode: function () {},
-  initRendererElement: function () {
-    this.baseElement = createTag(this.data.tg || 'div');
-    if (this.data.hasMask) {
-      this.svgElement = createNS('svg');
-      this.layerElement = createNS('g');
-      this.maskedElement = this.layerElement;
-      this.svgElement.appendChild(this.layerElement);
-      this.baseElement.appendChild(this.svgElement);
-    } else {
-      this.layerElement = this.baseElement;
-    }
-    styleDiv(this.baseElement);
-  },
-  createContainerElements: function () {
-    this.renderableEffectsManager = new CVEffects(this);
-    this.transformedElement = this.baseElement;
-    this.maskedElement = this.layerElement;
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
-    if (this.finalTransform._matMdf) {
-      var matrixValue = this.finalTransform.mat.toCSS();
-      transformedElementStyle.transform = matrixValue;
-      transformedElementStyle.webkitTransform = matrixValue;
-    }
-    if (this.finalTransform._opMdf) {
-      transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
-    }
-  },
-  renderFrame: function () {
-    // If it is exported as hidden (data.hd === true) no need to render
-    // If it is not visible no need to render
-    if (this.data.hd || this.hidden) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.renderElement();
-    this.renderInnerContent();
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.layerElement = null;
-    this.transformedElement = null;
-    if (this.matteElement) {
-      this.matteElement = null;
-    }
-    if (this.maskManager) {
-      this.maskManager.destroy();
-      this.maskManager = null;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-  },
-  addEffects: function () {
-  },
-  setMatte: function () {},
-};
-HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
-HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
-HBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, createNS, createTag */
-
-function HSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
-
-HSolidElement.prototype.createContent = function () {
-  var rect;
-  if (this.data.hasMask) {
-    rect = createNS('rect');
-    rect.setAttribute('width', this.data.sw);
-    rect.setAttribute('height', this.data.sh);
-    rect.setAttribute('fill', this.data.sc);
-    this.svgElement.setAttribute('width', this.data.sw);
-    this.svgElement.setAttribute('height', this.data.sh);
-  } else {
-    rect = createTag('div');
-    rect.style.width = this.data.sw + 'px';
-    rect.style.height = this.data.sh + 'px';
-    rect.style.backgroundColor = this.data.sc;
-  }
-  this.layerElement.appendChild(rect);
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, HybridRenderer, ICompElement, HBaseElement */
-
-function HCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = !data.hasMask;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);
-HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
-
-HCompElement.prototype.createContainerElements = function () {
-  this._createBaseContainerElements();
-  // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
-  if (this.data.hasMask) {
-    this.svgElement.setAttribute('width', this.data.w);
-    this.svgElement.setAttribute('height', this.data.h);
-    this.transformedElement = this.baseElement;
-  } else {
-    this.transformedElement = this.layerElement;
-  }
-};
-
-HCompElement.prototype.addTo3dContainer = function (elem, pos) {
-  var j = 0;
-  var nextElement;
-  while (j < pos) {
-    if (this.elements[j] && this.elements[j].getBaseElement) {
-      nextElement = this.elements[j].getBaseElement();
-    }
-    j += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(elem, nextElement);
-  } else {
-    this.layerElement.appendChild(elem);
-  }
-};
-
-/* global createNS, extendPrototype, BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement,
-HierarchyElement, FrameElement, RenderableElement, createNS, bmMin, bmSqrt, bmMin, bmMax, bmPow */
-
-function HShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.shapesContainer = createNS('g');
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  this.currentBBox = {
-    x: 999999,
-    y: -999999,
-    h: 0,
-    w: 0,
-  };
-}
-extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
-HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
-
-HShapeElement.prototype.createContent = function () {
-  var cont;
-  this.baseElement.style.fontSize = 0;
-  if (this.data.hasMask) {
-    this.layerElement.appendChild(this.shapesContainer);
-    cont = this.svgElement;
-  } else {
-    cont = createNS('svg');
-    var size = this.comp.data ? this.comp.data : this.globalData.compSize;
-    cont.setAttribute('width', size.w);
-    cont.setAttribute('height', size.h);
-    cont.appendChild(this.shapesContainer);
-    this.layerElement.appendChild(cont);
-  }
-
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
-  this.filterUniqueShapes();
-  this.shapeCont = cont;
-};
-
-HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
-  var i;
-  var len = transformers.length;
-  for (i = 0; i < len; i += 1) {
-    point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
-  }
-  return point;
-};
-
-HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
-  var shape = item.sh.v;
-  var transformers = item.transformers;
-  var i;
-  var len = shape._length;
-  var vPoint;
-  var oPoint;
-  var nextIPoint;
-  var nextVPoint;
-  if (len <= 1) {
-    return;
-  }
-  for (i = 0; i < len - 1; i += 1) {
-    vPoint = this.getTransformedPoint(transformers, shape.v[i]);
-    oPoint = this.getTransformedPoint(transformers, shape.o[i]);
-    nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
-    nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
-    this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
-  }
-  if (shape.c) {
-    vPoint = this.getTransformedPoint(transformers, shape.v[i]);
-    oPoint = this.getTransformedPoint(transformers, shape.o[i]);
-    nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
-    nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
-    this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
-  }
-};
-
-HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
-  this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
-  var bounds = this.shapeBoundingBox;
-  boundingBox.x = bmMin(bounds.left, boundingBox.x);
-  boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
-  boundingBox.y = bmMin(bounds.top, boundingBox.y);
-  boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
-};
-
-HShapeElement.prototype.shapeBoundingBox = {
-  left: 0,
-  right: 0,
-  top: 0,
-  bottom: 0,
-};
-
-HShapeElement.prototype.tempBoundingBox = {
-  x: 0,
-  xMax: 0,
-  y: 0,
-  yMax: 0,
-  width: 0,
-  height: 0,
-};
-
-HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
-  var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
-
-  for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) { // eslint-disable-line no-plusplus
-    b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
-    a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
-    c = 3 * p1[i] - 3 * p0[i];
-
-    b |= 0; // eslint-disable-line no-bitwise
-    a |= 0; // eslint-disable-line no-bitwise
-    c |= 0; // eslint-disable-line no-bitwise
-
-    if (a === 0 && b === 0) {
-      //
-    } else if (a === 0) {
-      t = -c / b;
-
-      if (t > 0 && t < 1) {
-        bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
-      }
-    } else {
-      b2ac = b * b - 4 * c * a;
-
-      if (b2ac >= 0) {
-        t1 = (-b + bmSqrt(b2ac)) / (2 * a);
-        if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
-        t2 = (-b - bmSqrt(b2ac)) / (2 * a);
-        if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
-      }
-    }
-  }
-
-  this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
-  this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
-  this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
-  this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
-};
-
-HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
-  return bmPow(1 - t, 3) * p0[i]
-        + 3 * bmPow(1 - t, 2) * t * p1[i]
-        + 3 * (1 - t) * bmPow(t, 2) * p2[i]
-        + bmPow(t, 3) * p3[i];
-};
-
-HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
-  var i;
-  var len = itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    if (itemsData[i] && itemsData[i].sh) {
-      this.calculateShapeBoundingBox(itemsData[i], boundingBox);
-    } else if (itemsData[i] && itemsData[i].it) {
-      this.calculateBoundingBox(itemsData[i].it, boundingBox);
-    }
-  }
-};
-
-HShapeElement.prototype.currentBoxContains = function (box) {
-  return this.currentBBox.x <= box.x
-    && this.currentBBox.y <= box.y
-    && this.currentBBox.width + this.currentBBox.x >= box.x + box.width
-    && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
-};
-
-HShapeElement.prototype.renderInnerContent = function () {
-  this._renderShapeFrame();
-
-  if (!this.hidden && (this._isFirstFrame || this._mdf)) {
-    var tempBoundingBox = this.tempBoundingBox;
-    var max = 999999;
-    tempBoundingBox.x = max;
-    tempBoundingBox.xMax = -max;
-    tempBoundingBox.y = max;
-    tempBoundingBox.yMax = -max;
-    this.calculateBoundingBox(this.itemsData, tempBoundingBox);
-    tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
-    tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y;
-    // var tempBoundingBox = this.shapeCont.getBBox();
-    if (this.currentBoxContains(tempBoundingBox)) {
-      return;
-    }
-    var changed = false;
-    if (this.currentBBox.w !== tempBoundingBox.width) {
-      this.currentBBox.w = tempBoundingBox.width;
-      this.shapeCont.setAttribute('width', tempBoundingBox.width);
-      changed = true;
-    }
-    if (this.currentBBox.h !== tempBoundingBox.height) {
-      this.currentBBox.h = tempBoundingBox.height;
-      this.shapeCont.setAttribute('height', tempBoundingBox.height);
-      changed = true;
-    }
-    if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
-      this.currentBBox.w = tempBoundingBox.width;
-      this.currentBBox.h = tempBoundingBox.height;
-      this.currentBBox.x = tempBoundingBox.x;
-      this.currentBBox.y = tempBoundingBox.y;
-
-      this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
-      var shapeStyle = this.shapeCont.style;
-      var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
-      shapeStyle.transform = shapeTransform;
-      shapeStyle.webkitTransform = shapeTransform;
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createTag, styleDiv, createNS, lineJoinEnum, lineCapEnum */
-
-function HTextElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.textPaths = [];
-  this.currentBBox = {
-    x: 999999,
-    y: -999999,
-    h: 0,
-    w: 0,
-  };
-  this.renderType = 'svg';
-  this.isMasked = false;
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
-
-HTextElement.prototype.createContent = function () {
-  this.isMasked = this.checkMasks();
-  if (this.isMasked) {
-    this.renderType = 'svg';
-    this.compW = this.comp.data.w;
-    this.compH = this.comp.data.h;
-    this.svgElement.setAttribute('width', this.compW);
-    this.svgElement.setAttribute('height', this.compH);
-    var g = createNS('g');
-    this.maskedElement.appendChild(g);
-    this.innerElem = g;
-  } else {
-    this.renderType = 'html';
-    this.innerElem = this.layerElement;
-  }
-
-  this.checkParenting();
-};
-
-HTextElement.prototype.buildNewText = function () {
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
-  var innerElemStyle = this.innerElem.style;
-  var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
-  innerElemStyle.fill = textColor;
-  innerElemStyle.color = textColor;
-  if (documentData.sc) {
-    innerElemStyle.stroke = this.buildColor(documentData.sc);
-    innerElemStyle.strokeWidth = documentData.sw + 'px';
-  }
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (!this.globalData.fontManager.chars) {
-    innerElemStyle.fontSize = documentData.finalSize + 'px';
-    innerElemStyle.lineHeight = documentData.finalSize + 'px';
-    if (fontData.fClass) {
-      this.innerElem.className = fontData.fClass;
-    } else {
-      innerElemStyle.fontFamily = fontData.fFamily;
-      var fWeight = documentData.fWeight;
-      var fStyle = documentData.fStyle;
-      innerElemStyle.fontStyle = fStyle;
-      innerElemStyle.fontWeight = fWeight;
-    }
-  }
-  var i;
-  var len;
-
-  var letters = documentData.l;
-  len = letters.length;
-  var tSpan;
-  var tParent;
-  var tCont;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var cnt = 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.globalData.fontManager.chars) {
-      if (!this.textPaths[cnt]) {
-        tSpan = createNS('path');
-        tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
-        tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
-        tSpan.setAttribute('stroke-miterlimit', '4');
-      } else {
-        tSpan = this.textPaths[cnt];
-      }
-      if (!this.isMasked) {
-        if (this.textSpans[cnt]) {
-          tParent = this.textSpans[cnt];
-          tCont = tParent.children[0];
-        } else {
-          tParent = createTag('div');
-          tParent.style.lineHeight = 0;
-          tCont = createNS('svg');
-          tCont.appendChild(tSpan);
-          styleDiv(tParent);
-        }
-      }
-    } else if (!this.isMasked) {
-      if (this.textSpans[cnt]) {
-        tParent = this.textSpans[cnt];
-        tSpan = this.textPaths[cnt];
-      } else {
-        tParent = createTag('span');
-        styleDiv(tParent);
-        tSpan = createTag('span');
-        styleDiv(tSpan);
-        tParent.appendChild(tSpan);
-      }
-    } else {
-      tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
-    }
-    // tSpan.setAttribute('visibility', 'hidden');
-    if (this.globalData.fontManager.chars) {
-      var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-      var shapeData;
-      if (charData) {
-        shapeData = charData.data;
-      } else {
-        shapeData = null;
-      }
-      matrixHelper.reset();
-      if (shapeData && shapeData.shapes) {
-        shapes = shapeData.shapes[0].it;
-        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-        shapeStr = this.createPathShape(matrixHelper, shapes);
-        tSpan.setAttribute('d', shapeStr);
-      }
-      if (!this.isMasked) {
-        this.innerElem.appendChild(tParent);
-        if (shapeData && shapeData.shapes) {
-          // document.body.appendChild is needed to get exact measure of shape
-          document.body.appendChild(tCont);
-          var boundingBox = tCont.getBBox();
-          tCont.setAttribute('width', boundingBox.width + 2);
-          tCont.setAttribute('height', boundingBox.height + 2);
-          tCont.setAttribute('viewBox', (boundingBox.x - 1) + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
-          var tContStyle = tCont.style;
-          var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
-          tContStyle.transform = tContTranslation;
-          tContStyle.webkitTransform = tContTranslation;
-
-          letters[i].yOffset = boundingBox.y - 1;
-        } else {
-          tCont.setAttribute('width', 1);
-          tCont.setAttribute('height', 1);
-        }
-        tParent.appendChild(tCont);
-      } else {
-        this.innerElem.appendChild(tSpan);
-      }
-    } else {
-      tSpan.textContent = letters[i].val;
-      tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      if (!this.isMasked) {
-        this.innerElem.appendChild(tParent);
-        //
-        var tStyle = tSpan.style;
-        var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
-        tStyle.transform = tSpanTranslation;
-        tStyle.webkitTransform = tSpanTranslation;
-      } else {
-        this.innerElem.appendChild(tSpan);
-      }
-    }
-    //
-    if (!this.isMasked) {
-      this.textSpans[cnt] = tParent;
-    } else {
-      this.textSpans[cnt] = tSpan;
-    }
-    this.textSpans[cnt].style.display = 'block';
-    this.textPaths[cnt] = tSpan;
-    cnt += 1;
-  }
-  while (cnt < this.textSpans.length) {
-    this.textSpans[cnt].style.display = 'none';
-    cnt += 1;
-  }
-};
-
-HTextElement.prototype.renderInnerContent = function () {
-  var svgStyle;
-  if (this.data.singleShape) {
-    if (!this._isFirstFrame && !this.lettersChangedFlag) {
-      return;
-    } if (this.isMasked && this.finalTransform._matMdf) {
-      // Todo Benchmark if using this is better than getBBox
-      this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
-      svgStyle = this.svgElement.style;
-      var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
-      svgStyle.transform = translation;
-      svgStyle.webkitTransform = translation;
-    }
-  }
-
-  this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-  if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
-    return;
-  }
-  var i;
-  var len;
-  var count = 0;
-  var renderedLetters = this.textAnimator.renderedLetters;
-
-  var letters = this.textProperty.currentData.l;
-
-  len = letters.length;
-  var renderedLetter;
-  var textSpan;
-  var textPath;
-  for (i = 0; i < len; i += 1) {
-    if (letters[i].n) {
-      count += 1;
-    } else {
-      textSpan = this.textSpans[i];
-      textPath = this.textPaths[i];
-      renderedLetter = renderedLetters[count];
-      count += 1;
-      if (renderedLetter._mdf.m) {
-        if (!this.isMasked) {
-          textSpan.style.webkitTransform = renderedLetter.m;
-          textSpan.style.transform = renderedLetter.m;
-        } else {
-          textSpan.setAttribute('transform', renderedLetter.m);
-        }
-      }
-      /// /textSpan.setAttribute('opacity',renderedLetter.o);
-      textSpan.style.opacity = renderedLetter.o;
-      if (renderedLetter.sw && renderedLetter._mdf.sw) {
-        textPath.setAttribute('stroke-width', renderedLetter.sw);
-      }
-      if (renderedLetter.sc && renderedLetter._mdf.sc) {
-        textPath.setAttribute('stroke', renderedLetter.sc);
-      }
-      if (renderedLetter.fc && renderedLetter._mdf.fc) {
-        textPath.setAttribute('fill', renderedLetter.fc);
-        textPath.style.color = renderedLetter.fc;
-      }
-    }
-  }
-
-  if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
-    var boundingBox = this.innerElem.getBBox();
-
-    if (this.currentBBox.w !== boundingBox.width) {
-      this.currentBBox.w = boundingBox.width;
-      this.svgElement.setAttribute('width', boundingBox.width);
-    }
-    if (this.currentBBox.h !== boundingBox.height) {
-      this.currentBBox.h = boundingBox.height;
-      this.svgElement.setAttribute('height', boundingBox.height);
-    }
-
-    var margin = 1;
-    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)) {
-      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;
-
-      this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
-      svgStyle = this.svgElement.style;
-      var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
-      svgStyle.transform = svgTransform;
-      svgStyle.webkitTransform = svgTransform;
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement,
-FrameElement, RenderableElement, createNS */
-
-function HImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
-
-HImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  var img = new Image();
-
-  if (this.data.hasMask) {
-    this.imageElem = createNS('image');
-    this.imageElem.setAttribute('width', this.assetData.w + 'px');
-    this.imageElem.setAttribute('height', this.assetData.h + 'px');
-    this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-    this.layerElement.appendChild(this.imageElem);
-    this.baseElement.setAttribute('width', this.assetData.w);
-    this.baseElement.setAttribute('height', this.assetData.h);
-  } else {
-    this.layerElement.appendChild(img);
-  }
-  img.crossOrigin = 'anonymous';
-  img.src = assetPath;
-  if (this.data.ln) {
-    this.baseElement.setAttribute('id', this.data.ln);
-  }
-};
-
-/* global PropertyFactory, degToRads, Matrix, extendPrototype, BaseElement, FrameElement, HierarchyElement */
-
-function HCameraElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initHierarchy();
-  var getProp = PropertyFactory.getProp;
-  this.pe = getProp(this, data.pe, 0, 0, this);
-  if (data.ks.p.s) {
-    this.px = getProp(this, data.ks.p.x, 1, 0, this);
-    this.py = getProp(this, data.ks.p.y, 1, 0, this);
-    this.pz = getProp(this, data.ks.p.z, 1, 0, this);
-  } else {
-    this.p = getProp(this, data.ks.p, 1, 0, this);
-  }
-  if (data.ks.a) {
-    this.a = getProp(this, data.ks.a, 1, 0, this);
-  }
-  if (data.ks.or.k.length && data.ks.or.k[0].to) {
-    var i;
-    var len = data.ks.or.k.length;
-    for (i = 0; i < len; i += 1) {
-      data.ks.or.k[i].to = null;
-      data.ks.or.k[i].ti = null;
-    }
-  }
-  this.or = getProp(this, data.ks.or, 1, degToRads, this);
-  this.or.sh = true;
-  this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
-  this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
-  this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
-  this.mat = new Matrix();
-  this._prevMat = new Matrix();
-  this._isFirstFrame = true;
-
-  // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
-  this.finalTransform = {
-    mProp: this,
-  };
-}
-extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
-
-HCameraElement.prototype.setup = function () {
-  var i;
-  var len = this.comp.threeDElements.length;
-  var comp;
-  var perspectiveStyle;
-  var containerStyle;
-  for (i = 0; i < len; i += 1) {
-    // [perspectiveElem,container]
-    comp = this.comp.threeDElements[i];
-    if (comp.type === '3d') {
-      perspectiveStyle = comp.perspectiveElem.style;
-      containerStyle = comp.container.style;
-      var perspective = this.pe.v + 'px';
-      var origin = '0px 0px 0px';
-      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-      perspectiveStyle.perspective = perspective;
-      perspectiveStyle.webkitPerspective = perspective;
-      containerStyle.transformOrigin = origin;
-      containerStyle.mozTransformOrigin = origin;
-      containerStyle.webkitTransformOrigin = origin;
-      perspectiveStyle.transform = matrix;
-      perspectiveStyle.webkitTransform = matrix;
-    }
-  }
-};
-
-HCameraElement.prototype.createElements = function () {
-};
-
-HCameraElement.prototype.hide = function () {
-};
-
-HCameraElement.prototype.renderFrame = function () {
-  var _mdf = this._isFirstFrame;
-  var i;
-  var len;
-  if (this.hierarchy) {
-    len = this.hierarchy.length;
-    for (i = 0; i < len; i += 1) {
-      _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
-    }
-  }
-  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)) {
-    this.mat.reset();
-
-    if (this.hierarchy) {
-      len = this.hierarchy.length - 1;
-      for (i = len; i >= 0; i -= 1) {
-        var mTransf = this.hierarchy[i].finalTransform.mProp;
-        this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
-        this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
-        this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
-        this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
-        this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
-      }
-    }
-    if (this.p) {
-      this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
-    } else {
-      this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
-    }
-    if (this.a) {
-      var diffVector;
-      if (this.p) {
-        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]];
-      } else {
-        diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
-      }
-      var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2));
-      // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
-      var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
-      var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
-      var mRotationX = (Math.atan2(lookDir[1], lookLengthOnXZ));
-      var mRotationY = (Math.atan2(lookDir[0], -lookDir[2]));
-      this.mat.rotateY(mRotationY).rotateX(-mRotationX);
-    }
-    this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
-    this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
-    this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
-    this.mat.translate(0, 0, this.pe.v);
-
-    var hasMatrixChanged = !this._prevMat.equals(this.mat);
-    if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
-      len = this.comp.threeDElements.length;
-      var comp;
-      var perspectiveStyle;
-      var containerStyle;
-      for (i = 0; i < len; i += 1) {
-        comp = this.comp.threeDElements[i];
-        if (comp.type === '3d') {
-          if (hasMatrixChanged) {
-            var matValue = this.mat.toCSS();
-            containerStyle = comp.container.style;
-            containerStyle.transform = matValue;
-            containerStyle.webkitTransform = matValue;
-          }
-          if (this.pe._mdf) {
-            perspectiveStyle = comp.perspectiveElem.style;
-            perspectiveStyle.perspective = this.pe.v + 'px';
-            perspectiveStyle.webkitPerspective = this.pe.v + 'px';
-          }
-        }
-      }
-      this.mat.clone(this._prevMat);
-    }
-  }
-  this._isFirstFrame = false;
-};
-
-HCameraElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-HCameraElement.prototype.destroy = function () {
-};
-HCameraElement.prototype.getBaseElement = function () { return null; };
-
-function HEffects() {
-}
-HEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
-
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
-    if (expressionsPlugin) {
-      expressionsPlugin.initExpressions(this);
-    }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
-    }
-  }
-};
-
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
-
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
-
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
-    }
-  }
-};
-
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
-
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
-
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
-
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
-    }
-  }
-  return null;
-};
-
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
-
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
-      } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
-      }
-    }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
-
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
-      }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
-      if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
-      }
-    } else {
-      this.setCurrentRawFrameValue(nextValue);
-    }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
-        } else {
-          this.trigger('loopComplete');
-        }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
-      }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
-
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
-      }
-    }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
-      }
-    }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
-    }
-  }
-
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
-
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
-
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
-
-var Expressions = (function () {
-  var ob = {};
-  ob.initExpressions = initExpressions;
-
-  function initExpressions(animation) {
-    var stackCount = 0;
-    var registers = [];
-
-    function pushExpression() {
-      stackCount += 1;
-    }
-
-    function popExpression() {
-      stackCount -= 1;
-      if (stackCount === 0) {
-        releaseInstances();
-      }
-    }
-
-    function registerExpressionProperty(expression) {
-      if (registers.indexOf(expression) === -1) {
-        registers.push(expression);
-      }
-    }
-
-    function releaseInstances() {
-      var i;
-      var len = registers.length;
-      for (i = 0; i < len; i += 1) {
-        registers[i].release();
-      }
-      registers.length = 0;
-    }
-
-    animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-    animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
-    animation.renderer.globalData.pushExpression = pushExpression;
-    animation.renderer.globalData.popExpression = popExpression;
-    animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
-  }
-  return ob;
-}());
-
-expressionsPlugin = Expressions;
-
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
-
-var ExpressionManager = (function () {
-  'use strict';
-
-  var ob = {};
-  var Math = BMMath;
-  var window = null;
-  var document = null;
-  var XMLHttpRequest = null;
-  var fetch = null;
-  var frames = null;
-
-  function $bm_isInstanceOfArray(arr) {
-    return arr.constructor === Array || arr.constructor === Float32Array;
-  }
-
-  function isNumerable(tOfV, v) {
-    return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
-  }
-
-  function $bm_neg(a) {
-    var tOfA = typeof a;
-    if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
-      return -a;
-    }
-    if ($bm_isInstanceOfArray(a)) {
-      var i;
-      var lenA = a.length;
-      var retArr = [];
-      for (i = 0; i < lenA; i += 1) {
-        retArr[i] = -a[i];
-      }
-      return retArr;
-    }
-    if (a.propType) {
-      return a.v;
-    }
-    return -a;
-  }
-
-  var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
-  var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
-  var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
-
-  function sum(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (tOfA === 'string' || tOfB === 'string') {
-      return a + b;
-    }
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a + b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] += b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a + b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] + b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-  var add = sum;
-
-  function sub(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      if (tOfA === 'string') {
-        a = parseInt(a, 10);
-      }
-      if (tOfB === 'string') {
-        b = parseInt(b, 10);
-      }
-      return a - b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] -= b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a - b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] - b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-
-  function mul(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a * b;
-    }
-
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] * b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a * b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-
-  function div(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a / b;
-    }
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] / b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a / b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-  function mod(a, b) {
-    if (typeof a === 'string') {
-      a = parseInt(a, 10);
-    }
-    if (typeof b === 'string') {
-      b = parseInt(b, 10);
-    }
-    return a % b;
-  }
-  var $bm_sum = sum;
-  var $bm_sub = sub;
-  var $bm_mul = mul;
-  var $bm_div = div;
-  var $bm_mod = mod;
-
-  function clamp(num, min, max) {
-    if (min > max) {
-      var mm = max;
-      max = min;
-      min = mm;
-    }
-    return Math.min(Math.max(num, min), max);
-  }
-
-  function radiansToDegrees(val) {
-    return val / degToRads;
-  }
-  var radians_to_degrees = radiansToDegrees;
-
-  function degreesToRadians(val) {
-    return val * degToRads;
-  }
-  var degrees_to_radians = radiansToDegrees;
-
-  var helperLengthArray = [0, 0, 0, 0, 0, 0];
-
-  function length(arr1, arr2) {
-    if (typeof arr1 === 'number' || arr1 instanceof Number) {
-      arr2 = arr2 || 0;
-      return Math.abs(arr1 - arr2);
-    }
-    if (!arr2) {
-      arr2 = helperLengthArray;
-    }
-    var i;
-    var len = Math.min(arr1.length, arr2.length);
-    var addedLength = 0;
-    for (i = 0; i < len; i += 1) {
-      addedLength += Math.pow(arr2[i] - arr1[i], 2);
-    }
-    return Math.sqrt(addedLength);
-  }
-
-  function normalize(vec) {
-    return div(vec, length(vec));
-  }
-
-  function rgbToHsl(val) {
-    var r = val[0]; var g = val[1]; var b = val[2];
-    var max = Math.max(r, g, b);
-    var min = Math.min(r, g, b);
-    var h;
-    var s;
-    var l = (max + min) / 2;
-
-    if (max === min) {
-      h = 0; // achromatic
-      s = 0; // achromatic
-    } else {
-      var d = max - min;
-      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
-      switch (max) {
-        case r: h = (g - b) / d + (g < b ? 6 : 0); break;
-        case g: h = (b - r) / d + 2; break;
-        case b: h = (r - g) / d + 4; break;
-        default: break;
-      }
-      h /= 6;
-    }
-
-    return [h, s, l, val[3]];
-  }
-
-  function hue2rgb(p, q, t) {
-    if (t < 0) t += 1;
-    if (t > 1) t -= 1;
-    if (t < 1 / 6) return p + (q - p) * 6 * t;
-    if (t < 1 / 2) return q;
-    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
-    return p;
-  }
-
-  function hslToRgb(val) {
-    var h = val[0];
-    var s = val[1];
-    var l = val[2];
-
-    var r;
-    var g;
-    var b;
-
-    if (s === 0) {
-      r = l; // achromatic
-      b = l; // achromatic
-      g = l; // achromatic
-    } else {
-      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-      var p = 2 * l - q;
-      r = hue2rgb(p, q, h + 1 / 3);
-      g = hue2rgb(p, q, h);
-      b = hue2rgb(p, q, h - 1 / 3);
-    }
-
-    return [r, g, b, val[3]];
-  }
-
-  function linear(t, tMin, tMax, value1, value2) {
-    if (value1 === undefined || value2 === undefined) {
-      value1 = tMin;
-      value2 = tMax;
-      tMin = 0;
-      tMax = 1;
-    }
-    if (tMax < tMin) {
-      var _tMin = tMax;
-      tMax = tMin;
-      tMin = _tMin;
-    }
-    if (t <= tMin) {
-      return value1;
-    } if (t >= tMax) {
-      return value2;
-    }
-    var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
-    if (!value1.length) {
-      return value1 + (value2 - value1) * perc;
-    }
-    var i;
-    var len = value1.length;
-    var arr = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
-    }
-    return arr;
-  }
-  function random(min, max) {
-    if (max === undefined) {
-      if (min === undefined) {
-        min = 0;
-        max = 1;
-      } else {
-        max = min;
-        min = undefined;
-      }
-    }
-    if (max.length) {
-      var i;
-      var len = max.length;
-      if (!min) {
-        min = createTypedArray('float32', len);
-      }
-      var arr = createTypedArray('float32', len);
-      var rnd = BMMath.random();
-      for (i = 0; i < len; i += 1) {
-        arr[i] = min[i] + rnd * (max[i] - min[i]);
-      }
-      return arr;
-    }
-    if (min === undefined) {
-      min = 0;
-    }
-    var rndm = BMMath.random();
-    return min + rndm * (max - min);
-  }
-
-  function createPath(points, inTangents, outTangents, closed) {
-    var i;
-    var len = points.length;
-    var path = shapePool.newElement();
-    path.setPathData(!!closed, len);
-    var arrPlaceholder = [0, 0];
-    var inVertexPoint;
-    var outVertexPoint;
-    for (i = 0; i < len; i += 1) {
-      inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
-      outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
-      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);
-    }
-    return path;
-  }
-
-  function initiateExpression(elem, data, property) {
-    var val = data.x;
-    var needsVelocity = /velocity(?![\w\d])/.test(val);
-    var _needsRandom = val.indexOf('random') !== -1;
-    var elemType = elem.data.ty;
-    var transform;
-    var $bm_transform;
-    var content;
-    var effect;
-    var thisProperty = property;
-    thisProperty.valueAtTime = thisProperty.getValueAtTime;
-    Object.defineProperty(thisProperty, 'value', {
-      get: function () {
-        return thisProperty.v;
-      },
-    });
-    elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
-    elem.comp.displayStartTime = 0;
-    var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    var outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    var width = elem.data.sw ? elem.data.sw : 0;
-    var height = elem.data.sh ? elem.data.sh : 0;
-    var name = elem.data.nm;
-    var loopIn;
-    var loop_in;
-    var loopOut;
-    var loop_out;
-    var smooth;
-    var toWorld;
-    var fromWorld;
-    var fromComp;
-    var toComp;
-    var fromCompToSurface;
-    var position;
-    var rotation;
-    var anchorPoint;
-    var scale;
-    var thisLayer;
-    var thisComp;
-    var mask;
-    var valueAtTime;
-    var velocityAtTime;
-
-    var scoped_bm_rt;
-    // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
-    var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
-    var numKeys = property.kf ? data.k.length : 0;
-
-    var active = !this.data || this.data.hd !== true;
-
-    var wiggle = function wiggle(freq, amp) {
-      var iWiggle;
-      var j;
-      var lenWiggle = this.pv.length ? this.pv.length : 1;
-      var addedAmps = createTypedArray('float32', lenWiggle);
-      freq = 5;
-      var iterations = Math.floor(time * freq);
-      iWiggle = 0;
-      j = 0;
-      while (iWiggle < iterations) {
-        // var rnd = BMMath.random();
-        for (j = 0; j < lenWiggle; j += 1) {
-          addedAmps[j] += -amp + amp * 2 * BMMath.random();
-          // addedAmps[j] += -amp + amp*2*rnd;
-        }
-        iWiggle += 1;
-      }
-      // var rnd2 = BMMath.random();
-      var periods = time * freq;
-      var perc = periods - Math.floor(periods);
-      var arr = createTypedArray('float32', lenWiggle);
-      if (lenWiggle > 1) {
-        for (j = 0; j < lenWiggle; j += 1) {
-          arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;
-          // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
-          // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
-        }
-        return arr;
-      }
-      return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
-    }.bind(this);
-
-    if (thisProperty.loopIn) {
-      loopIn = thisProperty.loopIn.bind(thisProperty);
-      loop_in = loopIn;
-    }
-
-    if (thisProperty.loopOut) {
-      loopOut = thisProperty.loopOut.bind(thisProperty);
-      loop_out = loopOut;
-    }
-
-    if (thisProperty.smooth) {
-      smooth = thisProperty.smooth.bind(thisProperty);
-    }
-
-    function loopInDuration(type, duration) {
-      return loopIn(type, duration, true);
-    }
-
-    function loopOutDuration(type, duration) {
-      return loopOut(type, duration, true);
-    }
-
-    if (this.getValueAtTime) {
-      valueAtTime = this.getValueAtTime.bind(this);
-    }
-
-    if (this.getVelocityAtTime) {
-      velocityAtTime = this.getVelocityAtTime.bind(this);
-    }
-
-    var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
-
-    function lookAt(elem1, elem2) {
-      var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
-      var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
-      var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
-      return [yaw, pitch, 0];
-    }
-
-    function easeOut(t, tMin, tMax, val1, val2) {
-      return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function easeIn(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInBez, t, tMin, tMax, val1, val2);
-    }
-
-    function ease(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function applyEase(fn, t, tMin, tMax, val1, val2) {
-      if (val1 === undefined) {
-        val1 = tMin;
-        val2 = tMax;
-      } else {
-        t = (t - tMin) / (tMax - tMin);
-      }
-      if (t > 1) {
-        t = 1;
-      } else if (t < 0) {
-        t = 0;
-      }
-      var mult = fn(t);
-      if ($bm_isInstanceOfArray(val1)) {
-        var iKey;
-        var lenKey = val1.length;
-        var arr = createTypedArray('float32', lenKey);
-        for (iKey = 0; iKey < lenKey; iKey += 1) {
-          arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
-        }
-        return arr;
-      }
-      return (val2 - val1) * mult + val1;
-    }
-
-    function nearestKey(time) {
-      var iKey;
-      var lenKey = data.k.length;
-      var index;
-      var keyTime;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        index = 0;
-        keyTime = 0;
-      } else {
-        index = -1;
-        time *= elem.comp.globalData.frameRate;
-        if (time < data.k[0].t) {
-          index = 1;
-          keyTime = data.k[0].t;
-        } else {
-          for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
-            if (time === data.k[iKey].t) {
-              index = iKey + 1;
-              keyTime = data.k[iKey].t;
-              break;
-            } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
-              if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
-                index = iKey + 2;
-                keyTime = data.k[iKey + 1].t;
-              } else {
-                index = iKey + 1;
-                keyTime = data.k[iKey].t;
-              }
-              break;
-            }
-          }
-          if (index === -1) {
-            index = iKey + 1;
-            keyTime = data.k[iKey].t;
-          }
-        }
-      }
-      var obKey = {};
-      obKey.index = index;
-      obKey.time = keyTime / elem.comp.globalData.frameRate;
-      return obKey;
-    }
-
-    function key(ind) {
-      var obKey;
-      var iKey;
-      var lenKey;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        throw new Error('The property has no keyframe at index ' + ind);
-      }
-      ind -= 1;
-      obKey = {
-        time: data.k[ind].t / elem.comp.globalData.frameRate,
-        value: [],
-      };
-      var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
-
-      lenKey = arr.length;
-      for (iKey = 0; iKey < lenKey; iKey += 1) {
-        obKey[iKey] = arr[iKey];
-        obKey.value[iKey] = arr[iKey];
-      }
-      return obKey;
-    }
-
-    function framesToTime(fr, fps) {
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return fr / fps;
-    }
-
-    function timeToFrames(t, fps) {
-      if (!t && t !== 0) {
-        t = time;
-      }
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return t * fps;
-    }
-
-    function seedRandom(seed) {
-      BMMath.seedrandom(randSeed + seed);
-    }
-
-    function sourceRectAtTime() {
-      return elem.sourceRectAtTime();
-    }
-
-    function substring(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substring(init);
-        }
-        return value.substring(init, end);
-      }
-      return '';
-    }
-
-    function substr(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substr(init);
-        }
-        return value.substr(init, end);
-      }
-      return '';
-    }
-
-    function posterizeTime(framesPerSecond) {
-      time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
-      value = valueAtTime(time);
-    }
-
-    var time;
-    var velocity;
-    var value;
-    var text;
-    var textIndex;
-    var textTotal;
-    var selectorValue;
-    var index = elem.data.ind;
-    var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-    var parent;
-    var randSeed = Math.floor(Math.random() * 1000000);
-    var globalData = elem.globalData;
-    function executeExpression(_value) {
-      // globalData.pushExpression();
-      value = _value;
-      if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
-        return value;
-      }
-      if (this.propType === 'textSelector') {
-        textIndex = this.textIndex;
-        textTotal = this.textTotal;
-        selectorValue = this.selectorValue;
-      }
-      if (!thisLayer) {
-        text = elem.layerInterface.text;
-        thisLayer = elem.layerInterface;
-        thisComp = elem.comp.compInterface;
-        toWorld = thisLayer.toWorld.bind(thisLayer);
-        fromWorld = thisLayer.fromWorld.bind(thisLayer);
-        fromComp = thisLayer.fromComp.bind(thisLayer);
-        toComp = thisLayer.toComp.bind(thisLayer);
-        mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
-        fromCompToSurface = fromComp;
-      }
-      if (!transform) {
-        transform = elem.layerInterface('ADBE Transform Group');
-        $bm_transform = transform;
-        if (transform) {
-          anchorPoint = transform.anchorPoint;
-          /* position = transform.position;
-                    rotation = transform.rotation;
-                    scale = transform.scale; */
-        }
-      }
-
-      if (elemType === 4 && !content) {
-        content = thisLayer('ADBE Root Vectors Group');
-      }
-      if (!effect) {
-        effect = thisLayer(4);
-      }
-      hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-      if (hasParent && !parent) {
-        parent = elem.hierarchy[0].layerInterface;
-      }
-      time = this.comp.renderedFrame / this.comp.globalData.frameRate;
-      if (_needsRandom) {
-        seedRandom(randSeed + time);
-      }
-      if (needsVelocity) {
-        velocity = velocityAtTime(time);
-      }
-      expression_function();
-      this.frameExpressionId = elem.globalData.frameId;
-
-      // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
-      return scoped_bm_rt;
-    }
-    return executeExpression;
-  }
-
-  ob.initiateExpression = initiateExpression;
-  return ob;
-}());
-
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
-
-var expressionHelpers = (function () {
-  function searchExpressions(elem, data, prop) {
-    if (data.x) {
-      prop.k = true;
-      prop.x = true;
-      prop.initiateExpression = ExpressionManager.initiateExpression;
-      prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
-    }
-  }
-
-  function getValueAtTime(frameNum) {
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastFrame) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
-      this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
-      this._cachingAtTime.lastFrame = frameNum;
-    }
-    return this._cachingAtTime.value;
-  }
-
-  function getSpeedAtTime(frameNum) {
-    var delta = -0.01;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var speed = 0;
-    if (v1.length) {
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        speed += Math.pow(v2[i] - v1[i], 2);
-      }
-      speed = Math.sqrt(speed) * 100;
-    } else {
-      speed = 0;
-    }
-    return speed;
-  }
-
-  function getVelocityAtTime(frameNum) {
-    if (this.vel !== undefined) {
-      return this.vel;
-    }
-    var delta = -0.001;
-    // frameNum += this.elem.data.st;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var velocity;
-    if (v1.length) {
-      velocity = createTypedArray('float32', v1.length);
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        // removing frameRate
-        // if needed, don't add it here
-        // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
-        velocity[i] = (v2[i] - v1[i]) / delta;
-      }
-    } else {
-      velocity = (v2 - v1) / delta;
-    }
-    return velocity;
-  }
-
-  function getStaticValueAtTime() {
-    return this.pv;
-  }
-
-  function setGroupProperty(propertyGroup) {
-    this.propertyGroup = propertyGroup;
-  }
-
-  return {
-    searchExpressions: searchExpressions,
-    getSpeedAtTime: getSpeedAtTime,
-    getVelocityAtTime: getVelocityAtTime,
-    getValueAtTime: getValueAtTime,
-    getStaticValueAtTime: getStaticValueAtTime,
-    setGroupProperty: setGroupProperty,
-  };
-}());
-
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
-
-(function addPropertyDecorator() {
-  function loopOut(type, duration, durationFlag) {
-    if (!this.k || !this.keyframes) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var lastKeyFrame = keyframes[keyframes.length - 1].t;
-    if (currentFrame <= lastKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var firstKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
-      } else {
-        cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
-      }
-      firstKeyFrame = lastKeyFrame - cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (iterations % 2 !== 0) {
-          return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = (endV[i] - initV[i]) * repeats + current[i];
-        }
-        return ret;
-      }
-      return (endV - initV) * repeats + current;
-    } else if (type === 'continue') {
-      var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(lastValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
-        }
-        return ret;
-      }
-      return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);
-    }
-      return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function loopIn(type, duration, durationFlag) {
-    if (!this.k) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var firstKeyFrame = keyframes[0].t;
-    if (currentFrame >= firstKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var lastKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      lastKeyFrame = keyframes[duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
-      } else {
-        cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
-      }
-      lastKeyFrame = firstKeyFrame + cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
-      if (iterations % 2 === 0) {
-          return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);
-      var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
-        }
-        return ret;
-      }
-      return current - (endV - initV) * repeats;
-    } else if (type === 'continue') {
-      var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(firstValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;
-        }
-        return ret;
-      }
-      return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;
-    }
-      return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function smooth(width, samples) {
-    if (!this.k) {
-      return this.pv;
-    }
-    width = (width || 0.4) * 0.5;
-    samples = Math.floor(samples || 5);
-    if (samples <= 1) {
-      return this.pv;
-    }
-    var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
-    var initFrame = currentTime - width;
-    var endFrame = currentTime + width;
-    var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
-    var i = 0;
-    var j = 0;
-    var value;
-    if (this.pv.length) {
-      value = createTypedArray('float32', this.pv.length);
-    } else {
-      value = 0;
-    }
-    var sampleValue;
-    while (i < samples) {
-      sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
-      if (this.pv.length) {
-        for (j = 0; j < this.pv.length; j += 1) {
-          value[j] += sampleValue[j];
-        }
-      } else {
-        value += sampleValue;
-      }
-      i += 1;
-    }
-    if (this.pv.length) {
-      for (j = 0; j < this.pv.length; j += 1) {
-        value[j] /= samples;
-      }
-    } else {
-      value /= samples;
-    }
-    return value;
-  }
-
-  function getTransformValueAtTime(time) {
-    if (!this._transformCachingAtTime) {
-      this._transformCachingAtTime = {
-        v: new Matrix(),
-      };
-    }
-    /// /
-    var matrix = this._transformCachingAtTime.v;
-    matrix.cloneFromProps(this.pre.props);
-    if (this.appliedTransformations < 1) {
-      var anchor = this.a.getValueAtTime(time);
-      matrix.translate(
-        -anchor[0] * this.a.mult,
-        -anchor[1] * this.a.mult,
-        anchor[2] * this.a.mult
-      );
-    }
-    if (this.appliedTransformations < 2) {
-      var scale = this.s.getValueAtTime(time);
-      matrix.scale(
-        scale[0] * this.s.mult,
-        scale[1] * this.s.mult,
-        scale[2] * this.s.mult
-      );
-    }
-    if (this.sk && this.appliedTransformations < 3) {
-      var skew = this.sk.getValueAtTime(time);
-      var skewAxis = this.sa.getValueAtTime(time);
-      matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
-    }
-    if (this.r && this.appliedTransformations < 4) {
-      var rotation = this.r.getValueAtTime(time);
-      matrix.rotate(-rotation * this.r.mult);
-    } else if (!this.r && this.appliedTransformations < 4) {
-      var rotationZ = this.rz.getValueAtTime(time);
-      var rotationY = this.ry.getValueAtTime(time);
-      var rotationX = this.rx.getValueAtTime(time);
-      var orientation = this.or.getValueAtTime(time);
-      matrix.rotateZ(-rotationZ * this.rz.mult)
-        .rotateY(rotationY * this.ry.mult)
-        .rotateX(rotationX * this.rx.mult)
-        .rotateZ(-orientation[2] * this.or.mult)
-        .rotateY(orientation[1] * this.or.mult)
-        .rotateX(orientation[0] * this.or.mult);
-    }
-    if (this.data.p && this.data.p.s) {
-      var positionX = this.px.getValueAtTime(time);
-      var positionY = this.py.getValueAtTime(time);
-      if (this.data.p.z) {
-        var positionZ = this.pz.getValueAtTime(time);
-        matrix.translate(
-          positionX * this.px.mult,
-          positionY * this.py.mult,
-          -positionZ * this.pz.mult
-        );
-      } else {
-        matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
-      }
-    } else {
-      var position = this.p.getValueAtTime(time);
-      matrix.translate(
-        position[0] * this.p.mult,
-        position[1] * this.p.mult,
-        -position[2] * this.p.mult
-      );
-    }
-    return matrix;
-    /// /
-  }
-
-  function getTransformStaticValueAtTime() {
-    return this.v.clone(new Matrix());
-  }
-
-  var getTransformProperty = TransformPropertyFactory.getTransformProperty;
-  TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
-    var prop = getTransformProperty(elem, data, container);
-    if (prop.dynamicProperties.length) {
-      prop.getValueAtTime = getTransformValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    return prop;
-  };
-
-  var propertyGetProp = PropertyFactory.getProp;
-  PropertyFactory.getProp = function (elem, data, type, mult, container) {
-    var prop = propertyGetProp(elem, data, type, mult, container);
-    // prop.getVelocityAtTime = getVelocityAtTime;
-    // prop.loopOut = loopOut;
-    // prop.loopIn = loopIn;
-    if (prop.kf) {
-      prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    prop.loopOut = loopOut;
-    prop.loopIn = loopIn;
-    prop.smooth = smooth;
-    prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
-    prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
-    prop.numKeys = data.a === 1 ? data.k.length : 0;
-    prop.propertyIndex = data.ix;
-    var value = 0;
-    if (type !== 0) {
-      value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
-    }
-    prop._cachingAtTime = {
-      lastFrame: initialDefaultFrame,
-      lastIndex: 0,
-      value: value,
-    };
-    expressionHelpers.searchExpressions(elem, data, prop);
-    if (prop.k) {
-      container.addDynamicProperty(prop);
-    }
-
-    return prop;
-  };
-
-  function getShapeValueAtTime(frameNum) {
-    // For now this caching object is created only when needed instead of creating it when the shape is initialized.
-    if (!this._cachingAtTime) {
-      this._cachingAtTime = {
-        shapeValue: shapePool.clone(this.pv),
-        lastIndex: 0,
-        lastTime: initialDefaultFrame,
-      };
-    }
-
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastTime) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
-      this._cachingAtTime.lastTime = frameNum;
-      this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
-    }
-    return this._cachingAtTime.shapeValue;
-  }
-
-  var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
-  var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
-
-  function ShapeExpressions() {}
-  ShapeExpressions.prototype = {
-    vertices: function (prop, time) {
-      if (this.k) {
-        this.getValue();
-      }
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      var i;
-      var len = shapePath._length;
-      var vertices = shapePath[prop];
-      var points = shapePath.v;
-      var arr = createSizedArray(len);
-      for (i = 0; i < len; i += 1) {
-        if (prop === 'i' || prop === 'o') {
-          arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
-        } else {
-          arr[i] = [vertices[i][0], vertices[i][1]];
-        }
-      }
-      return arr;
-    },
-    points: function (time) {
-      return this.vertices('v', time);
-    },
-    inTangents: function (time) {
-      return this.vertices('i', time);
-    },
-    outTangents: function (time) {
-      return this.vertices('o', time);
-    },
-    isClosed: function () {
-      return this.v.c;
-    },
-    pointOnPath: function (perc, time) {
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      if (!this._segmentsLength) {
-        this._segmentsLength = bez.getSegmentsLength(shapePath);
-      }
-
-      var segmentsLength = this._segmentsLength;
-      var lengths = segmentsLength.lengths;
-      var lengthPos = segmentsLength.totalLength * perc;
-      var i = 0;
-      var len = lengths.length;
-      var accumulatedLength = 0;
-      var pt;
-      while (i < len) {
-        if (accumulatedLength + lengths[i].addedLength > lengthPos) {
-          var initIndex = i;
-          var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
-          var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
-          pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
-          break;
-        } else {
-          accumulatedLength += lengths[i].addedLength;
-        }
-        i += 1;
-      }
-      if (!pt) {
-        pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
-      }
-      return pt;
-    },
-    vectorOnPath: function (perc, time, vectorType) {
-      // perc doesn't use triple equality because it can be a Number object as well as a primitive.
-      if (perc == 1) { // eslint-disable-line eqeqeq
-        perc = this.v.c;
-      } else if (perc == 0) { // eslint-disable-line eqeqeq
-        perc = 0.999;
-      }
-      var pt1 = this.pointOnPath(perc, time);
-      var pt2 = this.pointOnPath(perc + 0.001, time);
-      var xLength = pt2[0] - pt1[0];
-      var yLength = pt2[1] - pt1[1];
-      var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
-      if (magnitude === 0) {
-        return [0, 0];
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
       }
-      var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
-      return unitVector;
-    },
-    tangentOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'tangent');
-    },
-    normalOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'normal');
-    },
-    setGroupProperty: expressionHelpers.setGroupProperty,
-    getValueAtTime: expressionHelpers.getStaticValueAtTime,
-  };
-  extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
-  extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-  KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
-  KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
-
-  var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
-  ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
-    var prop = propertyGetShapeProp(elem, data, type, arr, trims);
-    prop.propertyIndex = data.ix;
-    prop.lock = false;
-    if (type === 3) {
-      expressionHelpers.searchExpressions(elem, data.pt, prop);
-    } else if (type === 4) {
-      expressionHelpers.searchExpressions(elem, data.ks, prop);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
     }
-    return prop;
-  };
-}());
 
-/* global ExpressionManager, TextProperty */
-
-(function addDecorator() {
-  function searchExpressions() {
-    if (this.data.d.x) {
-      this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
-      this.addEffect(this.getExpressionValue.bind(this));
-      return true;
-    }
     return null;
   }
 
-  TextProperty.prototype.getExpressionValue = function (currentValue, text) {
-    var newValue = this.calculateExpression(text);
-    if (currentValue.t !== newValue) {
-      var newData = {};
-      this.copyData(newData, currentValue);
-      newData.t = newValue.toString();
-      newData.__complete = false;
-      return newData;
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
     }
-    return currentValue;
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
   };
 
-  TextProperty.prototype.searchProperty = function () {
-    var isKeyframed = this.searchKeyframes();
-    var hasExpressions = this.searchExpressions();
-    this.kf = isKeyframed || hasExpressions;
-    return this.kf;
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
   };
 
-  TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
 
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-var ShapePathInterface = (
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-  function () {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
       var prop = view.sh;
 
@@ -14987,1602 +7683,10869 @@
         if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
           return interfaceFunction.path;
         }
+
         return null;
       }
 
       var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
       prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
       Object.defineProperties(interfaceFunction, {
         path: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
         shape: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
-        _name: { value: shape.nm },
-        ix: { value: shape.ix },
-        propertyIndex: { value: shape.ix },
-        mn: { value: shape.mn },
-        propertyGroup: { value: propertyGroup },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
       });
       return interfaceFunction;
     };
-  }()
-);
+  }();
 
-/* exported propertyGroupFactory */
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
 
-var propertyGroupFactory = (function () {
-  return function (interfaceFunction, parentPropertyGroup) {
-    return function (val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return parentPropertyGroup(val - 1);
-    };
-  };
-}());
-
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
-  return function (propertyName, propertyGroup) {
-    var interfaceFunction = {
-      _name: propertyName,
-    };
-
-    function _propertyGroup(val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return propertyGroup(val - 1);
-    }
-
-    return _propertyGroup;
-  };
-}());
-
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
-
-var ShapeExpressionInterface = (function () {
-  function iterateElements(shapes, view, propertyGroup) {
-    var arr = [];
-    var i;
-    var len = shapes ? shapes.length : 0;
-    for (i = 0; i < len; i += 1) {
-      if (shapes[i].ty === 'gr') {
-        arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'fl') {
-        arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'st') {
-        arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tm') {
-        arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tr') {
-        // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
-      } else if (shapes[i].ty === 'el') {
-        arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sr') {
-        arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sh') {
-        arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rc') {
-        arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rd') {
-        arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rp') {
-        arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'gf') {
-        arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else {
-        arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
-      }
-    }
-    return arr;
-  }
-
-  function contentsInterfaceFactory(shape, view, propertyGroup) {
-    var interfaces;
-    var interfaceFunction = function _interfaceFunction(value) {
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
-          return interfaces[i];
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
         }
-        i += 1;
       }
-      if (typeof value === 'number') {
-        return interfaces[value - 1];
-      }
-      return null;
-    };
 
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
-    interfaceFunction.numProperties = interfaces.length;
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.transform = transformInterface;
-    interfaceFunction.propertyIndex = shape.cix;
-    interfaceFunction._name = shape.nm;
+      return arr;
+    }
 
-    return interfaceFunction;
-  }
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
 
-  function groupInterfaceFactory(shape, view, propertyGroup) {
-    var interfaceFunction = function _interfaceFunction(value) {
-      switch (value) {
-        case 'ADBE Vectors Group':
-        case 'Contents':
-        case 2:
-          return interfaceFunction.content;
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
           // Not necessary for now. Keeping them here in case a new case appears
           // case 'ADBE Vector Transform Group':
           // case 3:
-        default:
-          return interfaceFunction.transform;
-      }
-    };
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.content = content;
-    interfaceFunction.transform = transformInterface;
-    Object.defineProperty(interfaceFunction, '_name', {
-      get: function () {
-        return shape.nm;
-      },
-    });
-    // interfaceFunction.content = interfaceFunction;
-    interfaceFunction.numProperties = shape.np;
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.nm = shape.nm;
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
 
-  function fillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
     }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
 
-    view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
 
-  function gradientFillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Start Point' || val === 'start point') {
-        return interfaceFunction.startPoint;
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      if (val === 'End Point' || val === 'end point') {
-        return interfaceFunction.endPoint;
-      }
-      if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      startPoint: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      endPoint: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      type: {
-        get: function () {
-          return 'a';
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
-  function defaultInterfaceFactory() {
-    function interfaceFunction() {
-      return null;
-    }
-    return interfaceFunction;
-  }
-
-  function strokeInterfaceFactory(shape, view, propertyGroup) {
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
-    function addPropertyToDashOb(i) {
-      Object.defineProperty(dashOb, shape.d[i].nm, {
-        get: ExpressionPropertyInterface(view.d.dataProps[i].p),
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
       });
-    }
-    var i;
-    var len = shape.d ? shape.d.length : 0;
-    var dashOb = {};
-    for (i = 0; i < len; i += 1) {
-      addPropertyToDashOb(i);
-      view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      } if (val === 'Stroke Width' || val === 'stroke width') {
-        return interfaceFunction.strokeWidth;
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      strokeWidth: {
-        get: ExpressionPropertyInterface(view.w),
-      },
-      dash: {
-        get: function () {
-          return dashOb;
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
-    return interfaceFunction;
-  }
-
-  function trimInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === shape.e.ix || val === 'End' || val === 'end') {
-        return interfaceFunction.end;
-      }
-      if (val === shape.s.ix) {
-        return interfaceFunction.start;
-      }
-      if (val === shape.o.ix) {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-
-    view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.propertyGroup = propertyGroup;
-
-    Object.defineProperties(interfaceFunction, {
-      start: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      end: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function transformInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.a.ix === value || value === 'Anchor Point') {
-        return interfaceFunction.anchorPoint;
-      }
-      if (shape.o.ix === value || value === 'Opacity') {
-        return interfaceFunction.opacity;
-      }
-      if (shape.p.ix === value || value === 'Position') {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
-        return interfaceFunction.rotation;
-      }
-      if (shape.s.ix === value || value === 'Scale') {
-        return interfaceFunction.scale;
-      }
-      if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {
-        return interfaceFunction.skew;
-      }
-      if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {
-        return interfaceFunction.skewAxis;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
-    view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
-    view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (view.transform.mProps.sk) {
-      view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
-      view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
-    }
-    view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      opacity: {
-        get: ExpressionPropertyInterface(view.transform.mProps.o),
-      },
-      position: {
-        get: ExpressionPropertyInterface(view.transform.mProps.p),
-      },
-      anchorPoint: {
-        get: ExpressionPropertyInterface(view.transform.mProps.a),
-      },
-      scale: {
-        get: ExpressionPropertyInterface(view.transform.mProps.s),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(view.transform.mProps.r),
-      },
-      skew: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sk),
-      },
-      skewAxis: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sa),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.ty = 'tr';
-    interfaceFunction.mn = shape.mn;
-    interfaceFunction.propertyGroup = propertyGroup;
-    return interfaceFunction;
-  }
-
-  function ellipseInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.s.ix === value) {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function starInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.rotation;
-      }
-      if (shape.pt.ix === value) {
-        return interfaceFunction.points;
-      }
-      if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
-        return interfaceFunction.outerRadius;
-      }
-      if (shape.os.ix === value) {
-        return interfaceFunction.outerRoundness;
-      }
-      if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
-        return interfaceFunction.innerRadius;
-      }
-      if (shape.is && shape.is.ix === value) {
-        return interfaceFunction.innerRoundness;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
-    prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
-    prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (shape.ir) {
-      prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
-      prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
-    }
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      points: {
-        get: ExpressionPropertyInterface(prop.pt),
-      },
-      outerRadius: {
-        get: ExpressionPropertyInterface(prop.or),
-      },
-      outerRoundness: {
-        get: ExpressionPropertyInterface(prop.os),
-      },
-      innerRadius: {
-        get: ExpressionPropertyInterface(prop.ir),
-      },
-      innerRoundness: {
-        get: ExpressionPropertyInterface(prop.is),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function rectInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.roundness;
-      }
-      if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      roundness: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function roundedInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.r.ix === value || value === 'Round Corners 1') {
-        return interfaceFunction.radius;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      radius: {
-        get: ExpressionPropertyInterface(prop.rd),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function repeaterInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.c.ix === value || value === 'Copies') {
-        return interfaceFunction.copies;
-      } if (shape.o.ix === value || value === 'Offset') {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
-    prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      copies: {
-        get: ExpressionPropertyInterface(prop.c),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(prop.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  return function (shapes, view, propertyGroup) {
-    var interfaces;
-    function _interfaceFunction(value) {
-      if (typeof value === 'number') {
-        value = value === undefined ? 1 : value;
-        if (value === 0) {
-          return propertyGroup;
-        }
-        return interfaces[value - 1];
-      }
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value) {
-          return interfaces[i];
-        }
-        i += 1;
-      }
-      return null;
-    }
-    function parentGroupWrapper() {
-      return propertyGroup;
-    }
-    _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
-    interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
-    _interfaceFunction.numProperties = interfaces.length;
-    _interfaceFunction._name = 'Contents';
-    return _interfaceFunction;
-  };
-}());
-
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
-  return function (elem) {
-    var _prevValue;
-    var _sourceText;
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Text Document':
-          return _thisLayerFunction.sourceText;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisLayerFunction, 'sourceText', {
-      get: function () {
-        elem.textProperty.getValue();
-        var stringValue = elem.textProperty.currentData.t;
-        if (stringValue !== _prevValue) {
-          elem.textProperty.currentData.t = _prevValue;
-          _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
-          // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
-          _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
-        }
-        return _sourceText;
-      },
-    });
-    return _thisLayerFunction;
-  };
-}());
-
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
-
-var LayerExpressionInterface = (function () {
-  function getMatrix(time) {
-    var toWorldMat = new Matrix();
-    if (time !== undefined) {
-      var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
-      propMatrix.clone(toWorldMat);
-    } else {
-      var transformMat = this._elem.finalTransform.mProp;
-      transformMat.applyToMatrix(toWorldMat);
-    }
-    return toWorldMat;
-  }
-
-  function toWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function toWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function fromWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function fromWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function applyPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
-  }
-
-  function invertPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.inversePoint(arr);
-  }
-
-  function fromComp(arr) {
-    var toWorldMat = new Matrix();
-    toWorldMat.reset();
-    this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
-      }
-      return toWorldMat.inversePoint(arr);
-    }
-    return toWorldMat.inversePoint(arr);
-  }
-
-  function sampleImage() {
-    return [1, 1, 1, 1];
-  }
-
-  return function (elem) {
-    var transformInterface;
-
-    function _registerMaskInterface(maskManager) {
-      _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
-    }
-    function _registerEffectsInterface(effects) {
-      _thisLayerFunction.effect = effects;
-    }
-
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Root Vectors Group':
-        case 'Contents':
-        case 2:
-          return _thisLayerFunction.shapeInterface;
-        case 1:
-        case 6:
-        case 'Transform':
-        case 'transform':
-        case 'ADBE Transform Group':
-          return transformInterface;
-        case 4:
-        case 'ADBE Effect Parade':
-        case 'effects':
-        case 'Effects':
-          return _thisLayerFunction.effect;
-        case 'ADBE Text Properties':
-          return _thisLayerFunction.textInterface;
-        default:
-          return null;
-      }
-    }
-    _thisLayerFunction.getMatrix = getMatrix;
-    _thisLayerFunction.invertPoint = invertPoint;
-    _thisLayerFunction.applyPoint = applyPoint;
-    _thisLayerFunction.toWorld = toWorld;
-    _thisLayerFunction.toWorldVec = toWorldVec;
-    _thisLayerFunction.fromWorld = fromWorld;
-    _thisLayerFunction.fromWorldVec = fromWorldVec;
-    _thisLayerFunction.toComp = toWorld;
-    _thisLayerFunction.fromComp = fromComp;
-    _thisLayerFunction.sampleImage = sampleImage;
-    _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-    _thisLayerFunction._elem = elem;
-    transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
-    var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-    Object.defineProperties(_thisLayerFunction, {
-      hasParent: {
-        get: function () {
-          return elem.hierarchy.length;
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
         },
-      },
-      parent: {
-        get: function () {
-          return elem.hierarchy[0].layerInterface;
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
         },
-      },
-      rotation: getDescriptor(transformInterface, 'rotation'),
-      scale: getDescriptor(transformInterface, 'scale'),
-      position: getDescriptor(transformInterface, 'position'),
-      opacity: getDescriptor(transformInterface, 'opacity'),
-      anchorPoint: anchorPointDescriptor,
-      anchor_point: anchorPointDescriptor,
-      transform: {
-        get: function () {
-          return transformInterface;
-        },
-      },
-      active: {
-        get: function () {
-          return elem.isInRange;
-        },
-      },
-    });
-
-    _thisLayerFunction.startTime = elem.data.st;
-    _thisLayerFunction.index = elem.data.ind;
-    _thisLayerFunction.source = elem.data.refId;
-    _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
-    _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
-    _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    _thisLayerFunction._name = elem.data.nm;
-
-    _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
-    _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
-  var outlineInterfaceFactory = (function (elem) {
-    var currentPropertyName = '';
-    var currentProperty = elem.getFootageData();
-    function init() {
-      currentPropertyName = '';
-      currentProperty = elem.getFootageData();
-      return searchProperty;
-    }
-    function searchProperty(value) {
-      if (currentProperty[value]) {
-        currentPropertyName = value;
-        currentProperty = currentProperty[value];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      var propertyNameIndex = value.indexOf(currentPropertyName);
-      if (propertyNameIndex !== -1) {
-        var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
-        currentProperty = currentProperty[index];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      return '';
-    }
-    return init;
-  });
-
-  var dataInterfaceFactory = function (elem) {
-    function interfaceFunction(value) {
-      if (value === 'Outline') {
-        return interfaceFunction.outlineInterface();
-      }
-      return null;
-    }
-
-    interfaceFunction._name = 'Outline';
-    interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
-    return interfaceFunction;
-  };
-
-  return function (elem) {
-    function _interfaceFunction(value) {
-      if (value === 'Data') {
-        return _interfaceFunction.dataInterface;
-      }
-      return null;
-    }
-
-    _interfaceFunction._name = 'Data';
-    _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
-    return _interfaceFunction;
-  };
-}());
-
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
-  return function (comp) {
-    function _thisLayerFunction(name) {
-      var i = 0;
-      var len = comp.layers.length;
-      while (i < len) {
-        if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
-          return comp.elements[i].layerInterface;
-        }
-        i += 1;
-      }
-      return null;
-      // return {active:false};
-    }
-    Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });
-    _thisLayerFunction.layer = _thisLayerFunction;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
-    _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
-    _thisLayerFunction.displayStartTime = 0;
-    _thisLayerFunction.numLayers = comp.layers.length;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
-
-var TransformExpressionInterface = (function () {
-  return function (transform) {
-    function _thisFunction(name) {
-      switch (name) {
-        case 'scale':
-        case 'Scale':
-        case 'ADBE Scale':
-        case 6:
-          return _thisFunction.scale;
-        case 'rotation':
-        case 'Rotation':
-        case 'ADBE Rotation':
-        case 'ADBE Rotate Z':
-        case 10:
-          return _thisFunction.rotation;
-        case 'ADBE Rotate X':
-          return _thisFunction.xRotation;
-        case 'ADBE Rotate Y':
-          return _thisFunction.yRotation;
-        case 'position':
-        case 'Position':
-        case 'ADBE Position':
-        case 2:
-          return _thisFunction.position;
-        case 'ADBE Position_0':
-          return _thisFunction.xPosition;
-        case 'ADBE Position_1':
-          return _thisFunction.yPosition;
-        case 'ADBE Position_2':
-          return _thisFunction.zPosition;
-        case 'anchorPoint':
-        case 'AnchorPoint':
-        case 'Anchor Point':
-        case 'ADBE AnchorPoint':
-        case 1:
-          return _thisFunction.anchorPoint;
-        case 'opacity':
-        case 'Opacity':
-        case 11:
-          return _thisFunction.opacity;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisFunction, 'rotation', {
-      get: ExpressionPropertyInterface(transform.r || transform.rz),
-    });
-
-    Object.defineProperty(_thisFunction, 'zRotation', {
-      get: ExpressionPropertyInterface(transform.rz || transform.r),
-    });
-
-    Object.defineProperty(_thisFunction, 'xRotation', {
-      get: ExpressionPropertyInterface(transform.rx),
-    });
-
-    Object.defineProperty(_thisFunction, 'yRotation', {
-      get: ExpressionPropertyInterface(transform.ry),
-    });
-    Object.defineProperty(_thisFunction, 'scale', {
-      get: ExpressionPropertyInterface(transform.s),
-    });
-    var _px;
-    var _py;
-    var _pz;
-    var _transformFactory;
-    if (transform.p) {
-      _transformFactory = ExpressionPropertyInterface(transform.p);
-    } else {
-      _px = ExpressionPropertyInterface(transform.px);
-      _py = ExpressionPropertyInterface(transform.py);
-      if (transform.pz) {
-        _pz = ExpressionPropertyInterface(transform.pz);
-      }
-    }
-    Object.defineProperty(_thisFunction, 'position', {
-      get: function () {
-        if (transform.p) {
-          return _transformFactory();
-        }
-        return [
-          _px(),
-          _py(),
-          _pz ? _pz() : 0];
-      },
-    });
-
-    Object.defineProperty(_thisFunction, 'xPosition', {
-      get: ExpressionPropertyInterface(transform.px),
-    });
-
-    Object.defineProperty(_thisFunction, 'yPosition', {
-      get: ExpressionPropertyInterface(transform.py),
-    });
-
-    Object.defineProperty(_thisFunction, 'zPosition', {
-      get: ExpressionPropertyInterface(transform.pz),
-    });
-
-    Object.defineProperty(_thisFunction, 'anchorPoint', {
-      get: ExpressionPropertyInterface(transform.a),
-    });
-
-    Object.defineProperty(_thisFunction, 'opacity', {
-      get: ExpressionPropertyInterface(transform.o),
-    });
-
-    Object.defineProperty(_thisFunction, 'skew', {
-      get: ExpressionPropertyInterface(transform.sk),
-    });
-
-    Object.defineProperty(_thisFunction, 'skewAxis', {
-      get: ExpressionPropertyInterface(transform.sa),
-    });
-
-    Object.defineProperty(_thisFunction, 'orientation', {
-      get: ExpressionPropertyInterface(transform.or),
-    });
-
-    return _thisFunction;
-  };
-}());
-
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
-  function registerComposition(comp) {
-    this.compositions.push(comp);
-  }
-
-  return function () {
-    function _thisProjectFunction(name) {
-      var i = 0;
-      var len = this.compositions.length;
-      while (i < len) {
-        if (this.compositions[i].data && this.compositions[i].data.nm === name) {
-          if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
-            this.compositions[i].prepareFrame(this.currentFrame);
+        type: {
+          get: function get() {
+            return 'a';
           }
-          return this.compositions[i].compInterface;
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
         }
-        i += 1;
-      }
-      return null;
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    _thisProjectFunction.compositions = [];
-    _thisProjectFunction.currentFrame = 0;
-
-    _thisProjectFunction.registerComposition = registerComposition;
-
-    return _thisProjectFunction;
-  };
-}());
-
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
-
-var EffectsExpressionInterface = (function () {
-  var ob = {
-    createEffectsInterface: createEffectsInterface,
-  };
-
-  function createEffectsInterface(elem, propertyGroup) {
-    if (elem.effectsManager) {
-      var effectElements = [];
-      var effectsData = elem.data.ef;
-      var i;
-      var len = elem.effectsManager.effectElements.length;
-      for (i = 0; i < len; i += 1) {
-        effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
       }
 
-      var effects = elem.data.ef || [];
-      var groupInterface = function (name) {
-        i = 0;
-        len = effects.length;
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
         while (i < len) {
-          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-            return effectElements[i];
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
           }
+
           i += 1;
         }
+
         return null;
-      };
-      Object.defineProperty(groupInterface, 'numProperties', {
-        get: function () {
-          return effects.length;
-        },
-      });
-      return groupInterface;
-    }
-    return null;
-  }
+      }
 
-  function createGroupInterface(data, elements, propertyGroup, elem) {
-    function groupInterface(name) {
-      var effects = data.ef;
-      var i = 0;
-      var len = effects.length;
-      while (i < len) {
-        if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-          if (effects[i].ty === 5) {
-            return effectElements[i];
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
           }
-          return effectElements[i]();
+
+          return _sourceText;
         }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
         i += 1;
       }
-      throw new Error();
-    }
-    var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
 
-    var effectElements = [];
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
     var i;
-    var len = data.ef.length;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
     for (i = 0; i < len; i += 1) {
-      if (data.ef[i].ty === 5) {
-        effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
     }
 
-    if (data.mn === 'ADBE Color Control') {
-      Object.defineProperty(groupInterface, 'color', {
-        get: function () {
-          return effectElements[0]();
-        },
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
       });
     }
-    Object.defineProperties(groupInterface, {
-      numProperties: {
-        get: function () {
-          return data.np;
-        },
-      },
-      _name: { value: data.nm },
-      propertyGroup: { value: _propertyGroup },
-    });
-    groupInterface.enabled = data.en !== 0;
-    groupInterface.active = groupInterface.enabled;
-    return groupInterface;
-  }
 
-  function createValueInterface(element, type, elem, propertyGroup) {
-    var expressionProperty = ExpressionPropertyInterface(element.p);
-    function interfaceFunction() {
-      if (type === 10) {
-        return elem.comp.compInterface(element.p.v);
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
       }
-      return expressionProperty();
-    }
 
-    if (element.p.setGroupProperty) {
-      element.p.setGroupProperty(PropertyInterface('', propertyGroup));
-    }
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
 
-    return interfaceFunction;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray */
-/* exported MaskManagerInterface */
-
-var MaskManagerInterface = (function () {
-  function MaskInterface(mask, data) {
-    this._mask = mask;
-    this._data = data;
-  }
-  Object.defineProperty(MaskInterface.prototype, 'maskPath', {
-    get: function () {
-      if (this._mask.prop.k) {
-        this._mask.prop.getValue();
-      }
-      return this._mask.prop;
-    },
-  });
-  Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
-    get: function () {
-      if (this._mask.op.k) {
-        this._mask.op.getValue();
-      }
-      return this._mask.op.v * 100;
-    },
-  });
-
-  var MaskManager = function (maskManager) {
-    var _masksInterfaces = createSizedArray(maskManager.viewData.length);
-    var i;
-    var len = maskManager.viewData.length;
-    for (i = 0; i < len; i += 1) {
-      _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
-    }
-
-    var maskFunction = function (name) {
-      i = 0;
-      while (i < len) {
-        if (maskManager.masksProperties[i].nm === name) {
-          return _masksInterfaces[i];
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
         }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
         i += 1;
       }
-      return null;
-    };
-    return maskFunction;
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
   };
-  return MaskManager;
-}());
 
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
-
-var ExpressionPropertyInterface = (function () {
-  var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
-  var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
-
-  function completeProperty(expressionValue, property, type) {
-    Object.defineProperty(expressionValue, 'velocity', {
-      get: function () {
-        return property.getVelocityAtTime(property.comp.currentFrame);
-      },
-    });
-    expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
-    expressionValue.key = function (pos) {
-      if (!expressionValue.numKeys) {
-        return 0;
-      }
-      var value = '';
-      if ('s' in property.keyframes[pos - 1]) {
-        value = property.keyframes[pos - 1].s;
-      } else if ('e' in property.keyframes[pos - 2]) {
-        value = property.keyframes[pos - 2].e;
-      } else {
-        value = property.keyframes[pos - 2].s;
-      }
-      var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
-      valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
-      valueProp.value = type === 'unidimensional' ? value[0] : value;
-      return valueProp;
-    };
-    expressionValue.valueAtTime = property.getValueAtTime;
-    expressionValue.speedAtTime = property.getSpeedAtTime;
-    expressionValue.velocityAtTime = property.getVelocityAtTime;
-    expressionValue.propertyGroup = property.propertyGroup;
-  }
-
-  function UnidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultUnidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var val = property.pv * mult;
-    var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-    expressionValue.value = val;
-    completeProperty(expressionValue, property, 'unidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      val = property.v * mult;
-      if (expressionValue.value !== val) {
-        expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-        expressionValue.value = val;
-        completeProperty(expressionValue, property, 'unidimensional');
-      }
-      return expressionValue;
-    };
-  }
-
-  function MultidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultMultidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var len = (property.data && property.data.l) || property.pv.length;
-    var expressionValue = createTypedArray('float32', len);
-    var arrValue = createTypedArray('float32', len);
-    expressionValue.value = arrValue;
-    completeProperty(expressionValue, property, 'multidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      for (var i = 0; i < len; i += 1) {
-        arrValue[i] = property.v[i] * mult;
-        expressionValue[i] = arrValue[i];
-      }
-      return expressionValue;
-    };
-  }
-
-  // TODO: try to avoid using this getter
-  function defaultGetter() {
-    return defaultUnidimensionalValue;
-  }
-
-  return function (property) {
-    if (!property) {
-      return defaultGetter;
-    } if (property.propType === 'unidimensional') {
-      return UnidimensionalPropertyInterface(property);
-    }
-    return MultidimensionalPropertyInterface(property);
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
   };
-}());
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
 
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
-  function getValueProxy(index, total) {
-    this.textIndex = index + 1;
-    this.textTotal = total;
-    this.v = this.getValue() * this.mult;
-    return this.v;
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
   }
 
-  return function (elem, data) {
-    this.pv = 1;
-    this.comp = elem.comp;
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
     this.elem = elem;
-    this.mult = 0.01;
-    this.propType = 'textSelector';
-    this.textTotal = data.totalChars;
-    this.selectorValue = 100;
-    this.lastValue = [1, 1, 1];
-    this.k = true;
-    this.x = true;
-    this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);
-    this.getMult = getValueProxy;
-    this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
     if (this.kf) {
-      this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
     } else {
-      this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
     }
-    this.setGroupProperty = expressionHelpers.setGroupProperty;
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
   };
-}());
 
-var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
-TextSelectorProp.getTextSelectorProp = function (elem, data, arr) {
-  if (data.t === 1) {
-    return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
   }
-  return propertyGetTextProp(elem, data, arr);
-};
 
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
-
-function SliderEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function AngleEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function ColorEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function PointEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function LayerIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function MaskIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function CheckboxEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function NoValueEffect() {
-  this.p = {};
-}
-
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
-
-function EffectsManager(data, element) {
-  var effects = data.ef || [];
-  this.effectElements = [];
-  var i;
-  var len = effects.length;
-  var effectItem;
-  for (i = 0; i < len; i += 1) {
-    effectItem = new GroupEffect(effects[i], element);
-    this.effectElements.push(effectItem);
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
   }
-}
 
-function GroupEffect(data, element) {
-  this.init(data, element);
-}
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
 
-extendPrototype([DynamicPropertyContainer], GroupEffect);
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
 
-GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
 
-GroupEffect.prototype.init = function (data, element) {
-  this.data = data;
-  this.effectElements = [];
-  this.initDynamicPropertyContainer(element);
-  var i;
-  var len = this.data.ef.length;
-  var eff;
-  var effects = this.data.ef;
-  for (i = 0; i < len; i += 1) {
-    eff = null;
-    switch (effects[i].ty) {
-      case 0:
-        eff = new SliderEffect(effects[i], element, this);
-        break;
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
       case 1:
-        eff = new AngleEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
         break;
+
       case 2:
-        eff = new ColorEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
         break;
-      case 3:
-        eff = new PointEffect(effects[i], element, this);
-        break;
-      case 4:
-      case 7:
-        eff = new CheckboxEffect(effects[i], element, this);
-        break;
-      case 10:
-        eff = new LayerIndexEffect(effects[i], element, this);
-        break;
-      case 11:
-        eff = new MaskIndexEffect(effects[i], element, this);
-        break;
-      case 5:
-        eff = new EffectsManager(effects[i], element, this);
-        break;
-        // case 6:
+
       default:
-        eff = new NoValueEffect(effects[i], element, this);
         break;
     }
-    if (eff) {
-      this.effectElements.push(eff);
-    }
-  }
-};
 
-
-var lottie = {};
-
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
-    }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
-
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
-
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
-
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
-
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
-
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
-
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
-    }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+    matrixHelper.translate(xPos, yPos, 0);
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
 
-return lottie;
-}));
\ No newline at end of file
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVContextData() {
+    this.saved = [];
+    this.cArrPos = 0;
+    this.cTr = new Matrix();
+    this.cO = 1;
+    var i;
+    var len = 15;
+    this.savedOp = createTypedArray('float32', len);
+
+    for (i = 0; i < len; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = len;
+  }
+
+  CVContextData.prototype.duplicate = function () {
+    var newLength = this._length * 2;
+    var currentSavedOp = this.savedOp;
+    this.savedOp = createTypedArray('float32', newLength);
+    this.savedOp.set(currentSavedOp);
+    var i = 0;
+
+    for (i = this._length; i < newLength; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = newLength;
+  };
+
+  CVContextData.prototype.reset = function () {
+    this.cArrPos = 0;
+    this.cTr.reset();
+    this.cO = 1;
+  };
+
+  function ShapeTransformManager() {
+    this.sequences = {};
+    this.sequenceList = [];
+    this.transform_key_count = 0;
+  }
+
+  ShapeTransformManager.prototype = {
+    addTransformSequence: function addTransformSequence(transforms) {
+      var i;
+      var len = transforms.length;
+      var key = '_';
+
+      for (i = 0; i < len; i += 1) {
+        key += transforms[i].transform.key + '_';
+      }
+
+      var sequence = this.sequences[key];
+
+      if (!sequence) {
+        sequence = {
+          transforms: [].concat(transforms),
+          finalTransform: new Matrix(),
+          _mdf: false
+        };
+        this.sequences[key] = sequence;
+        this.sequenceList.push(sequence);
+      }
+
+      return sequence;
+    },
+    processSequence: function processSequence(sequence, isFirstFrame) {
+      var i = 0;
+      var len = sequence.transforms.length;
+      var _mdf = isFirstFrame;
+
+      while (i < len && !isFirstFrame) {
+        if (sequence.transforms[i].transform.mProps._mdf) {
+          _mdf = true;
+          break;
+        }
+
+        i += 1;
+      }
+
+      if (_mdf) {
+        var props;
+        sequence.finalTransform.reset();
+
+        for (i = len - 1; i >= 0; i -= 1) {
+          props = sequence.transforms[i].transform.mProps.v.props;
+          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]);
+        }
+      }
+
+      sequence._mdf = _mdf;
+    },
+    processSequences: function processSequences(isFirstFrame) {
+      var i;
+      var len = this.sequenceList.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.processSequence(this.sequenceList[i], isFirstFrame);
+      }
+    },
+    getNewKey: function getNewKey() {
+      this.transform_key_count += 1;
+      return '_' + this.transform_key_count;
+    }
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function CVMaskElement(data, element) {
+    this.data = data;
+    this.element = element;
+    this.masksProperties = this.data.masksProperties || [];
+    this.viewData = createSizedArray(this.masksProperties.length);
+    var i;
+    var len = this.masksProperties.length;
+    var hasMasks = false;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        hasMasks = true;
+      }
+
+      this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
+    }
+
+    this.hasMasks = hasMasks;
+
+    if (hasMasks) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  CVMaskElement.prototype.renderFrame = function () {
+    if (!this.hasMasks) {
+      return;
+    }
+
+    var transform = this.element.finalTransform.mat;
+    var ctx = this.element.canvasContext;
+    var i;
+    var len = this.masksProperties.length;
+    var pt;
+    var pts;
+    var data;
+    ctx.beginPath();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.masksProperties[i].inv) {
+          ctx.moveTo(0, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
+          ctx.lineTo(0, this.element.globalData.compSize.h);
+          ctx.lineTo(0, 0);
+        }
+
+        data = this.viewData[i].v;
+        pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
+        ctx.moveTo(pt[0], pt[1]);
+        var j;
+        var jLen = data._length;
+
+        for (j = 1; j < jLen; j += 1) {
+          pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
+          ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+        }
+
+        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
+        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+      }
+    }
+
+    this.element.globalData.renderer.save(true);
+    ctx.clip();
+  };
+
+  CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
+
+  CVMaskElement.prototype.destroy = function () {
+    this.element = null;
+  };
+
+  function CVBaseElement() {}
+
+  CVBaseElement.prototype = {
+    createElements: function createElements() {},
+    initRendererElement: function initRendererElement() {},
+    createContainerElements: function createContainerElements() {
+      this.canvasContext = this.globalData.canvasContext;
+      this.renderableEffectsManager = new CVEffects(this);
+    },
+    createContent: function createContent() {},
+    setBlendMode: function setBlendMode() {
+      var globalData = this.globalData;
+
+      if (globalData.blendMode !== this.data.bm) {
+        globalData.blendMode = this.data.bm;
+        var blendModeValue = getBlendMode(this.data.bm);
+        globalData.canvasContext.globalCompositeOperation = blendModeValue;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new CVMaskElement(this.data, this);
+    },
+    hideElement: function hideElement() {
+      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+        this.hidden = true;
+      }
+    },
+    showElement: function showElement() {
+      if (this.isInRange && !this.isTransparent) {
+        this.hidden = false;
+        this._isFirstFrame = true;
+        this.maskManager._isFirstFrame = true;
+      }
+    },
+    renderFrame: function renderFrame() {
+      if (this.hidden || this.data.hd) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.setBlendMode();
+      var forceRealStack = this.data.ty === 0;
+      this.globalData.renderer.save(forceRealStack);
+      this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
+      this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
+      this.renderInnerContent();
+      this.globalData.renderer.restore(forceRealStack);
+
+      if (this.maskManager.hasMasks) {
+        this.globalData.renderer.restore(true);
+      }
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.canvasContext = null;
+      this.data = null;
+      this.globalData = null;
+      this.maskManager.destroy();
+    },
+    mHelper: new Matrix()
+  };
+  CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
+  CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
+
+  function CVShapeData(element, data, styles, transformsManager) {
+    this.styledShapes = [];
+    this.tr = [0, 0, 0, 0, 0, 0];
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
+    var i;
+    var len = styles.length;
+    var styledShape;
+
+    for (i = 0; i < len; i += 1) {
+      if (!styles[i].closed) {
+        styledShape = {
+          transforms: transformsManager.addTransformSequence(styles[i].transforms),
+          trNodes: []
+        };
+        this.styledShapes.push(styledShape);
+        styles[i].elements.push(styledShape);
+      }
+    }
+  }
+
+  CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
+
+  function CVShapeElement(data, globalData, comp) {
+    this.shapes = [];
+    this.shapesData = data.shapes;
+    this.stylesList = [];
+    this.itemsData = [];
+    this.prevViewData = [];
+    this.shapeModifiers = [];
+    this.processedElements = [];
+    this.transformsManager = new ShapeTransformManager();
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
+  CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
+  CVShapeElement.prototype.transformHelper = {
+    opacity: 1,
+    _opMdf: false
+  };
+  CVShapeElement.prototype.dashResetter = [];
+
+  CVShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+  };
+
+  CVShapeElement.prototype.createStyleElement = function (data, transforms) {
+    var styleElem = {
+      data: data,
+      type: data.ty,
+      preTransforms: this.transformsManager.addTransformSequence(transforms),
+      transforms: [],
+      elements: [],
+      closed: data.hd === true
+    };
+    var elementData = {};
+
+    if (data.ty === 'fl' || data.ty === 'st') {
+      elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
+
+      if (!elementData.c.k) {
+        styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
+      }
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
+      elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
+      elementData.h = PropertyFactory.getProp(this, data.h || {
+        k: 0
+      }, 0, 0.01, this);
+      elementData.a = PropertyFactory.getProp(this, data.a || {
+        k: 0
+      }, 0, degToRads, this);
+      elementData.g = new GradientProperty(this, data.g, this);
+    }
+
+    elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      styleElem.lc = lineCapEnum[data.lc || 2];
+      styleElem.lj = lineJoinEnum[data.lj || 2];
+
+      if (data.lj == 1) {
+        // eslint-disable-line eqeqeq
+        styleElem.ml = data.ml;
+      }
+
+      elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
+
+      if (!elementData.w.k) {
+        styleElem.wi = elementData.w.v;
+      }
+
+      if (data.d) {
+        var d = new DashProperty(this, data.d, 'canvas', this);
+        elementData.d = d;
+
+        if (!elementData.d.k) {
+          styleElem.da = elementData.d.dashArray;
+          styleElem["do"] = elementData.d.dashoffset[0];
+        }
+      }
+    } else {
+      styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
+    }
+
+    this.stylesList.push(styleElem);
+    elementData.style = styleElem;
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createGroupElement = function () {
+    var elementData = {
+      it: [],
+      prevViewData: []
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createTransformElement = function (data) {
+    var elementData = {
+      transform: {
+        opacity: 1,
+        _opMdf: false,
+        key: this.transformsManager.getNewKey(),
+        op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
+        mProps: TransformPropertyFactory.getTransformProperty(this, data, this)
+      }
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createShapeElement = function (data) {
+    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    return elementData;
+  };
+
+  CVShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+  };
+
+  CVShapeElement.prototype.addTransformToStyleList = function (transform) {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.push(transform);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.removeTransformFromStyleList = function () {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.pop();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.closeStyles = function (styles) {
+    var i;
+    var len = styles.length;
+
+    for (i = 0; i < len; i += 1) {
+      styles[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var processedPos;
+    var modifier;
+    var currentTransform;
+    var ownTransforms = [].concat(transforms);
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._shouldRender = shouldRender;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          currentTransform = this.createTransformElement(arr[i]);
+          itemsData[i] = currentTransform;
+        }
+
+        ownTransforms.push(itemsData[i]);
+        this.addTransformToStyleList(itemsData[i]);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i]);
+        }
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          shouldRender = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    this.removeTransformFromStyleList();
+    this.closeStyles(ownStyles);
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.renderInnerContent = function () {
+    this.transformHelper.opacity = 1;
+    this.transformHelper._opMdf = false;
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+    this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
+  };
+
+  CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
+    if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+      groupTransform.opacity = parentTransform.opacity;
+      groupTransform.opacity *= groupTransform.op.v;
+      groupTransform._opMdf = true;
+    }
+  };
+
+  CVShapeElement.prototype.drawLayer = function () {
+    var i;
+    var len = this.stylesList.length;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var elems;
+    var nodes;
+    var renderer = this.globalData.renderer;
+    var ctx = this.globalData.canvasContext;
+    var type;
+    var currentStyle;
+
+    for (i = 0; i < len; i += 1) {
+      currentStyle = this.stylesList[i];
+      type = currentStyle.type; // Skipping style when
+      // Stroke width equals 0
+      // style should not be rendered (extra unused repeaters)
+      // current opacity equals 0
+      // global opacity equals 0
+
+      if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
+        renderer.save();
+        elems = currentStyle.elements;
+
+        if (type === 'st' || type === 'gs') {
+          ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
+          ctx.lineWidth = currentStyle.wi;
+          ctx.lineCap = currentStyle.lc;
+          ctx.lineJoin = currentStyle.lj;
+          ctx.miterLimit = currentStyle.ml || 0;
+        } else {
+          ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
+        }
+
+        renderer.ctxOpacity(currentStyle.coOp);
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.beginPath();
+        }
+
+        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
+        jLen = elems.length;
+
+        for (j = 0; j < jLen; j += 1) {
+          if (type === 'st' || type === 'gs') {
+            ctx.beginPath();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(currentStyle.da);
+              ctx.lineDashOffset = currentStyle["do"];
+            }
+          }
+
+          nodes = elems[j].trNodes;
+          kLen = nodes.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            if (nodes[k].t === 'm') {
+              ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
+            } else if (nodes[k].t === 'c') {
+              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]);
+            } else {
+              ctx.closePath();
+            }
+          }
+
+          if (type === 'st' || type === 'gs') {
+            ctx.stroke();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(this.dashResetter);
+            }
+          }
+        }
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.fill(currentStyle.r);
+        }
+
+        renderer.restore();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
+    var i;
+    var len = items.length - 1;
+    var groupTransform;
+    groupTransform = parentTransform;
+
+    for (i = len; i >= 0; i -= 1) {
+      if (items[i].ty === 'tr') {
+        groupTransform = data[i].transform;
+        this.renderShapeTransform(parentTransform, groupTransform);
+      } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
+        this.renderPath(items[i], data[i]);
+      } else if (items[i].ty === 'fl') {
+        this.renderFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'st') {
+        this.renderStroke(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
+        this.renderGradientFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gr') {
+        this.renderShape(groupTransform, items[i].it, data[i].it);
+      } else if (items[i].ty === 'tm') {//
+      }
+    }
+
+    if (isMain) {
+      this.drawLayer();
+    }
+  };
+
+  CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
+    if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
+      var shapeNodes = styledShape.trNodes;
+      var paths = shape.paths;
+      var i;
+      var len;
+      var j;
+      var jLen = paths._length;
+      shapeNodes.length = 0;
+      var groupTransformMat = styledShape.transforms.finalTransform;
+
+      for (j = 0; j < jLen; j += 1) {
+        var pathNodes = paths.shapes[j];
+
+        if (pathNodes && pathNodes.v) {
+          len = pathNodes._length;
+
+          for (i = 1; i < len; i += 1) {
+            if (i === 1) {
+              shapeNodes.push({
+                t: 'm',
+                p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+              });
+            }
+
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
+            });
+          }
+
+          if (len === 1) {
+            shapeNodes.push({
+              t: 'm',
+              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+            });
+          }
+
+          if (pathNodes.c && len) {
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
+            });
+            shapeNodes.push({
+              t: 'z'
+            });
+          }
+        }
+      }
+
+      styledShape.trNodes = shapeNodes;
+    }
+  };
+
+  CVShapeElement.prototype.renderPath = function (pathData, itemData) {
+    if (pathData.hd !== true && pathData._shouldRender) {
+      var i;
+      var len = itemData.styledShapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+  };
+
+  CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var grd;
+
+    if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {
+      var ctx = this.globalData.canvasContext;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (styleData.t === 1) {
+        grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
+      } else {
+        var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+        var percent = itemData.h.v;
+
+        if (percent >= 1) {
+          percent = 0.99;
+        } else if (percent <= -1) {
+          percent = -0.99;
+        }
+
+        var dist = rad * percent;
+        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+        grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
+      }
+
+      var i;
+      var len = styleData.g.p;
+      var cValues = itemData.g.c;
+      var opacity = 1;
+
+      for (i = 0; i < len; i += 1) {
+        if (itemData.g._hasOpacity && itemData.g._collapsable) {
+          opacity = itemData.g.o[i * 2 + 1];
+        }
+
+        grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
+      }
+
+      styleElem.grd = grd;
+    }
+
+    styleElem.coOp = itemData.o.v * groupTransform.opacity;
+  };
+
+  CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var d = itemData.d;
+
+    if (d && (d._mdf || this._isFirstFrame)) {
+      styleElem.da = d.dashArray;
+      styleElem["do"] = d.dashoffset[0];
+    }
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+
+    if (itemData.w._mdf || this._isFirstFrame) {
+      styleElem.wi = itemData.w.v;
+    }
+  };
+
+  CVShapeElement.prototype.destroy = function () {
+    this.shapesData = null;
+    this.globalData = null;
+    this.canvasContext = null;
+    this.stylesList.length = 0;
+    this.itemsData.length = 0;
+  };
+
+  function CVTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.yOffset = 0;
+    this.fillColorAnim = false;
+    this.strokeColorAnim = false;
+    this.strokeWidthAnim = false;
+    this.stroke = false;
+    this.fill = false;
+    this.justifyOffset = 0;
+    this.currentRender = null;
+    this.renderType = 'canvas';
+    this.values = {
+      fill: 'rgba(0,0,0,0)',
+      stroke: 'rgba(0,0,0,0)',
+      sWidth: 0,
+      fValue: ''
+    };
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
+  CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
+
+  CVTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var hasFill = false;
+
+    if (documentData.fc) {
+      hasFill = true;
+      this.values.fill = this.buildColor(documentData.fc);
+    } else {
+      this.values.fill = 'rgba(0,0,0,0)';
+    }
+
+    this.fill = hasFill;
+    var hasStroke = false;
+
+    if (documentData.sc) {
+      hasStroke = true;
+      this.values.stroke = this.buildColor(documentData.sc);
+      this.values.sWidth = documentData.sw;
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+    var i;
+    var len;
+    var letters = documentData.l;
+    var matrixHelper = this.mHelper;
+    this.stroke = hasStroke;
+    this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
+    len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;
+
+    var charData;
+    var shapeData;
+    var k;
+    var kLen;
+    var shapes;
+    var j;
+    var jLen;
+    var pathNodes;
+    var commands;
+    var pathArr;
+    var singleShape = this.data.singleShape;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+      shapeData = charData && charData.data || {};
+      matrixHelper.reset();
+
+      if (singleShape && letters[i].n) {
+        xPos = -trackingOffset;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        firstLine = false;
+      }
+
+      shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
+      jLen = shapes.length;
+      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+      if (singleShape) {
+        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+      }
+
+      commands = createSizedArray(jLen - 1);
+      var commandsCounter = 0;
+
+      for (j = 0; j < jLen; j += 1) {
+        if (shapes[j].ty === 'sh') {
+          kLen = shapes[j].ks.k.i.length;
+          pathNodes = shapes[j].ks.k;
+          pathArr = [];
+
+          for (k = 1; k < kLen; k += 1) {
+            if (k === 1) {
+              pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+            }
+
+            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));
+          }
+
+          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));
+          commands[commandsCounter] = pathArr;
+          commandsCounter += 1;
+        }
+      }
+
+      if (singleShape) {
+        xPos += letters[i].l;
+        xPos += trackingOffset;
+      }
+
+      if (this.textSpans[cnt]) {
+        this.textSpans[cnt].elem = commands;
+      } else {
+        this.textSpans[cnt] = {
+          elem: commands
+        };
+      }
+
+      cnt += 1;
+    }
+  };
+
+  CVTextElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.font = this.values.fValue;
+    ctx.lineCap = 'butt';
+    ctx.lineJoin = 'miter';
+    ctx.miterLimit = 4;
+
+    if (!this.data.singleShape) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+    }
+
+    var i;
+    var len;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var lastFill = null;
+    var lastStroke = null;
+    var lastStrokeW = null;
+    var commands;
+    var pathArr;
+
+    for (i = 0; i < len; i += 1) {
+      if (!letters[i].n) {
+        renderedLetter = renderedLetters[i];
+
+        if (renderedLetter) {
+          this.globalData.renderer.save();
+          this.globalData.renderer.ctxTransform(renderedLetter.p);
+          this.globalData.renderer.ctxOpacity(renderedLetter.o);
+        }
+
+        if (this.fill) {
+          if (renderedLetter && renderedLetter.fc) {
+            if (lastFill !== renderedLetter.fc) {
+              lastFill = renderedLetter.fc;
+              ctx.fillStyle = renderedLetter.fc;
+            }
+          } else if (lastFill !== this.values.fill) {
+            lastFill = this.values.fill;
+            ctx.fillStyle = this.values.fill;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);
+        }
+
+        if (this.stroke) {
+          if (renderedLetter && renderedLetter.sw) {
+            if (lastStrokeW !== renderedLetter.sw) {
+              lastStrokeW = renderedLetter.sw;
+              ctx.lineWidth = renderedLetter.sw;
+            }
+          } else if (lastStrokeW !== this.values.sWidth) {
+            lastStrokeW = this.values.sWidth;
+            ctx.lineWidth = this.values.sWidth;
+          }
+
+          if (renderedLetter && renderedLetter.sc) {
+            if (lastStroke !== renderedLetter.sc) {
+              lastStroke = renderedLetter.sc;
+              ctx.strokeStyle = renderedLetter.sc;
+            }
+          } else if (lastStroke !== this.values.stroke) {
+            lastStroke = this.values.stroke;
+            ctx.strokeStyle = this.values.stroke;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);
+        }
+
+        if (renderedLetter) {
+          this.globalData.renderer.restore();
+        }
+      }
+    }
+  };
+
+  function CVImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.img = globalData.imageLoader.getAsset(this.assetData);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
+  CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVImageElement.prototype.createContent = function () {
+    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
+      var canvas = createTag('canvas');
+      canvas.width = this.assetData.w;
+      canvas.height = this.assetData.h;
+      var ctx = canvas.getContext('2d');
+      var imgW = this.img.width;
+      var imgH = this.img.height;
+      var imgRel = imgW / imgH;
+      var canvasRel = this.assetData.w / this.assetData.h;
+      var widthCrop;
+      var heightCrop;
+      var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
+
+      if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {
+        heightCrop = imgH;
+        widthCrop = heightCrop * canvasRel;
+      } else {
+        widthCrop = imgW;
+        heightCrop = widthCrop / canvasRel;
+      }
+
+      ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
+      this.img = canvas;
+    }
+  };
+
+  CVImageElement.prototype.renderInnerContent = function () {
+    this.canvasContext.drawImage(this.img, 0, 0);
+  };
+
+  CVImageElement.prototype.destroy = function () {
+    this.img = null;
+  };
+
+  function CVSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
+  CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVSolidElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.fillStyle = this.data.sc;
+    ctx.fillRect(0, 0, this.data.sw, this.data.sh); //
+  };
+
+  function CanvasRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([BaseRenderer], CanvasRendererBase);
+
+  CanvasRendererBase.prototype.createShape = function (data) {
+    return new CVShapeElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createText = function (data) {
+    return new CVTextElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createImage = function (data) {
+    return new CVImageElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createSolid = function (data) {
+    return new CVSolidElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  CanvasRendererBase.prototype.ctxTransform = function (props) {
+    if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
+      return;
+    }
+
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
+      return;
+    }
+
+    this.transformMat.cloneFromProps(props);
+    var cProps = this.contextData.cTr.props;
+    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]); // 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]);
+
+    this.contextData.cTr.cloneFromProps(this.transformMat.props);
+    var trProps = this.contextData.cTr.props;
+    this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
+  };
+
+  CanvasRendererBase.prototype.ctxOpacity = function (op) {
+    /* if(op === 1){
+          return;
+      } */
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+      return;
+    }
+
+    this.contextData.cO *= op < 0 ? 0 : op;
+
+    if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
+      this.canvasContext.globalAlpha = this.contextData.cO;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+    }
+  };
+
+  CanvasRendererBase.prototype.reset = function () {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    this.contextData.reset();
+  };
+
+  CanvasRendererBase.prototype.save = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.save();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.save();
+    }
+
+    var props = this.contextData.cTr.props;
+
+    if (this.contextData._length <= this.contextData.cArrPos) {
+      this.contextData.duplicate();
+    }
+
+    var i;
+    var arr = this.contextData.saved[this.contextData.cArrPos];
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = props[i];
+    }
+
+    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
+    this.contextData.cArrPos += 1;
+  };
+
+  CanvasRendererBase.prototype.restore = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.restore();
+      this.globalData.blendMode = 'source-over';
+    }
+
+    this.contextData.cArrPos -= 1;
+    var popped = this.contextData.saved[this.contextData.cArrPos];
+    var i;
+    var arr = this.contextData.cTr.props;
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = popped[i];
+    }
+
+    this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
+    popped = this.contextData.savedOp[this.contextData.cArrPos];
+    this.contextData.cO = popped;
+
+    if (this.globalData.currentGlobalAlpha !== popped) {
+      this.canvasContext.globalAlpha = popped;
+      this.globalData.currentGlobalAlpha = popped;
+    }
+  };
+
+  CanvasRendererBase.prototype.configAnimation = function (animData) {
+    if (this.animationItem.wrapper) {
+      this.animationItem.container = createTag('canvas');
+      var containerStyle = this.animationItem.container.style;
+      containerStyle.width = '100%';
+      containerStyle.height = '100%';
+      var origin = '0px 0px 0px';
+      containerStyle.transformOrigin = origin;
+      containerStyle.mozTransformOrigin = origin;
+      containerStyle.webkitTransformOrigin = origin;
+      containerStyle['-webkit-transform'] = origin;
+      containerStyle.contentVisibility = this.renderConfig.contentVisibility;
+      this.animationItem.wrapper.appendChild(this.animationItem.container);
+      this.canvasContext = this.animationItem.container.getContext('2d');
+
+      if (this.renderConfig.className) {
+        this.animationItem.container.setAttribute('class', this.renderConfig.className);
+      }
+
+      if (this.renderConfig.id) {
+        this.animationItem.container.setAttribute('id', this.renderConfig.id);
+      }
+    } else {
+      this.canvasContext = this.renderConfig.context;
+    }
+
+    this.data = animData;
+    this.layers = animData.layers;
+    this.transformCanvas = {
+      w: animData.w,
+      h: animData.h,
+      sx: 0,
+      sy: 0,
+      tx: 0,
+      ty: 0
+    };
+    this.setupGlobalData(animData, document.body);
+    this.globalData.canvasContext = this.canvasContext;
+    this.globalData.renderer = this;
+    this.globalData.isDashed = false;
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.transformCanvas = this.transformCanvas;
+    this.elements = createSizedArray(animData.layers.length);
+    this.updateContainerSize();
+  };
+
+  CanvasRendererBase.prototype.updateContainerSize = function () {
+    this.reset();
+    var elementWidth;
+    var elementHeight;
+
+    if (this.animationItem.wrapper && this.animationItem.container) {
+      elementWidth = this.animationItem.wrapper.offsetWidth;
+      elementHeight = this.animationItem.wrapper.offsetHeight;
+      this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
+      this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
+    } else {
+      elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+      elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
+    }
+
+    var elementRel;
+    var animationRel;
+
+    if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
+      var par = this.renderConfig.preserveAspectRatio.split(' ');
+      var fillType = par[1] || 'meet';
+      var pos = par[0] || 'xMidYMid';
+      var xPos = pos.substr(0, 4);
+      var yPos = pos.substr(4);
+      elementRel = elementWidth / elementHeight;
+      animationRel = this.transformCanvas.w / this.transformCanvas.h;
+
+      if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {
+        this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      } else {
+        this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      }
+
+      if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;
+      } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.tx = 0;
+      }
+
+      if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;
+      } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.ty = 0;
+      }
+    } else if (this.renderConfig.preserveAspectRatio === 'none') {
+      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    } else {
+      this.transformCanvas.sx = this.renderConfig.dpr;
+      this.transformCanvas.sy = this.renderConfig.dpr;
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    }
+
+    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];
+    /* var i, len = this.elements.length;
+      for(i=0;i<len;i+=1){
+          if(this.elements[i] && this.elements[i].data.ty === 0){
+              this.elements[i].resize(this.globalData.transformCanvas);
+          }
+      } */
+
+    this.ctxTransform(this.transformCanvas.props);
+    this.canvasContext.beginPath();
+    this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+    this.canvasContext.closePath();
+    this.canvasContext.clip();
+    this.renderFrame(this.renderedFrame, true);
+  };
+
+  CanvasRendererBase.prototype.destroy = function () {
+    if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.globalData.canvasContext = null;
+    this.animationItem.container = null;
+    this.destroyed = true;
+  };
+
+  CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {
+    if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {
+      return;
+    }
+
+    this.renderedFrame = num;
+    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+    this.globalData.frameId += 1;
+    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
+    this.globalData.projectInterface.currentFrame = num; // console.log('--------');
+    // console.log('NEW: ',num);
+
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      if (this.renderConfig.clearCanvas === true) {
+        this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+      } else {
+        this.save();
+      }
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+
+      if (this.renderConfig.clearCanvas !== true) {
+        this.restore();
+      }
+    }
+  };
+
+  CanvasRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    var element = this.createItem(this.layers[pos], this, this.globalData);
+    elements[pos] = element;
+    element.initExpressions();
+    /* if(this.layers[pos].ty === 0){
+          element.resize(this.globalData.transformCanvas);
+      } */
+  };
+
+  CanvasRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  CanvasRendererBase.prototype.hide = function () {
+    this.animationItem.container.style.display = 'none';
+  };
+
+  CanvasRendererBase.prototype.show = function () {
+    this.animationItem.container.style.display = 'block';
+  };
+
+  function CVCompElement(data, globalData, comp) {
+    this.completeLayers = false;
+    this.layers = data.layers;
+    this.pendingElements = [];
+    this.elements = createSizedArray(this.layers.length);
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);
+
+  CVCompElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.beginPath();
+    ctx.moveTo(0, 0);
+    ctx.lineTo(this.data.w, 0);
+    ctx.lineTo(this.data.w, this.data.h);
+    ctx.lineTo(0, this.data.h);
+    ctx.lineTo(0, 0);
+    ctx.clip();
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  CVCompElement.prototype.destroy = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.layers = null;
+    this.elements = null;
+  };
+
+  CVCompElement.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function CanvasRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([CanvasRendererBase], CanvasRenderer);
+
+  CanvasRenderer.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function HBaseElement() {}
+
+  HBaseElement.prototype = {
+    checkBlendMode: function checkBlendMode() {},
+    initRendererElement: function initRendererElement() {
+      this.baseElement = createTag(this.data.tg || 'div');
+
+      if (this.data.hasMask) {
+        this.svgElement = createNS('svg');
+        this.layerElement = createNS('g');
+        this.maskedElement = this.layerElement;
+        this.svgElement.appendChild(this.layerElement);
+        this.baseElement.appendChild(this.svgElement);
+      } else {
+        this.layerElement = this.baseElement;
+      }
+
+      styleDiv(this.baseElement);
+    },
+    createContainerElements: function createContainerElements() {
+      this.renderableEffectsManager = new CVEffects(this);
+      this.transformedElement = this.baseElement;
+      this.maskedElement = this.layerElement;
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
+
+      if (this.finalTransform._matMdf) {
+        var matrixValue = this.finalTransform.mat.toCSS();
+        transformedElementStyle.transform = matrixValue;
+        transformedElementStyle.webkitTransform = matrixValue;
+      }
+
+      if (this.finalTransform._opMdf) {
+        transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
+      }
+    },
+    renderFrame: function renderFrame() {
+      // If it is exported as hidden (data.hd === true) no need to render
+      // If it is not visible no need to render
+      if (this.data.hd || this.hidden) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.renderElement();
+      this.renderInnerContent();
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.layerElement = null;
+      this.transformedElement = null;
+
+      if (this.matteElement) {
+        this.matteElement = null;
+      }
+
+      if (this.maskManager) {
+        this.maskManager.destroy();
+        this.maskManager = null;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+    },
+    addEffects: function addEffects() {},
+    setMatte: function setMatte() {}
+  };
+  HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
+  HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
+  HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;
+
+  function HSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
+
+  HSolidElement.prototype.createContent = function () {
+    var rect;
+
+    if (this.data.hasMask) {
+      rect = createNS('rect');
+      rect.setAttribute('width', this.data.sw);
+      rect.setAttribute('height', this.data.sh);
+      rect.setAttribute('fill', this.data.sc);
+      this.svgElement.setAttribute('width', this.data.sw);
+      this.svgElement.setAttribute('height', this.data.sh);
+    } else {
+      rect = createTag('div');
+      rect.style.width = this.data.sw + 'px';
+      rect.style.height = this.data.sh + 'px';
+      rect.style.backgroundColor = this.data.sc;
+    }
+
+    this.layerElement.appendChild(rect);
+  };
+
+  function HShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.shapesContainer = createNS('g');
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
+  HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
+
+  HShapeElement.prototype.createContent = function () {
+    var cont;
+    this.baseElement.style.fontSize = 0;
+
+    if (this.data.hasMask) {
+      this.layerElement.appendChild(this.shapesContainer);
+      cont = this.svgElement;
+    } else {
+      cont = createNS('svg');
+      var size = this.comp.data ? this.comp.data : this.globalData.compSize;
+      cont.setAttribute('width', size.w);
+      cont.setAttribute('height', size.h);
+      cont.appendChild(this.shapesContainer);
+      this.layerElement.appendChild(cont);
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
+    this.filterUniqueShapes();
+    this.shapeCont = cont;
+  };
+
+  HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
+    var i;
+    var len = transformers.length;
+
+    for (i = 0; i < len; i += 1) {
+      point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
+    }
+
+    return point;
+  };
+
+  HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
+    var shape = item.sh.v;
+    var transformers = item.transformers;
+    var i;
+    var len = shape._length;
+    var vPoint;
+    var oPoint;
+    var nextIPoint;
+    var nextVPoint;
+
+    if (len <= 1) {
+      return;
+    }
+
+    for (i = 0; i < len - 1; i += 1) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+
+    if (shape.c) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+  };
+
+  HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
+    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
+    var bounds = this.shapeBoundingBox;
+    boundingBox.x = bmMin(bounds.left, boundingBox.x);
+    boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
+    boundingBox.y = bmMin(bounds.top, boundingBox.y);
+    boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
+  };
+
+  HShapeElement.prototype.shapeBoundingBox = {
+    left: 0,
+    right: 0,
+    top: 0,
+    bottom: 0
+  };
+  HShapeElement.prototype.tempBoundingBox = {
+    x: 0,
+    xMax: 0,
+    y: 0,
+    yMax: 0,
+    width: 0,
+    height: 0
+  };
+
+  HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
+    var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
+
+    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {
+      // eslint-disable-line no-plusplus
+      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
+      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
+      c = 3 * p1[i] - 3 * p0[i];
+      b |= 0; // eslint-disable-line no-bitwise
+
+      a |= 0; // eslint-disable-line no-bitwise
+
+      c |= 0; // eslint-disable-line no-bitwise
+
+      if (a === 0 && b === 0) {//
+      } else if (a === 0) {
+        t = -c / b;
+
+        if (t > 0 && t < 1) {
+          bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
+        }
+      } else {
+        b2ac = b * b - 4 * c * a;
+
+        if (b2ac >= 0) {
+          t1 = (-b + bmSqrt(b2ac)) / (2 * a);
+          if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
+          t2 = (-b - bmSqrt(b2ac)) / (2 * a);
+          if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
+        }
+      }
+    }
+
+    this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
+    this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
+    this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
+    this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
+  };
+
+  HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
+    return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];
+  };
+
+  HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
+    var i;
+    var len = itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (itemsData[i] && itemsData[i].sh) {
+        this.calculateShapeBoundingBox(itemsData[i], boundingBox);
+      } else if (itemsData[i] && itemsData[i].it) {
+        this.calculateBoundingBox(itemsData[i].it, boundingBox);
+      }
+    }
+  };
+
+  HShapeElement.prototype.currentBoxContains = function (box) {
+    return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
+  };
+
+  HShapeElement.prototype.renderInnerContent = function () {
+    this._renderShapeFrame();
+
+    if (!this.hidden && (this._isFirstFrame || this._mdf)) {
+      var tempBoundingBox = this.tempBoundingBox;
+      var max = 999999;
+      tempBoundingBox.x = max;
+      tempBoundingBox.xMax = -max;
+      tempBoundingBox.y = max;
+      tempBoundingBox.yMax = -max;
+      this.calculateBoundingBox(this.itemsData, tempBoundingBox);
+      tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
+      tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();
+
+      if (this.currentBoxContains(tempBoundingBox)) {
+        return;
+      }
+
+      var changed = false;
+
+      if (this.currentBBox.w !== tempBoundingBox.width) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.shapeCont.setAttribute('width', tempBoundingBox.width);
+        changed = true;
+      }
+
+      if (this.currentBBox.h !== tempBoundingBox.height) {
+        this.currentBBox.h = tempBoundingBox.height;
+        this.shapeCont.setAttribute('height', tempBoundingBox.height);
+        changed = true;
+      }
+
+      if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.currentBBox.h = tempBoundingBox.height;
+        this.currentBBox.x = tempBoundingBox.x;
+        this.currentBBox.y = tempBoundingBox.y;
+        this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        var shapeStyle = this.shapeCont.style;
+        var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        shapeStyle.transform = shapeTransform;
+        shapeStyle.webkitTransform = shapeTransform;
+      }
+    }
+  };
+
+  function HTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.textPaths = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+    this.renderType = 'svg';
+    this.isMasked = false;
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
+
+  HTextElement.prototype.createContent = function () {
+    this.isMasked = this.checkMasks();
+
+    if (this.isMasked) {
+      this.renderType = 'svg';
+      this.compW = this.comp.data.w;
+      this.compH = this.comp.data.h;
+      this.svgElement.setAttribute('width', this.compW);
+      this.svgElement.setAttribute('height', this.compH);
+      var g = createNS('g');
+      this.maskedElement.appendChild(g);
+      this.innerElem = g;
+    } else {
+      this.renderType = 'html';
+      this.innerElem = this.layerElement;
+    }
+
+    this.checkParenting();
+  };
+
+  HTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var innerElemStyle = this.innerElem.style;
+    var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
+    innerElemStyle.fill = textColor;
+    innerElemStyle.color = textColor;
+
+    if (documentData.sc) {
+      innerElemStyle.stroke = this.buildColor(documentData.sc);
+      innerElemStyle.strokeWidth = documentData.sw + 'px';
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (!this.globalData.fontManager.chars) {
+      innerElemStyle.fontSize = documentData.finalSize + 'px';
+      innerElemStyle.lineHeight = documentData.finalSize + 'px';
+
+      if (fontData.fClass) {
+        this.innerElem.className = fontData.fClass;
+      } else {
+        innerElemStyle.fontFamily = fontData.fFamily;
+        var fWeight = documentData.fWeight;
+        var fStyle = documentData.fStyle;
+        innerElemStyle.fontStyle = fStyle;
+        innerElemStyle.fontWeight = fWeight;
+      }
+    }
+
+    var i;
+    var len;
+    var letters = documentData.l;
+    len = letters.length;
+    var tSpan;
+    var tParent;
+    var tCont;
+    var matrixHelper = this.mHelper;
+    var shapes;
+    var shapeStr = '';
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.globalData.fontManager.chars) {
+        if (!this.textPaths[cnt]) {
+          tSpan = createNS('path');
+          tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
+          tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
+          tSpan.setAttribute('stroke-miterlimit', '4');
+        } else {
+          tSpan = this.textPaths[cnt];
+        }
+
+        if (!this.isMasked) {
+          if (this.textSpans[cnt]) {
+            tParent = this.textSpans[cnt];
+            tCont = tParent.children[0];
+          } else {
+            tParent = createTag('div');
+            tParent.style.lineHeight = 0;
+            tCont = createNS('svg');
+            tCont.appendChild(tSpan);
+            styleDiv(tParent);
+          }
+        }
+      } else if (!this.isMasked) {
+        if (this.textSpans[cnt]) {
+          tParent = this.textSpans[cnt];
+          tSpan = this.textPaths[cnt];
+        } else {
+          tParent = createTag('span');
+          styleDiv(tParent);
+          tSpan = createTag('span');
+          styleDiv(tSpan);
+          tParent.appendChild(tSpan);
+        }
+      } else {
+        tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
+      } // tSpan.setAttribute('visibility', 'hidden');
+
+
+      if (this.globalData.fontManager.chars) {
+        var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+        var shapeData;
+
+        if (charData) {
+          shapeData = charData.data;
+        } else {
+          shapeData = null;
+        }
+
+        matrixHelper.reset();
+
+        if (shapeData && shapeData.shapes && shapeData.shapes.length) {
+          shapes = shapeData.shapes[0].it;
+          matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+          shapeStr = this.createPathShape(matrixHelper, shapes);
+          tSpan.setAttribute('d', shapeStr);
+        }
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent);
+
+          if (shapeData && shapeData.shapes) {
+            // document.body.appendChild is needed to get exact measure of shape
+            document.body.appendChild(tCont);
+            var boundingBox = tCont.getBBox();
+            tCont.setAttribute('width', boundingBox.width + 2);
+            tCont.setAttribute('height', boundingBox.height + 2);
+            tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
+            var tContStyle = tCont.style;
+            var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
+            tContStyle.transform = tContTranslation;
+            tContStyle.webkitTransform = tContTranslation;
+            letters[i].yOffset = boundingBox.y - 1;
+          } else {
+            tCont.setAttribute('width', 1);
+            tCont.setAttribute('height', 1);
+          }
+
+          tParent.appendChild(tCont);
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } else {
+        tSpan.textContent = letters[i].val;
+        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent); //
+
+          var tStyle = tSpan.style;
+          var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
+          tStyle.transform = tSpanTranslation;
+          tStyle.webkitTransform = tSpanTranslation;
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } //
+
+
+      if (!this.isMasked) {
+        this.textSpans[cnt] = tParent;
+      } else {
+        this.textSpans[cnt] = tSpan;
+      }
+
+      this.textSpans[cnt].style.display = 'block';
+      this.textPaths[cnt] = tSpan;
+      cnt += 1;
+    }
+
+    while (cnt < this.textSpans.length) {
+      this.textSpans[cnt].style.display = 'none';
+      cnt += 1;
+    }
+  };
+
+  HTextElement.prototype.renderInnerContent = function () {
+    var svgStyle;
+
+    if (this.data.singleShape) {
+      if (!this._isFirstFrame && !this.lettersChangedFlag) {
+        return;
+      }
+
+      if (this.isMasked && this.finalTransform._matMdf) {
+        // Todo Benchmark if using this is better than getBBox
+        this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
+        svgStyle = this.svgElement.style;
+        var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
+        svgStyle.transform = translation;
+        svgStyle.webkitTransform = translation;
+      }
+    }
+
+    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+    if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
+      return;
+    }
+
+    var i;
+    var len;
+    var count = 0;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var textSpan;
+    var textPath;
+
+    for (i = 0; i < len; i += 1) {
+      if (letters[i].n) {
+        count += 1;
+      } else {
+        textSpan = this.textSpans[i];
+        textPath = this.textPaths[i];
+        renderedLetter = renderedLetters[count];
+        count += 1;
+
+        if (renderedLetter._mdf.m) {
+          if (!this.isMasked) {
+            textSpan.style.webkitTransform = renderedLetter.m;
+            textSpan.style.transform = renderedLetter.m;
+          } else {
+            textSpan.setAttribute('transform', renderedLetter.m);
+          }
+        } /// /textSpan.setAttribute('opacity',renderedLetter.o);
+
+
+        textSpan.style.opacity = renderedLetter.o;
+
+        if (renderedLetter.sw && renderedLetter._mdf.sw) {
+          textPath.setAttribute('stroke-width', renderedLetter.sw);
+        }
+
+        if (renderedLetter.sc && renderedLetter._mdf.sc) {
+          textPath.setAttribute('stroke', renderedLetter.sc);
+        }
+
+        if (renderedLetter.fc && renderedLetter._mdf.fc) {
+          textPath.setAttribute('fill', renderedLetter.fc);
+          textPath.style.color = renderedLetter.fc;
+        }
+      }
+    }
+
+    if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
+      var boundingBox = this.innerElem.getBBox();
+
+      if (this.currentBBox.w !== boundingBox.width) {
+        this.currentBBox.w = boundingBox.width;
+        this.svgElement.setAttribute('width', boundingBox.width);
+      }
+
+      if (this.currentBBox.h !== boundingBox.height) {
+        this.currentBBox.h = boundingBox.height;
+        this.svgElement.setAttribute('height', boundingBox.height);
+      }
+
+      var margin = 1;
+
+      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) {
+        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;
+        this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        svgStyle = this.svgElement.style;
+        var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        svgStyle.transform = svgTransform;
+        svgStyle.webkitTransform = svgTransform;
+      }
+    }
+  };
+
+  function HCameraElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initHierarchy();
+    var getProp = PropertyFactory.getProp;
+    this.pe = getProp(this, data.pe, 0, 0, this);
+
+    if (data.ks.p.s) {
+      this.px = getProp(this, data.ks.p.x, 1, 0, this);
+      this.py = getProp(this, data.ks.p.y, 1, 0, this);
+      this.pz = getProp(this, data.ks.p.z, 1, 0, this);
+    } else {
+      this.p = getProp(this, data.ks.p, 1, 0, this);
+    }
+
+    if (data.ks.a) {
+      this.a = getProp(this, data.ks.a, 1, 0, this);
+    }
+
+    if (data.ks.or.k.length && data.ks.or.k[0].to) {
+      var i;
+      var len = data.ks.or.k.length;
+
+      for (i = 0; i < len; i += 1) {
+        data.ks.or.k[i].to = null;
+        data.ks.or.k[i].ti = null;
+      }
+    }
+
+    this.or = getProp(this, data.ks.or, 1, degToRads, this);
+    this.or.sh = true;
+    this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
+    this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
+    this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
+    this.mat = new Matrix();
+    this._prevMat = new Matrix();
+    this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
+
+    this.finalTransform = {
+      mProp: this
+    };
+  }
+
+  extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
+
+  HCameraElement.prototype.setup = function () {
+    var i;
+    var len = this.comp.threeDElements.length;
+    var comp;
+    var perspectiveStyle;
+    var containerStyle;
+
+    for (i = 0; i < len; i += 1) {
+      // [perspectiveElem,container]
+      comp = this.comp.threeDElements[i];
+
+      if (comp.type === '3d') {
+        perspectiveStyle = comp.perspectiveElem.style;
+        containerStyle = comp.container.style;
+        var perspective = this.pe.v + 'px';
+        var origin = '0px 0px 0px';
+        var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+        perspectiveStyle.perspective = perspective;
+        perspectiveStyle.webkitPerspective = perspective;
+        containerStyle.transformOrigin = origin;
+        containerStyle.mozTransformOrigin = origin;
+        containerStyle.webkitTransformOrigin = origin;
+        perspectiveStyle.transform = matrix;
+        perspectiveStyle.webkitTransform = matrix;
+      }
+    }
+  };
+
+  HCameraElement.prototype.createElements = function () {};
+
+  HCameraElement.prototype.hide = function () {};
+
+  HCameraElement.prototype.renderFrame = function () {
+    var _mdf = this._isFirstFrame;
+    var i;
+    var len;
+
+    if (this.hierarchy) {
+      len = this.hierarchy.length;
+
+      for (i = 0; i < len; i += 1) {
+        _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
+      }
+    }
+
+    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) {
+      this.mat.reset();
+
+      if (this.hierarchy) {
+        len = this.hierarchy.length - 1;
+
+        for (i = len; i >= 0; i -= 1) {
+          var mTransf = this.hierarchy[i].finalTransform.mProp;
+          this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
+          this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
+          this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
+          this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
+          this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
+        }
+      }
+
+      if (this.p) {
+        this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
+      } else {
+        this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
+      }
+
+      if (this.a) {
+        var diffVector;
+
+        if (this.p) {
+          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]];
+        } else {
+          diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
+        }
+
+        var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
+
+        var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
+        var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
+        var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);
+        var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);
+        this.mat.rotateY(mRotationY).rotateX(-mRotationX);
+      }
+
+      this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
+      this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
+      this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
+      this.mat.translate(0, 0, this.pe.v);
+      var hasMatrixChanged = !this._prevMat.equals(this.mat);
+
+      if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
+        len = this.comp.threeDElements.length;
+        var comp;
+        var perspectiveStyle;
+        var containerStyle;
+
+        for (i = 0; i < len; i += 1) {
+          comp = this.comp.threeDElements[i];
+
+          if (comp.type === '3d') {
+            if (hasMatrixChanged) {
+              var matValue = this.mat.toCSS();
+              containerStyle = comp.container.style;
+              containerStyle.transform = matValue;
+              containerStyle.webkitTransform = matValue;
+            }
+
+            if (this.pe._mdf) {
+              perspectiveStyle = comp.perspectiveElem.style;
+              perspectiveStyle.perspective = this.pe.v + 'px';
+              perspectiveStyle.webkitPerspective = this.pe.v + 'px';
+            }
+          }
+        }
+
+        this.mat.clone(this._prevMat);
+      }
+    }
+
+    this._isFirstFrame = false;
+  };
+
+  HCameraElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  HCameraElement.prototype.destroy = function () {};
+
+  HCameraElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  function HImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
+
+  HImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    var img = new Image();
+
+    if (this.data.hasMask) {
+      this.imageElem = createNS('image');
+      this.imageElem.setAttribute('width', this.assetData.w + 'px');
+      this.imageElem.setAttribute('height', this.assetData.h + 'px');
+      this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+      this.layerElement.appendChild(this.imageElem);
+      this.baseElement.setAttribute('width', this.assetData.w);
+      this.baseElement.setAttribute('height', this.assetData.h);
+    } else {
+      this.layerElement.appendChild(img);
+    }
+
+    img.crossOrigin = 'anonymous';
+    img.src = assetPath;
+
+    if (this.data.ln) {
+      this.baseElement.setAttribute('id', this.data.ln);
+    }
+  };
+
+  function HybridRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([BaseRenderer], HybridRendererBase);
+  HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;
+
+  HybridRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  HybridRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newDOMElement = element.getBaseElement();
+
+    if (!newDOMElement) {
+      return;
+    }
+
+    var layer = this.layers[pos];
+
+    if (!layer.ddd || !this.supports3d) {
+      if (this.threeDElements) {
+        this.addTo3dContainer(newDOMElement, pos);
+      } else {
+        var i = 0;
+        var nextDOMElement;
+        var nextLayer;
+        var tmpDOMElement;
+
+        while (i < pos) {
+          if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
+            nextLayer = this.elements[i];
+            tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+            nextDOMElement = tmpDOMElement || nextDOMElement;
+          }
+
+          i += 1;
+        }
+
+        if (nextDOMElement) {
+          if (!layer.ddd || !this.supports3d) {
+            this.layerElement.insertBefore(newDOMElement, nextDOMElement);
+          }
+        } else if (!layer.ddd || !this.supports3d) {
+          this.layerElement.appendChild(newDOMElement);
+        }
+      }
+    } else {
+      this.addTo3dContainer(newDOMElement, pos);
+    }
+  };
+
+  HybridRendererBase.prototype.createShape = function (data) {
+    if (!this.supports3d) {
+      return new SVGShapeElement(data, this.globalData, this);
+    }
+
+    return new HShapeElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createText = function (data) {
+    if (!this.supports3d) {
+      return new SVGTextLottieElement(data, this.globalData, this);
+    }
+
+    return new HTextElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createCamera = function (data) {
+    this.camera = new HCameraElement(data, this.globalData, this);
+    return this.camera;
+  };
+
+  HybridRendererBase.prototype.createImage = function (data) {
+    if (!this.supports3d) {
+      return new IImageElement(data, this.globalData, this);
+    }
+
+    return new HImageElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createSolid = function (data) {
+    if (!this.supports3d) {
+      return new ISolidElement(data, this.globalData, this);
+    }
+
+    return new HSolidElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
+        return this.threeDElements[i].perspectiveElem;
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {
+    var perspectiveElem = createTag('div');
+    var style;
+    var containerStyle;
+    styleDiv(perspectiveElem);
+    var container = createTag('div');
+    styleDiv(container);
+
+    if (type === '3d') {
+      style = perspectiveElem.style;
+      style.width = this.globalData.compSize.w + 'px';
+      style.height = this.globalData.compSize.h + 'px';
+      var center = '50% 50%';
+      style.webkitTransformOrigin = center;
+      style.mozTransformOrigin = center;
+      style.transformOrigin = center;
+      containerStyle = container.style;
+      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+      containerStyle.transform = matrix;
+      containerStyle.webkitTransform = matrix;
+    }
+
+    perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);
+
+    var threeDContainerData = {
+      container: container,
+      perspectiveElem: perspectiveElem,
+      startPos: pos,
+      endPos: pos,
+      type: type
+    };
+    this.threeDElements.push(threeDContainerData);
+    return threeDContainerData;
+  };
+
+  HybridRendererBase.prototype.build3dContainers = function () {
+    var i;
+    var len = this.layers.length;
+    var lastThreeDContainerData;
+    var currentContainer = '';
+
+    for (i = 0; i < len; i += 1) {
+      if (this.layers[i].ddd && this.layers[i].ty !== 3) {
+        if (currentContainer !== '3d') {
+          currentContainer = '3d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '3d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      } else {
+        if (currentContainer !== '2d') {
+          currentContainer = '2d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '2d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      }
+    }
+
+    len = this.threeDElements.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
+    }
+  };
+
+  HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (pos <= this.threeDElements[i].endPos) {
+        var j = this.threeDElements[i].startPos;
+        var nextElement;
+
+        while (j < pos) {
+          if (this.elements[j] && this.elements[j].getBaseElement) {
+            nextElement = this.elements[j].getBaseElement();
+          }
+
+          j += 1;
+        }
+
+        if (nextElement) {
+          this.threeDElements[i].container.insertBefore(elem, nextElement);
+        } else {
+          this.threeDElements[i].container.appendChild(elem);
+        }
+
+        break;
+      }
+
+      i += 1;
+    }
+  };
+
+  HybridRendererBase.prototype.configAnimation = function (animData) {
+    var resizerElem = createTag('div');
+    var wrapper = this.animationItem.wrapper;
+    var style = resizerElem.style;
+    style.width = animData.w + 'px';
+    style.height = animData.h + 'px';
+    this.resizerElem = resizerElem;
+    styleDiv(resizerElem);
+    style.transformStyle = 'flat';
+    style.mozTransformStyle = 'flat';
+    style.webkitTransformStyle = 'flat';
+
+    if (this.renderConfig.className) {
+      resizerElem.setAttribute('class', this.renderConfig.className);
+    }
+
+    wrapper.appendChild(resizerElem);
+    style.overflow = 'hidden';
+    var svg = createNS('svg');
+    svg.setAttribute('width', '1');
+    svg.setAttribute('height', '1');
+    styleDiv(svg);
+    this.resizerElem.appendChild(svg);
+    var defs = createNS('defs');
+    svg.appendChild(defs);
+    this.data = animData; // Mask animation
+
+    this.setupGlobalData(animData, svg);
+    this.globalData.defs = defs;
+    this.layers = animData.layers;
+    this.layerElement = this.resizerElem;
+    this.build3dContainers();
+    this.updateContainerSize();
+  };
+
+  HybridRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.animationItem.container = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      this.elements[i].destroy();
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  HybridRendererBase.prototype.updateContainerSize = function () {
+    var elementWidth = this.animationItem.wrapper.offsetWidth;
+    var elementHeight = this.animationItem.wrapper.offsetHeight;
+    var elementRel = elementWidth / elementHeight;
+    var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
+    var sx;
+    var sy;
+    var tx;
+    var ty;
+
+    if (animationRel > elementRel) {
+      sx = elementWidth / this.globalData.compSize.w;
+      sy = elementWidth / this.globalData.compSize.w;
+      tx = 0;
+      ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;
+    } else {
+      sx = elementHeight / this.globalData.compSize.h;
+      sy = elementHeight / this.globalData.compSize.h;
+      tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
+      ty = 0;
+    }
+
+    var style = this.resizerElem.style;
+    style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
+    style.transform = style.webkitTransform;
+  };
+
+  HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
+
+  HybridRendererBase.prototype.hide = function () {
+    this.resizerElem.style.display = 'none';
+  };
+
+  HybridRendererBase.prototype.show = function () {
+    this.resizerElem.style.display = 'block';
+  };
+
+  HybridRendererBase.prototype.initItems = function () {
+    this.buildAllItems();
+
+    if (this.camera) {
+      this.camera.setup();
+    } else {
+      var cWidth = this.globalData.compSize.w;
+      var cHeight = this.globalData.compSize.h;
+      var i;
+      var len = this.threeDElements.length;
+
+      for (i = 0; i < len; i += 1) {
+        var style = this.threeDElements[i].perspectiveElem.style;
+        style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
+        style.perspective = style.webkitPerspective;
+      }
+    }
+  };
+
+  HybridRendererBase.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+    var floatingContainer = createTag('div');
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  function HCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = !data.hasMask;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);
+  HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
+
+  HCompElement.prototype.createContainerElements = function () {
+    this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
+
+
+    if (this.data.hasMask) {
+      this.svgElement.setAttribute('width', this.data.w);
+      this.svgElement.setAttribute('height', this.data.h);
+      this.transformedElement = this.baseElement;
+    } else {
+      this.transformedElement = this.layerElement;
+    }
+  };
+
+  HCompElement.prototype.addTo3dContainer = function (elem, pos) {
+    var j = 0;
+    var nextElement;
+
+    while (j < pos) {
+      if (this.elements[j] && this.elements[j].getBaseElement) {
+        nextElement = this.elements[j].getBaseElement();
+      }
+
+      j += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(elem, nextElement);
+    } else {
+      this.layerElement.appendChild(elem);
+    }
+  };
+
+  HCompElement.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  function HybridRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([HybridRendererBase], HybridRenderer);
+
+  HybridRenderer.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  var Expressions = function () {
+    var ob = {};
+    ob.initExpressions = initExpressions;
+
+    function initExpressions(animation) {
+      var stackCount = 0;
+      var registers = [];
+
+      function pushExpression() {
+        stackCount += 1;
+      }
+
+      function popExpression() {
+        stackCount -= 1;
+
+        if (stackCount === 0) {
+          releaseInstances();
+        }
+      }
+
+      function registerExpressionProperty(expression) {
+        if (registers.indexOf(expression) === -1) {
+          registers.push(expression);
+        }
+      }
+
+      function releaseInstances() {
+        var i;
+        var len = registers.length;
+
+        for (i = 0; i < len; i += 1) {
+          registers[i].release();
+        }
+
+        registers.length = 0;
+      }
+
+      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
+      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
+      animation.renderer.globalData.pushExpression = pushExpression;
+      animation.renderer.globalData.popExpression = popExpression;
+      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
+    }
+
+    return ob;
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+  /* eslint-disable */
+
+  /*
+   Copyright 2014 David Bau.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+   */
+  function seedRandom(pool, math) {
+    //
+    // The following constants are related to IEEE 754 limits.
+    //
+    var global = this,
+        width = 256,
+        // each RC4 output is 0 <= x < 256
+    chunks = 6,
+        // at least six RC4 outputs for each double
+    digits = 52,
+        // there are 52 significant digits in a double
+    rngname = 'random',
+        // rngname: name for Math.random and Math.seedrandom
+    startdenom = math.pow(width, chunks),
+        significance = math.pow(2, digits),
+        overflow = significance * 2,
+        mask = width - 1,
+        nodecrypto; // node.js crypto module, initialized at the bottom.
+    //
+    // seedrandom()
+    // This is the seedrandom function described above.
+    //
+
+    function seedrandom(seed, options, callback) {
+      var key = [];
+      options = options === true ? {
+        entropy: true
+      } : options || {}; // Flatten the seed string or build one from local entropy if needed.
+
+      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.
+
+      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains
+      // randomness in every bit of the mantissa of the IEEE 754 value.
+
+      var prng = function prng() {
+        var n = arc4.g(chunks),
+            // Start with a numerator n < 2 ^ 48
+        d = startdenom,
+            //   and denominator d = 2 ^ 48.
+        x = 0; //   and no 'extra last byte'.
+
+        while (n < significance) {
+          // Fill up all significant digits by
+          n = (n + x) * width; //   shifting numerator and
+
+          d *= width; //   denominator and generating a
+
+          x = arc4.g(1); //   new least-significant-byte.
+        }
+
+        while (n >= overflow) {
+          // To avoid rounding up, before adding
+          n /= 2; //   last byte, shift everything
+
+          d /= 2; //   right using integer math until
+
+          x >>>= 1; //   we have exactly the desired bits.
+        }
+
+        return (n + x) / d; // Form the number within [0, 1).
+      };
+
+      prng.int32 = function () {
+        return arc4.g(4) | 0;
+      };
+
+      prng.quick = function () {
+        return arc4.g(4) / 0x100000000;
+      };
+
+      prng["double"] = prng; // Mix the randomness into accumulated entropy.
+
+      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.
+
+      return (options.pass || callback || function (prng, seed, is_math_call, state) {
+        if (state) {
+          // Load the arc4 state from the given state if it has an S array.
+          if (state.S) {
+            copy(state, arc4);
+          } // Only provide the .state method if requested via options.state.
+
+
+          prng.state = function () {
+            return copy(arc4, {});
+          };
+        } // If called as a method of Math (Math.seedrandom()), mutate
+        // Math.random because that is how seedrandom.js has worked since v1.0.
+
+
+        if (is_math_call) {
+          math[rngname] = prng;
+          return seed;
+        } // Otherwise, it is a newer calling convention, so return the
+        // prng directly.
+        else return prng;
+      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);
+    }
+
+    math['seed' + rngname] = seedrandom; //
+    // ARC4
+    //
+    // An ARC4 implementation.  The constructor takes a key in the form of
+    // an array of at most (width) integers that should be 0 <= x < (width).
+    //
+    // The g(count) method returns a pseudorandom integer that concatenates
+    // the next (count) outputs from ARC4.  Its return value is a number x
+    // that is in the range 0 <= x < (width ^ count).
+    //
+
+    function ARC4(key) {
+      var t,
+          keylen = key.length,
+          me = this,
+          i = 0,
+          j = me.i = me.j = 0,
+          s = me.S = []; // The empty key [] is treated as [0].
+
+      if (!keylen) {
+        key = [keylen++];
+      } // Set up S using the standard key scheduling algorithm.
+
+
+      while (i < width) {
+        s[i] = i++;
+      }
+
+      for (i = 0; i < width; i++) {
+        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
+        s[j] = t;
+      } // The "g" method returns the next (count) outputs as one number.
+
+
+      me.g = function (count) {
+        // Using instance members instead of closure state nearly doubles speed.
+        var t,
+            r = 0,
+            i = me.i,
+            j = me.j,
+            s = me.S;
+
+        while (count--) {
+          t = s[i = mask & i + 1];
+          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];
+        }
+
+        me.i = i;
+        me.j = j;
+        return r; // For robust unpredictability, the function call below automatically
+        // discards an initial batch of values.  This is called RC4-drop[256].
+        // See http://google.com/search?q=rsa+fluhrer+response&btnI
+      };
+    } //
+    // copy()
+    // Copies internal state of ARC4 to or from a plain object.
+    //
+
+
+    function copy(f, t) {
+      t.i = f.i;
+      t.j = f.j;
+      t.S = f.S.slice();
+      return t;
+    } //
+    // flatten()
+    // Converts an object tree to nested arrays of strings.
+    //
+
+
+    function flatten(obj, depth) {
+      var result = [],
+          typ = _typeof$1(obj),
+          prop;
+
+      if (depth && typ == 'object') {
+        for (prop in obj) {
+          try {
+            result.push(flatten(obj[prop], depth - 1));
+          } catch (e) {}
+        }
+      }
+
+      return result.length ? result : typ == 'string' ? obj : obj + '\0';
+    } //
+    // mixkey()
+    // Mixes a string seed into a key that is an array of integers, and
+    // returns a shortened string seed that is equivalent to the result key.
+    //
+
+
+    function mixkey(seed, key) {
+      var stringseed = seed + '',
+          smear,
+          j = 0;
+
+      while (j < stringseed.length) {
+        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
+      }
+
+      return tostring(key);
+    } //
+    // autoseed()
+    // Returns an object for autoseeding, using window.crypto and Node crypto
+    // module if available.
+    //
+
+
+    function autoseed() {
+      try {
+        if (nodecrypto) {
+          return tostring(nodecrypto.randomBytes(width));
+        }
+
+        var out = new Uint8Array(width);
+        (global.crypto || global.msCrypto).getRandomValues(out);
+        return tostring(out);
+      } catch (e) {
+        var browser = global.navigator,
+            plugins = browser && browser.plugins;
+        return [+new Date(), global, plugins, global.screen, tostring(pool)];
+      }
+    } //
+    // tostring()
+    // Converts an array of charcodes to a string
+    //
+
+
+    function tostring(a) {
+      return String.fromCharCode.apply(0, a);
+    } //
+    // When seedrandom.js is loaded, we immediately mix a few bits
+    // from the built-in RNG into the entropy pool.  Because we do
+    // not want to interfere with deterministic PRNG state later,
+    // seedrandom will not call math.random on its own again after
+    // initialization.
+    //
+
+
+    mixkey(math.random(), pool); //
+    // Nodejs and AMD support: export the implementation as a module using
+    // either convention.
+    //
+    // End anonymous scope, and pass initial values.
+  }
+
+  ;
+
+  function initialize$2(BMMath) {
+    seedRandom([], BMMath);
+  }
+
+  var propTypes = {
+    SHAPE: 'shape'
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var ExpressionManager = function () {
+    'use strict';
+
+    var ob = {};
+    var Math = BMMath;
+    var window = null;
+    var document = null;
+    var XMLHttpRequest = null;
+    var fetch = null;
+    var frames = null;
+    initialize$2(BMMath);
+
+    function $bm_isInstanceOfArray(arr) {
+      return arr.constructor === Array || arr.constructor === Float32Array;
+    }
+
+    function isNumerable(tOfV, v) {
+      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
+    }
+
+    function $bm_neg(a) {
+      var tOfA = _typeof(a);
+
+      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
+        return -a;
+      }
+
+      if ($bm_isInstanceOfArray(a)) {
+        var i;
+        var lenA = a.length;
+        var retArr = [];
+
+        for (i = 0; i < lenA; i += 1) {
+          retArr[i] = -a[i];
+        }
+
+        return retArr;
+      }
+
+      if (a.propType) {
+        return a.v;
+      }
+
+      return -a;
+    }
+
+    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
+    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
+    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
+
+    function sum(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (tOfA === 'string' || tOfB === 'string') {
+        return a + b;
+      }
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a + b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] += b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a + b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] + b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    var add = sum;
+
+    function sub(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        if (tOfA === 'string') {
+          a = parseInt(a, 10);
+        }
+
+        if (tOfB === 'string') {
+          b = parseInt(b, 10);
+        }
+
+        return a - b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] -= b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a - b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] - b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    function mul(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a * b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] * b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a * b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function div(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a / b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] / b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a / b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function mod(a, b) {
+      if (typeof a === 'string') {
+        a = parseInt(a, 10);
+      }
+
+      if (typeof b === 'string') {
+        b = parseInt(b, 10);
+      }
+
+      return a % b;
+    }
+
+    var $bm_sum = sum;
+    var $bm_sub = sub;
+    var $bm_mul = mul;
+    var $bm_div = div;
+    var $bm_mod = mod;
+
+    function clamp(num, min, max) {
+      if (min > max) {
+        var mm = max;
+        max = min;
+        min = mm;
+      }
+
+      return Math.min(Math.max(num, min), max);
+    }
+
+    function radiansToDegrees(val) {
+      return val / degToRads;
+    }
+
+    var radians_to_degrees = radiansToDegrees;
+
+    function degreesToRadians(val) {
+      return val * degToRads;
+    }
+
+    var degrees_to_radians = radiansToDegrees;
+    var helperLengthArray = [0, 0, 0, 0, 0, 0];
+
+    function length(arr1, arr2) {
+      if (typeof arr1 === 'number' || arr1 instanceof Number) {
+        arr2 = arr2 || 0;
+        return Math.abs(arr1 - arr2);
+      }
+
+      if (!arr2) {
+        arr2 = helperLengthArray;
+      }
+
+      var i;
+      var len = Math.min(arr1.length, arr2.length);
+      var addedLength = 0;
+
+      for (i = 0; i < len; i += 1) {
+        addedLength += Math.pow(arr2[i] - arr1[i], 2);
+      }
+
+      return Math.sqrt(addedLength);
+    }
+
+    function normalize(vec) {
+      return div(vec, length(vec));
+    }
+
+    function rgbToHsl(val) {
+      var r = val[0];
+      var g = val[1];
+      var b = val[2];
+      var max = Math.max(r, g, b);
+      var min = Math.min(r, g, b);
+      var h;
+      var s;
+      var l = (max + min) / 2;
+
+      if (max === min) {
+        h = 0; // achromatic
+
+        s = 0; // achromatic
+      } else {
+        var d = max - min;
+        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+
+        switch (max) {
+          case r:
+            h = (g - b) / d + (g < b ? 6 : 0);
+            break;
+
+          case g:
+            h = (b - r) / d + 2;
+            break;
+
+          case b:
+            h = (r - g) / d + 4;
+            break;
+
+          default:
+            break;
+        }
+
+        h /= 6;
+      }
+
+      return [h, s, l, val[3]];
+    }
+
+    function hue2rgb(p, q, t) {
+      if (t < 0) t += 1;
+      if (t > 1) t -= 1;
+      if (t < 1 / 6) return p + (q - p) * 6 * t;
+      if (t < 1 / 2) return q;
+      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+      return p;
+    }
+
+    function hslToRgb(val) {
+      var h = val[0];
+      var s = val[1];
+      var l = val[2];
+      var r;
+      var g;
+      var b;
+
+      if (s === 0) {
+        r = l; // achromatic
+
+        b = l; // achromatic
+
+        g = l; // achromatic
+      } else {
+        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+        var p = 2 * l - q;
+        r = hue2rgb(p, q, h + 1 / 3);
+        g = hue2rgb(p, q, h);
+        b = hue2rgb(p, q, h - 1 / 3);
+      }
+
+      return [r, g, b, val[3]];
+    }
+
+    function linear(t, tMin, tMax, value1, value2) {
+      if (value1 === undefined || value2 === undefined) {
+        value1 = tMin;
+        value2 = tMax;
+        tMin = 0;
+        tMax = 1;
+      }
+
+      if (tMax < tMin) {
+        var _tMin = tMax;
+        tMax = tMin;
+        tMin = _tMin;
+      }
+
+      if (t <= tMin) {
+        return value1;
+      }
+
+      if (t >= tMax) {
+        return value2;
+      }
+
+      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
+
+      if (!value1.length) {
+        return value1 + (value2 - value1) * perc;
+      }
+
+      var i;
+      var len = value1.length;
+      var arr = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
+      }
+
+      return arr;
+    }
+
+    function random(min, max) {
+      if (max === undefined) {
+        if (min === undefined) {
+          min = 0;
+          max = 1;
+        } else {
+          max = min;
+          min = undefined;
+        }
+      }
+
+      if (max.length) {
+        var i;
+        var len = max.length;
+
+        if (!min) {
+          min = createTypedArray('float32', len);
+        }
+
+        var arr = createTypedArray('float32', len);
+        var rnd = BMMath.random();
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = min[i] + rnd * (max[i] - min[i]);
+        }
+
+        return arr;
+      }
+
+      if (min === undefined) {
+        min = 0;
+      }
+
+      var rndm = BMMath.random();
+      return min + rndm * (max - min);
+    }
+
+    function createPath(points, inTangents, outTangents, closed) {
+      var i;
+      var len = points.length;
+      var path = shapePool.newElement();
+      path.setPathData(!!closed, len);
+      var arrPlaceholder = [0, 0];
+      var inVertexPoint;
+      var outVertexPoint;
+
+      for (i = 0; i < len; i += 1) {
+        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
+        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
+        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);
+      }
+
+      return path;
+    }
+
+    function initiateExpression(elem, data, property) {
+      var val = data.x;
+      var needsVelocity = /velocity(?![\w\d])/.test(val);
+
+      var _needsRandom = val.indexOf('random') !== -1;
+
+      var elemType = elem.data.ty;
+      var transform;
+      var $bm_transform;
+      var content;
+      var effect;
+      var thisProperty = property;
+      thisProperty.valueAtTime = thisProperty.getValueAtTime;
+      Object.defineProperty(thisProperty, 'value', {
+        get: function get() {
+          return thisProperty.v;
+        }
+      });
+      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
+      elem.comp.displayStartTime = 0;
+      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      var outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      var width = elem.data.sw ? elem.data.sw : 0;
+      var height = elem.data.sh ? elem.data.sh : 0;
+      var name = elem.data.nm;
+      var loopIn;
+      var loop_in;
+      var loopOut;
+      var loop_out;
+      var smooth;
+      var toWorld;
+      var fromWorld;
+      var fromComp;
+      var toComp;
+      var fromCompToSurface;
+      var position;
+      var rotation;
+      var anchorPoint;
+      var scale;
+      var thisLayer;
+      var thisComp;
+      var mask;
+      var valueAtTime;
+      var velocityAtTime;
+      var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
+
+      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
+
+      var numKeys = property.kf ? data.k.length : 0;
+      var active = !this.data || this.data.hd !== true;
+
+      var wiggle = function wiggle(freq, amp) {
+        var iWiggle;
+        var j;
+        var lenWiggle = this.pv.length ? this.pv.length : 1;
+        var addedAmps = createTypedArray('float32', lenWiggle);
+        freq = 5;
+        var iterations = Math.floor(time * freq);
+        iWiggle = 0;
+        j = 0;
+
+        while (iWiggle < iterations) {
+          // var rnd = BMMath.random();
+          for (j = 0; j < lenWiggle; j += 1) {
+            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;
+          }
+
+          iWiggle += 1;
+        } // var rnd2 = BMMath.random();
+
+
+        var periods = time * freq;
+        var perc = periods - Math.floor(periods);
+        var arr = createTypedArray('float32', lenWiggle);
+
+        if (lenWiggle > 1) {
+          for (j = 0; j < lenWiggle; j += 1) {
+            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
+            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
+          }
+
+          return arr;
+        }
+
+        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
+      }.bind(this);
+
+      if (thisProperty.loopIn) {
+        loopIn = thisProperty.loopIn.bind(thisProperty);
+        loop_in = loopIn;
+      }
+
+      if (thisProperty.loopOut) {
+        loopOut = thisProperty.loopOut.bind(thisProperty);
+        loop_out = loopOut;
+      }
+
+      if (thisProperty.smooth) {
+        smooth = thisProperty.smooth.bind(thisProperty);
+      }
+
+      function loopInDuration(type, duration) {
+        return loopIn(type, duration, true);
+      }
+
+      function loopOutDuration(type, duration) {
+        return loopOut(type, duration, true);
+      }
+
+      if (this.getValueAtTime) {
+        valueAtTime = this.getValueAtTime.bind(this);
+      }
+
+      if (this.getVelocityAtTime) {
+        velocityAtTime = this.getVelocityAtTime.bind(this);
+      }
+
+      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
+
+      function lookAt(elem1, elem2) {
+        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
+        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
+        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
+        return [yaw, pitch, 0];
+      }
+
+      function easeOut(t, tMin, tMax, val1, val2) {
+        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function easeIn(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInBez, t, tMin, tMax, val1, val2);
+      }
+
+      function ease(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function applyEase(fn, t, tMin, tMax, val1, val2) {
+        if (val1 === undefined) {
+          val1 = tMin;
+          val2 = tMax;
+        } else {
+          t = (t - tMin) / (tMax - tMin);
+        }
+
+        if (t > 1) {
+          t = 1;
+        } else if (t < 0) {
+          t = 0;
+        }
+
+        var mult = fn(t);
+
+        if ($bm_isInstanceOfArray(val1)) {
+          var iKey;
+          var lenKey = val1.length;
+          var arr = createTypedArray('float32', lenKey);
+
+          for (iKey = 0; iKey < lenKey; iKey += 1) {
+            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
+          }
+
+          return arr;
+        }
+
+        return (val2 - val1) * mult + val1;
+      }
+
+      function nearestKey(time) {
+        var iKey;
+        var lenKey = data.k.length;
+        var index;
+        var keyTime;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          index = 0;
+          keyTime = 0;
+        } else {
+          index = -1;
+          time *= elem.comp.globalData.frameRate;
+
+          if (time < data.k[0].t) {
+            index = 1;
+            keyTime = data.k[0].t;
+          } else {
+            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
+              if (time === data.k[iKey].t) {
+                index = iKey + 1;
+                keyTime = data.k[iKey].t;
+                break;
+              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
+                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
+                  index = iKey + 2;
+                  keyTime = data.k[iKey + 1].t;
+                } else {
+                  index = iKey + 1;
+                  keyTime = data.k[iKey].t;
+                }
+
+                break;
+              }
+            }
+
+            if (index === -1) {
+              index = iKey + 1;
+              keyTime = data.k[iKey].t;
+            }
+          }
+        }
+
+        var obKey = {};
+        obKey.index = index;
+        obKey.time = keyTime / elem.comp.globalData.frameRate;
+        return obKey;
+      }
+
+      function key(ind) {
+        var obKey;
+        var iKey;
+        var lenKey;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          throw new Error('The property has no keyframe at index ' + ind);
+        }
+
+        ind -= 1;
+        obKey = {
+          time: data.k[ind].t / elem.comp.globalData.frameRate,
+          value: []
+        };
+        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
+        lenKey = arr.length;
+
+        for (iKey = 0; iKey < lenKey; iKey += 1) {
+          obKey[iKey] = arr[iKey];
+          obKey.value[iKey] = arr[iKey];
+        }
+
+        return obKey;
+      }
+
+      function framesToTime(fr, fps) {
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return fr / fps;
+      }
+
+      function timeToFrames(t, fps) {
+        if (!t && t !== 0) {
+          t = time;
+        }
+
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return t * fps;
+      }
+
+      function seedRandom(seed) {
+        BMMath.seedrandom(randSeed + seed);
+      }
+
+      function sourceRectAtTime() {
+        return elem.sourceRectAtTime();
+      }
+
+      function substring(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substring(init);
+          }
+
+          return value.substring(init, end);
+        }
+
+        return '';
+      }
+
+      function substr(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substr(init);
+          }
+
+          return value.substr(init, end);
+        }
+
+        return '';
+      }
+
+      function posterizeTime(framesPerSecond) {
+        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
+        value = valueAtTime(time);
+      }
+
+      var time;
+      var velocity;
+      var value;
+      var text;
+      var textIndex;
+      var textTotal;
+      var selectorValue;
+      var index = elem.data.ind;
+      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+      var parent;
+      var randSeed = Math.floor(Math.random() * 1000000);
+      var globalData = elem.globalData;
+
+      function executeExpression(_value) {
+        // globalData.pushExpression();
+        value = _value;
+
+        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
+          return value;
+        }
+
+        if (this.propType === 'textSelector') {
+          textIndex = this.textIndex;
+          textTotal = this.textTotal;
+          selectorValue = this.selectorValue;
+        }
+
+        if (!thisLayer) {
+          text = elem.layerInterface.text;
+          thisLayer = elem.layerInterface;
+          thisComp = elem.comp.compInterface;
+          toWorld = thisLayer.toWorld.bind(thisLayer);
+          fromWorld = thisLayer.fromWorld.bind(thisLayer);
+          fromComp = thisLayer.fromComp.bind(thisLayer);
+          toComp = thisLayer.toComp.bind(thisLayer);
+          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
+          fromCompToSurface = fromComp;
+        }
+
+        if (!transform) {
+          transform = elem.layerInterface('ADBE Transform Group');
+          $bm_transform = transform;
+
+          if (transform) {
+            anchorPoint = transform.anchorPoint;
+            /* position = transform.position;
+                      rotation = transform.rotation;
+                      scale = transform.scale; */
+          }
+        }
+
+        if (elemType === 4 && !content) {
+          content = thisLayer('ADBE Root Vectors Group');
+        }
+
+        if (!effect) {
+          effect = thisLayer(4);
+        }
+
+        hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+
+        if (hasParent && !parent) {
+          parent = elem.hierarchy[0].layerInterface;
+        }
+
+        time = this.comp.renderedFrame / this.comp.globalData.frameRate;
+
+        if (_needsRandom) {
+          seedRandom(randSeed + time);
+        }
+
+        if (needsVelocity) {
+          velocity = velocityAtTime(time);
+        }
+
+        expression_function();
+        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value
+        // Changed this to a ternary operation because Rollup failed compiling it correctly
+
+        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;
+        return scoped_bm_rt;
+      } // Bundlers will see these as dead code and unless we reference them
+
+
+      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
+      return executeExpression;
+    }
+
+    ob.initiateExpression = initiateExpression;
+    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
+    return ob;
+  }();
+
+  var expressionHelpers = function () {
+    function searchExpressions(elem, data, prop) {
+      if (data.x) {
+        prop.k = true;
+        prop.x = true;
+        prop.initiateExpression = ExpressionManager.initiateExpression;
+        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
+      }
+    }
+
+    function getValueAtTime(frameNum) {
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastFrame) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
+        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
+        this._cachingAtTime.lastFrame = frameNum;
+      }
+
+      return this._cachingAtTime.value;
+    }
+
+    function getSpeedAtTime(frameNum) {
+      var delta = -0.01;
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var speed = 0;
+
+      if (v1.length) {
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          speed += Math.pow(v2[i] - v1[i], 2);
+        }
+
+        speed = Math.sqrt(speed) * 100;
+      } else {
+        speed = 0;
+      }
+
+      return speed;
+    }
+
+    function getVelocityAtTime(frameNum) {
+      if (this.vel !== undefined) {
+        return this.vel;
+      }
+
+      var delta = -0.001; // frameNum += this.elem.data.st;
+
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var velocity;
+
+      if (v1.length) {
+        velocity = createTypedArray('float32', v1.length);
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          // removing frameRate
+          // if needed, don't add it here
+          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
+          velocity[i] = (v2[i] - v1[i]) / delta;
+        }
+      } else {
+        velocity = (v2 - v1) / delta;
+      }
+
+      return velocity;
+    }
+
+    function getStaticValueAtTime() {
+      return this.pv;
+    }
+
+    function setGroupProperty(propertyGroup) {
+      this.propertyGroup = propertyGroup;
+    }
+
+    return {
+      searchExpressions: searchExpressions,
+      getSpeedAtTime: getSpeedAtTime,
+      getVelocityAtTime: getVelocityAtTime,
+      getValueAtTime: getValueAtTime,
+      getStaticValueAtTime: getStaticValueAtTime,
+      setGroupProperty: setGroupProperty
+    };
+  }();
+
+  function addPropertyDecorator() {
+    function loopOut(type, duration, durationFlag) {
+      if (!this.k || !this.keyframes) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var lastKeyFrame = keyframes[keyframes.length - 1].t;
+
+      if (currentFrame <= lastKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var firstKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
+        } else {
+          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
+        }
+
+        firstKeyFrame = lastKeyFrame - cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (iterations % 2 !== 0) {
+          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+
+        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = (endV[i] - initV[i]) * repeats + current[i];
+          }
+
+          return ret;
+        }
+
+        return (endV - initV) * repeats + current;
+      } else if (type === 'continue') {
+        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(lastValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
+          }
+
+          return ret;
+        }
+
+        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);
+      }
+
+      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function loopIn(type, duration, durationFlag) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var firstKeyFrame = keyframes[0].t;
+
+      if (currentFrame >= firstKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var lastKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        lastKeyFrame = keyframes[duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
+        } else {
+          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
+        }
+
+        lastKeyFrame = firstKeyFrame + cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
+
+        if (iterations % 2 === 0) {
+          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);
+        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
+          }
+
+          return ret;
+        }
+
+        return current - (endV - initV) * repeats;
+      } else if (type === 'continue') {
+        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(firstValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;
+          }
+
+          return ret;
+        }
+
+        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;
+      }
+
+      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function smooth(width, samples) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      width = (width || 0.4) * 0.5;
+      samples = Math.floor(samples || 5);
+
+      if (samples <= 1) {
+        return this.pv;
+      }
+
+      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
+      var initFrame = currentTime - width;
+      var endFrame = currentTime + width;
+      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
+      var i = 0;
+      var j = 0;
+      var value;
+
+      if (this.pv.length) {
+        value = createTypedArray('float32', this.pv.length);
+      } else {
+        value = 0;
+      }
+
+      var sampleValue;
+
+      while (i < samples) {
+        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
+
+        if (this.pv.length) {
+          for (j = 0; j < this.pv.length; j += 1) {
+            value[j] += sampleValue[j];
+          }
+        } else {
+          value += sampleValue;
+        }
+
+        i += 1;
+      }
+
+      if (this.pv.length) {
+        for (j = 0; j < this.pv.length; j += 1) {
+          value[j] /= samples;
+        }
+      } else {
+        value /= samples;
+      }
+
+      return value;
+    }
+
+    function getTransformValueAtTime(time) {
+      if (!this._transformCachingAtTime) {
+        this._transformCachingAtTime = {
+          v: new Matrix()
+        };
+      } /// /
+
+
+      var matrix = this._transformCachingAtTime.v;
+      matrix.cloneFromProps(this.pre.props);
+
+      if (this.appliedTransformations < 1) {
+        var anchor = this.a.getValueAtTime(time);
+        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);
+      }
+
+      if (this.appliedTransformations < 2) {
+        var scale = this.s.getValueAtTime(time);
+        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);
+      }
+
+      if (this.sk && this.appliedTransformations < 3) {
+        var skew = this.sk.getValueAtTime(time);
+        var skewAxis = this.sa.getValueAtTime(time);
+        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
+      }
+
+      if (this.r && this.appliedTransformations < 4) {
+        var rotation = this.r.getValueAtTime(time);
+        matrix.rotate(-rotation * this.r.mult);
+      } else if (!this.r && this.appliedTransformations < 4) {
+        var rotationZ = this.rz.getValueAtTime(time);
+        var rotationY = this.ry.getValueAtTime(time);
+        var rotationX = this.rx.getValueAtTime(time);
+        var orientation = this.or.getValueAtTime(time);
+        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);
+      }
+
+      if (this.data.p && this.data.p.s) {
+        var positionX = this.px.getValueAtTime(time);
+        var positionY = this.py.getValueAtTime(time);
+
+        if (this.data.p.z) {
+          var positionZ = this.pz.getValueAtTime(time);
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);
+        } else {
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
+        }
+      } else {
+        var position = this.p.getValueAtTime(time);
+        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);
+      }
+
+      return matrix; /// /
+    }
+
+    function getTransformStaticValueAtTime() {
+      return this.v.clone(new Matrix());
+    }
+
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+
+    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
+      var prop = getTransformProperty(elem, data, container);
+
+      if (prop.dynamicProperties.length) {
+        prop.getValueAtTime = getTransformValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      return prop;
+    };
+
+    var propertyGetProp = PropertyFactory.getProp;
+
+    PropertyFactory.getProp = function (elem, data, type, mult, container) {
+      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;
+      // prop.loopOut = loopOut;
+      // prop.loopIn = loopIn;
+
+      if (prop.kf) {
+        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      prop.loopOut = loopOut;
+      prop.loopIn = loopIn;
+      prop.smooth = smooth;
+      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
+      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
+      prop.numKeys = data.a === 1 ? data.k.length : 0;
+      prop.propertyIndex = data.ix;
+      var value = 0;
+
+      if (type !== 0) {
+        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
+      }
+
+      prop._cachingAtTime = {
+        lastFrame: initialDefaultFrame,
+        lastIndex: 0,
+        value: value
+      };
+      expressionHelpers.searchExpressions(elem, data, prop);
+
+      if (prop.k) {
+        container.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+
+    function getShapeValueAtTime(frameNum) {
+      // For now this caching object is created only when needed instead of creating it when the shape is initialized.
+      if (!this._cachingAtTime) {
+        this._cachingAtTime = {
+          shapeValue: shapePool.clone(this.pv),
+          lastIndex: 0,
+          lastTime: initialDefaultFrame
+        };
+      }
+
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastTime) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
+        this._cachingAtTime.lastTime = frameNum;
+        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
+      }
+
+      return this._cachingAtTime.shapeValue;
+    }
+
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
+
+    function ShapeExpressions() {}
+
+    ShapeExpressions.prototype = {
+      vertices: function vertices(prop, time) {
+        if (this.k) {
+          this.getValue();
+        }
+
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        var i;
+        var len = shapePath._length;
+        var vertices = shapePath[prop];
+        var points = shapePath.v;
+        var arr = createSizedArray(len);
+
+        for (i = 0; i < len; i += 1) {
+          if (prop === 'i' || prop === 'o') {
+            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
+          } else {
+            arr[i] = [vertices[i][0], vertices[i][1]];
+          }
+        }
+
+        return arr;
+      },
+      points: function points(time) {
+        return this.vertices('v', time);
+      },
+      inTangents: function inTangents(time) {
+        return this.vertices('i', time);
+      },
+      outTangents: function outTangents(time) {
+        return this.vertices('o', time);
+      },
+      isClosed: function isClosed() {
+        return this.v.c;
+      },
+      pointOnPath: function pointOnPath(perc, time) {
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        if (!this._segmentsLength) {
+          this._segmentsLength = bez.getSegmentsLength(shapePath);
+        }
+
+        var segmentsLength = this._segmentsLength;
+        var lengths = segmentsLength.lengths;
+        var lengthPos = segmentsLength.totalLength * perc;
+        var i = 0;
+        var len = lengths.length;
+        var accumulatedLength = 0;
+        var pt;
+
+        while (i < len) {
+          if (accumulatedLength + lengths[i].addedLength > lengthPos) {
+            var initIndex = i;
+            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;
+            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
+            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
+            break;
+          } else {
+            accumulatedLength += lengths[i].addedLength;
+          }
+
+          i += 1;
+        }
+
+        if (!pt) {
+          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
+        }
+
+        return pt;
+      },
+      vectorOnPath: function vectorOnPath(perc, time, vectorType) {
+        // perc doesn't use triple equality because it can be a Number object as well as a primitive.
+        if (perc == 1) {
+          // eslint-disable-line eqeqeq
+          perc = this.v.c;
+        } else if (perc == 0) {
+          // eslint-disable-line eqeqeq
+          perc = 0.999;
+        }
+
+        var pt1 = this.pointOnPath(perc, time);
+        var pt2 = this.pointOnPath(perc + 0.001, time);
+        var xLength = pt2[0] - pt1[0];
+        var yLength = pt2[1] - pt1[1];
+        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
+
+        if (magnitude === 0) {
+          return [0, 0];
+        }
+
+        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
+        return unitVector;
+      },
+      tangentOnPath: function tangentOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'tangent');
+      },
+      normalOnPath: function normalOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'normal');
+      },
+      setGroupProperty: expressionHelpers.setGroupProperty,
+      getValueAtTime: expressionHelpers.getStaticValueAtTime
+    };
+    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
+    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+
+    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
+      var prop = propertyGetShapeProp(elem, data, type, arr, trims);
+      prop.propertyIndex = data.ix;
+      prop.lock = false;
+
+      if (type === 3) {
+        expressionHelpers.searchExpressions(elem, data.pt, prop);
+      } else if (type === 4) {
+        expressionHelpers.searchExpressions(elem, data.ks, prop);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+  }
+
+  function initialize$1() {
+    addPropertyDecorator();
+  }
+
+  function addDecorator() {
+    function searchExpressions() {
+      if (this.data.d.x) {
+        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
+        this.addEffect(this.getExpressionValue.bind(this));
+        return true;
+      }
+
+      return null;
+    }
+
+    TextProperty.prototype.getExpressionValue = function (currentValue, text) {
+      var newValue = this.calculateExpression(text);
+
+      if (currentValue.t !== newValue) {
+        var newData = {};
+        this.copyData(newData, currentValue);
+        newData.t = newValue.toString();
+        newData.__complete = false;
+        return newData;
+      }
+
+      return currentValue;
+    };
+
+    TextProperty.prototype.searchProperty = function () {
+      var isKeyframed = this.searchKeyframes();
+      var hasExpressions = this.searchExpressions();
+      this.kf = isKeyframed || hasExpressions;
+      return this.kf;
+    };
+
+    TextProperty.prototype.searchExpressions = searchExpressions;
+  }
+
+  function initialize() {
+    addDecorator();
+  }
+
+  registerRenderer('canvas', CanvasRenderer);
+  registerRenderer('html', HybridRenderer);
+  registerRenderer('svg', SVGRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier); // Registering expression plugin
+
+  setExpressionsPlugin(Expressions);
+  initialize$1();
+  initialize(); // Registering svg effects
+
+  registerEffect(20, SVGTintFilter, true);
+  registerEffect(21, SVGFillFilter, true);
+  registerEffect(22, SVGStrokeEffect, false);
+  registerEffect(23, SVGTritoneFilter, true);
+  registerEffect(24, SVGProLevelsFilter, true);
+  registerEffect(25, SVGDropShadowEffect, true);
+  registerEffect(28, SVGMatte3Effect, false);
+  registerEffect(29, SVGGaussianBlurEffect, true);
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie.min.js b/build/player/lottie.min.js
index 086aa59..be2618e 100644
--- a/build/player/lottie.min.js
+++ b/build/player/lottie.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,_useWebWorker=!1,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bmRnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}roundValues(!1);var createElementID=(F=0,function(){return idPrefix+"__lottie_element_"+(F+=1)}),F;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function createNS(t){return document.createElementNS(svgNS,t)}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var getBlendMode=(Oa={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Oa[t]||""}),Oa,lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"},Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function m(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function f(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,m,f,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return y[12]=y[12]*t+y[15]*f,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],E=y[4],x=y[5],S=y[6],C=y[7],A=y[8],_=y[9],T=y[10],k=y[11],D=y[12],M=y[13],F=y[14],w=y[15];return y[0]=g*t+v*s+b*h+P*f,y[1]=g*e+v*a+b*l+P*c,y[2]=g*r+v*n+b*p+P*d,y[3]=g*i+v*o+b*m+P*u,y[4]=E*t+x*s+S*h+C*f,y[5]=E*e+x*a+S*l+C*c,y[6]=E*r+x*n+S*p+C*d,y[7]=E*i+x*o+S*m+C*u,y[8]=A*t+_*s+T*h+k*f,y[9]=A*e+_*a+T*l+k*c,y[10]=A*r+_*n+T*p+k*d,y[11]=A*i+_*o+T*m+k*u,y[12]=D*t+M*s+F*h+w*f,y[13]=D*e+M*a+F*l+w*c,y[14]=D*r+M*n+F*p+w*d,y[15]=D*i+M*o+F*m+w*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function E(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function x(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function S(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function C(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function _(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=A(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function k(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function M(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function w(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=m,this.shear=l,this.scale=f,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=E,this.applyToY=x,this.applyToZ=S,this.applyToPointArray=k,this.applyToTriplePoints=T,this.applyToPointStringified=D,this.toCSS=M,this.to2dCSS=w,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=_,this.inversePoint=A,this.getInverseMatrix=C,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var l,p=this,m=256,f=6,c="random",d=h.pow(m,f),u=h.pow(2,52),y=2*u,g=m-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<m;)a[i]=i++;for(i=0;i<m;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*m+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function P(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return E(e)}function E(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=P(function t(e,r){var i,s=[],a=typeof e;if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,E(o)]:null===t?function(){try{if(l)return E(l.randomBytes(m));var t=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(t),E(t)}catch(t){var e=p.navigator,r=e&&e.plugins;return[+new Date,p,r,p.screen,E(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(f),e=d,r=0;t<u;)t=(t+r)*m,e*=m,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,P(E(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&b(i,a),t.state=function(){return b(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},P(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function m(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function f(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:m(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<l;++r)this._mSampleValues[r]=m(r*p,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&i[a]<=t;++a)s+=p;var o=s+(t-i[--a])/(i[a+1]-i[a])*p,h=f(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=f(e,r,i);if(0===a)return e;e-=(m(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=m(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,r)}},t}();function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){var D=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var p=function(t,e,r,i){var s,a,n,o,h,l,p=defaultCurveSegments,m=0,f=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],f[a]=o,null!==c[a]&&(l+=bmPow(f[a]-c[a],2)),c[a]=f[a];l&&(m+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=m}return d.addedLength=m,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[s]){var a,n,o,h,l,p,m,f=defaultCurveSegments,c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(f=2);var u=new g(f);for(o=r.length,a=0;a<f;a+=1){for(m=createSizedArray(o),l=a/(f-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+r[n])+3*(1-l)*bmPow(l,2)*(e[n]+i[n])+bmPow(l,3)*e[n],m[n]=h,null!==d&&(p+=bmPow(m[n]-d[n],2));c+=p=bmSqrt(p),u.points[a]=new v(p,m),d=m}u.segmentLength=c,b[s]=u}return b[s]});function M(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var F=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),r.totalLength=l,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=M(s,n),l=M(a=1<a?1:a,n),p=t.length,m=1-h,f=1-l,c=m*m*m,d=h*m*m*3,u=h*h*m*3,y=h*h*h,g=m*m*f,v=h*m*f+m*h*f+m*m*l,b=h*h*f+m*h*l+h*m*l,P=h*h*l,E=m*f*f,x=h*f*f+m*l*f+m*f*l,S=h*l*f+m*l*l+h*f*l,C=h*l*l,A=f*f*f,_=l*f*f+f*l*f+f*f*l,T=l*l*f+f*l*l+l*f*l,k=l*l*l;for(o=0;o<p;o+=1)F[4*o]=D.round(1e3*(c*t[o]+d*r[o]+u*i[o]+y*e[o]))/1e3,F[4*o+1]=D.round(1e3*(g*t[o]+v*r[o]+b*i[o]+P*e[o]))/1e3,F[4*o+2]=D.round(1e3*(E*t[o]+x*r[o]+S*i[o]+C*e[o]))/1e3,F[4*o+3]=D.round(1e3*(A*t[o]+_*r[o]+T*i[o]+k*e[o]))/1e3;return F},getPointInSegment:function(t,e,r,i,s,a){var n=M(s,a),o=1-n;return[D.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,D.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var l,p=D.sqrt(D.pow(i-t,2)+D.pow(s-e,2)+D.pow(a-r,2)),m=D.sqrt(D.pow(n-t,2)+D.pow(o-e,2)+D.pow(h-r,2)),f=D.sqrt(D.pow(n-i,2)+D.pow(o-s,2)+D.pow(h-a,2));return-1e-4<(l=m<p?f<p?p-m-f:f-m-p:m<f?f-m-p:m-p-f)&&l<1e-4}}}!function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-s)),i=setTimeout(function(){t(e+r)},r);return s=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&_useWebWorker){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function m(t,e){var r,i,s,a,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var p=r.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)d(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&d(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&d(p[s].pt.k[n].e[0])}0===r.ty?(r.layers=f(r.refId,e),m(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0!==(h=r).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function f(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}return null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&d(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&d(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var h,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,r,i,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(a=t.chars[e].data.shapes[0].it).length,r=0;r<i;r+=1)(s=a[r].ks.k).__converted||(d(a[r].ks.k),s.__converted=!0)}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),s=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,4,18];function l(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(s(t),e(t),r(t),i(t),a(t),m(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=s,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=a,t.completeLayers=m,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}();function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}var FontManager=function(){var a={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function f(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=f(i[r].fFamily,"monospace"),i[r].sansCase=f(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.setAttribute("f-family",i[r].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(l)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.type="text/css",p.rel="stylesheet",p.href=i[r].fPath,document.body.appendChild(p)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.setAttribute("rel","stylesheet"),m.setAttribute("href",i[r].fPath),e.appendChild(m)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),PropertyFactory=function(){var m=initialDefaultFrame,s=Math.abs;function f(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,m,f,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,b,P,E,x,S,C,A,_,T=a.t-i,k=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var D=n.bezierData;if(T<=t||t<k){var M=T<=t?D.points.length-1:0;for(h=D.points[M].point.length,o=0;o<h;o+=1)r[o]=D.points[M].point[o]}else{n.__fnct?f=n.__fnct:(f=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=f),l=f((t-k)/(T-k));var F,w=D.segmentLength*l,I=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,p=D.points.length;y;){if(I+=D.points[m].partialLength,0===w||0===l||m===D.points.length-1){for(h=D.points[m].point.length,o=0;o<h;o+=1)r[o]=D.points[m].point[o];break}if(I<=w&&w<I+D.points[m+1].partialLength){for(F=(w-I)/D.points[m+1].partialLength,h=D.points[m].point.length,o=0;o<h;o+=1)r[o]=D.points[m].point[o]+(D.points[m+1].point[o]-D.points[m].point[o])*F;break}m<p-1?m+=1:y=!1}e._lastPoint=m,e._lastAddedLength=I-D.points[m].partialLength,e._lastKeyframeIndex=d}}else{var V,R,B,L,G;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(T<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=k)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var z=O(s.s),N=O(g);v=r,b=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],m=t[2],f=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+m*u+f*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*m+o*u,h[3]=n*f+o*y,h}(z,N,(t-k)/(T-k)),P=b[0],E=b[1],x=b[2],S=b[3],C=Math.atan2(2*E*S-2*P*x,1-2*E*E-2*x*x),A=Math.asin(2*P*E+2*x*S),_=Math.atan2(2*P*S-2*E*x,1-2*P*P-2*x*x),v[0]=C/degToRads,v[1]=A/degToRads,v[2]=_/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(l=T<=t?1:t<k?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?f=n.__fnct[d]:(V=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],R=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],B=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],L=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],f=BezierFactory.getBezierEasing(V,R,B,L).get,n.__fnct[d]=f)):n.__fnct?f=n.__fnct:(V=s.o.x,R=s.o.y,B=s.i.x,L=s.i.y,f=BezierFactory.getBezierEasing(V,R,B,L).get,s.keyframeMetadata=f),f((t-k)/(T-k)))),g=a.s||s.e,G=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*l,"multidimensional"===this.propType?r[d]=G:r=G}return e.lastIndex=c,r}function O(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==m&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:m,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=m,this.pv=m,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=m,this.pv[s]=m;this._caching={lastFrame:m,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new l(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,l,p,m,f=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,f=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=f,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},f=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=P),p=P((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=f,n=0;n<h;n+=1)for(o=0;o<l;o+=1)m=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=m,m=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=m,m=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=m}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*s),f=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?l:p,i=n?m:f;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-m*a*s*o,h+p*a*s*o,l+m*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new p(t,e):6===r?i=new h(t,e):7===r&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return m}(),ShapeModifiers=(tt={},ut={},tt.registerModifier=function(t,e){ut[t]||(ut[t]=e)},tt.getModifier=function(t,e,r){return new ut[t](e,r)},tt),tt,ut;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,m;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,m=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,m,f=this.shapes.length,c=0;if(r===e)for(s=0;s<f;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<f;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<f;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,m=0,!d.shape._mdf&&d.pathsData.length)m=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),m+=p.totalLength;d.totalShapeLength=m,d.pathsData=l}c+=m,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,P=0;for(s=f-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<f?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var E=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var x=E.pop();this.addPaths(E,u),E=this.addShapes(d,y[1],x)}else this.addPaths(E,u),E=this.addShapes(d,y[1]);this.addPaths(E,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),u.push(r),i=0;i<c;i+=1){for(h=m[i].lengths,r.c=f[i].c,a=f[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[s],f[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[s],f[i].o[s-1],f[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[0],f[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[0],f[i].o[s-1],f[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,m,f,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,m=u=s[1]-(s[1]-o[1])*l,f=p-(p-s[0])*roundCorner,c=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=f=s[0]+(o[0]-s[0])*l,m=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,m,f=shapePool.newElement();for(f.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,m=t.i[a][1]+(i[1]-t.i[a][1])*-r,f.setTripleAt(n,o,h,l,p,m,a);return f},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,m=p[p.length-1];0!==m.transform.op.v?(m.transform.op._mdf=!0,m.transform.op.v=0):m.transform.op._mdf=!1}a+=1}this._currentCopies=h;var f=this.o.v,c=f%1,d=0<f?Math.floor(f):Math.ceil(f),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(0<f){for(;P<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(f<0){for(;d<P;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];P+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}(),featureSupport=(My={maskType:!0},(/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))&&(My.maskType=!1),My),My,filtersFactory=(Ny={},Ny.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},Ny.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},Ny),Ny;function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,m,f,c,d,u,y,g,v,b,P,E=this._moreOptions.alignment.v,x=this._animatorsData,S=this._textData,C=this.mHelper,A=this._renderType,_=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var k,D=P.v;for(this._pathData.r.v&&(D=D.reverse()),n={tLength:0,segments:[]},a=D._length-1,s=g=0;s<a;s+=1)k=bez.buildBezierData(D.v[s],D.v[s+1],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[s+1][0]-D.v[s+1][0],D.i[s+1][1]-D.v[s+1][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength;s=a,P.v.c&&(k=bez.buildBezierData(D.v[s],D.v[0],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[0][0]-D.v[0][0],D.i[0][1]-D.v[0][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=1,p=!(l=f=0),u=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),m=(d=u[f=u.length-1].points).length-1;o<0;)o+=d[m].partialLength,(m-=1)<0&&(m=(d=u[f-=1].points).length-1);c=(d=u[f].points)[m-1],y=(h=d[m]).partialLength}a=T.length,i=r=0;var M,F,w,I,V,R=1.2*t.finalSize*.714,B=!0;w=x.length;var L,G,z,N,O,H,j,q,W,Y,X,J,K=-1,Z=o,$=f,U=m,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(F=0;F<w;F+=1)(M=x[F].a).t.propType&&(nt&&2===t.j&&(it+=M.t.v*st),(V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?rt+=M.t.v*V[0]*st:rt+=M.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(C.reset(),N=1,T[s].n)r=0,i+=t.yOffset,i+=B?1:0,o=Z,B=!1,this._hasMaskedPath&&(m=U,c=(d=u[f=$].points)[m-1],y=(h=d[m]).partialLength,l=0),J=W=X=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}K!==T[s].ind&&(T[K]&&(o+=T[K].extra),o+=T[s].an/2,K=T[s].ind),o+=E[0]*T[s].an*.005;var ot=0;for(F=0;F<w;F+=1)(M=x[F].a).p.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=M.p.v[0]*V[0]:ot+=M.p.v[0]*V),M.a.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=M.a.v[0]*V[0]:ot+=M.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,C.translate(-E[0]*T[s].an*.005,-E[1]*R*.01),p=!1):d&&(l+=h.partialLength,(m+=1)>=d.length&&(m=0,d=u[f+=1]?u[f].points:P.v.c?u[f=m=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[m]).partialLength));L=T[s].an/2-T[s].add,C.translate(-L,0,0)}else L=T[s].an/2-T[s].add,C.translate(-L,0,0),C.translate(-E[0]*T[s].an*.005,-E[1]*R*.01,0);for(F=0;F<w;F+=1)(M=x[F].a).t.propType&&(V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=M.t.v*V[0]:o+=M.t.v*V:V.length?r+=M.t.v*V[0]:r+=M.t.v*V));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<w;F+=1)(M=x[F].a).a.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?C.translate(-M.a.v[0]*V[0],-M.a.v[1]*V[1],M.a.v[2]*V[2]):C.translate(-M.a.v[0]*V,-M.a.v[1]*V,M.a.v[2]*V));for(F=0;F<w;F+=1)(M=x[F].a).s.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?C.scale(1+(M.s.v[0]-1)*V[0],1+(M.s.v[1]-1)*V[1],1):C.scale(1+(M.s.v[0]-1)*V,1+(M.s.v[1]-1)*V,1));for(F=0;F<w;F+=1){if(M=x[F].a,V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),M.sk.propType&&(V.length?C.skewFromAxis(-M.sk.v*V[0],M.sa.v*V[1]):C.skewFromAxis(-M.sk.v*V,M.sa.v*V)),M.r.propType&&(V.length?C.rotateZ(-M.r.v*V[2]):C.rotateZ(-M.r.v*V)),M.ry.propType&&(V.length?C.rotateY(M.ry.v*V[1]):C.rotateY(M.ry.v*V)),M.rx.propType&&(V.length?C.rotateX(M.rx.v*V[0]):C.rotateX(M.rx.v*V)),M.o.propType&&(V.length?N+=(M.o.v*V[0]-N)*V[0]:N+=(M.o.v*V-N)*V),t.strokeWidthAnim&&M.sw.propType&&(V.length?H+=M.sw.v*V[0]:H+=M.sw.v*V),t.strokeColorAnim&&M.sc.propType)for(q=0;q<3;q+=1)V.length?O[q]+=(M.sc.v[q]-O[q])*V[0]:O[q]+=(M.sc.v[q]-O[q])*V;if(t.fillColorAnim&&t.fc){if(M.fc.propType)for(q=0;q<3;q+=1)V.length?j[q]+=(M.fc.v[q]-j[q])*V[0]:j[q]+=(M.fc.v[q]-j[q])*V;M.fh.propType&&(j=V.length?addHueToRGB(j,M.fh.v*V[0]):addHueToRGB(j,M.fh.v*V)),M.fs.propType&&(j=V.length?addSaturationToRGB(j,M.fs.v*V[0]):addSaturationToRGB(j,M.fs.v*V)),M.fb.propType&&(j=V.length?addBrightnessToRGB(j,M.fb.v*V[0]):addBrightnessToRGB(j,M.fb.v*V))}}for(F=0;F<w;F+=1)(M=x[F].a).p.propType&&(V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?V.length?C.translate(0,M.p.v[1]*V[0],-M.p.v[2]*V[1]):C.translate(0,M.p.v[1]*V,-M.p.v[2]*V):V.length?C.translate(M.p.v[0]*V[0],M.p.v[1]*V[1],-M.p.v[2]*V[2]):C.translate(M.p.v[0]*V,M.p.v[1]*V,-M.p.v[2]*V));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&(Y="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(C.translate(0,-t.ls),C.translate(0,E[1]*R*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),C.rotate(-ht*Math.PI/180)}C.translate(G,z,0),o-=E[0]*T[s].an*.005,T[s+1]&&K!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(C.translate(r,i,0),t.ps&&C.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}C.translate(0,-t.ls),C.translate(L,0,0),C.translate(E[0]*T[s].an*.005,E[1]*R*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===A?tt=C.toCSS():"svg"===A?tt=C.to2dCSS():et=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],J=N}this.lettersChangedFlag=_<=s?(I=new LetterProps(J,W,Y,X,tt,et),this.renderedLetters.push(I),_+=1,!0):(I=this.renderedLetters[s]).update(J,W,Y,X,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],m=0,f=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,E=getFontProperties(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var x,S=t.tr/1e3*t.finalSize;if(t.sz)for(var C,A,_=!0,T=t.sz[0],k=t.sz[1];_;){g=C=0,r=(A=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var D=-1;for(e=0;e<r;e+=1)x=A[e].charCodeAt(0),i=!1," "===A[e]?D=e:13!==x&&3!==x||(i=!(g=0),C+=t.finalLineHeight||1.2*t.finalSize),T<g+(P=h.chars?(o=h.getCharData(A[e],b.fStyle,b.fFamily),i?0:o.w*t.finalSize/100):h.measureText(A[e],t.f,t.finalSize))&&" "!==A[e]?(-1===D?r+=1:e=D,C+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,D===e?1:0,"\r"),D=-1,g=0):(g+=P,g+=S);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&k<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,_=!1)}g=-S;var M,F=P=0;for(e=0;e<r;e+=1)if(i=!1,13===(x=(M=t.finalText[e]).charCodeAt(0))||3===x?(F=0,y.push(g),v=v<g?g:v,g=-2*S,i=!(s=""),u+=1):s=M,P=h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===M?F+=P+S:(g+=P+S+F,F=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==f){if(c+=P,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=P);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=P,d+=1;m+=1,c=0}}else if(3==f){if(c+=P,""===s||e===r-1){for(""===s&&(c-=P);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=P,d+=1;c=0,m+=1}}else p[m].ind=m,p[m].extra=0,m+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,R,B=l.a;n=B.length;var L=[];for(a=0;a<n;a+=1){for((w=B[a]).a.sc&&(t.strokeColorAnim=!0),w.a.sw&&(t.strokeWidthAnim=!0),(w.a.fc||w.a.fh||w.a.fs||w.a.fb)&&(t.fillColorAnim=!0),R=0,V=w.s.b,e=0;e<r;e+=1)(I=p[e]).anIndexes[a]=R,(1==V&&""!==I.val||2==V&&""!==I.val&&" "!==I.val||3==V&&(I.n||" "==I.val||e==r-1)||4==V&&(I.n||e==r-1))&&(1===w.s.rn&&L.push(R),R+=1);l.a[a].s.totalChars=R;var G,z=-1;if(1===w.s.rn)for(e=0;e<r;e+=1)z!=(I=p[e]).anIndexes[a]&&(z=I.anIndexes[a],G=L.splice(Math.floor(Math.random()*L.length),1)[0]),I.anIndexes[a]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,m=-p/2+(t=y(u(0,t+.5-o),h-o)),f=p/2;n=Math.sqrt(1-m*m/(f*f))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}(),poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},pointPool=poolFactory(8,function(){return createTypedArray("float32",2)}),shapePool=(NC=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),NC.clone=function(t){var e,r=NC.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},NC),NC,shapeCollectionPool=(VC={newShapeCollection:function(){var t;t=WC?YC[WC-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,WC===XC&&(YC=pooling.double(YC),XC*=2);YC[WC]=t,WC+=1}},WC=0,XC=4,YC=createSizedArray(XC),VC),VC,WC,XC,YC,segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}),bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}),markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}();function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,m,f,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",f=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(m=createNS("feMorphology")).setAttribute("operator","erode"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),p.appendChild(m),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):f=m=null,this.storedData[i]={elem:s,x:f,expan:m,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(u[o]);var E=createNS("mask");E.setAttribute("mask-type","alpha"),E.setAttribute("id",y+"_"+d),E.appendChild(s),a.appendChild(E),P.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(P)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRenderer.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRenderer.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRenderer.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRenderer.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=r<i&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRenderer.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);(e[t]=r).initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([BaseRenderer],HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,s):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRenderer.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRenderer.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRenderer.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRenderer.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},HybridRenderer.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRenderer.prototype.createNull=SVGRenderer.prototype.createNull,HybridRenderer.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRenderer.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRenderer.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?"3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")):"2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t);for(t=(r=this.threeDElements.length)-1;0<=t;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRenderer.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var s,a=this.threeDElements[r].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[r].container.insertBefore(t,s):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRenderer.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",styleDiv(this.resizerElem=e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRenderer.prototype.updateContainerSize=function(){var t,e,r,i,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight;i=s/a<this.globalData.compSize.w/this.globalData.compSize.h?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,r=0,(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,0);var n=this.resizerElem.style;n.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",n.transform=n.webkitTransform},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.resizerElem.style.display="block"},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",s.perspective=s.webkitPerspective}}},HybridRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],i,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+locationHref+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+locationHref+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function r(t,e,r){var i,s,a,n,o,h,l,p,m,f,c,d=e.styles.length,u=e.lvl;for(h=0;h<d;h+=1){if(n=e.sh._mdf||r,e.styles[h].lvl<u){for(p=g.reset(),f=u-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<f;)n=e.transformers[c].mProps._mdf||n,f-=1,c-=1;if(n)for(f=u-e.styles[h].lvl,c=e.transformers.length-1;0<f;)m=e.transformers[c].mProps.v.props,p.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),f-=1,c-=1}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",i=0;i<s;i+=1)(o=l.shapes[i])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function i(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function s(t,e,r){a(t,e,r),n(t,e,r)}function a(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,m=e.e.v;if(e.o._mdf||r){var f="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(f,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",m[0]),h.setAttribute("y2",m[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",m[0]),e.of.setAttribute("y2",m[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-m[0],2)+Math.pow(p[1]-m[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-m[0],2)+Math.pow(p[1]-m[1],2)));var g=Math.atan2(m[1]-p[1],m[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],E=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",E))}}function n(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return i;case"gf":return a;case"gs":return s;case"st":return n;case"sh":case"el":case"rc":case"sr":return r;case"tr":return e;default:return null}}}}();function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function BaseElement(){}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,r){this.initElement(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),m=createNS("path");m.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var f=createElementID();if(p.setAttribute("id",f),p.appendChild(m),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+f+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+f+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e,r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l,p=this.mHelper,m="",f=this.data.singleShape,c=0,d=0,u=!0,y=.001*r.tr*r.finalSize;if(!f||h||r.sz){var g,v,b=this.textSpans.length;for(t=0;t<e;t+=1)h&&f&&0!==t||(n=t<b?this.textSpans[t]:createNS(h?"path":"text"),b<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(r.finalSize/100,r.finalSize/100),f&&(o[t].n&&(c=-y,d+=r.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(r,p,o[t].line,c,d),c+=o[t].l||0,c+=y),h?(l=(g=(v=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily))&&v.data||{}).shapes?g.shapes[0].it:[],f?m+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(f&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));f&&n&&n.setAttribute("d",m)}else{var P=this.textContainer,E="start";switch(r.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}P.setAttribute("text-anchor",E),P.setAttribute("letter-spacing",y);var x=this.buildTextContents(r.finalText);for(e=x.length,d=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||createNS("tspan")).textContent=x[t],n.setAttribute("x",0),n.setAttribute("y",d),n.style.display="inherit",P.appendChild(n),this.textSpans[t]=n,d+=r.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(r=s[t],i=this.textSpans[t],r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+locationHref+"#"+r.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,m,f,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=r[f-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)f?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(f)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(f||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(f||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(f?(m=e[o]).closed=!1:((m=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=m,this.shapeModifiers.push(m)),y.push(m)):"rp"===t[o].ty&&(f?(m=e[o]).closed=!0:(m=ShapeModifiers.getModifier(t[o].ty),(e[o]=m).init(this,t,o,e),this.shapeModifiers.push(m),n=!1),y.push(m));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+locationHref+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),m=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,f=Math.floor(p/m);for(l=0;l<f;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),m=0,f=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:l<=a?c<0?i:s:i+f*Math.pow((a-t)/c,1/r),p[m]=n,m+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=r).matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1)r=null,20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r);n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+locationHref+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function CVBaseElement(){}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVEffects(){}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HEffects(){}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o<n&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(r=a)*o:r=(e=s)/o,i.drawImage(this.img,(s-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,l,p,m=t.length-1,f=[],c=[],d=[].concat(s);for(a=m;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),f.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),(e[a]=l).init(this,t,a,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),m=c.length,a=0;a<m;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,m=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(m.strokeStyle="st"===o?h.co:h.grd,m.lineWidth=h.wi,m.lineCap=h.lc,m.lineJoin=h.lj,m.miterLimit=h.ml||0):m.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&m.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(m.beginPath(),h.da&&(m.setLineDash(h.da),m.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?m.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?m.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):m.closePath();"st"!==o&&"gs"!==o||(m.stroke(),h.da&&m.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&m.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),m=e.h.v;1<=m?m=.99:m<=-1&&(m=-.99);var f=l*m,c=Math.cos(p+e.a.v)*f+o[0],d=Math.sin(p+e.a.v)*f+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,s,a,n,o,h,l,p,m,f,c,d,u=this.globalData.fontManager.getFontByName(t.f),y=t.l,g=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,P=0,E=0,x=!0,S=0;for(i=0;i<s;i+=1){for(n=(a=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&a.data||{},g.reset(),v&&y[i].n&&(P=-b,E+=t.yOffset,E+=x?1:0,x=!1),m=(l=n.shapes?n.shapes[0].it:[]).length,g.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,g,y[i].line,P,E),c=createSizedArray(m),p=0;p<m;p+=1){for(h=l[p].ks.k.i.length,f=l[p].ks.k,d=[],o=1;o<h;o+=1)1===o&&d.push(g.applyToX(f.v[0][0],f.v[0][1],0),g.applyToY(f.v[0][0],f.v[0][1],0)),d.push(g.applyToX(f.o[o-1][0],f.o[o-1][1],0),g.applyToY(f.o[o-1][0],f.o[o-1][1],0),g.applyToX(f.i[o][0],f.i[o][1],0),g.applyToY(f.i[o][0],f.i[o][1],0),g.applyToX(f.v[o][0],f.v[o][1],0),g.applyToY(f.v[o][0],f.v[o][1],0));d.push(g.applyToX(f.o[o-1][0],f.o[o-1][1],0),g.applyToY(f.o[o-1][0],f.o[o-1][1],0),g.applyToX(f.i[0][0],f.i[0][1],0),g.applyToY(f.i[0][0],f.i[0][1],0),g.applyToX(f.v[0][0],f.v[0][1],0),g.applyToY(f.v[0][0],f.v[0][1],0)),c[p]=d}v&&(P+=y[i].l,P+=b),this.textSpans[S]?this.textSpans[S].elem=c:this.textSpans[S]={elem:c},S+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,s,a,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,m,f=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?f!==o.fc&&(f=o.fc,n.fillStyle=o.fc):f!==this.values.fill&&(f=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(m=p[r]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(m=p[r]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},CVEffects.prototype.renderFrame=function(){},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([HybridRenderer,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(r=0;r<l-1;r+=1)i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[r+1]),n=this.getTransformedPoint(h,o.v[r+1]),this.checkBounds(i,s,a,n,e);o.c&&(i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(i,s,a,n,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,s){this.getBoundsOfCurve(t,e,r,i);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var s,a,n,o,h,l,p,m=[[t[0],i[0]],[t[1],i[1]]],f=0;f<2;++f)a=6*t[f]-12*e[f]+6*r[f],s=-3*t[f]+9*e[f]-9*r[f]+3*i[f],n=3*e[f]-3*t[f],a|=0,n|=0,0===(s|=0)&&0===a||(0===s?0<(o=-n/a)&&o<1&&m[f].push(this.calculateF(o,t,e,r,i,f)):0<=(h=a*a-4*n*s)&&(0<(l=(-a+bmSqrt(h))/(2*s))&&l<1&&m[f].push(this.calculateF(l,t,e,r,i,f)),0<(p=(-a-bmSqrt(h))/(2*s))&&p<1&&m[f].push(this.calculateF(p,t,e,r,i,f))));this.shapeBoundingBox.left=bmMin.apply(null,m[0]),this.shapeBoundingBox.top=bmMin.apply(null,m[1]),this.shapeBoundingBox.right=bmMax.apply(null,m[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,m[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it&&this.calculateBoundingBox(t[r].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=s,i.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,s,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var n=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=n}var h,l,p,m=t.l;s=m.length;var f,c=this.mHelper,d="",u=0;for(i=0;i<s;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?h=this.textPaths[u]:((h=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[u]?this.textPaths[u]:createNS("text"):this.textSpans[u]?(l=this.textSpans[u],h=this.textPaths[u]):(styleDiv(l=createTag("span")),styleDiv(h=createTag("span")),l.appendChild(h)),this.globalData.fontManager.chars){var y,g=this.globalData.fontManager.getCharData(t.finalText[i],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(y=g?g.data:null,c.reset(),y&&y.shapes&&(f=y.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),d=this.createPathShape(c,f),h.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(l),y&&y.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,P="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=P,b.webkitTransform=P,m[i].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(h.textContent=m[i].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(l);var E=h.style,x="translate3d(0,"+-t.finalSize/1.2+"px,0)";E.transform=x,E.webkitTransform=x}this.isMasked?this.textSpans[u]=h:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=h,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,s,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(i=l.length,r=0;r<i;r+=1)l[r].n?o+=1:(a=this.textSpans[r],n=this.textPaths[r],s=h[o],o+=1,s._mdf.m&&(this.isMasked?a.setAttribute("transform",s.m):(a.style.webkitTransform=s.m,a.style.transform=s.m)),a.style.opacity=s.o,s.sw&&s._mdf.sw&&n.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&n.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(n.setAttribute("fill",s.fc),n.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var m="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=m,t.webkitTransform=m}}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,s=this.comp.threeDElements.length;for(t=0;t<s;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){r=e.perspectiveElem.style,i=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,i.transformOrigin=n,i.mozTransformOrigin=n,i.webkitTransformOrigin=n,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;0<=t;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var m,f,c;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(m=this.comp.threeDElements[t]).type){if(p){var d=this.mat.toCSS();(c=m.container.style).transform=d,c.webkitTransform=d}this.pe._mdf&&((f=m.perspectiveElem.style).perspective=this.pe.v+"px",f.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},HEffects.prototype.renderFrame=function(){};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||m()),e+=1}function l(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return f(i,t),i.setData(t,e),i}function p(){n+=1,d()}function m(){n-=1}function f(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",p),t.addEventListener("_idle",m),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),l(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(LZ={},LZ.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},LZ),LZ;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=typeof t,i=typeof e;if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=typeof t,i=typeof e;if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var l=n-o;switch(r=.5<h?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=(f[a]-m[a])*d+c[a];return o}return(f-m)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(f[a]-m[a])*d;return o}return c-(f-m)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var m=this.px.getValueAtTime(t),f=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(m*this.px.mult,f*this.py.mult,-c*this.pz.mult)}else e.translate(m*this.px.mult,f*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,m=r.c&&o===h-1?0:o+1,f=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[m],r.o[p],r.i[m],f,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null};var ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(m(t[i],e[i],r)):"tm"===t[i].ty?s.push(f(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(d(t[i],e[i],r)):"sr"===t[i].ty?s.push(u(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(l(t[i],e[i],r)):s.push(p(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(){return function(){return null}}function m(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function f(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function m(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function f(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=p,i.applyPoint=l,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=m,i.sampleImage=f,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),FootageInterface=(x7=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"==typeof(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"==typeof(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=x7(t),e}),x7,CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function l(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(p(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function p(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(l(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TextExpressionSelectorPropFactory=function(){function r(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=r,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}TextSelectorProp.getTextSelectorProp=function(t,e,r){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,r):propertyGetTextProp(t,e,r)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}};var lottie={};function setLocationHref(t){locationHref=t}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){subframeEnabled=t}function setIDPrefix(t){idPrefix=t}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;default:case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocationHref,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=function(t){_useWebWorker=t},lottie.setIDPrefix=setIDPrefix,lottie.__getFactory=getFactory,lottie.version="5.8.1";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,r){return"float32"===e?new Float32Array(r):"int16"===e?new Int16Array(r):"uint8c"===e?new Uint8ClampedArray(r):t(e,r)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,idPrefix="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix=t},getIdPrefix=function(){return idPrefix};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,r=1,i=[],s={onmessage:function(){},postMessage:function(e){t({data:e})}},a={postMessage:function(t){s.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(r);return new Worker(i)}return t=e,s}((function(t){if(a.dataManager||(a.dataManager=function(){function t(s,a){var n,o,h,l,p,m,c=s.length;for(o=0;o<c;o+=1)if("ks"in(n=s[o])&&!n.completed){if(n.completed=!0,n.tt&&(s[o-1].td=n.tt),n.hasMask){var d=n.masksProperties;for(l=d.length,h=0;h<l;h+=1)if(d[h].pt.k.i)i(d[h].pt.k);else for(m=d[h].pt.k.length,p=0;p<m;p+=1)d[h].pt.k[p].s&&i(d[h].pt.k[p].s[0]),d[h].pt.k[p].e&&i(d[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,a),t(n.layers,a)):4===n.ty?r(n.shapes):5===n.ty&&f(n)}}function e(t,e){var r=function(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r];r+=1}return null}(t,e);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(t){var e,s,a;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(a=t[e].ks.k.length,s=0;s<a;s+=1)t[e].ks.k[s].s&&i(t[e].ks.k[s].s[0]),t[e].ks.k[s].e&&i(t[e].ks.k[s].e[0]);else"gr"===t[e].ty&&r(t[e].it)}function i(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function s(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=void 0,i=(r=t[e]).t.d,r.t.d={k:[{s:i,t:0}]})}return function(r){if(s(t,r.v)&&(e(r.layers),r.assets)){var i,a=r.assets.length;for(i=0;i<a;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),o=(a=[4,7,99],function(t){if(t.chars&&!s(a,t.v)){var e,i=t.chars.length;for(e=0;e<i;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(r(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,r,i=t.length;for(e=0;e<i;e+=1)5===t[e].ty&&(r=void 0,"number"==typeof(r=t[e].t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(r){if(s(t,r.v)&&(e(r.layers),r.assets)){var i,a=r.assets.length;for(i=0;i<a;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var r,i,s,a=t.length;for(r=0;r<a;r+=1)if("gr"===t[r].ty)e(t[r].it);else if("fl"===t[r].ty||"st"===t[r].ty)if(t[r].c.k&&t[r].c.k[0].i)for(s=t[r].c.k.length,i=0;i<s;i+=1)t[r].c.k[i].s&&(t[r].c.k[i].s[0]/=255,t[r].c.k[i].s[1]/=255,t[r].c.k[i].s[2]/=255,t[r].c.k[i].s[3]/=255),t[r].c.k[i].e&&(t[r].c.k[i].e[0]/=255,t[r].c.k[i].e[1]/=255,t[r].c.k[i].e[2]/=255,t[r].c.k[i].e[3]/=255);else t[r].c.k[0]/=255,t[r].c.k[1]/=255,t[r].c.k[2]/=255,t[r].c.k[3]/=255}function r(t){var r,i=t.length;for(r=0;r<i;r+=1)4===t[r].ty&&e(t[r].shapes)}return function(e){if(s(t,e.v)&&(r(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var r,i,s;for(r=t.length-1;r>=0;r-=1)if("sh"===t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(s=t[r].ks.k.length,i=0;i<s;i+=1)t[r].ks.k[i].s&&(t[r].ks.k[i].s[0].c=t[r].closed),t[r].ks.k[i].e&&(t[r].ks.k[i].e[0].c=t[r].closed);else"gr"===t[r].ty&&e(t[r].it)}function r(t){var r,i,s,a,n,o,h=t.length;for(i=0;i<h;i+=1){if((r=t[i]).hasMask){var l=r.masksProperties;for(a=l.length,s=0;s<a;s+=1)if(l[s].pt.k.i)l[s].pt.k.c=l[s].cl;else for(o=l[s].pt.k.length,n=0;n<o;n+=1)l[s].pt.k[n].s&&(l[s].pt.k[n].s[0].c=l[s].cl),l[s].pt.k[n].e&&(l[s].pt.k[n].e[0].c=l[s].cl)}4===r.ty&&e(r.shapes)}}return function(e){if(s(t,e.v)&&(r(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var m={completeData:function(r){r.__complete||(l(r),n(r),o(r),h(r),p(r),t(r.layers,r.assets),function(r,i){if(r){var s=0,a=r.length;for(s=0;s<a;s+=1)1===r[s].t&&(r[s].data.layers=e(r[s].data.refId,i),t(r[s].data.layers,i))}}(r.chars,r.assets),r.__complete=!0)}};return m.checkColors=l,m.checkChars=o,m.checkPathProperties=h,m.checkShapes=p,m.completeLayers=t,m}()),a.assetLoader||(a.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,i,s){var a,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)a=t(n),i(a);else try{a=t(n),i(a)}catch(t){s&&s(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",r+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)a.assetLoader.load(t.data.path,t.data.fullPath,(function(e){a.dataManager.completeData(e),a.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){a.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;a.dataManager.completeData(e),a.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&a.assetLoader.load(t.data.path,t.data.fullPath,(function(e){a.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){a.postMessage({id:t.data.id,status:"error"})}))})),e.onmessage=function(t){var e=t.data,r=e.id,s=i[r];i[r]=null,"success"===e.status?s.onComplete(e.payload):s.onError&&s.onError()})}function o(t,e){var s="processId_"+(r+=1);return i[s]={onComplete:t,onError:e},s}return{loadAnimation:function(t,r,i){n();var s=o(r,i);e.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:s})},loadData:function(t,r,i){n();var s=o(r,i);e.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:s})},completeAnimation:function(t,r,i){n();var s=o(r,i);e.postMessage({type:"complete",animation:t,id:s})}}}(),ImagePreloader=function(){var t=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function s(t){var e=0,r=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},r=i(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var r=i(e,this.assetsPath,this.path),s=createTag("img");s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),s.src=r;var a={img:s,assetData:e};return a},createImageData:function(e){var r=i(e,this.assetsPath,this.path),s=createNS("image");isSafari?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(s):this._elementHelper.appendChild(s);var a={img:s,assetData:e};return a},imageLoaded:e,footageLoaded:r,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},n}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var r=[],i=0;i<e.length;i+=1){var s=e[i],a={time:s.tm,duration:s.dr};try{a.payload=JSON.parse(e[i].cm)}catch(r){try{a.payload=t(e[i].cm)}catch(t){a.payload={name:e[i]}}}r.push(a)}return r}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,i=0,s=0,a=!0,n=!1;function o(t){for(var r=0,s=t.target;r<i;)e[r].animation===s&&(e.splice(r,1),r-=1,i-=1,s.isPaused||p()),r+=1}function h(t,r){if(!t)return null;for(var s=0;s<i;){if(e[s].elem===t&&null!==e[s].elem)return e[s].animation;s+=1}var a=new AnimationItem;return f(a,t),a.setData(t,r),a}function l(){s+=1,d()}function p(){s-=1}function f(t,r){t.addEventListener("destroy",o),t.addEventListener("_active",l),t.addEventListener("_idle",p),e.push({elem:r,animation:t}),i+=1}function m(t){var o,h=t-r;for(o=0;o<i;o+=1)e[o].animation.advanceTime(h);r=t,s&&!n?window.requestAnimationFrame(m):a=!0}function c(t){r=t,window.requestAnimationFrame(m)}function d(){!n&&s&&a&&(window.requestAnimationFrame(c),a=!1)}return t.registerAnimation=h,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,r){var s;for(s=0;s<i;s+=1)e[s].animation.setSpeed(t,r)},t.setDirection=function(t,r){var s;for(s=0;s<i;s+=1)e[s].animation.setDirection(t,r)},t.play=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.play(t)},t.pause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.pause(t)},t.stop=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.stop(t)},t.togglePause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),h(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),h(o,t)}},t.resize=function(){var t;for(t=0;t<i;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,r,s){var a;for(a=0;a<i;a+=1)e[a].animation.goToAndStop(t,r,s)},t.destroy=function(t){var r;for(r=i-1;r>=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,d()},t.setVolume=function(t,r){var s;for(s=0;s<i;s+=1)e[s].animation.setVolume(t,r)},t.mute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.mute(t)},t.unmute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,r=e.length,i=[];for(t=0;t<r;t+=1)i.push(e[t].animation);return i},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,r,i,s,a){var n=a||("bez_"+t+"_"+r+"_"+i+"_"+s).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,r,i,s]);return e[n]=o,o}},e={};var r=.1,i="function"==typeof Float32Array;function s(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,r){return((s(e,r)*t+a(e,r))*t+n(e))*t}function h(t,e,r){return 3*s(e,r)*t*t+2*a(e,r)*t+n(e)}function l(t){this._p=t,this._mSampleValues=i?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:o(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<11;++i)this._mSampleValues[i]=o(i*r,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],s=this._mSampleValues,a=0,n=1;10!==n&&s[n]<=t;++n)a+=r;var l=a+(t-s[--n])/(s[n+1]-s[n])*r,p=h(l,e,i);return p>=.001?function(t,e,r,i){for(var s=0;s<4;++s){var a=h(e,r,i);if(0===a)return e;e-=(o(e,r,i)-t)/a}return e}(t,l,e,i):0===p?l:function(t,e,r,i,s){var a,n,h=0;do{(a=o(n=e+(r-e)/2,i,s)-t)>0?r=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+r,e,i)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}));function bezFunction(){var t=Math;function e(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return n>-.001&&n<.001}var r=function(t,e,r,i){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),l=0,a=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=f}return d.addedLength=f,d};function i(t){this.segmentLength=0,this.points=new Array(t)}function s(t,e){this.partialLength=t,this.point=e}var a,n=(a={},function(t,r,n,o){var h=(t[0]+"_"+t[1]+"_"+r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!a[h]){var l,p,f,m,c,d,u,y=getDefaultCurveSegments(),g=0,v=null;2===t.length&&(t[0]!==r[0]||t[1]!==r[1])&&e(t[0],t[1],r[0],r[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(y=2);var b=new i(y);for(f=n.length,l=0;l<y;l+=1){for(u=createSizedArray(f),c=l/(y-1),d=0,p=0;p<f;p+=1)m=bmPow(1-c,3)*t[p]+3*bmPow(1-c,2)*c*(t[p]+n[p])+3*(1-c)*bmPow(c,2)*(r[p]+o[p])+bmPow(c,3)*r[p],u[p]=m,null!==v&&(d+=bmPow(u[p]-v[p],2));g+=d=bmSqrt(d),b.points[l]=new s(d,u),v=u}b.segmentLength=g,a[h]=b}return a[h]});function o(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||a>=s-1){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),s=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=r(a[e],a[e+1],n[e],o[e+1]),p+=l[e].addedLength;return s&&h&&(l[e]=r(a[e],a[0],n[e],o[0]),p+=l[e].addedLength),i.totalLength=p,i},getNewSegment:function(e,r,i,s,a,n,l){a<0?a=0:a>1&&(a=1);var p,f=o(a,l),m=o(n=n>1?1:n,l),c=e.length,d=1-f,u=1-m,y=d*d*d,g=f*d*d*3,v=f*f*d*3,b=f*f*f,P=d*d*u,E=f*d*u+d*f*u+d*d*m,x=f*f*u+d*f*m+f*d*m,S=f*f*m,C=d*u*u,A=f*u*u+d*m*u+d*u*m,_=f*m*u+d*m*m+f*u*m,T=f*m*m,k=u*u*u,D=m*u*u+u*m*u+u*u*m,M=m*m*u+u*m*m+m*u*m,F=m*m*m;for(p=0;p<c;p+=1)h[4*p]=t.round(1e3*(y*e[p]+g*i[p]+v*s[p]+b*r[p]))/1e3,h[4*p+1]=t.round(1e3*(P*e[p]+E*i[p]+x*s[p]+S*r[p]))/1e3,h[4*p+2]=t.round(1e3*(C*e[p]+A*i[p]+_*s[p]+T*r[p]))/1e3,h[4*p+3]=t.round(1e3*(k*e[p]+D*i[p]+M*s[p]+F*r[p]))/1e3;return h},getPointInSegment:function(e,r,i,s,a,n){var h=o(a,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*i[0]+(h*h*l+l*h*h+h*l*h)*s[0]+h*h*h*r[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*i[1]+(h*h*l+l*h*h+h*l*h)*s[1]+h*h*h*r[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(r,i,s,a,n,o,h,l,p){if(0===s&&0===o&&0===p)return e(r,i,a,n,h,l);var f,m=t.sqrt(t.pow(a-r,2)+t.pow(n-i,2)+t.pow(o-s,2)),c=t.sqrt(t.pow(h-r,2)+t.pow(l-i,2)+t.pow(p-s,2)),d=t.sqrt(t.pow(h-a,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=m>c?m>d?m-c-d:d-c-m:d>c?d-c-m:c-m-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(t,e){var r,s=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,n,o,h,l,p,f,m,c,d=e.lastIndex,u=d,y=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[u],n=this.keyframes[u+1],u===y-1&&t>=n.t-s){a.h&&(a=n),d=0;break}if(n.t-s>t){d=u;break}u<y-1?u+=1:(d=0,g=!1)}o=this.keyframesMetadata[u]||{};var v,b,P,E,x,S,C,A,_,T,k=n.t-s,D=a.t-s;if(a.to){o.bezierData||(o.bezierData=bez.buildBezierData(a.s,n.s||a.e,a.to,a.ti));var M=o.bezierData;if(t>=k||t<D){var F=t>=k?M.points.length-1:0;for(l=M.points[F].point.length,h=0;h<l;h+=1)r[h]=M.points[F].point[h]}else{o.__fnct?c=o.__fnct:(c=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,o.__fnct=c),p=c((t-D)/(k-D));var w,I=M.segmentLength*p,V=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastPoint:0,g=!0,f=M.points.length;g;){if(V+=M.points[m].partialLength,0===I||0===p||m===M.points.length-1){for(l=M.points[m].point.length,h=0;h<l;h+=1)r[h]=M.points[m].point[h];break}if(I>=V&&I<V+M.points[m+1].partialLength){for(w=(I-V)/M.points[m+1].partialLength,l=M.points[m].point.length,h=0;h<l;h+=1)r[h]=M.points[m].point[h]+(M.points[m+1].point[h]-M.points[m].point[h])*w;break}m<f-1?m+=1:g=!1}e._lastPoint=m,e._lastAddedLength=V-M.points[m].partialLength,e._lastKeyframeIndex=u}}else{var B,R,L,G,z;if(y=a.s.length,v=n.s||a.e,this.sh&&1!==a.h)if(t>=k)r[0]=v[0],r[1]=v[1],r[2]=v[2];else if(t<=D)r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2];else{var N=i(a.s),O=i(v);b=r,P=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];return(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y),1-s>1e-6?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,o=Math.sin(r*i)/a):(n=1-r,o=r),h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(N,O,(t-D)/(k-D)),E=P[0],x=P[1],S=P[2],C=P[3],A=Math.atan2(2*x*C-2*E*S,1-2*x*x-2*S*S),_=Math.asin(2*E*x+2*S*C),T=Math.atan2(2*E*C-2*x*S,1-2*E*E-2*S*S),b[0]=A/degToRads,b[1]=_/degToRads,b[2]=T/degToRads}else for(u=0;u<y;u+=1)1!==a.h&&(t>=k?p=1:t<D?p=0:(a.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[u]?c=o.__fnct[u]:(B=void 0===a.o.x[u]?a.o.x[0]:a.o.x[u],R=void 0===a.o.y[u]?a.o.y[0]:a.o.y[u],L=void 0===a.i.x[u]?a.i.x[0]:a.i.x[u],G=void 0===a.i.y[u]?a.i.y[0]:a.i.y[u],c=BezierFactory.getBezierEasing(B,R,L,G).get,o.__fnct[u]=c)):o.__fnct?c=o.__fnct:(B=a.o.x,R=a.o.y,L=a.i.x,G=a.i.y,c=BezierFactory.getBezierEasing(B,R,L,G).get,a.keyframeMetadata=c),p=c((t-D)/(k-D)))),v=n.s||a.e,z=1===a.h?a.s[u]:a.s[u]+(v[u]-a.s[u])*p,"multidimensional"===this.propType?r[u]=z:r=z}return e.lastIndex=d,r}function i(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function s(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<r&&e<r))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function a(t){var r;if("unidimensional"===this.propType)r=t*this.mult,e(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var i=0,s=this.v.length;i<s;)r=t[i]*this.mult,e(this.v[i]-r)>1e-5&&(this.v[i]=r,this._mdf=!0),i+=1}function n(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=n,this.setVValue=a,this.addEffect=o}function l(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var h=e.k.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),this.vel=createTypedArray("float32",h),s=0;s<h;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=n,this.setVValue=a,this.addEffect=o}function p(e,i,h,l){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=n,this.setVValue=a,this.interpolateValue=r,this.effectsSequence=[s.bind(this)],this.addEffect=o}function f(e,i,h,l){var p;this.propType="multidimensional";var f,m,c,d,u=i.k.length;for(p=0;p<u-1;p+=1)i.k[p].to&&i.k[p].s&&i.k[p+1]&&i.k[p+1].s&&(f=i.k[p].s,m=i.k[p+1].s,c=i.k[p].to,d=i.k[p].ti,(2===f.length&&(f[0]!==m[0]||f[1]!==m[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],f[0]+c[0],f[1]+c[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],m[0]+d[0],m[1]+d[1])||3===f.length&&(f[0]!==m[0]||f[1]!==m[1]||f[2]!==m[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],f[0]+c[0],f[1]+c[1],f[2]+c[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],m[0]+d[0],m[1]+d[1],m[2]+d[2]))&&(i.k[p].to=null,i.k[p].ti=null),f[0]===m[0]&&f[1]===m[1]&&0===c[0]&&0===c[1]&&0===d[0]&&0===d[1]&&(2===f.length||f[2]===m[2]&&0===c[2]&&0===d[2])&&(i.k[p].to=null,i.k[p].ti=null));this.effectsSequence=[s.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.getValue=n,this.setVValue=a,this.interpolateValue=r,this.frameId=-1;var y=i.k[0].s.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),p=0;p<y;p+=1)this.v[p]=t,this.pv[p]=t;this._caching={lastFrame:t,lastIndex:0,value:createTypedArray("float32",y)},this.addEffect=o}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new l(t,e,i,s);else switch(r){case 0:a=new p(t,e,i,s);break;case 1:a=new f(t,e,i,s)}else a=new h(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})),factory.clone=function(t){var e,r=factory.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var t=-999999;function e(t,e,r){var i,s,a,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=P),p=P((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function r(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,s=this._caching.lastFrame;return s!==t&&(s<r&&e<r||s>i&&e>i)||(this._caching.lastIndex=s<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function s(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function a(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var s=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(e,s,a){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===a?s.pt.k:s.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[r.bind(this)]}n.prototype.interpolateShape=e,n.prototype.getValue=a,n.prototype.setVValue=s,n.prototype.addEffect=o,h.prototype.getValue=a,h.prototype.interpolateShape=e,h.prototype.setVValue=s,h.prototype.addEffect=o;var l=function(){var t=roundCorner;function e(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],r=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,a=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=r-s,n.v[1][0]=a?e+i:e-i,n.v[1][1]=r,n.v[2][0]=e,n.v[2][1]=r+s,n.v[3][0]=a?e-i:e+i,n.v[3][1]=r,n.i[0][0]=a?e-i*t:e+i*t,n.i[0][1]=r-s,n.i[1][0]=a?e+i:e-i,n.i[1][1]=r-s*t,n.i[2][0]=a?e+i*t:e-i*t,n.i[2][1]=r+s,n.i[3][0]=a?e-i:e+i,n.i[3][1]=r+s*t,n.o[0][0]=a?e+i*t:e-i*t,n.o[0][1]=r-s,n.o[1][0]=a?e+i:e-i,n.o[1][1]=r+s*t,n.o[2][0]=a?e-i*t:e+i*t,n.o[2][1]=r+s,n.o[3][0]=a?e-i:e+i,n.o[3][1]=r-s*t}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<s;t+=1){r=n?l:p,i=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),f=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new h(t,e,r):new n(t,e,r):5===r?i=new f(t,e):6===r?i=new l(t,e):7===r&&(i=new p(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return h}};return m}(),Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,i=Math.round;function s(){return 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,this}function a(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function n(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(1,0,0,0,0,i,-s,0,0,s,i,0,0,0,0,1)}function o(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(i,0,s,0,0,1,0,0,-s,0,i,0,0,0,0,1)}function h(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(r(t),r(e))}function f(i,s){var a=t(s),n=e(s);return this._t(a,n,0,0,-n,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(i),1,0,0,0,0,1,0,0,0,0,1)._t(a,-n,0,0,n,a,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],E=y[4],x=y[5],S=y[6],C=y[7],A=y[8],_=y[9],T=y[10],k=y[11],D=y[12],M=y[13],F=y[14],w=y[15];return y[0]=g*t+v*s+b*h+P*m,y[1]=g*e+v*a+b*l+P*c,y[2]=g*r+v*n+b*p+P*d,y[3]=g*i+v*o+b*f+P*u,y[4]=E*t+x*s+S*h+C*m,y[5]=E*e+x*a+S*l+C*c,y[6]=E*r+x*n+S*p+C*d,y[7]=E*i+x*o+S*f+C*u,y[8]=A*t+_*s+T*h+k*m,y[9]=A*e+_*a+T*l+k*c,y[10]=A*r+_*n+T*p+k*d,y[11]=A*i+_*o+T*f+k*u,y[12]=D*t+M*s+F*h+w*m,y[13]=D*e+M*a+F*l+w*c,y[14]=D*r+M*n+F*p+w*d,y[15]=D*i+M*o+F*f+w*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function E(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function x(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function S(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function C(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function _(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=A(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function k(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function M(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function w(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=E,this.applyToY=x,this.applyToZ=S,this.applyToPointArray=k,this.applyToTriplePoints=T,this.applyToPointStringified=D,this.toCSS=M,this.to2dCSS=w,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=_,this.inversePoint=A,this.getInverseMatrix=C,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}if(lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.1",standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===("undefined"==typeof exports?"undefined":_typeof$3(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(t,r){e[t]||(e[t]=r)},t.getModifier=function(t,r,i){return new e[t](r,i)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=this.s.v>1?1+a:this.s.v<0?0+a:this.s.v+a)>(r=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<m;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,P=0;for(s=m-1;s>=0;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):v>=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var E=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var x=E.pop();this.addPaths(E,u),E=this.addShapes(d,y[1],x)}else this.addPaths(E,u),E=this.addShapes(d,y[1]);this.addPaths(E,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(r?(o=r._length,p=r._length):(r=shapePool.newElement(),o=0,p=0),u.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,a=m[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,f=t.i[a][1]+(i[1]-t.i[a][1])*-r,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var r;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var i,s;if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],s=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(i[0]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),s[0]=a.getValueAtTime(a.keyframes[0].t/r,0),s[1]=n.getValueAtTime(n.keyframes[0].t/r,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(i[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0),s[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0)):(i=[a.pv,n.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime),s[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime))}else i=s=t;this.v.rotate(-Math.atan2(i[1]-s[1],i[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(a=0,i=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=m>0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(m>0){for(;P<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(m<0){for(;P>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];P+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,f=u=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1):(i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g),g+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function s(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function a(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var n=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};n.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},n.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},n.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var o={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,n=i.length,o=n;for(r=0;r<n;r+=1){var h,l,p=!0;if(i[r].loaded=!1,i[r].monoCase=s(i[r].fFamily,"monospace"),i[r].sansCase=s(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if((h=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length>0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("f-family",i[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(f)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;l<h.length;l+=1)-1!==h[l].href.indexOf(i[r].fPath)&&(p=!1);if(p){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.type="text/css",m.rel="stylesheet",m.href=i[r].fPath,document.body.appendChild(m)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(h=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),l=0;l<h.length;l+=1)i[r].fPath===h[l].src&&(p=!1);if(p){var c=createTag("link");c.setAttribute("f-forigin",i[r].fOrigin),c.setAttribute("f-origin",i[r].origin),c.setAttribute("rel","stylesheet"),c.setAttribute("href",i[r].fPath),e.appendChild(c)}}}else i[r].loaded=!0,o-=1;i[r].helper=a(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,r,i){for(var s=0,a=this.chars.length;s<a;){if(this.chars[s].ch===e&&this.chars[s].style===r&&this.chars[s].fFamily===i)return this.chars[s];s+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,r,i)),t},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return n.prototype=o,n}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(t,e,r){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(i){if(!t.numKeys)return 0;var s="";s="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s;var a="unidimensional"===r?new Number(s):Object.assign({},s);return a.time=e.keyframes[i-1].t/e.elem.comp.globalData.frameRate,a.value="unidimensional"===r?s[0]:s,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function i(){return t}return function(s){return s?"unidimensional"===s.propType?function(e){e&&"pv"in e||(e=t);var i=1/e.mult,s=e.pv*i,a=new Number(s);return a.value=s,r(a,e,"unidimensional"),function(){return e.k&&e.getValue(),s=e.v*i,a.value!==s&&((a=new Number(s)).value=s,r(a,e,"unidimensional")),a}}(s):function(t){t&&"pv"in t||(t=e);var i=1/t.mult,s=t.data&&t.data.l||t.pv.length,a=createTypedArray("float32",s),n=createTypedArray("float32",s);return a.value=n,r(a,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<s;e+=1)n[e]=t.v[e]*i,a[e]=n[e];return a}}(s):i}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function r(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function i(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function s(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function a(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function n(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function o(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function h(){return[1,1,1,1]}return function(l){var p;function f(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return f.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return f.effect;case"ADBE Text Properties":return f.textInterface;default:return null}}f.getMatrix=t,f.invertPoint=n,f.applyPoint=a,f.toWorld=r,f.toWorldVec=e,f.fromWorld=s,f.fromWorldVec=i,f.toComp=r,f.fromComp=o,f.sampleImage=h,f.sourceRectAtTime=l.sourceRectAtTime.bind(l),f._elem=l;var m=getDescriptor(p=TransformExpressionInterface(l.finalTransform.mProp),"anchorPoint");return Object.defineProperties(f,{hasParent:{get:function(){return l.hierarchy.length}},parent:{get:function(){return l.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return l.isInRange}}}),f.startTime=l.data.st,f.index=l.data.ind,f.source=l.data.refId,f.height=0===l.data.ty?l.data.h:100,f.width=0===l.data.ty?l.data.w:100,f.inPoint=l.data.ip/l.comp.globalData.frameRate,f.outPoint=l.data.op/l.comp.globalData.frameRate,f._name=l.data.nm,f.registerMaskInterface=function(t){f.mask=new MaskManagerInterface(t,l)},f.registerEffectsInterface=function(t){f.effect=t},f}}(),propertyGroupFactory=function(t,e){return function(r){return(r=void 0===r?1:r)<=0?t:e(r-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},EffectsExpressionInterface=function(){function t(r,i,s,a){function n(t){for(var e=r.ef,i=0,s=e.length;i<s;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?l[i]:l[i]();i+=1}throw new Error}var o,h=propertyGroupFactory(n,s),l=[],p=r.ef.length;for(o=0;o<p;o+=1)5===r.ef[o].ty?l.push(t(r.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,a)):l.push(e(i.effectElements[o],r.ef[o].ty,a,h));return"ADBE Color Control"===r.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:h}}),n.enabled=0!==r.en,n.active=n.enabled,n}function e(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(e,r){if(e.effectsManager){var i,s=[],a=e.data.ef,n=e.effectsManager.effectElements.length;for(i=0;i<n;i+=1)s.push(t(a[i],e.effectsManager.effectElements[i],r,e));var o=e.data.ef||[],h=function(t){for(i=0,n=o.length;i<n;){if(t===o[i].nm||t===o[i].mn||t===o[i].ix)return s[i];i+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),CompExpressionInterface=function(t){function e(e){for(var r=0,i=t.layers.length;r<i;){if(t.layers[r].nm===e||t.layers[r].ind===e)return t.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},ShapeExpressionInterface=function(){function t(t,o,c){var d,u=[],y=t?t.length:0;for(d=0;d<y;d+=1)"gr"===t[d].ty?u.push(e(t[d],o[d],c)):"fl"===t[d].ty?u.push(r(t[d],o[d],c)):"st"===t[d].ty?u.push(a(t[d],o[d],c)):"tm"===t[d].ty?u.push(n(t[d],o[d],c)):"tr"===t[d].ty||("el"===t[d].ty?u.push(h(t[d],o[d],c)):"sr"===t[d].ty?u.push(l(t[d],o[d],c)):"sh"===t[d].ty?u.push(ShapePathInterface(t[d],o[d],c)):"rc"===t[d].ty?u.push(p(t[d],o[d],c)):"rd"===t[d].ty?u.push(f(t[d],o[d],c)):"rp"===t[d].ty?u.push(m(t[d],o[d],c)):"gf"===t[d].ty?u.push(i(t[d],o[d],c)):u.push(s(t[d],o[d])));return u}function e(e,r,i){var s=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return s.content;default:return s.transform}};s.propertyGroup=propertyGroupFactory(s,i);var a=function(e,r,i){var s,a=function(t){for(var e=0,r=s.length;e<r;){if(s[e]._name===t||s[e].mn===t||s[e].propertyIndex===t||s[e].ix===t||s[e].ind===t)return s[e];e+=1}return"number"==typeof t?s[t-1]:null};a.propertyGroup=propertyGroupFactory(a,i),s=t(e.it,r.it,a.propertyGroup),a.numProperties=s.length;var n=o(e.it[e.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.transform=n,a.propertyIndex=e.cix,a._name=e.nm,a}(e,r,s.propertyGroup),n=o(e.it[e.it.length-1],r.it[r.it.length-1],s.propertyGroup);return s.content=a,s.transform=n,Object.defineProperty(s,"_name",{get:function(){return e.nm}}),s.numProperties=e.np,s.propertyIndex=e.ix,s.nm=e.nm,s.mn=e.mn,s}function r(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function i(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function s(){return function(){return null}}function a(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);function n(r){Object.defineProperty(h,t.d[r].nm,{get:ExpressionPropertyInterface(e.d.dataProps[r].p)})}var o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n(i),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function n(t,e,r){function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",s)),e.e.setGroupProperty(PropertyInterface("End",s)),e.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=t.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),i.mn=t.mn,i}function o(t,e,r){function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:null}var s=propertyGroupFactory(i,r);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i.propertyGroup=r,i}function h(t,e,r){function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),t.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:t.nm}}),i.mn=t.mn,i}function p(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:t.nm}}),i.mn=t.mn,i}function f(t,e,r){function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:null}var s=propertyGroupFactory(i,r),a=e;return i.propertyIndex=t.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:t.nm}}),i.mn=t.mn,i}function m(t,e,r){function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:null}var s=propertyGroupFactory(i,r),a=e;return i.propertyIndex=t.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:t.nm}}),i.mn=t.mn,i}return function(e,r,i){var s;function a(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return a.propertyGroup=propertyGroupFactory(a,(function(){return i})),s=t(e,r,a.propertyGroup),a.numProperties=s.length,a._name="Contents",a}}(),TextExpressionInterface=function(t){var e,r;function i(t){return"ADBE Text Document"===t?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==e&&(t.textProperty.currentData.t=e,(r=new String(i)).value=i||new String(i)),r}}),i},getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function _typeof$2(t){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var FootageInterface=(dataInterfaceFactory=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",r=t.getFootageData();function i(t){if(r[t])return e=t,"object"===_typeof$2(r=r[t])?i:r;var s=t.indexOf(e);if(-1!==s){var a=parseInt(t.substr(s+e.length),10);return"object"===_typeof$2(r=r[a])?i:r}return""}return function(){return e="",r=t.getFootageData(),i}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory;function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(g="mask",v="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(g="mask",v="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):(f=null,m=null),this.storedData[i]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(u[o]);var E=createNS("mask");E.setAttribute("mask-type","alpha"),E.setAttribute("id",y+"_"+d),E.appendChild(s),a.appendChild(E),P.setAttribute("mask","url("+getLocationHref()+"#"+y+"_"+d+")"),u.length=0,u.push(P)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);d>0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&s>1&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var r=createNS("filter");r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%"));return r},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:a>=l?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}};var registeredEffects={};function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1){r=null;var o=t.data.ef[e].ty;if(registeredEffects[o])r=new(0,registeredEffects[o].effect)(a,t.effectsManager.effectElements[e],t),registeredEffects[o].countsAsEffect&&(n+=1);20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r)}n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(Math.abs(t[4*r]-t[4*e+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function r(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(){}function s(r,i,s){var a,n,o,h,l,p,f,m,c,d,u,y=i.styles.length,g=i.lvl;for(p=0;p<y;p+=1){if(h=i.sh._mdf||s,i.styles[p].lvl<g){for(m=e.reset(),d=g-i.styles[p].lvl,u=i.transformers.length-1;!h&&d>0;)h=i.transformers[u].mProps._mdf||h,d-=1,u-=1;if(h)for(d=g-i.styles[p].lvl,u=i.transformers.length-1;d>0;)c=i.transformers[u].mProps.v.props,m.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),d-=1,u-=1}else m=t;if(n=(f=i.sh.paths)._length,h){for(o="",a=0;a<n;a+=1)(l=f.shapes[a])&&l._length&&(o+=buildShapeString(l,l._length,l.c,m));i.caches[p]=o}else o=i.caches[p];i.styles[p].d+=!0===r.hd?"":o,i.styles[p]._mdf=h||i.styles[p]._mdf}}function a(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,r){o(t,e,r),h(t,e,r)}function o(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],E=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",E))}}function h(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return s;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,n.length=0,t=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else"no"===t.ty&&(r=new SVGNoStyleData(this,t,i));return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,f,m,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;o>=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==s&&(this.m=s,this._mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,n=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):e>=55296&&e<=56319?(r=t.charCodeAt(s+1))>=56320&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):e>56319?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,E=getFontProperties(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var x,S=t.tr/1e3*t.finalSize;if(t.sz)for(var C,A,_=!0,T=t.sz[0],k=t.sz[1];_;){C=0,g=0,r=(A=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var D=-1;for(e=0;e<r;e+=1)x=A[e].charCodeAt(0),i=!1," "===A[e]?D=e:13!==x&&3!==x||(g=0,i=!0,C+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(A[e],b.fStyle,b.fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(A[e],t.f,t.finalSize),g+P>T&&" "!==A[e]?(-1===D?r+=1:e=D,C+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,D===e?1:0,"\r"),D=-1,g=0):(g+=P,g+=S);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&k<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,_=!1)}g=-S,P=0;var M,F=0;for(e=0;e<r;e+=1)if(i=!1,13===(x=(M=t.finalText[e]).charCodeAt(0))||3===x?(F=0,y.push(g),v=g>v?g:v,g=-2*S,s="",i=!0,u+=1):s=M,h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(s,t.f,t.finalSize)," "===M?F+=P+S:(g+=P+S+F,F=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=P,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===s||e===r-1){for(""===s&&(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,B,R=l.a;n=R.length;var L=[];for(a=0;a<n;a+=1){for((w=R[a]).a.sc&&(t.strokeColorAnim=!0),w.a.sw&&(t.strokeWidthAnim=!0),(w.a.fc||w.a.fh||w.a.fs||w.a.fb)&&(t.fillColorAnim=!0),B=0,V=w.s.b,e=0;e<r;e+=1)(I=p[e]).anIndexes[a]=B,(1==V&&""!==I.val||2==V&&""!==I.val&&" "!==I.val||3==V&&(I.n||" "==I.val||e==r-1)||4==V&&(I.n||e==r-1))&&(1===w.s.rn&&L.push(B),B+=1);l.a[a].s.totalChars=B;var G,z=-1;if(1===w.s.rn)for(e=0;e<r;e+=1)z!=(I=p[e]).anIndexes[a]&&(z=I.anIndexes[a],G=L.splice(Math.floor(Math.random()*L.length),1)[0]),I.anIndexes[a]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var s=0,a=0,n=1,o=1;this.ne.v>0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===m)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,d=-c/2+(i=e(t(0,i+.5-p),f-p)),u=c/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===m?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=r(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l<g?l=0:(l=(l-g)/y)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(i>s){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,f,m,c,d,u,y,g,v,b,P,E=this._moreOptions.alignment.v,x=this._animatorsData,S=this._textData,C=this.mHelper,A=this._renderType,_=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var k,D=P.v;for(this._pathData.r.v&&(D=D.reverse()),n={tLength:0,segments:[]},a=D._length-1,g=0,s=0;s<a;s+=1)k=bez.buildBezierData(D.v[s],D.v[s+1],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[s+1][0]-D.v[s+1][0],D.i[s+1][1]-D.v[s+1][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength;s=a,P.v.c&&(k=bez.buildBezierData(D.v[s],D.v[0],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[0][0]-D.v[0][0],D.i[0][1]-D.v[0][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=0,f=1,l=0,p=!0,u=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}a=T.length,r=0,i=0;var M,F,w,I,V,B=1.2*t.finalSize*.714,R=!0;w=x.length;var L,G,z,N,O,H,j,q,W,$,Y,X,K=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;rt=0,nt=!0}else{for(F=0;F<w;F+=1)(M=x[F].a).t.propType&&(nt&&2===t.j&&(it+=M.t.v*st),(V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?rt+=M.t.v*V[0]*st:rt+=M.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(C.reset(),N=1,T[s].n)r=0,i+=t.yOffset,i+=R?1:0,o=J,R=!1,this._hasMaskedPath&&(f=U,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),tt="",Y="",W="",X="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}K!==T[s].ind&&(T[K]&&(o+=T[K].extra),o+=T[s].an/2,K=T[s].ind),o+=E[0]*T[s].an*.005;var ot=0;for(F=0;F<w;F+=1)(M=x[F].a).p.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=M.p.v[0]*V[0]:ot+=M.p.v[0]*V),M.a.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=M.a.v[0]*V[0]:ot+=M.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(a-1),o+=this._pathData.f.v);p;)l+y>=o+ot||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,C.translate(-E[0]*T[s].an*.005,-E[1]*B*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[m+=1]?d=u[m].points:P.v.c?(f=0,d=u[m=0].points):(l-=h.partialLength,d=null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,C.translate(-L,0,0)}else L=T[s].an/2-T[s].add,C.translate(-L,0,0),C.translate(-E[0]*T[s].an*.005,-E[1]*B*.01,0);for(F=0;F<w;F+=1)(M=x[F].a).t.propType&&(V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=M.t.v*V[0]:o+=M.t.v*V:V.length?r+=M.t.v*V[0]:r+=M.t.v*V));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<w;F+=1)(M=x[F].a).a.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?C.translate(-M.a.v[0]*V[0],-M.a.v[1]*V[1],M.a.v[2]*V[2]):C.translate(-M.a.v[0]*V,-M.a.v[1]*V,M.a.v[2]*V));for(F=0;F<w;F+=1)(M=x[F].a).s.propType&&((V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?C.scale(1+(M.s.v[0]-1)*V[0],1+(M.s.v[1]-1)*V[1],1):C.scale(1+(M.s.v[0]-1)*V,1+(M.s.v[1]-1)*V,1));for(F=0;F<w;F+=1){if(M=x[F].a,V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),M.sk.propType&&(V.length?C.skewFromAxis(-M.sk.v*V[0],M.sa.v*V[1]):C.skewFromAxis(-M.sk.v*V,M.sa.v*V)),M.r.propType&&(V.length?C.rotateZ(-M.r.v*V[2]):C.rotateZ(-M.r.v*V)),M.ry.propType&&(V.length?C.rotateY(M.ry.v*V[1]):C.rotateY(M.ry.v*V)),M.rx.propType&&(V.length?C.rotateX(M.rx.v*V[0]):C.rotateX(M.rx.v*V)),M.o.propType&&(V.length?N+=(M.o.v*V[0]-N)*V[0]:N+=(M.o.v*V-N)*V),t.strokeWidthAnim&&M.sw.propType&&(V.length?H+=M.sw.v*V[0]:H+=M.sw.v*V),t.strokeColorAnim&&M.sc.propType)for(q=0;q<3;q+=1)V.length?O[q]+=(M.sc.v[q]-O[q])*V[0]:O[q]+=(M.sc.v[q]-O[q])*V;if(t.fillColorAnim&&t.fc){if(M.fc.propType)for(q=0;q<3;q+=1)V.length?j[q]+=(M.fc.v[q]-j[q])*V[0]:j[q]+=(M.fc.v[q]-j[q])*V;M.fh.propType&&(j=V.length?addHueToRGB(j,M.fh.v*V[0]):addHueToRGB(j,M.fh.v*V)),M.fs.propType&&(j=V.length?addSaturationToRGB(j,M.fs.v*V[0]):addSaturationToRGB(j,M.fs.v*V)),M.fb.propType&&(j=V.length?addBrightnessToRGB(j,M.fb.v*V[0]):addBrightnessToRGB(j,M.fb.v*V))}}for(F=0;F<w;F+=1)(M=x[F].a).p.propType&&(V=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?V.length?C.translate(0,M.p.v[1]*V[0],-M.p.v[2]*V[1]):C.translate(0,M.p.v[1]*V,-M.p.v[2]*V):V.length?C.translate(M.p.v[0]*V[0],M.p.v[1]*V[1],-M.p.v[2]*V[2]):C.translate(M.p.v[0]*V,M.p.v[1]*V,-M.p.v[2]*V));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&($="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(C.translate(0,-t.ls),C.translate(0,E[1]*B*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),C.rotate(-ht*Math.PI/180)}C.translate(G,z,0),o-=E[0]*T[s].an*.005,T[s+1]&&K!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(C.translate(r,i,0),t.ps&&C.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}C.translate(0,-t.ls),C.translate(L,0,0),C.translate(E[0]*T[s].an*.005,E[1]*B*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===A?tt=C.toCSS():"svg"===A?tt=C.to2dCSS():et=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],X=N}_<=s?(I=new LetterProps(X,W,$,Y,tt,et),this.renderedLetters.push(I),_+=1,this.lettersChangedFlag=!0):(I=this.renderedLetters[s],this.lettersChangedFlag=I.update(X,W,$,Y,tt,et)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)"sh"===e[r].ty&&(i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t));return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVEffects(){}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=s,s&&this.element.addRenderableComponent(this)}function CVBaseElement(){}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CanvasRendererBase(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,p=this.data.singleShape,f=0,m=0,c=!0,d=.001*r.tr*r.finalSize;if(!p||h||r.sz){var u,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!p||0===t){if(n=y>t?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(r.finalSize/100,r.finalSize/100),p&&(o[t].n&&(f=-d,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=u.data),v=new SVGShapeElement(b,this.globalData,this)}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var P=this.textContainer,E="start";switch(r.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}P.setAttribute("text-anchor",E),P.setAttribute("letter-spacing",d);var x=this.buildTextContents(r.finalText);for(e=x.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||createNS("tspan")).textContent=x[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",P.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=r.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s,a=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(r=a[t],i=this.textSpans[t].span,(s=this.textSpans[t].glyph)&&s.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;i>=0;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,l,p,f=t.length-1,m=[],c=[],d=[].concat(s);for(a=f;a>=0;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),e[a]=l,l.init(this,t,a,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),f=c.length,a=0;a<f;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;s>=0;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;f>=1?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,s,a,n,o,h,l,p,f,m,c,d,u=this.globalData.fontManager.getFontByName(t.f),y=t.l,g=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,P=0,E=0,x=!0,S=0;for(i=0;i<s;i+=1){n=(a=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&a.data||{},g.reset(),v&&y[i].n&&(P=-b,E+=t.yOffset,E+=x?1:0,x=!1),f=(l=n.shapes?n.shapes[0].it:[]).length,g.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,g,y[i].line,P,E),c=createSizedArray(f-1);var C=0;for(p=0;p<f;p+=1)if("sh"===l[p].ty){for(h=l[p].ks.k.i.length,m=l[p].ks.k,d=[],o=1;o<h;o+=1)1===o&&d.push(g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[o][0],m.i[o][1],0),g.applyToY(m.i[o][0],m.i[o][1],0),g.applyToX(m.v[o][0],m.v[o][1],0),g.applyToY(m.v[o][0],m.v[o][1],0));d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[0][0],m.i[0][1],0),g.applyToY(m.i[0][0],m.i[0][1],0),g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),c[C]=d,C+=1}v&&(P+=y[i].l,P+=b),this.textSpans[S]?this.textSpans[S].elem=c:this.textSpans[S]={elem:c},S+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,s,a,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,f,m=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?m!==o.fc&&(m=o.fc,n.fillStyle=o.fc):m!==this.values.fill&&(m=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(f[s],f[s+1],f[s+2],f[s+3],f[s+4],f[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(f[s],f[s+1],f[s+2],f[s+3],f[s+4],f[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;n>o&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(r=a)*o:r=(e=s)/o,i.drawImage(this.img,(s-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,(i=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||i>r&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||i>r&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>r&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(i>r&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(r=0;r<l-1;r+=1)i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[r+1]),n=this.getTransformedPoint(h,o.v[r+1]),this.checkBounds(i,s,a,n,e);o.c&&(i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(i,s,a,n,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,s){this.getBoundsOfCurve(t,e,r,i);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var s,a,n,o,h,l,p,f=[[t[0],i[0]],[t[1],i[1]]],m=0;m<2;++m)a=6*t[m]-12*e[m]+6*r[m],s=-3*t[m]+9*e[m]-9*r[m]+3*i[m],n=3*e[m]-3*t[m],a|=0,n|=0,0===(s|=0)&&0===a||(0===s?(o=-n/a)>0&&o<1&&f[m].push(this.calculateF(o,t,e,r,i,m)):(h=a*a-4*n*s)>=0&&((l=(-a+bmSqrt(h))/(2*s))>0&&l<1&&f[m].push(this.calculateF(l,t,e,r,i,m)),(p=(-a-bmSqrt(h))/(2*s))>0&&p<1&&f[m].push(this.calculateF(p,t,e,r,i,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it&&this.calculateBoundingBox(t[r].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=s,i.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,s,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var n=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=n}var h,l,p,f=t.l;s=f.length;var m,c=this.mHelper,d="",u=0;for(i=0;i<s;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?h=this.textPaths[u]:((h=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[u]?this.textPaths[u]:createNS("text"):this.textSpans[u]?(l=this.textSpans[u],h=this.textPaths[u]):(styleDiv(l=createTag("span")),styleDiv(h=createTag("span")),l.appendChild(h)),this.globalData.fontManager.chars){var y,g=this.globalData.fontManager.getCharData(t.finalText[i],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(y=g?g.data:null,c.reset(),y&&y.shapes&&y.shapes.length&&(m=y.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),d=this.createPathShape(c,m),h.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(l),y&&y.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,P="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=P,b.webkitTransform=P,f[i].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(h.textContent=f[i].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(l);var E=h.style,x="translate3d(0,"+-t.finalSize/1.2+"px,0)";E.transform=x,E.webkitTransform=x}this.isMasked?this.textSpans[u]=h:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=h,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,s,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(i=l.length,r=0;r<i;r+=1)l[r].n?o+=1:(a=this.textSpans[r],n=this.textPaths[r],s=h[o],o+=1,s._mdf.m&&(this.isMasked?a.setAttribute("transform",s.m):(a.style.webkitTransform=s.m,a.style.transform=s.m)),a.style.opacity=s.o,s.sw&&s._mdf.sw&&n.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&n.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(n.setAttribute("fill",s.fc),n.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,s=this.comp.threeDElements.length;for(t=0;t<s;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){r=e.perspectiveElem.style,i=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,i.transformOrigin=n,i.mozTransformOrigin=n,i.webkitTransformOrigin=n,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var d=this.mat.toCSS();(c=f.container.style).transform=d,c.webkitTransform=d}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,s):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?("3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):("2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(r=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var s,a=this.threeDElements[r].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[r].container.insertBefore(t,s):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",this.resizerElem=e,styleDiv(e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,r,i,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,n=s/a;this.globalData.compSize.w/this.globalData.compSize.h>n?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,r=0,i=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,i=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",s.perspective=s.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],i,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var Expressions=function(){var t={};return t.initExpressions=function(t){var e=0,r=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&function(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},t}();function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}function seedRandom(t,e){var r,i=this,s=256,a=e.pow(s,6),n=e.pow(2,52),o=2*n,h=255;function l(t){var e,r=t.length,i=this,a=0,n=i.i=i.j=0,o=i.S=[];for(r||(t=[r++]);a<s;)o[a]=a++;for(a=0;a<s;a++)o[a]=o[n=h&n+t[a%r]+(e=o[a])],o[n]=e;i.g=function(t){for(var e,r=0,a=i.i,n=i.j,o=i.S;t--;)e=o[a=h&a+1],r=r*s+o[h&(o[a]=o[n=h&n+e])+(o[n]=e)];return i.i=a,i.j=n,r}}function p(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function f(t,e){var r,i=[],s=_typeof$1(t);if(e&&"object"==s)for(r in t)try{i.push(f(t[r],e-1))}catch(t){}return i.length?i:"string"==s?t:t+"\0"}function m(t,e){for(var r,i=t+"",s=0;s<i.length;)e[h&s]=h&(r^=19*e[h&s])+i.charCodeAt(s++);return c(e)}function c(t){return String.fromCharCode.apply(0,t)}e.seedrandom=function(h,d,u){var y=[],g=m(f((d=!0===d?{entropy:!0}:d||{}).entropy?[h,c(t)]:null===h?function(){try{r;var e=new Uint8Array(s);return(i.crypto||i.msCrypto).getRandomValues(e),c(e)}catch(e){var a=i.navigator,n=a&&a.plugins;return[+new Date,i,n,i.screen,c(t)]}}():h,3),y),v=new l(y),b=function(){for(var t=v.g(6),e=a,r=0;t<n;)t=(t+r)*s,e*=s,r=v.g(1);for(;t>=o;)t/=2,e/=2,r>>>=1;return(t+r)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(d.pass||u||function(t,r,i,s){return s&&(s.S&&p(s,v),t.state=function(){return p(v,{})}),i?(e.random=t,r):t})(b,g,"global"in d?d.global:this==e,d.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)e=0,r=0;else{var l=n-o;switch(r=h>.5?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)e=n,i=n,r=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(t>=r)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(r=0,i=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(s>1){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),e>1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=-.001,s=this.getValueAtTime(t),a=this.getValueAtTime(t+i);if(s.length)for(e=createTypedArray("float32",s.length),r=0;r<s.length;r+=1)e[r]=(a[r]-s[r])/i;else e=(a-s)/i;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*d+c[a];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function e(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(h>=p)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function r(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=e>1?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}function i(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}function s(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var n=a(t,e,r);return n.dynamicProperties.length?n.getValueAtTime=i.bind(n):n.getValueAtTime=s.bind(n),n.setGroupProperty=expressionHelpers.setGroupProperty,n};var n=PropertyFactory.getProp;PropertyFactory.getProp=function(i,s,a,o,h){var l=n(i,s,a,o,h);l.kf?l.getValueAtTime=expressionHelpers.getValueAtTime.bind(l):l.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(l),l.setGroupProperty=expressionHelpers.setGroupProperty,l.loopOut=t,l.loopIn=e,l.smooth=r,l.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(l),l.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(l),l.numKeys=1===s.a?s.k.length:0,l.propertyIndex=s.ix;var p=0;return 0!==a&&(p=createTypedArray("float32",1===s.a?s.k[0].s.length:s.k.length)),l._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:p},expressionHelpers.searchExpressions(i,s,l),l.k&&h.addDynamicProperty(l),l};var o=ShapePropertyFactory.getConstructorFunction(),h=ShapePropertyFactory.getKeyframedConstructorFunction();function l(){}l.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},h.prototype.initiateExpression=ExpressionManager.initiateExpression;var p=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t!==r){var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}return registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),setExpressionsPlugin(Expressions),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie}));
diff --git a/build/player/lottie_canvas.js b/build/player/lottie_canvas.js
index f68b9f6..25a2abc 100644
--- a/build/player/lottie_canvas.js
+++ b/build/player/lottie_canvas.js
@@ -1,1903 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$6(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1905,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$5(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6766,5824 +1620,6062 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$4(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,
-CVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */
-
-function CanvasRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.renderConfig = {
-    clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
-    context: (config && config.context) || null,
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.renderConfig.dpr = (config && config.dpr) || 1;
-  if (this.animationItem.wrapper) {
-    this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
-  }
-  this.renderedFrame = -1;
-  this.globalData = {
-    frameNum: -1,
-    _mdf: false,
-    renderConfig: this.renderConfig,
-    currentGlobalAlpha: -1,
-  };
-  this.contextData = new CVContextData();
-  this.elements = [];
-  this.pendingElements = [];
-  this.transformMat = new Matrix();
-  this.completeLayers = false;
-  this.rendererType = 'canvas';
-}
-extendPrototype([BaseRenderer], CanvasRenderer);
 
-CanvasRenderer.prototype.createShape = function (data) {
-  return new CVShapeElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createText = function (data) {
-  return new CVTextElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createImage = function (data) {
-  return new CVImageElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createComp = function (data) {
-  return new CVCompElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createSolid = function (data) {
-  return new CVSolidElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-CanvasRenderer.prototype.ctxTransform = function (props) {
-  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
-    return;
-  }
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
-    return;
-  }
-  this.transformMat.cloneFromProps(props);
-  var cProps = this.contextData.cTr.props;
-  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]);
-  // 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]);
-  this.contextData.cTr.cloneFromProps(this.transformMat.props);
-  var trProps = this.contextData.cTr.props;
-  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
-};
-
-CanvasRenderer.prototype.ctxOpacity = function (op) {
-  /* if(op === 1){
-        return;
-    } */
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-    return;
-  }
-  this.contextData.cO *= op < 0 ? 0 : op;
-  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
-    this.canvasContext.globalAlpha = this.contextData.cO;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-  }
-};
-
-CanvasRenderer.prototype.reset = function () {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  this.contextData.reset();
-};
-
-CanvasRenderer.prototype.save = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.save();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.save();
-  }
-  var props = this.contextData.cTr.props;
-  if (this.contextData._length <= this.contextData.cArrPos) {
-    this.contextData.duplicate();
-  }
-  var i;
-  var arr = this.contextData.saved[this.contextData.cArrPos];
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = props[i];
-  }
-  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
-  this.contextData.cArrPos += 1;
-};
-
-CanvasRenderer.prototype.restore = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.restore();
-    this.globalData.blendMode = 'source-over';
-  }
-  this.contextData.cArrPos -= 1;
-  var popped = this.contextData.saved[this.contextData.cArrPos];
-  var i;
-  var arr = this.contextData.cTr.props;
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = popped[i];
-  }
-  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
-  popped = this.contextData.savedOp[this.contextData.cArrPos];
-  this.contextData.cO = popped;
-  if (this.globalData.currentGlobalAlpha !== popped) {
-    this.canvasContext.globalAlpha = popped;
-    this.globalData.currentGlobalAlpha = popped;
-  }
-};
-
-CanvasRenderer.prototype.configAnimation = function (animData) {
-  if (this.animationItem.wrapper) {
-    this.animationItem.container = createTag('canvas');
-    var containerStyle = this.animationItem.container.style;
-    containerStyle.width = '100%';
-    containerStyle.height = '100%';
-    var origin = '0px 0px 0px';
-    containerStyle.transformOrigin = origin;
-    containerStyle.mozTransformOrigin = origin;
-    containerStyle.webkitTransformOrigin = origin;
-    containerStyle['-webkit-transform'] = origin;
-    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
-    this.animationItem.wrapper.appendChild(this.animationItem.container);
-    this.canvasContext = this.animationItem.container.getContext('2d');
-    if (this.renderConfig.className) {
-      this.animationItem.container.setAttribute('class', this.renderConfig.className);
-    }
-    if (this.renderConfig.id) {
-      this.animationItem.container.setAttribute('id', this.renderConfig.id);
-    }
-  } else {
-    this.canvasContext = this.renderConfig.context;
-  }
-  this.data = animData;
-  this.layers = animData.layers;
-  this.transformCanvas = {
-    w: animData.w,
-    h: animData.h,
-    sx: 0,
-    sy: 0,
-    tx: 0,
-    ty: 0,
-  };
-  this.setupGlobalData(animData, document.body);
-  this.globalData.canvasContext = this.canvasContext;
-  this.globalData.renderer = this;
-  this.globalData.isDashed = false;
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.globalData.transformCanvas = this.transformCanvas;
-  this.elements = createSizedArray(animData.layers.length);
-
-  this.updateContainerSize();
-};
-
-CanvasRenderer.prototype.updateContainerSize = function () {
-  this.reset();
-  var elementWidth;
-  var elementHeight;
-  if (this.animationItem.wrapper && this.animationItem.container) {
-    elementWidth = this.animationItem.wrapper.offsetWidth;
-    elementHeight = this.animationItem.wrapper.offsetHeight;
-    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
-    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
-  } else {
-    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
-    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
-  }
-  var elementRel;
-  var animationRel;
-  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
-    var par = this.renderConfig.preserveAspectRatio.split(' ');
-    var fillType = par[1] || 'meet';
-    var pos = par[0] || 'xMidYMid';
-    var xPos = pos.substr(0, 4);
-    var yPos = pos.substr(4);
-    elementRel = elementWidth / elementHeight;
-    animationRel = this.transformCanvas.w / this.transformCanvas.h;
-    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
-      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    } else {
-      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    }
-
-    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
-    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.tx = 0;
-    }
-    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
-    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.ty = 0;
-    }
-  } else if (this.renderConfig.preserveAspectRatio === 'none') {
-    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  } else {
-    this.transformCanvas.sx = this.renderConfig.dpr;
-    this.transformCanvas.sy = this.renderConfig.dpr;
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  }
-  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];
-  /* var i, len = this.elements.length;
-    for(i=0;i<len;i+=1){
-        if(this.elements[i] && this.elements[i].data.ty === 0){
-            this.elements[i].resize(this.globalData.transformCanvas);
-        }
-    } */
-  this.ctxTransform(this.transformCanvas.props);
-  this.canvasContext.beginPath();
-  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-  this.canvasContext.closePath();
-  this.canvasContext.clip();
-
-  this.renderFrame(this.renderedFrame, true);
-};
-
-CanvasRenderer.prototype.destroy = function () {
-  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.globalData.canvasContext = null;
-  this.animationItem.container = null;
-  this.destroyed = true;
-};
-
-CanvasRenderer.prototype.renderFrame = function (num, forceRender) {
-  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
-    return;
-  }
-  this.renderedFrame = num;
-  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
-  this.globalData.frameId += 1;
-  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
-  this.globalData.projectInterface.currentFrame = num;
-
-  // console.log('--------');
-  // console.log('NEW: ',num);
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    if (this.renderConfig.clearCanvas === true) {
-      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-    } else {
-      this.save();
-    }
-    for (i = len - 1; i >= 0; i -= 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-    if (this.renderConfig.clearCanvas !== true) {
-      this.restore();
-    }
-  }
-};
-
-CanvasRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  var element = this.createItem(this.layers[pos], this, this.globalData);
-  elements[pos] = element;
-  element.initExpressions();
-  /* if(this.layers[pos].ty === 0){
-        element.resize(this.globalData.transformCanvas);
-    } */
-};
-
-CanvasRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-CanvasRenderer.prototype.hide = function () {
-  this.animationItem.container.style.display = 'none';
-};
-
-CanvasRenderer.prototype.show = function () {
-  this.animationItem.container.style.display = 'block';
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
-    }
-
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
-    } else {
-      rect = null;
-    }
-
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
-    } else {
-      count += 1;
-
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
-
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      } else {
-        feMorph = null;
-        x = null;
-      }
-
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
-
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
-      }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
-      }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
-      }
-    }
-  }
-
-  this.maskElement = createNS(maskType);
-
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
-
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
-    }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
-    }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
-      }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
-        } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
-          }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
-        }
-      }
-    }
-  }
-};
-
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
-
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
-
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
-
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
-      }
-      viewData.elem.setAttribute('d', pathShapeValue);
-    }
-    viewData.lastPath = pathString;
-  }
-};
-
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
-
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
-
-function HierarchyElement() {}
-
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
-    }
-  },
-};
-
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
-
-function FrameElement() {}
-
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
-          this._mdf = true;
-        }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
-
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
-        while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
-          }
-          i += 1;
-        }
-      }
-
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
-        return;
-      }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
-      }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
-      this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
-    }
-    i += 1;
-  }
-}
-
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
-
-/* global createNS */
-/* exported ShapeGroupData */
-
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global ShapePropertyFactory, SVGShapeData */
-
-function CVShapeData(element, data, styles, transformsManager) {
-  this.styledShapes = [];
-  this.tr = [0, 0, 0, 0, 0, 0];
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
-  var i;
-  var len = styles.length;
-  var styledShape;
-  for (i = 0; i < len; i += 1) {
-    if (!styles[i].closed) {
-      styledShape = {
-        transforms: transformsManager.addTransformSequence(styles[i].transforms),
-        trNodes: [],
-      };
-      this.styledShapes.push(styledShape);
-      styles[i].elements.push(styledShape);
-    }
-  }
-}
-
-CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
-
-function FootageElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.footageData = globalData.imageLoader.getAsset(this.assetData);
-  this.initBaseData(data, globalData, comp);
-}
-
-FootageElement.prototype.prepareFrame = function () {
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
-
-FootageElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-FootageElement.prototype.renderFrame = function () {
-};
-
-FootageElement.prototype.destroy = function () {
-};
-
-FootageElement.prototype.initExpressions = function () {
-  this.layerInterface = FootageInterface(this);
-};
-
-FootageElement.prototype.getFootageData = function () {
-  return this.footageData;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global Matrix, createTypedArray */
-
-function CVContextData() {
-  this.saved = [];
-  this.cArrPos = 0;
-  this.cTr = new Matrix();
-  this.cO = 1;
-  var i;
-  var len = 15;
-  this.savedOp = createTypedArray('float32', len);
-  for (i = 0; i < len; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = len;
-}
-
-CVContextData.prototype.duplicate = function () {
-  var newLength = this._length * 2;
-  var currentSavedOp = this.savedOp;
-  this.savedOp = createTypedArray('float32', newLength);
-  this.savedOp.set(currentSavedOp);
-  var i = 0;
-  for (i = this._length; i < newLength; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = newLength;
-};
-
-CVContextData.prototype.reset = function () {
-  this.cArrPos = 0;
-  this.cTr.reset();
-  this.cO = 1;
-};
-
-/* global CVEffects, getBlendMode, CVMaskElement, Matrix */
-
-function CVBaseElement() {
-}
-
-CVBaseElement.prototype = {
-  createElements: function () {},
-  initRendererElement: function () {},
-  createContainerElements: function () {
-    this.canvasContext = this.globalData.canvasContext;
-    this.renderableEffectsManager = new CVEffects(this);
-  },
-  createContent: function () {},
-  setBlendMode: function () {
-    var globalData = this.globalData;
-    if (globalData.blendMode !== this.data.bm) {
-      globalData.blendMode = this.data.bm;
-      var blendModeValue = getBlendMode(this.data.bm);
-      globalData.canvasContext.globalCompositeOperation = blendModeValue;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new CVMaskElement(this.data, this);
-  },
-  hideElement: function () {
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-      this.hidden = true;
-    }
-  },
-  showElement: function () {
-    if (this.isInRange && !this.isTransparent) {
-      this.hidden = false;
-      this._isFirstFrame = true;
-      this.maskManager._isFirstFrame = true;
-    }
-  },
-  renderFrame: function () {
-    if (this.hidden || this.data.hd) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.setBlendMode();
-    var forceRealStack = this.data.ty === 0;
-    this.globalData.renderer.save(forceRealStack);
-    this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
-    this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
-    this.renderInnerContent();
-    this.globalData.renderer.restore(forceRealStack);
-    if (this.maskManager.hasMasks) {
-      this.globalData.renderer.restore(true);
-    }
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.canvasContext = null;
-    this.data = null;
-    this.globalData = null;
-    this.maskManager.destroy();
-  },
-  mHelper: new Matrix(),
-};
-CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
-CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement,HierarchyElement, FrameElement,
-RenderableElement, SVGShapeElement, IImageElement, createTag */
-
-function CVImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.img = globalData.imageLoader.getAsset(this.assetData);
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
-
-CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVImageElement.prototype.createContent = function () {
-  if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
-    var canvas = createTag('canvas');
-    canvas.width = this.assetData.w;
-    canvas.height = this.assetData.h;
-    var ctx = canvas.getContext('2d');
-
-    var imgW = this.img.width;
-    var imgH = this.img.height;
-    var imgRel = imgW / imgH;
-    var canvasRel = this.assetData.w / this.assetData.h;
-    var widthCrop;
-    var heightCrop;
-    var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
-    if ((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) {
-      heightCrop = imgH;
-      widthCrop = heightCrop * canvasRel;
-    } else {
-      widthCrop = imgW;
-      heightCrop = widthCrop / canvasRel;
-    }
-    ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
-    this.img = canvas;
-  }
-};
-
-CVImageElement.prototype.renderInnerContent = function () {
-  this.canvasContext.drawImage(this.img, 0, 0);
-};
-
-CVImageElement.prototype.destroy = function () {
-  this.img = null;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */
-
-function CVCompElement(data, globalData, comp) {
-  this.completeLayers = false;
-  this.layers = data.layers;
-  this.pendingElements = [];
-  this.elements = createSizedArray(this.layers.length);
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
-
-CVCompElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.beginPath();
-  ctx.moveTo(0, 0);
-  ctx.lineTo(this.data.w, 0);
-  ctx.lineTo(this.data.w, this.data.h);
-  ctx.lineTo(0, this.data.h);
-  ctx.lineTo(0, 0);
-  ctx.clip();
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-CVCompElement.prototype.destroy = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.layers = null;
-  this.elements = null;
-};
-
-/* global createSizedArray, ShapePropertyFactory, MaskElement */
-
-function CVMaskElement(data, element) {
-  this.data = data;
-  this.element = element;
-  this.masksProperties = this.data.masksProperties || [];
-  this.viewData = createSizedArray(this.masksProperties.length);
-  var i;
-  var len = this.masksProperties.length;
-  var hasMasks = false;
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      hasMasks = true;
-    }
-    this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
-  }
-  this.hasMasks = hasMasks;
-  if (hasMasks) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-CVMaskElement.prototype.renderFrame = function () {
-  if (!this.hasMasks) {
-    return;
-  }
-  var transform = this.element.finalTransform.mat;
-  var ctx = this.element.canvasContext;
-  var i;
-  var len = this.masksProperties.length;
-  var pt;
-  var pts;
-  var data;
-  ctx.beginPath();
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.masksProperties[i].inv) {
-        ctx.moveTo(0, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
-        ctx.lineTo(0, this.element.globalData.compSize.h);
-        ctx.lineTo(0, 0);
-      }
-      data = this.viewData[i].v;
-      pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
-      ctx.moveTo(pt[0], pt[1]);
-      var j;
-      var jLen = data._length;
-      for (j = 1; j < jLen; j += 1) {
-        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
-        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-      }
-      pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
-      ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-    }
-  }
-  this.element.globalData.renderer.save(true);
-  ctx.clip();
-};
-
-CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
-
-CVMaskElement.prototype.destroy = function () {
-  this.element = null;
-};
-
-/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,
-HierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,
-DashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */
-
-function CVShapeElement(data, globalData, comp) {
-  this.shapes = [];
-  this.shapesData = data.shapes;
-  this.stylesList = [];
-  this.itemsData = [];
-  this.prevViewData = [];
-  this.shapeModifiers = [];
-  this.processedElements = [];
-  this.transformsManager = new ShapeTransformManager();
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
-
-CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
-
-CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false };
-
-CVShapeElement.prototype.dashResetter = [];
-
-CVShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-};
-
-CVShapeElement.prototype.createStyleElement = function (data, transforms) {
-  var styleElem = {
-    data: data,
-    type: data.ty,
-    preTransforms: this.transformsManager.addTransformSequence(transforms),
-    transforms: [],
-    elements: [],
-    closed: data.hd === true,
-  };
-  var elementData = {};
-  if (data.ty === 'fl' || data.ty === 'st') {
-    elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
-    if (!elementData.c.k) {
-      styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
-    }
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
-    elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
-    elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this);
-    elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this);
-    elementData.g = new GradientProperty(this, data.g, this);
-  }
-  elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
-  if (data.ty === 'st' || data.ty === 'gs') {
-    styleElem.lc = lineCapEnum[data.lc || 2];
-    styleElem.lj = lineJoinEnum[data.lj || 2];
-    if (data.lj == 1) { // eslint-disable-line eqeqeq
-      styleElem.ml = data.ml;
-    }
-    elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
-    if (!elementData.w.k) {
-      styleElem.wi = elementData.w.v;
-    }
-    if (data.d) {
-      var d = new DashProperty(this, data.d, 'canvas', this);
-      elementData.d = d;
-      if (!elementData.d.k) {
-        styleElem.da = elementData.d.dashArray;
-        styleElem.do = elementData.d.dashoffset[0];
-      }
-    }
-  } else {
-    styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
-  }
-  this.stylesList.push(styleElem);
-  elementData.style = styleElem;
-  return elementData;
-};
-
-CVShapeElement.prototype.createGroupElement = function () {
-  var elementData = {
-    it: [],
-    prevViewData: [],
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createTransformElement = function (data) {
-  var elementData = {
-    transform: {
-      opacity: 1,
-      _opMdf: false,
-      key: this.transformsManager.getNewKey(),
-      op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
-      mProps: TransformPropertyFactory.getTransformProperty(this, data, this),
-    },
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createShapeElement = function (data) {
-  var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
-
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  return elementData;
-};
-
-CVShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-};
-
-CVShapeElement.prototype.addTransformToStyleList = function (transform) {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.push(transform);
-    }
-  }
-};
-
-CVShapeElement.prototype.removeTransformFromStyleList = function () {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.pop();
-    }
-  }
-};
-
-CVShapeElement.prototype.closeStyles = function (styles) {
-  var i;
-  var len = styles.length;
-  for (i = 0; i < len; i += 1) {
-    styles[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var processedPos;
-  var modifier;
-  var currentTransform;
-  var ownTransforms = [].concat(transforms);
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._shouldRender = shouldRender;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        currentTransform = this.createTransformElement(arr[i]);
-        itemsData[i] = currentTransform;
-      }
-      ownTransforms.push(itemsData[i]);
-      this.addTransformToStyleList(itemsData[i]);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i]);
-      }
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        shouldRender = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  this.removeTransformFromStyleList();
-  this.closeStyles(ownStyles);
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.renderInnerContent = function () {
-  this.transformHelper.opacity = 1;
-  this.transformHelper._opMdf = false;
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-  this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
-};
-
-CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
-  if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
-    groupTransform.opacity = parentTransform.opacity;
-    groupTransform.opacity *= groupTransform.op.v;
-    groupTransform._opMdf = true;
-  }
-};
-
-CVShapeElement.prototype.drawLayer = function () {
-  var i;
-  var len = this.stylesList.length;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var elems;
-  var nodes;
-  var renderer = this.globalData.renderer;
-  var ctx = this.globalData.canvasContext;
-  var type;
-  var currentStyle;
-  for (i = 0; i < len; i += 1) {
-    currentStyle = this.stylesList[i];
-    type = currentStyle.type;
-
-    // Skipping style when
-    // Stroke width equals 0
-    // style should not be rendered (extra unused repeaters)
-    // current opacity equals 0
-    // global opacity equals 0
-    if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
-      renderer.save();
-      elems = currentStyle.elements;
-      if (type === 'st' || type === 'gs') {
-        ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
-        ctx.lineWidth = currentStyle.wi;
-        ctx.lineCap = currentStyle.lc;
-        ctx.lineJoin = currentStyle.lj;
-        ctx.miterLimit = currentStyle.ml || 0;
-      } else {
-        ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
-      }
-      renderer.ctxOpacity(currentStyle.coOp);
-      if (type !== 'st' && type !== 'gs') {
-        ctx.beginPath();
-      }
-      renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
-      jLen = elems.length;
-      for (j = 0; j < jLen; j += 1) {
-        if (type === 'st' || type === 'gs') {
-          ctx.beginPath();
-          if (currentStyle.da) {
-            ctx.setLineDash(currentStyle.da);
-            ctx.lineDashOffset = currentStyle.do;
-          }
-        }
-        nodes = elems[j].trNodes;
-        kLen = nodes.length;
-
-        for (k = 0; k < kLen; k += 1) {
-          if (nodes[k].t === 'm') {
-            ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
-          } else if (nodes[k].t === 'c') {
-            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]);
-          } else {
-            ctx.closePath();
-          }
-        }
-        if (type === 'st' || type === 'gs') {
-          ctx.stroke();
-          if (currentStyle.da) {
-            ctx.setLineDash(this.dashResetter);
-          }
-        }
-      }
-      if (type !== 'st' && type !== 'gs') {
-        ctx.fill(currentStyle.r);
-      }
-      renderer.restore();
-    }
-  }
-};
-
-CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
-  var i;
-  var len = items.length - 1;
-  var groupTransform;
-  groupTransform = parentTransform;
-  for (i = len; i >= 0; i -= 1) {
-    if (items[i].ty === 'tr') {
-      groupTransform = data[i].transform;
-      this.renderShapeTransform(parentTransform, groupTransform);
-    } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
-      this.renderPath(items[i], data[i]);
-    } else if (items[i].ty === 'fl') {
-      this.renderFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'st') {
-      this.renderStroke(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
-      this.renderGradientFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gr') {
-      this.renderShape(groupTransform, items[i].it, data[i].it);
-    } else if (items[i].ty === 'tm') {
-      //
-    }
-  }
-  if (isMain) {
-    this.drawLayer();
-  }
-};
-
-CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
-  if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
-    var shapeNodes = styledShape.trNodes;
-    var paths = shape.paths;
-    var i;
-    var len;
-    var j;
-    var jLen = paths._length;
-    shapeNodes.length = 0;
-    var groupTransformMat = styledShape.transforms.finalTransform;
-    for (j = 0; j < jLen; j += 1) {
-      var pathNodes = paths.shapes[j];
-      if (pathNodes && pathNodes.v) {
-        len = pathNodes._length;
-        for (i = 1; i < len; i += 1) {
-          if (i === 1) {
-            shapeNodes.push({
-              t: 'm',
-              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-            });
-          }
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]),
-          });
-        }
-        if (len === 1) {
-          shapeNodes.push({
-            t: 'm',
-            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-          });
-        }
-        if (pathNodes.c && len) {
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]),
-          });
-          shapeNodes.push({
-            t: 'z',
-          });
-        }
-      }
-    }
-    styledShape.trNodes = shapeNodes;
-  }
-};
-
-CVShapeElement.prototype.renderPath = function (pathData, itemData) {
-  if (pathData.hd !== true && pathData._shouldRender) {
-    var i;
-    var len = itemData.styledShapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
-    }
-  }
-};
-
-CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb('
-        + bmFloor(itemData.c.v[0]) + ','
-        + bmFloor(itemData.c.v[1]) + ','
-        + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-};
-
-CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var grd;
-  if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {
-    var ctx = this.globalData.canvasContext;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
-    if (styleData.t === 1) {
-      grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
-    } else {
-      var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-      var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-      var percent = itemData.h.v;
-      if (percent >= 1) {
-        percent = 0.99;
-      } else if (percent <= -1) {
-        percent = -0.99;
-      }
-      var dist = rad * percent;
-      var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-      var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-      grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
-    }
-
-    var i;
-    var len = styleData.g.p;
-    var cValues = itemData.g.c;
-    var opacity = 1;
-
-    for (i = 0; i < len; i += 1) {
-      if (itemData.g._hasOpacity && itemData.g._collapsable) {
-        opacity = itemData.g.o[i * 2 + 1];
-      }
-      grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
-    }
-    styleElem.grd = grd;
-  }
-  styleElem.coOp = itemData.o.v * groupTransform.opacity;
-};
-
-CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var d = itemData.d;
-  if (d && (d._mdf || this._isFirstFrame)) {
-    styleElem.da = d.dashArray;
-    styleElem.do = d.dashoffset[0];
-  }
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-  if (itemData.w._mdf || this._isFirstFrame) {
-    styleElem.wi = itemData.w.v;
-  }
-};
-
-CVShapeElement.prototype.destroy = function () {
-  this.shapesData = null;
-  this.globalData = null;
-  this.canvasContext = null;
-  this.stylesList.length = 0;
-  this.itemsData.length = 0;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,
-SVGShapeElement, IImageElement */
-
-function CVSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
-
-CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVSolidElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.fillStyle = this.data.sc;
-  ctx.fillRect(0, 0, this.data.sw, this.data.sh);
-  //
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement,
-RenderableElement, ITextElement, createTag, createSizedArray */
-
-function CVTextElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.yOffset = 0;
-  this.fillColorAnim = false;
-  this.strokeColorAnim = false;
-  this.strokeWidthAnim = false;
-  this.stroke = false;
-  this.fill = false;
-  this.justifyOffset = 0;
-  this.currentRender = null;
-  this.renderType = 'canvas';
-  this.values = {
-    fill: 'rgba(0,0,0,0)',
-    stroke: 'rgba(0,0,0,0)',
-    sWidth: 0,
-    fValue: '',
-  };
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
-
-CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
-
-CVTextElement.prototype.buildNewText = function () {
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
-
-  var hasFill = false;
-  if (documentData.fc) {
-    hasFill = true;
-    this.values.fill = this.buildColor(documentData.fc);
-  } else {
-    this.values.fill = 'rgba(0,0,0,0)';
-  }
-  this.fill = hasFill;
-  var hasStroke = false;
-  if (documentData.sc) {
-    hasStroke = true;
-    this.values.stroke = this.buildColor(documentData.sc);
-    this.values.sWidth = documentData.sw;
-  }
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  var i;
-  var len;
-  var letters = documentData.l;
-  var matrixHelper = this.mHelper;
-  this.stroke = hasStroke;
-  this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
-  len = documentData.finalText.length;
-  // this.tHelper.font = this.values.fValue;
-  var charData;
-  var shapeData;
-  var k;
-  var kLen;
-  var shapes;
-  var j;
-  var jLen;
-  var pathNodes;
-  var commands;
-  var pathArr;
-  var singleShape = this.data.singleShape;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var cnt = 0;
-  for (i = 0; i < len; i += 1) {
-    charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-    shapeData = (charData && charData.data) || {};
-    matrixHelper.reset();
-    if (singleShape && letters[i].n) {
-      xPos = -trackingOffset;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      firstLine = false;
-    }
-
-    shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-    jLen = shapes.length;
-    matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-    if (singleShape) {
-      this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-    }
-    commands = createSizedArray(jLen);
-    for (j = 0; j < jLen; j += 1) {
-      kLen = shapes[j].ks.k.i.length;
-      pathNodes = shapes[j].ks.k;
-      pathArr = [];
-      for (k = 1; k < kLen; k += 1) {
-        if (k === 1) {
-          pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
-        }
-        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));
-      }
-      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));
-      commands[j] = pathArr;
-    }
-    if (singleShape) {
-      xPos += letters[i].l;
-      xPos += trackingOffset;
-    }
-    if (this.textSpans[cnt]) {
-      this.textSpans[cnt].elem = commands;
-    } else {
-      this.textSpans[cnt] = { elem: commands };
-    }
-    cnt += 1;
-  }
-};
-
-CVTextElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.font = this.values.fValue;
-  ctx.lineCap = 'butt';
-  ctx.lineJoin = 'miter';
-  ctx.miterLimit = 4;
-
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-  }
-
-  var i;
-  var len;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var renderedLetters = this.textAnimator.renderedLetters;
-
-  var letters = this.textProperty.currentData.l;
-
-  len = letters.length;
-  var renderedLetter;
-  var lastFill = null;
-  var lastStroke = null;
-  var lastStrokeW = null;
-  var commands;
-  var pathArr;
-  for (i = 0; i < len; i += 1) {
-    if (!letters[i].n) {
-      renderedLetter = renderedLetters[i];
-      if (renderedLetter) {
-        this.globalData.renderer.save();
-        this.globalData.renderer.ctxTransform(renderedLetter.p);
-        this.globalData.renderer.ctxOpacity(renderedLetter.o);
-      }
-      if (this.fill) {
-        if (renderedLetter && renderedLetter.fc) {
-          if (lastFill !== renderedLetter.fc) {
-            lastFill = renderedLetter.fc;
-            ctx.fillStyle = renderedLetter.fc;
-          }
-        } else if (lastFill !== this.values.fill) {
-          lastFill = this.values.fill;
-          ctx.fillStyle = this.values.fill;
-        }
-        commands = this.textSpans[i].elem;
-        jLen = commands.length;
-        this.globalData.canvasContext.beginPath();
-        for (j = 0; j < jLen; j += 1) {
-          pathArr = commands[j];
-          kLen = pathArr.length;
-          this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
-          for (k = 2; k < kLen; k += 6) {
-            this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
-          }
-        }
-        this.globalData.canvasContext.closePath();
-        this.globalData.canvasContext.fill();
-        /// ctx.fillText(this.textSpans[i].val,0,0);
-      }
-      if (this.stroke) {
-        if (renderedLetter && renderedLetter.sw) {
-          if (lastStrokeW !== renderedLetter.sw) {
-            lastStrokeW = renderedLetter.sw;
-            ctx.lineWidth = renderedLetter.sw;
-          }
-        } else if (lastStrokeW !== this.values.sWidth) {
-          lastStrokeW = this.values.sWidth;
-          ctx.lineWidth = this.values.sWidth;
-        }
-        if (renderedLetter && renderedLetter.sc) {
-          if (lastStroke !== renderedLetter.sc) {
-            lastStroke = renderedLetter.sc;
-            ctx.strokeStyle = renderedLetter.sc;
-          }
-        } else if (lastStroke !== this.values.stroke) {
-          lastStroke = this.values.stroke;
-          ctx.strokeStyle = this.values.stroke;
-        }
-        commands = this.textSpans[i].elem;
-        jLen = commands.length;
-        this.globalData.canvasContext.beginPath();
-        for (j = 0; j < jLen; j += 1) {
-          pathArr = commands[j];
-          kLen = pathArr.length;
-          this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
-          for (k = 2; k < kLen; k += 6) {
-            this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
-          }
-        }
-        this.globalData.canvasContext.closePath();
-        this.globalData.canvasContext.stroke();
-        /// ctx.strokeText(letters[i].val,0,0);
-      }
-      if (renderedLetter) {
-        this.globalData.renderer.restore();
-      }
-    }
-  }
-};
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
 
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
     if (expressionsPlugin) {
       expressionsPlugin.initExpressions(this);
     }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
+
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-  }
-};
 
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
+  };
 
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
-  }
-};
 
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
+    this.loadNextSegment();
+  };
 
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
 
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
 
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
     }
-  }
-  return null;
-};
 
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
+    try {
+      this.animationData = animData;
 
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
+      }
+
+      this.renderer.configAnimation(animData);
+
+      if (!animData.assets) {
+        animData.assets = [];
+      }
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
+      }
+    } catch (error) {
+      this.triggerConfigError(error);
+    }
+  };
+
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
+    }
+
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
+    } else {
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
       }
     }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
+  };
 
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
+
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
+
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
+
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
+    }
+
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
+    }
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
       }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
+    } else {
+      this.pause();
+    }
+  };
+
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
+
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
+
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
+      }
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
+      }
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
+        } else {
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
       if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
+          }
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
       }
     } else {
       this.setCurrentRawFrameValue(nextValue);
     }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
         } else {
-          this.trigger('loopComplete');
+          this.setDirection(-1);
         }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
       }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
 
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
       }
     }
-    this.totalFrames = arr[0] - arr[1];
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
     this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$4(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
       }
+    } else {
+      this.segments.push(arr);
     }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
     }
-  }
 
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
+    if (this.isPaused) {
+      this.play();
+    }
+  };
 
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
     this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
+    this.segments.push([this.animationData.ip, this.animationData.op]);
 
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
-
-var Expressions = (function () {
-  var ob = {};
-  ob.initExpressions = initExpressions;
-
-  function initExpressions(animation) {
-    var stackCount = 0;
-    var registers = [];
-
-    function pushExpression() {
-      stackCount += 1;
-    }
-
-    function popExpression() {
-      stackCount -= 1;
-      if (stackCount === 0) {
-        releaseInstances();
-      }
-    }
-
-    function registerExpressionProperty(expression) {
-      if (registers.indexOf(expression) === -1) {
-        registers.push(expression);
-      }
-    }
-
-    function releaseInstances() {
-      var i;
-      var len = registers.length;
-      for (i = 0; i < len; i += 1) {
-        registers[i].release();
-      }
-      registers.length = 0;
-    }
-
-    animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-    animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
-    animation.renderer.globalData.pushExpression = pushExpression;
-    animation.renderer.globalData.popExpression = popExpression;
-    animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
-  }
-  return ob;
-}());
-
-expressionsPlugin = Expressions;
-
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
-
-var ExpressionManager = (function () {
-  'use strict';
-
-  var ob = {};
-  var Math = BMMath;
-  var window = null;
-  var document = null;
-  var XMLHttpRequest = null;
-  var fetch = null;
-  var frames = null;
-
-  function $bm_isInstanceOfArray(arr) {
-    return arr.constructor === Array || arr.constructor === Float32Array;
-  }
-
-  function isNumerable(tOfV, v) {
-    return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
-  }
-
-  function $bm_neg(a) {
-    var tOfA = typeof a;
-    if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
-      return -a;
-    }
-    if ($bm_isInstanceOfArray(a)) {
-      var i;
-      var lenA = a.length;
-      var retArr = [];
-      for (i = 0; i < lenA; i += 1) {
-        retArr[i] = -a[i];
-      }
-      return retArr;
-    }
-    if (a.propType) {
-      return a.v;
-    }
-    return -a;
-  }
-
-  var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
-  var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
-  var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
-
-  function sum(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (tOfA === 'string' || tOfB === 'string') {
-      return a + b;
-    }
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a + b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] += b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a + b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] + b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-  var add = sum;
-
-  function sub(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      if (tOfA === 'string') {
-        a = parseInt(a, 10);
-      }
-      if (tOfB === 'string') {
-        b = parseInt(b, 10);
-      }
-      return a - b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] -= b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a - b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] - b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-
-  function mul(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a * b;
-    }
-
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] * b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a * b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-
-  function div(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a / b;
-    }
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] / b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a / b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-  function mod(a, b) {
-    if (typeof a === 'string') {
-      a = parseInt(a, 10);
-    }
-    if (typeof b === 'string') {
-      b = parseInt(b, 10);
-    }
-    return a % b;
-  }
-  var $bm_sum = sum;
-  var $bm_sub = sub;
-  var $bm_mul = mul;
-  var $bm_div = div;
-  var $bm_mod = mod;
-
-  function clamp(num, min, max) {
-    if (min > max) {
-      var mm = max;
-      max = min;
-      min = mm;
-    }
-    return Math.min(Math.max(num, min), max);
-  }
-
-  function radiansToDegrees(val) {
-    return val / degToRads;
-  }
-  var radians_to_degrees = radiansToDegrees;
-
-  function degreesToRadians(val) {
-    return val * degToRads;
-  }
-  var degrees_to_radians = radiansToDegrees;
-
-  var helperLengthArray = [0, 0, 0, 0, 0, 0];
-
-  function length(arr1, arr2) {
-    if (typeof arr1 === 'number' || arr1 instanceof Number) {
-      arr2 = arr2 || 0;
-      return Math.abs(arr1 - arr2);
-    }
-    if (!arr2) {
-      arr2 = helperLengthArray;
-    }
-    var i;
-    var len = Math.min(arr1.length, arr2.length);
-    var addedLength = 0;
-    for (i = 0; i < len; i += 1) {
-      addedLength += Math.pow(arr2[i] - arr1[i], 2);
-    }
-    return Math.sqrt(addedLength);
-  }
-
-  function normalize(vec) {
-    return div(vec, length(vec));
-  }
-
-  function rgbToHsl(val) {
-    var r = val[0]; var g = val[1]; var b = val[2];
-    var max = Math.max(r, g, b);
-    var min = Math.min(r, g, b);
-    var h;
-    var s;
-    var l = (max + min) / 2;
-
-    if (max === min) {
-      h = 0; // achromatic
-      s = 0; // achromatic
-    } else {
-      var d = max - min;
-      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
-      switch (max) {
-        case r: h = (g - b) / d + (g < b ? 6 : 0); break;
-        case g: h = (b - r) / d + 2; break;
-        case b: h = (r - g) / d + 4; break;
-        default: break;
-      }
-      h /= 6;
-    }
-
-    return [h, s, l, val[3]];
-  }
-
-  function hue2rgb(p, q, t) {
-    if (t < 0) t += 1;
-    if (t > 1) t -= 1;
-    if (t < 1 / 6) return p + (q - p) * 6 * t;
-    if (t < 1 / 2) return q;
-    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
-    return p;
-  }
-
-  function hslToRgb(val) {
-    var h = val[0];
-    var s = val[1];
-    var l = val[2];
-
-    var r;
-    var g;
-    var b;
-
-    if (s === 0) {
-      r = l; // achromatic
-      b = l; // achromatic
-      g = l; // achromatic
-    } else {
-      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-      var p = 2 * l - q;
-      r = hue2rgb(p, q, h + 1 / 3);
-      g = hue2rgb(p, q, h);
-      b = hue2rgb(p, q, h - 1 / 3);
-    }
-
-    return [r, g, b, val[3]];
-  }
-
-  function linear(t, tMin, tMax, value1, value2) {
-    if (value1 === undefined || value2 === undefined) {
-      value1 = tMin;
-      value2 = tMax;
-      tMin = 0;
-      tMax = 1;
-    }
-    if (tMax < tMin) {
-      var _tMin = tMax;
-      tMax = tMin;
-      tMin = _tMin;
-    }
-    if (t <= tMin) {
-      return value1;
-    } if (t >= tMax) {
-      return value2;
-    }
-    var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
-    if (!value1.length) {
-      return value1 + (value2 - value1) * perc;
-    }
-    var i;
-    var len = value1.length;
-    var arr = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
-    }
-    return arr;
-  }
-  function random(min, max) {
-    if (max === undefined) {
-      if (min === undefined) {
-        min = 0;
-        max = 1;
-      } else {
-        max = min;
-        min = undefined;
-      }
-    }
-    if (max.length) {
-      var i;
-      var len = max.length;
-      if (!min) {
-        min = createTypedArray('float32', len);
-      }
-      var arr = createTypedArray('float32', len);
-      var rnd = BMMath.random();
-      for (i = 0; i < len; i += 1) {
-        arr[i] = min[i] + rnd * (max[i] - min[i]);
-      }
-      return arr;
-    }
-    if (min === undefined) {
-      min = 0;
-    }
-    var rndm = BMMath.random();
-    return min + rndm * (max - min);
-  }
-
-  function createPath(points, inTangents, outTangents, closed) {
-    var i;
-    var len = points.length;
-    var path = shapePool.newElement();
-    path.setPathData(!!closed, len);
-    var arrPlaceholder = [0, 0];
-    var inVertexPoint;
-    var outVertexPoint;
-    for (i = 0; i < len; i += 1) {
-      inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
-      outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
-      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);
-    }
-    return path;
-  }
-
-  function initiateExpression(elem, data, property) {
-    var val = data.x;
-    var needsVelocity = /velocity(?![\w\d])/.test(val);
-    var _needsRandom = val.indexOf('random') !== -1;
-    var elemType = elem.data.ty;
-    var transform;
-    var $bm_transform;
-    var content;
-    var effect;
-    var thisProperty = property;
-    thisProperty.valueAtTime = thisProperty.getValueAtTime;
-    Object.defineProperty(thisProperty, 'value', {
-      get: function () {
-        return thisProperty.v;
-      },
-    });
-    elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
-    elem.comp.displayStartTime = 0;
-    var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    var outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    var width = elem.data.sw ? elem.data.sw : 0;
-    var height = elem.data.sh ? elem.data.sh : 0;
-    var name = elem.data.nm;
-    var loopIn;
-    var loop_in;
-    var loopOut;
-    var loop_out;
-    var smooth;
-    var toWorld;
-    var fromWorld;
-    var fromComp;
-    var toComp;
-    var fromCompToSurface;
-    var position;
-    var rotation;
-    var anchorPoint;
-    var scale;
-    var thisLayer;
-    var thisComp;
-    var mask;
-    var valueAtTime;
-    var velocityAtTime;
-
-    var scoped_bm_rt;
-    // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
-    var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
-    var numKeys = property.kf ? data.k.length : 0;
-
-    var active = !this.data || this.data.hd !== true;
-
-    var wiggle = function wiggle(freq, amp) {
-      var iWiggle;
-      var j;
-      var lenWiggle = this.pv.length ? this.pv.length : 1;
-      var addedAmps = createTypedArray('float32', lenWiggle);
-      freq = 5;
-      var iterations = Math.floor(time * freq);
-      iWiggle = 0;
-      j = 0;
-      while (iWiggle < iterations) {
-        // var rnd = BMMath.random();
-        for (j = 0; j < lenWiggle; j += 1) {
-          addedAmps[j] += -amp + amp * 2 * BMMath.random();
-          // addedAmps[j] += -amp + amp*2*rnd;
-        }
-        iWiggle += 1;
-      }
-      // var rnd2 = BMMath.random();
-      var periods = time * freq;
-      var perc = periods - Math.floor(periods);
-      var arr = createTypedArray('float32', lenWiggle);
-      if (lenWiggle > 1) {
-        for (j = 0; j < lenWiggle; j += 1) {
-          arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;
-          // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
-          // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
-        }
-        return arr;
-      }
-      return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
-    }.bind(this);
-
-    if (thisProperty.loopIn) {
-      loopIn = thisProperty.loopIn.bind(thisProperty);
-      loop_in = loopIn;
-    }
-
-    if (thisProperty.loopOut) {
-      loopOut = thisProperty.loopOut.bind(thisProperty);
-      loop_out = loopOut;
-    }
-
-    if (thisProperty.smooth) {
-      smooth = thisProperty.smooth.bind(thisProperty);
-    }
-
-    function loopInDuration(type, duration) {
-      return loopIn(type, duration, true);
-    }
-
-    function loopOutDuration(type, duration) {
-      return loopOut(type, duration, true);
-    }
-
-    if (this.getValueAtTime) {
-      valueAtTime = this.getValueAtTime.bind(this);
-    }
-
-    if (this.getVelocityAtTime) {
-      velocityAtTime = this.getVelocityAtTime.bind(this);
-    }
-
-    var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
-
-    function lookAt(elem1, elem2) {
-      var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
-      var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
-      var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
-      return [yaw, pitch, 0];
-    }
-
-    function easeOut(t, tMin, tMax, val1, val2) {
-      return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function easeIn(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInBez, t, tMin, tMax, val1, val2);
-    }
-
-    function ease(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function applyEase(fn, t, tMin, tMax, val1, val2) {
-      if (val1 === undefined) {
-        val1 = tMin;
-        val2 = tMax;
-      } else {
-        t = (t - tMin) / (tMax - tMin);
-      }
-      if (t > 1) {
-        t = 1;
-      } else if (t < 0) {
-        t = 0;
-      }
-      var mult = fn(t);
-      if ($bm_isInstanceOfArray(val1)) {
-        var iKey;
-        var lenKey = val1.length;
-        var arr = createTypedArray('float32', lenKey);
-        for (iKey = 0; iKey < lenKey; iKey += 1) {
-          arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
-        }
-        return arr;
-      }
-      return (val2 - val1) * mult + val1;
-    }
-
-    function nearestKey(time) {
-      var iKey;
-      var lenKey = data.k.length;
-      var index;
-      var keyTime;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        index = 0;
-        keyTime = 0;
-      } else {
-        index = -1;
-        time *= elem.comp.globalData.frameRate;
-        if (time < data.k[0].t) {
-          index = 1;
-          keyTime = data.k[0].t;
-        } else {
-          for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
-            if (time === data.k[iKey].t) {
-              index = iKey + 1;
-              keyTime = data.k[iKey].t;
-              break;
-            } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
-              if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
-                index = iKey + 2;
-                keyTime = data.k[iKey + 1].t;
-              } else {
-                index = iKey + 1;
-                keyTime = data.k[iKey].t;
-              }
-              break;
-            }
-          }
-          if (index === -1) {
-            index = iKey + 1;
-            keyTime = data.k[iKey].t;
-          }
-        }
-      }
-      var obKey = {};
-      obKey.index = index;
-      obKey.time = keyTime / elem.comp.globalData.frameRate;
-      return obKey;
-    }
-
-    function key(ind) {
-      var obKey;
-      var iKey;
-      var lenKey;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        throw new Error('The property has no keyframe at index ' + ind);
-      }
-      ind -= 1;
-      obKey = {
-        time: data.k[ind].t / elem.comp.globalData.frameRate,
-        value: [],
-      };
-      var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
-
-      lenKey = arr.length;
-      for (iKey = 0; iKey < lenKey; iKey += 1) {
-        obKey[iKey] = arr[iKey];
-        obKey.value[iKey] = arr[iKey];
-      }
-      return obKey;
-    }
-
-    function framesToTime(fr, fps) {
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return fr / fps;
-    }
-
-    function timeToFrames(t, fps) {
-      if (!t && t !== 0) {
-        t = time;
-      }
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return t * fps;
-    }
-
-    function seedRandom(seed) {
-      BMMath.seedrandom(randSeed + seed);
-    }
-
-    function sourceRectAtTime() {
-      return elem.sourceRectAtTime();
-    }
-
-    function substring(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substring(init);
-        }
-        return value.substring(init, end);
-      }
-      return '';
-    }
-
-    function substr(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substr(init);
-        }
-        return value.substr(init, end);
-      }
-      return '';
-    }
-
-    function posterizeTime(framesPerSecond) {
-      time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
-      value = valueAtTime(time);
-    }
-
-    var time;
-    var velocity;
-    var value;
-    var text;
-    var textIndex;
-    var textTotal;
-    var selectorValue;
-    var index = elem.data.ind;
-    var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-    var parent;
-    var randSeed = Math.floor(Math.random() * 1000000);
-    var globalData = elem.globalData;
-    function executeExpression(_value) {
-      // globalData.pushExpression();
-      value = _value;
-      if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
-        return value;
-      }
-      if (this.propType === 'textSelector') {
-        textIndex = this.textIndex;
-        textTotal = this.textTotal;
-        selectorValue = this.selectorValue;
-      }
-      if (!thisLayer) {
-        text = elem.layerInterface.text;
-        thisLayer = elem.layerInterface;
-        thisComp = elem.comp.compInterface;
-        toWorld = thisLayer.toWorld.bind(thisLayer);
-        fromWorld = thisLayer.fromWorld.bind(thisLayer);
-        fromComp = thisLayer.fromComp.bind(thisLayer);
-        toComp = thisLayer.toComp.bind(thisLayer);
-        mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
-        fromCompToSurface = fromComp;
-      }
-      if (!transform) {
-        transform = elem.layerInterface('ADBE Transform Group');
-        $bm_transform = transform;
-        if (transform) {
-          anchorPoint = transform.anchorPoint;
-          /* position = transform.position;
-                    rotation = transform.rotation;
-                    scale = transform.scale; */
-        }
-      }
-
-      if (elemType === 4 && !content) {
-        content = thisLayer('ADBE Root Vectors Group');
-      }
-      if (!effect) {
-        effect = thisLayer(4);
-      }
-      hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-      if (hasParent && !parent) {
-        parent = elem.hierarchy[0].layerInterface;
-      }
-      time = this.comp.renderedFrame / this.comp.globalData.frameRate;
-      if (_needsRandom) {
-        seedRandom(randSeed + time);
-      }
-      if (needsVelocity) {
-        velocity = velocityAtTime(time);
-      }
-      expression_function();
-      this.frameExpressionId = elem.globalData.frameId;
-
-      // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
-      return scoped_bm_rt;
-    }
-    return executeExpression;
-  }
-
-  ob.initiateExpression = initiateExpression;
-  return ob;
-}());
-
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
-
-var expressionHelpers = (function () {
-  function searchExpressions(elem, data, prop) {
-    if (data.x) {
-      prop.k = true;
-      prop.x = true;
-      prop.initiateExpression = ExpressionManager.initiateExpression;
-      prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
-    }
-  }
-
-  function getValueAtTime(frameNum) {
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastFrame) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
-      this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
-      this._cachingAtTime.lastFrame = frameNum;
-    }
-    return this._cachingAtTime.value;
-  }
-
-  function getSpeedAtTime(frameNum) {
-    var delta = -0.01;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var speed = 0;
-    if (v1.length) {
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        speed += Math.pow(v2[i] - v1[i], 2);
-      }
-      speed = Math.sqrt(speed) * 100;
-    } else {
-      speed = 0;
-    }
-    return speed;
-  }
-
-  function getVelocityAtTime(frameNum) {
-    if (this.vel !== undefined) {
-      return this.vel;
-    }
-    var delta = -0.001;
-    // frameNum += this.elem.data.st;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var velocity;
-    if (v1.length) {
-      velocity = createTypedArray('float32', v1.length);
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        // removing frameRate
-        // if needed, don't add it here
-        // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
-        velocity[i] = (v2[i] - v1[i]) / delta;
-      }
-    } else {
-      velocity = (v2 - v1) / delta;
-    }
-    return velocity;
-  }
-
-  function getStaticValueAtTime() {
-    return this.pv;
-  }
-
-  function setGroupProperty(propertyGroup) {
-    this.propertyGroup = propertyGroup;
-  }
-
-  return {
-    searchExpressions: searchExpressions,
-    getSpeedAtTime: getSpeedAtTime,
-    getVelocityAtTime: getVelocityAtTime,
-    getValueAtTime: getValueAtTime,
-    getStaticValueAtTime: getStaticValueAtTime,
-    setGroupProperty: setGroupProperty,
-  };
-}());
-
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
-
-(function addPropertyDecorator() {
-  function loopOut(type, duration, durationFlag) {
-    if (!this.k || !this.keyframes) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var lastKeyFrame = keyframes[keyframes.length - 1].t;
-    if (currentFrame <= lastKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var firstKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
-      } else {
-        cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
-      }
-      firstKeyFrame = lastKeyFrame - cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (iterations % 2 !== 0) {
-          return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = (endV[i] - initV[i]) * repeats + current[i];
-        }
-        return ret;
-      }
-      return (endV - initV) * repeats + current;
-    } else if (type === 'continue') {
-      var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(lastValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
-        }
-        return ret;
-      }
-      return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);
-    }
-      return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function loopIn(type, duration, durationFlag) {
-    if (!this.k) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var firstKeyFrame = keyframes[0].t;
-    if (currentFrame >= firstKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var lastKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      lastKeyFrame = keyframes[duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
-      } else {
-        cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
-      }
-      lastKeyFrame = firstKeyFrame + cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
-      if (iterations % 2 === 0) {
-          return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);
-      var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
-        }
-        return ret;
-      }
-      return current - (endV - initV) * repeats;
-    } else if (type === 'continue') {
-      var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(firstValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;
-        }
-        return ret;
-      }
-      return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;
-    }
-      return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function smooth(width, samples) {
-    if (!this.k) {
-      return this.pv;
-    }
-    width = (width || 0.4) * 0.5;
-    samples = Math.floor(samples || 5);
-    if (samples <= 1) {
-      return this.pv;
-    }
-    var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
-    var initFrame = currentTime - width;
-    var endFrame = currentTime + width;
-    var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
-    var i = 0;
-    var j = 0;
-    var value;
-    if (this.pv.length) {
-      value = createTypedArray('float32', this.pv.length);
-    } else {
-      value = 0;
-    }
-    var sampleValue;
-    while (i < samples) {
-      sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
-      if (this.pv.length) {
-        for (j = 0; j < this.pv.length; j += 1) {
-          value[j] += sampleValue[j];
-        }
-      } else {
-        value += sampleValue;
-      }
-      i += 1;
-    }
-    if (this.pv.length) {
-      for (j = 0; j < this.pv.length; j += 1) {
-        value[j] /= samples;
-      }
-    } else {
-      value /= samples;
-    }
-    return value;
-  }
-
-  function getTransformValueAtTime(time) {
-    if (!this._transformCachingAtTime) {
-      this._transformCachingAtTime = {
-        v: new Matrix(),
-      };
-    }
-    /// /
-    var matrix = this._transformCachingAtTime.v;
-    matrix.cloneFromProps(this.pre.props);
-    if (this.appliedTransformations < 1) {
-      var anchor = this.a.getValueAtTime(time);
-      matrix.translate(
-        -anchor[0] * this.a.mult,
-        -anchor[1] * this.a.mult,
-        anchor[2] * this.a.mult
-      );
-    }
-    if (this.appliedTransformations < 2) {
-      var scale = this.s.getValueAtTime(time);
-      matrix.scale(
-        scale[0] * this.s.mult,
-        scale[1] * this.s.mult,
-        scale[2] * this.s.mult
-      );
-    }
-    if (this.sk && this.appliedTransformations < 3) {
-      var skew = this.sk.getValueAtTime(time);
-      var skewAxis = this.sa.getValueAtTime(time);
-      matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
-    }
-    if (this.r && this.appliedTransformations < 4) {
-      var rotation = this.r.getValueAtTime(time);
-      matrix.rotate(-rotation * this.r.mult);
-    } else if (!this.r && this.appliedTransformations < 4) {
-      var rotationZ = this.rz.getValueAtTime(time);
-      var rotationY = this.ry.getValueAtTime(time);
-      var rotationX = this.rx.getValueAtTime(time);
-      var orientation = this.or.getValueAtTime(time);
-      matrix.rotateZ(-rotationZ * this.rz.mult)
-        .rotateY(rotationY * this.ry.mult)
-        .rotateX(rotationX * this.rx.mult)
-        .rotateZ(-orientation[2] * this.or.mult)
-        .rotateY(orientation[1] * this.or.mult)
-        .rotateX(orientation[0] * this.or.mult);
-    }
-    if (this.data.p && this.data.p.s) {
-      var positionX = this.px.getValueAtTime(time);
-      var positionY = this.py.getValueAtTime(time);
-      if (this.data.p.z) {
-        var positionZ = this.pz.getValueAtTime(time);
-        matrix.translate(
-          positionX * this.px.mult,
-          positionY * this.py.mult,
-          -positionZ * this.pz.mult
-        );
-      } else {
-        matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
-      }
-    } else {
-      var position = this.p.getValueAtTime(time);
-      matrix.translate(
-        position[0] * this.p.mult,
-        position[1] * this.p.mult,
-        -position[2] * this.p.mult
-      );
-    }
-    return matrix;
-    /// /
-  }
-
-  function getTransformStaticValueAtTime() {
-    return this.v.clone(new Matrix());
-  }
-
-  var getTransformProperty = TransformPropertyFactory.getTransformProperty;
-  TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
-    var prop = getTransformProperty(elem, data, container);
-    if (prop.dynamicProperties.length) {
-      prop.getValueAtTime = getTransformValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+    if (forceFlag) {
+      this.checkSegments(0);
     }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    return prop;
   };
 
-  var propertyGetProp = PropertyFactory.getProp;
-  PropertyFactory.getProp = function (elem, data, type, mult, container) {
-    var prop = propertyGetProp(elem, data, type, mult, container);
-    // prop.getVelocityAtTime = getVelocityAtTime;
-    // prop.loopOut = loopOut;
-    // prop.loopIn = loopIn;
-    if (prop.kf) {
-      prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    prop.loopOut = loopOut;
-    prop.loopIn = loopIn;
-    prop.smooth = smooth;
-    prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
-    prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
-    prop.numKeys = data.a === 1 ? data.k.length : 0;
-    prop.propertyIndex = data.ix;
-    var value = 0;
-    if (type !== 0) {
-      value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
-    }
-    prop._cachingAtTime = {
-      lastFrame: initialDefaultFrame,
-      lastIndex: 0,
-      value: value,
-    };
-    expressionHelpers.searchExpressions(elem, data, prop);
-    if (prop.k) {
-      container.addDynamicProperty(prop);
-    }
-
-    return prop;
-  };
-
-  function getShapeValueAtTime(frameNum) {
-    // For now this caching object is created only when needed instead of creating it when the shape is initialized.
-    if (!this._cachingAtTime) {
-      this._cachingAtTime = {
-        shapeValue: shapePool.clone(this.pv),
-        lastIndex: 0,
-        lastTime: initialDefaultFrame,
-      };
-    }
-
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastTime) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
-      this._cachingAtTime.lastTime = frameNum;
-      this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
-    }
-    return this._cachingAtTime.shapeValue;
-  }
-
-  var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
-  var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
-
-  function ShapeExpressions() {}
-  ShapeExpressions.prototype = {
-    vertices: function (prop, time) {
-      if (this.k) {
-        this.getValue();
-      }
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      var i;
-      var len = shapePath._length;
-      var vertices = shapePath[prop];
-      var points = shapePath.v;
-      var arr = createSizedArray(len);
-      for (i = 0; i < len; i += 1) {
-        if (prop === 'i' || prop === 'o') {
-          arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
-        } else {
-          arr[i] = [vertices[i][0], vertices[i][1]];
-        }
-      }
-      return arr;
-    },
-    points: function (time) {
-      return this.vertices('v', time);
-    },
-    inTangents: function (time) {
-      return this.vertices('i', time);
-    },
-    outTangents: function (time) {
-      return this.vertices('o', time);
-    },
-    isClosed: function () {
-      return this.v.c;
-    },
-    pointOnPath: function (perc, time) {
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      if (!this._segmentsLength) {
-        this._segmentsLength = bez.getSegmentsLength(shapePath);
-      }
-
-      var segmentsLength = this._segmentsLength;
-      var lengths = segmentsLength.lengths;
-      var lengthPos = segmentsLength.totalLength * perc;
-      var i = 0;
-      var len = lengths.length;
-      var accumulatedLength = 0;
-      var pt;
-      while (i < len) {
-        if (accumulatedLength + lengths[i].addedLength > lengthPos) {
-          var initIndex = i;
-          var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
-          var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
-          pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
-          break;
-        } else {
-          accumulatedLength += lengths[i].addedLength;
-        }
-        i += 1;
-      }
-      if (!pt) {
-        pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
-      }
-      return pt;
-    },
-    vectorOnPath: function (perc, time, vectorType) {
-      // perc doesn't use triple equality because it can be a Number object as well as a primitive.
-      if (perc == 1) { // eslint-disable-line eqeqeq
-        perc = this.v.c;
-      } else if (perc == 0) { // eslint-disable-line eqeqeq
-        perc = 0.999;
-      }
-      var pt1 = this.pointOnPath(perc, time);
-      var pt2 = this.pointOnPath(perc + 0.001, time);
-      var xLength = pt2[0] - pt1[0];
-      var yLength = pt2[1] - pt1[1];
-      var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
-      if (magnitude === 0) {
-        return [0, 0];
-      }
-      var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
-      return unitVector;
-    },
-    tangentOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'tangent');
-    },
-    normalOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'normal');
-    },
-    setGroupProperty: expressionHelpers.setGroupProperty,
-    getValueAtTime: expressionHelpers.getStaticValueAtTime,
-  };
-  extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
-  extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-  KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
-  KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
-
-  var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
-  ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
-    var prop = propertyGetShapeProp(elem, data, type, arr, trims);
-    prop.propertyIndex = data.ix;
-    prop.lock = false;
-    if (type === 3) {
-      expressionHelpers.searchExpressions(elem, data.pt, prop);
-    } else if (type === 4) {
-      expressionHelpers.searchExpressions(elem, data.ks, prop);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  };
-}());
-
-/* global ExpressionManager, TextProperty */
-
-(function addDecorator() {
-  function searchExpressions() {
-    if (this.data.d.x) {
-      this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
-      this.addEffect(this.getExpressionValue.bind(this));
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
       return true;
     }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
+        }
+      }
+    }
+
+    function freeze() {
+      _isFrozen = true;
+    }
+
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
+
+    function setVolume(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
+      }
+    }
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
+  }
+
+  var bez = bezFunction();
+
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
+
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
+
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
+    }
+
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
+
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
+
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
+          this._mdf = true;
+        }
+      } else {
+        var i = 0;
+        var len = this.v.length;
+
+        while (i < len) {
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
+          }
+
+          i += 1;
+        }
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
+    }
+
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
+
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
+      }
+    }
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
+  }
+
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
+
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
+
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
+
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
+
+    return animationManager.loadAnimation(params);
+  }
+
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
+
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
+
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
+
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
+
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
+      default:
+        return null;
+    }
+  }
+
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
+
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
+
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
+    }
+  }
+
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
+
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
+
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
+      }
+    }
+
     return null;
   }
 
-  TextProperty.prototype.getExpressionValue = function (currentValue, text) {
-    var newValue = this.calculateExpression(text);
-    if (currentValue.t !== newValue) {
-      var newData = {};
-      this.copyData(newData, currentValue);
-      newData.t = newValue.toString();
-      newData.__complete = false;
-      return newData;
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
     }
-    return currentValue;
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
   };
 
-  TextProperty.prototype.searchProperty = function () {
-    var isKeyframed = this.searchKeyframes();
-    var hasExpressions = this.searchExpressions();
-    this.kf = isKeyframed || hasExpressions;
-    return this.kf;
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
   };
 
-  TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
 
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-var ShapePathInterface = (
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-  function () {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
       var prop = view.sh;
 
@@ -12591,1602 +7683,9570 @@
         if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
           return interfaceFunction.path;
         }
+
         return null;
       }
 
       var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
       prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
       Object.defineProperties(interfaceFunction, {
         path: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
         shape: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
-        _name: { value: shape.nm },
-        ix: { value: shape.ix },
-        propertyIndex: { value: shape.ix },
-        mn: { value: shape.mn },
-        propertyGroup: { value: propertyGroup },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
       });
       return interfaceFunction;
     };
-  }()
-);
+  }();
 
-/* exported propertyGroupFactory */
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
 
-var propertyGroupFactory = (function () {
-  return function (interfaceFunction, parentPropertyGroup) {
-    return function (val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return parentPropertyGroup(val - 1);
-    };
-  };
-}());
-
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
-  return function (propertyName, propertyGroup) {
-    var interfaceFunction = {
-      _name: propertyName,
-    };
-
-    function _propertyGroup(val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return propertyGroup(val - 1);
-    }
-
-    return _propertyGroup;
-  };
-}());
-
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
-
-var ShapeExpressionInterface = (function () {
-  function iterateElements(shapes, view, propertyGroup) {
-    var arr = [];
-    var i;
-    var len = shapes ? shapes.length : 0;
-    for (i = 0; i < len; i += 1) {
-      if (shapes[i].ty === 'gr') {
-        arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'fl') {
-        arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'st') {
-        arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tm') {
-        arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tr') {
-        // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
-      } else if (shapes[i].ty === 'el') {
-        arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sr') {
-        arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sh') {
-        arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rc') {
-        arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rd') {
-        arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rp') {
-        arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'gf') {
-        arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else {
-        arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
-      }
-    }
-    return arr;
-  }
-
-  function contentsInterfaceFactory(shape, view, propertyGroup) {
-    var interfaces;
-    var interfaceFunction = function _interfaceFunction(value) {
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
-          return interfaces[i];
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
         }
-        i += 1;
       }
-      if (typeof value === 'number') {
-        return interfaces[value - 1];
-      }
-      return null;
-    };
 
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
-    interfaceFunction.numProperties = interfaces.length;
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.transform = transformInterface;
-    interfaceFunction.propertyIndex = shape.cix;
-    interfaceFunction._name = shape.nm;
+      return arr;
+    }
 
-    return interfaceFunction;
-  }
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
 
-  function groupInterfaceFactory(shape, view, propertyGroup) {
-    var interfaceFunction = function _interfaceFunction(value) {
-      switch (value) {
-        case 'ADBE Vectors Group':
-        case 'Contents':
-        case 2:
-          return interfaceFunction.content;
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
           // Not necessary for now. Keeping them here in case a new case appears
           // case 'ADBE Vector Transform Group':
           // case 3:
-        default:
-          return interfaceFunction.transform;
-      }
-    };
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.content = content;
-    interfaceFunction.transform = transformInterface;
-    Object.defineProperty(interfaceFunction, '_name', {
-      get: function () {
-        return shape.nm;
-      },
-    });
-    // interfaceFunction.content = interfaceFunction;
-    interfaceFunction.numProperties = shape.np;
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.nm = shape.nm;
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
 
-  function fillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
     }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
 
-    view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
 
-  function gradientFillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Start Point' || val === 'start point') {
-        return interfaceFunction.startPoint;
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      if (val === 'End Point' || val === 'end point') {
-        return interfaceFunction.endPoint;
-      }
-      if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      startPoint: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      endPoint: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      type: {
-        get: function () {
-          return 'a';
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
-  function defaultInterfaceFactory() {
-    function interfaceFunction() {
-      return null;
-    }
-    return interfaceFunction;
-  }
-
-  function strokeInterfaceFactory(shape, view, propertyGroup) {
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
-    function addPropertyToDashOb(i) {
-      Object.defineProperty(dashOb, shape.d[i].nm, {
-        get: ExpressionPropertyInterface(view.d.dataProps[i].p),
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
       });
-    }
-    var i;
-    var len = shape.d ? shape.d.length : 0;
-    var dashOb = {};
-    for (i = 0; i < len; i += 1) {
-      addPropertyToDashOb(i);
-      view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      } if (val === 'Stroke Width' || val === 'stroke width') {
-        return interfaceFunction.strokeWidth;
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      strokeWidth: {
-        get: ExpressionPropertyInterface(view.w),
-      },
-      dash: {
-        get: function () {
-          return dashOb;
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
-    return interfaceFunction;
-  }
-
-  function trimInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === shape.e.ix || val === 'End' || val === 'end') {
-        return interfaceFunction.end;
-      }
-      if (val === shape.s.ix) {
-        return interfaceFunction.start;
-      }
-      if (val === shape.o.ix) {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-
-    view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.propertyGroup = propertyGroup;
-
-    Object.defineProperties(interfaceFunction, {
-      start: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      end: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function transformInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.a.ix === value || value === 'Anchor Point') {
-        return interfaceFunction.anchorPoint;
-      }
-      if (shape.o.ix === value || value === 'Opacity') {
-        return interfaceFunction.opacity;
-      }
-      if (shape.p.ix === value || value === 'Position') {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
-        return interfaceFunction.rotation;
-      }
-      if (shape.s.ix === value || value === 'Scale') {
-        return interfaceFunction.scale;
-      }
-      if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {
-        return interfaceFunction.skew;
-      }
-      if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {
-        return interfaceFunction.skewAxis;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
-    view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
-    view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (view.transform.mProps.sk) {
-      view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
-      view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
-    }
-    view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      opacity: {
-        get: ExpressionPropertyInterface(view.transform.mProps.o),
-      },
-      position: {
-        get: ExpressionPropertyInterface(view.transform.mProps.p),
-      },
-      anchorPoint: {
-        get: ExpressionPropertyInterface(view.transform.mProps.a),
-      },
-      scale: {
-        get: ExpressionPropertyInterface(view.transform.mProps.s),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(view.transform.mProps.r),
-      },
-      skew: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sk),
-      },
-      skewAxis: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sa),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.ty = 'tr';
-    interfaceFunction.mn = shape.mn;
-    interfaceFunction.propertyGroup = propertyGroup;
-    return interfaceFunction;
-  }
-
-  function ellipseInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.s.ix === value) {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function starInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.rotation;
-      }
-      if (shape.pt.ix === value) {
-        return interfaceFunction.points;
-      }
-      if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
-        return interfaceFunction.outerRadius;
-      }
-      if (shape.os.ix === value) {
-        return interfaceFunction.outerRoundness;
-      }
-      if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
-        return interfaceFunction.innerRadius;
-      }
-      if (shape.is && shape.is.ix === value) {
-        return interfaceFunction.innerRoundness;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
-    prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
-    prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (shape.ir) {
-      prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
-      prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
-    }
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      points: {
-        get: ExpressionPropertyInterface(prop.pt),
-      },
-      outerRadius: {
-        get: ExpressionPropertyInterface(prop.or),
-      },
-      outerRoundness: {
-        get: ExpressionPropertyInterface(prop.os),
-      },
-      innerRadius: {
-        get: ExpressionPropertyInterface(prop.ir),
-      },
-      innerRoundness: {
-        get: ExpressionPropertyInterface(prop.is),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function rectInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.roundness;
-      }
-      if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      roundness: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function roundedInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.r.ix === value || value === 'Round Corners 1') {
-        return interfaceFunction.radius;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      radius: {
-        get: ExpressionPropertyInterface(prop.rd),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function repeaterInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.c.ix === value || value === 'Copies') {
-        return interfaceFunction.copies;
-      } if (shape.o.ix === value || value === 'Offset') {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
-    prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      copies: {
-        get: ExpressionPropertyInterface(prop.c),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(prop.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  return function (shapes, view, propertyGroup) {
-    var interfaces;
-    function _interfaceFunction(value) {
-      if (typeof value === 'number') {
-        value = value === undefined ? 1 : value;
-        if (value === 0) {
-          return propertyGroup;
-        }
-        return interfaces[value - 1];
-      }
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value) {
-          return interfaces[i];
-        }
-        i += 1;
-      }
-      return null;
-    }
-    function parentGroupWrapper() {
-      return propertyGroup;
-    }
-    _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
-    interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
-    _interfaceFunction.numProperties = interfaces.length;
-    _interfaceFunction._name = 'Contents';
-    return _interfaceFunction;
-  };
-}());
-
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
-  return function (elem) {
-    var _prevValue;
-    var _sourceText;
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Text Document':
-          return _thisLayerFunction.sourceText;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisLayerFunction, 'sourceText', {
-      get: function () {
-        elem.textProperty.getValue();
-        var stringValue = elem.textProperty.currentData.t;
-        if (stringValue !== _prevValue) {
-          elem.textProperty.currentData.t = _prevValue;
-          _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
-          // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
-          _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
-        }
-        return _sourceText;
-      },
-    });
-    return _thisLayerFunction;
-  };
-}());
-
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
-
-var LayerExpressionInterface = (function () {
-  function getMatrix(time) {
-    var toWorldMat = new Matrix();
-    if (time !== undefined) {
-      var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
-      propMatrix.clone(toWorldMat);
-    } else {
-      var transformMat = this._elem.finalTransform.mProp;
-      transformMat.applyToMatrix(toWorldMat);
-    }
-    return toWorldMat;
-  }
-
-  function toWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function toWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function fromWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function fromWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function applyPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
-  }
-
-  function invertPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.inversePoint(arr);
-  }
-
-  function fromComp(arr) {
-    var toWorldMat = new Matrix();
-    toWorldMat.reset();
-    this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
-      }
-      return toWorldMat.inversePoint(arr);
-    }
-    return toWorldMat.inversePoint(arr);
-  }
-
-  function sampleImage() {
-    return [1, 1, 1, 1];
-  }
-
-  return function (elem) {
-    var transformInterface;
-
-    function _registerMaskInterface(maskManager) {
-      _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
-    }
-    function _registerEffectsInterface(effects) {
-      _thisLayerFunction.effect = effects;
-    }
-
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Root Vectors Group':
-        case 'Contents':
-        case 2:
-          return _thisLayerFunction.shapeInterface;
-        case 1:
-        case 6:
-        case 'Transform':
-        case 'transform':
-        case 'ADBE Transform Group':
-          return transformInterface;
-        case 4:
-        case 'ADBE Effect Parade':
-        case 'effects':
-        case 'Effects':
-          return _thisLayerFunction.effect;
-        case 'ADBE Text Properties':
-          return _thisLayerFunction.textInterface;
-        default:
-          return null;
-      }
-    }
-    _thisLayerFunction.getMatrix = getMatrix;
-    _thisLayerFunction.invertPoint = invertPoint;
-    _thisLayerFunction.applyPoint = applyPoint;
-    _thisLayerFunction.toWorld = toWorld;
-    _thisLayerFunction.toWorldVec = toWorldVec;
-    _thisLayerFunction.fromWorld = fromWorld;
-    _thisLayerFunction.fromWorldVec = fromWorldVec;
-    _thisLayerFunction.toComp = toWorld;
-    _thisLayerFunction.fromComp = fromComp;
-    _thisLayerFunction.sampleImage = sampleImage;
-    _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-    _thisLayerFunction._elem = elem;
-    transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
-    var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-    Object.defineProperties(_thisLayerFunction, {
-      hasParent: {
-        get: function () {
-          return elem.hierarchy.length;
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
         },
-      },
-      parent: {
-        get: function () {
-          return elem.hierarchy[0].layerInterface;
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
         },
-      },
-      rotation: getDescriptor(transformInterface, 'rotation'),
-      scale: getDescriptor(transformInterface, 'scale'),
-      position: getDescriptor(transformInterface, 'position'),
-      opacity: getDescriptor(transformInterface, 'opacity'),
-      anchorPoint: anchorPointDescriptor,
-      anchor_point: anchorPointDescriptor,
-      transform: {
-        get: function () {
-          return transformInterface;
-        },
-      },
-      active: {
-        get: function () {
-          return elem.isInRange;
-        },
-      },
-    });
-
-    _thisLayerFunction.startTime = elem.data.st;
-    _thisLayerFunction.index = elem.data.ind;
-    _thisLayerFunction.source = elem.data.refId;
-    _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
-    _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
-    _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    _thisLayerFunction._name = elem.data.nm;
-
-    _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
-    _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
-  var outlineInterfaceFactory = (function (elem) {
-    var currentPropertyName = '';
-    var currentProperty = elem.getFootageData();
-    function init() {
-      currentPropertyName = '';
-      currentProperty = elem.getFootageData();
-      return searchProperty;
-    }
-    function searchProperty(value) {
-      if (currentProperty[value]) {
-        currentPropertyName = value;
-        currentProperty = currentProperty[value];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      var propertyNameIndex = value.indexOf(currentPropertyName);
-      if (propertyNameIndex !== -1) {
-        var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
-        currentProperty = currentProperty[index];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      return '';
-    }
-    return init;
-  });
-
-  var dataInterfaceFactory = function (elem) {
-    function interfaceFunction(value) {
-      if (value === 'Outline') {
-        return interfaceFunction.outlineInterface();
-      }
-      return null;
-    }
-
-    interfaceFunction._name = 'Outline';
-    interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
-    return interfaceFunction;
-  };
-
-  return function (elem) {
-    function _interfaceFunction(value) {
-      if (value === 'Data') {
-        return _interfaceFunction.dataInterface;
-      }
-      return null;
-    }
-
-    _interfaceFunction._name = 'Data';
-    _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
-    return _interfaceFunction;
-  };
-}());
-
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
-  return function (comp) {
-    function _thisLayerFunction(name) {
-      var i = 0;
-      var len = comp.layers.length;
-      while (i < len) {
-        if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
-          return comp.elements[i].layerInterface;
-        }
-        i += 1;
-      }
-      return null;
-      // return {active:false};
-    }
-    Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });
-    _thisLayerFunction.layer = _thisLayerFunction;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
-    _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
-    _thisLayerFunction.displayStartTime = 0;
-    _thisLayerFunction.numLayers = comp.layers.length;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
-
-var TransformExpressionInterface = (function () {
-  return function (transform) {
-    function _thisFunction(name) {
-      switch (name) {
-        case 'scale':
-        case 'Scale':
-        case 'ADBE Scale':
-        case 6:
-          return _thisFunction.scale;
-        case 'rotation':
-        case 'Rotation':
-        case 'ADBE Rotation':
-        case 'ADBE Rotate Z':
-        case 10:
-          return _thisFunction.rotation;
-        case 'ADBE Rotate X':
-          return _thisFunction.xRotation;
-        case 'ADBE Rotate Y':
-          return _thisFunction.yRotation;
-        case 'position':
-        case 'Position':
-        case 'ADBE Position':
-        case 2:
-          return _thisFunction.position;
-        case 'ADBE Position_0':
-          return _thisFunction.xPosition;
-        case 'ADBE Position_1':
-          return _thisFunction.yPosition;
-        case 'ADBE Position_2':
-          return _thisFunction.zPosition;
-        case 'anchorPoint':
-        case 'AnchorPoint':
-        case 'Anchor Point':
-        case 'ADBE AnchorPoint':
-        case 1:
-          return _thisFunction.anchorPoint;
-        case 'opacity':
-        case 'Opacity':
-        case 11:
-          return _thisFunction.opacity;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisFunction, 'rotation', {
-      get: ExpressionPropertyInterface(transform.r || transform.rz),
-    });
-
-    Object.defineProperty(_thisFunction, 'zRotation', {
-      get: ExpressionPropertyInterface(transform.rz || transform.r),
-    });
-
-    Object.defineProperty(_thisFunction, 'xRotation', {
-      get: ExpressionPropertyInterface(transform.rx),
-    });
-
-    Object.defineProperty(_thisFunction, 'yRotation', {
-      get: ExpressionPropertyInterface(transform.ry),
-    });
-    Object.defineProperty(_thisFunction, 'scale', {
-      get: ExpressionPropertyInterface(transform.s),
-    });
-    var _px;
-    var _py;
-    var _pz;
-    var _transformFactory;
-    if (transform.p) {
-      _transformFactory = ExpressionPropertyInterface(transform.p);
-    } else {
-      _px = ExpressionPropertyInterface(transform.px);
-      _py = ExpressionPropertyInterface(transform.py);
-      if (transform.pz) {
-        _pz = ExpressionPropertyInterface(transform.pz);
-      }
-    }
-    Object.defineProperty(_thisFunction, 'position', {
-      get: function () {
-        if (transform.p) {
-          return _transformFactory();
-        }
-        return [
-          _px(),
-          _py(),
-          _pz ? _pz() : 0];
-      },
-    });
-
-    Object.defineProperty(_thisFunction, 'xPosition', {
-      get: ExpressionPropertyInterface(transform.px),
-    });
-
-    Object.defineProperty(_thisFunction, 'yPosition', {
-      get: ExpressionPropertyInterface(transform.py),
-    });
-
-    Object.defineProperty(_thisFunction, 'zPosition', {
-      get: ExpressionPropertyInterface(transform.pz),
-    });
-
-    Object.defineProperty(_thisFunction, 'anchorPoint', {
-      get: ExpressionPropertyInterface(transform.a),
-    });
-
-    Object.defineProperty(_thisFunction, 'opacity', {
-      get: ExpressionPropertyInterface(transform.o),
-    });
-
-    Object.defineProperty(_thisFunction, 'skew', {
-      get: ExpressionPropertyInterface(transform.sk),
-    });
-
-    Object.defineProperty(_thisFunction, 'skewAxis', {
-      get: ExpressionPropertyInterface(transform.sa),
-    });
-
-    Object.defineProperty(_thisFunction, 'orientation', {
-      get: ExpressionPropertyInterface(transform.or),
-    });
-
-    return _thisFunction;
-  };
-}());
-
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
-  function registerComposition(comp) {
-    this.compositions.push(comp);
-  }
-
-  return function () {
-    function _thisProjectFunction(name) {
-      var i = 0;
-      var len = this.compositions.length;
-      while (i < len) {
-        if (this.compositions[i].data && this.compositions[i].data.nm === name) {
-          if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
-            this.compositions[i].prepareFrame(this.currentFrame);
+        type: {
+          get: function get() {
+            return 'a';
           }
-          return this.compositions[i].compInterface;
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
         }
-        i += 1;
-      }
-      return null;
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    _thisProjectFunction.compositions = [];
-    _thisProjectFunction.currentFrame = 0;
-
-    _thisProjectFunction.registerComposition = registerComposition;
-
-    return _thisProjectFunction;
-  };
-}());
-
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
-
-var EffectsExpressionInterface = (function () {
-  var ob = {
-    createEffectsInterface: createEffectsInterface,
-  };
-
-  function createEffectsInterface(elem, propertyGroup) {
-    if (elem.effectsManager) {
-      var effectElements = [];
-      var effectsData = elem.data.ef;
-      var i;
-      var len = elem.effectsManager.effectElements.length;
-      for (i = 0; i < len; i += 1) {
-        effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
       }
 
-      var effects = elem.data.ef || [];
-      var groupInterface = function (name) {
-        i = 0;
-        len = effects.length;
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
         while (i < len) {
-          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-            return effectElements[i];
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
           }
+
           i += 1;
         }
+
         return null;
-      };
-      Object.defineProperty(groupInterface, 'numProperties', {
-        get: function () {
-          return effects.length;
-        },
-      });
-      return groupInterface;
-    }
-    return null;
-  }
+      }
 
-  function createGroupInterface(data, elements, propertyGroup, elem) {
-    function groupInterface(name) {
-      var effects = data.ef;
-      var i = 0;
-      var len = effects.length;
-      while (i < len) {
-        if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-          if (effects[i].ty === 5) {
-            return effectElements[i];
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
           }
-          return effectElements[i]();
+
+          return _sourceText;
         }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
         i += 1;
       }
-      throw new Error();
-    }
-    var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
 
-    var effectElements = [];
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
     var i;
-    var len = data.ef.length;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
     for (i = 0; i < len; i += 1) {
-      if (data.ef[i].ty === 5) {
-        effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
     }
 
-    if (data.mn === 'ADBE Color Control') {
-      Object.defineProperty(groupInterface, 'color', {
-        get: function () {
-          return effectElements[0]();
-        },
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
       });
     }
-    Object.defineProperties(groupInterface, {
-      numProperties: {
-        get: function () {
-          return data.np;
-        },
-      },
-      _name: { value: data.nm },
-      propertyGroup: { value: _propertyGroup },
-    });
-    groupInterface.enabled = data.en !== 0;
-    groupInterface.active = groupInterface.enabled;
-    return groupInterface;
-  }
 
-  function createValueInterface(element, type, elem, propertyGroup) {
-    var expressionProperty = ExpressionPropertyInterface(element.p);
-    function interfaceFunction() {
-      if (type === 10) {
-        return elem.comp.compInterface(element.p.v);
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
       }
-      return expressionProperty();
-    }
 
-    if (element.p.setGroupProperty) {
-      element.p.setGroupProperty(PropertyInterface('', propertyGroup));
-    }
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
 
-    return interfaceFunction;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray */
-/* exported MaskManagerInterface */
-
-var MaskManagerInterface = (function () {
-  function MaskInterface(mask, data) {
-    this._mask = mask;
-    this._data = data;
-  }
-  Object.defineProperty(MaskInterface.prototype, 'maskPath', {
-    get: function () {
-      if (this._mask.prop.k) {
-        this._mask.prop.getValue();
-      }
-      return this._mask.prop;
-    },
-  });
-  Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
-    get: function () {
-      if (this._mask.op.k) {
-        this._mask.op.getValue();
-      }
-      return this._mask.op.v * 100;
-    },
-  });
-
-  var MaskManager = function (maskManager) {
-    var _masksInterfaces = createSizedArray(maskManager.viewData.length);
-    var i;
-    var len = maskManager.viewData.length;
-    for (i = 0; i < len; i += 1) {
-      _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
-    }
-
-    var maskFunction = function (name) {
-      i = 0;
-      while (i < len) {
-        if (maskManager.masksProperties[i].nm === name) {
-          return _masksInterfaces[i];
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
         }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
         i += 1;
       }
-      return null;
-    };
-    return maskFunction;
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
   };
-  return MaskManager;
-}());
 
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
-
-var ExpressionPropertyInterface = (function () {
-  var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
-  var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
-
-  function completeProperty(expressionValue, property, type) {
-    Object.defineProperty(expressionValue, 'velocity', {
-      get: function () {
-        return property.getVelocityAtTime(property.comp.currentFrame);
-      },
-    });
-    expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
-    expressionValue.key = function (pos) {
-      if (!expressionValue.numKeys) {
-        return 0;
-      }
-      var value = '';
-      if ('s' in property.keyframes[pos - 1]) {
-        value = property.keyframes[pos - 1].s;
-      } else if ('e' in property.keyframes[pos - 2]) {
-        value = property.keyframes[pos - 2].e;
-      } else {
-        value = property.keyframes[pos - 2].s;
-      }
-      var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
-      valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
-      valueProp.value = type === 'unidimensional' ? value[0] : value;
-      return valueProp;
-    };
-    expressionValue.valueAtTime = property.getValueAtTime;
-    expressionValue.speedAtTime = property.getSpeedAtTime;
-    expressionValue.velocityAtTime = property.getVelocityAtTime;
-    expressionValue.propertyGroup = property.propertyGroup;
-  }
-
-  function UnidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultUnidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var val = property.pv * mult;
-    var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-    expressionValue.value = val;
-    completeProperty(expressionValue, property, 'unidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      val = property.v * mult;
-      if (expressionValue.value !== val) {
-        expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-        expressionValue.value = val;
-        completeProperty(expressionValue, property, 'unidimensional');
-      }
-      return expressionValue;
-    };
-  }
-
-  function MultidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultMultidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var len = (property.data && property.data.l) || property.pv.length;
-    var expressionValue = createTypedArray('float32', len);
-    var arrValue = createTypedArray('float32', len);
-    expressionValue.value = arrValue;
-    completeProperty(expressionValue, property, 'multidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      for (var i = 0; i < len; i += 1) {
-        arrValue[i] = property.v[i] * mult;
-        expressionValue[i] = arrValue[i];
-      }
-      return expressionValue;
-    };
-  }
-
-  // TODO: try to avoid using this getter
-  function defaultGetter() {
-    return defaultUnidimensionalValue;
-  }
-
-  return function (property) {
-    if (!property) {
-      return defaultGetter;
-    } if (property.propType === 'unidimensional') {
-      return UnidimensionalPropertyInterface(property);
-    }
-    return MultidimensionalPropertyInterface(property);
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
   };
-}());
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
 
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
-  function getValueProxy(index, total) {
-    this.textIndex = index + 1;
-    this.textTotal = total;
-    this.v = this.getValue() * this.mult;
-    return this.v;
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
   }
 
-  return function (elem, data) {
-    this.pv = 1;
-    this.comp = elem.comp;
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
     this.elem = elem;
-    this.mult = 0.01;
-    this.propType = 'textSelector';
-    this.textTotal = data.totalChars;
-    this.selectorValue = 100;
-    this.lastValue = [1, 1, 1];
-    this.k = true;
-    this.x = true;
-    this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);
-    this.getMult = getValueProxy;
-    this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
     if (this.kf) {
-      this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
     } else {
-      this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
     }
-    this.setGroupProperty = expressionHelpers.setGroupProperty;
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
   };
-}());
 
-var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
-TextSelectorProp.getTextSelectorProp = function (elem, data, arr) {
-  if (data.t === 1) {
-    return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
   }
-  return propertyGetTextProp(elem, data, arr);
-};
 
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
-
-function SliderEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function AngleEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function ColorEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function PointEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function LayerIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function MaskIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function CheckboxEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function NoValueEffect() {
-  this.p = {};
-}
-
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
-
-function EffectsManager(data, element) {
-  var effects = data.ef || [];
-  this.effectElements = [];
-  var i;
-  var len = effects.length;
-  var effectItem;
-  for (i = 0; i < len; i += 1) {
-    effectItem = new GroupEffect(effects[i], element);
-    this.effectElements.push(effectItem);
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
   }
-}
 
-function GroupEffect(data, element) {
-  this.init(data, element);
-}
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
 
-extendPrototype([DynamicPropertyContainer], GroupEffect);
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
 
-GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
 
-GroupEffect.prototype.init = function (data, element) {
-  this.data = data;
-  this.effectElements = [];
-  this.initDynamicPropertyContainer(element);
-  var i;
-  var len = this.data.ef.length;
-  var eff;
-  var effects = this.data.ef;
-  for (i = 0; i < len; i += 1) {
-    eff = null;
-    switch (effects[i].ty) {
-      case 0:
-        eff = new SliderEffect(effects[i], element, this);
-        break;
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
       case 1:
-        eff = new AngleEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
         break;
+
       case 2:
-        eff = new ColorEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
         break;
-      case 3:
-        eff = new PointEffect(effects[i], element, this);
-        break;
-      case 4:
-      case 7:
-        eff = new CheckboxEffect(effects[i], element, this);
-        break;
-      case 10:
-        eff = new LayerIndexEffect(effects[i], element, this);
-        break;
-      case 11:
-        eff = new MaskIndexEffect(effects[i], element, this);
-        break;
-      case 5:
-        eff = new EffectsManager(effects[i], element, this);
-        break;
-        // case 6:
+
       default:
-        eff = new NoValueEffect(effects[i], element, this);
         break;
     }
-    if (eff) {
-      this.effectElements.push(eff);
-    }
-  }
-};
 
-
-var lottie = {};
-
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
-    }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
-
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
-
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
-
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
-
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
-
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
-
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
-    }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+    matrixHelper.translate(xPos, yPos, 0);
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
 
-return lottie;
-}));
\ No newline at end of file
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVContextData() {
+    this.saved = [];
+    this.cArrPos = 0;
+    this.cTr = new Matrix();
+    this.cO = 1;
+    var i;
+    var len = 15;
+    this.savedOp = createTypedArray('float32', len);
+
+    for (i = 0; i < len; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = len;
+  }
+
+  CVContextData.prototype.duplicate = function () {
+    var newLength = this._length * 2;
+    var currentSavedOp = this.savedOp;
+    this.savedOp = createTypedArray('float32', newLength);
+    this.savedOp.set(currentSavedOp);
+    var i = 0;
+
+    for (i = this._length; i < newLength; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = newLength;
+  };
+
+  CVContextData.prototype.reset = function () {
+    this.cArrPos = 0;
+    this.cTr.reset();
+    this.cO = 1;
+  };
+
+  function ShapeTransformManager() {
+    this.sequences = {};
+    this.sequenceList = [];
+    this.transform_key_count = 0;
+  }
+
+  ShapeTransformManager.prototype = {
+    addTransformSequence: function addTransformSequence(transforms) {
+      var i;
+      var len = transforms.length;
+      var key = '_';
+
+      for (i = 0; i < len; i += 1) {
+        key += transforms[i].transform.key + '_';
+      }
+
+      var sequence = this.sequences[key];
+
+      if (!sequence) {
+        sequence = {
+          transforms: [].concat(transforms),
+          finalTransform: new Matrix(),
+          _mdf: false
+        };
+        this.sequences[key] = sequence;
+        this.sequenceList.push(sequence);
+      }
+
+      return sequence;
+    },
+    processSequence: function processSequence(sequence, isFirstFrame) {
+      var i = 0;
+      var len = sequence.transforms.length;
+      var _mdf = isFirstFrame;
+
+      while (i < len && !isFirstFrame) {
+        if (sequence.transforms[i].transform.mProps._mdf) {
+          _mdf = true;
+          break;
+        }
+
+        i += 1;
+      }
+
+      if (_mdf) {
+        var props;
+        sequence.finalTransform.reset();
+
+        for (i = len - 1; i >= 0; i -= 1) {
+          props = sequence.transforms[i].transform.mProps.v.props;
+          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]);
+        }
+      }
+
+      sequence._mdf = _mdf;
+    },
+    processSequences: function processSequences(isFirstFrame) {
+      var i;
+      var len = this.sequenceList.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.processSequence(this.sequenceList[i], isFirstFrame);
+      }
+    },
+    getNewKey: function getNewKey() {
+      this.transform_key_count += 1;
+      return '_' + this.transform_key_count;
+    }
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function CVMaskElement(data, element) {
+    this.data = data;
+    this.element = element;
+    this.masksProperties = this.data.masksProperties || [];
+    this.viewData = createSizedArray(this.masksProperties.length);
+    var i;
+    var len = this.masksProperties.length;
+    var hasMasks = false;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        hasMasks = true;
+      }
+
+      this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
+    }
+
+    this.hasMasks = hasMasks;
+
+    if (hasMasks) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  CVMaskElement.prototype.renderFrame = function () {
+    if (!this.hasMasks) {
+      return;
+    }
+
+    var transform = this.element.finalTransform.mat;
+    var ctx = this.element.canvasContext;
+    var i;
+    var len = this.masksProperties.length;
+    var pt;
+    var pts;
+    var data;
+    ctx.beginPath();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.masksProperties[i].inv) {
+          ctx.moveTo(0, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
+          ctx.lineTo(0, this.element.globalData.compSize.h);
+          ctx.lineTo(0, 0);
+        }
+
+        data = this.viewData[i].v;
+        pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
+        ctx.moveTo(pt[0], pt[1]);
+        var j;
+        var jLen = data._length;
+
+        for (j = 1; j < jLen; j += 1) {
+          pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
+          ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+        }
+
+        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
+        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+      }
+    }
+
+    this.element.globalData.renderer.save(true);
+    ctx.clip();
+  };
+
+  CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
+
+  CVMaskElement.prototype.destroy = function () {
+    this.element = null;
+  };
+
+  function CVBaseElement() {}
+
+  CVBaseElement.prototype = {
+    createElements: function createElements() {},
+    initRendererElement: function initRendererElement() {},
+    createContainerElements: function createContainerElements() {
+      this.canvasContext = this.globalData.canvasContext;
+      this.renderableEffectsManager = new CVEffects(this);
+    },
+    createContent: function createContent() {},
+    setBlendMode: function setBlendMode() {
+      var globalData = this.globalData;
+
+      if (globalData.blendMode !== this.data.bm) {
+        globalData.blendMode = this.data.bm;
+        var blendModeValue = getBlendMode(this.data.bm);
+        globalData.canvasContext.globalCompositeOperation = blendModeValue;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new CVMaskElement(this.data, this);
+    },
+    hideElement: function hideElement() {
+      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+        this.hidden = true;
+      }
+    },
+    showElement: function showElement() {
+      if (this.isInRange && !this.isTransparent) {
+        this.hidden = false;
+        this._isFirstFrame = true;
+        this.maskManager._isFirstFrame = true;
+      }
+    },
+    renderFrame: function renderFrame() {
+      if (this.hidden || this.data.hd) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.setBlendMode();
+      var forceRealStack = this.data.ty === 0;
+      this.globalData.renderer.save(forceRealStack);
+      this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
+      this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
+      this.renderInnerContent();
+      this.globalData.renderer.restore(forceRealStack);
+
+      if (this.maskManager.hasMasks) {
+        this.globalData.renderer.restore(true);
+      }
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.canvasContext = null;
+      this.data = null;
+      this.globalData = null;
+      this.maskManager.destroy();
+    },
+    mHelper: new Matrix()
+  };
+  CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
+  CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
+
+  function CVShapeData(element, data, styles, transformsManager) {
+    this.styledShapes = [];
+    this.tr = [0, 0, 0, 0, 0, 0];
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
+    var i;
+    var len = styles.length;
+    var styledShape;
+
+    for (i = 0; i < len; i += 1) {
+      if (!styles[i].closed) {
+        styledShape = {
+          transforms: transformsManager.addTransformSequence(styles[i].transforms),
+          trNodes: []
+        };
+        this.styledShapes.push(styledShape);
+        styles[i].elements.push(styledShape);
+      }
+    }
+  }
+
+  CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
+
+  function CVShapeElement(data, globalData, comp) {
+    this.shapes = [];
+    this.shapesData = data.shapes;
+    this.stylesList = [];
+    this.itemsData = [];
+    this.prevViewData = [];
+    this.shapeModifiers = [];
+    this.processedElements = [];
+    this.transformsManager = new ShapeTransformManager();
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
+  CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
+  CVShapeElement.prototype.transformHelper = {
+    opacity: 1,
+    _opMdf: false
+  };
+  CVShapeElement.prototype.dashResetter = [];
+
+  CVShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+  };
+
+  CVShapeElement.prototype.createStyleElement = function (data, transforms) {
+    var styleElem = {
+      data: data,
+      type: data.ty,
+      preTransforms: this.transformsManager.addTransformSequence(transforms),
+      transforms: [],
+      elements: [],
+      closed: data.hd === true
+    };
+    var elementData = {};
+
+    if (data.ty === 'fl' || data.ty === 'st') {
+      elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
+
+      if (!elementData.c.k) {
+        styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
+      }
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
+      elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
+      elementData.h = PropertyFactory.getProp(this, data.h || {
+        k: 0
+      }, 0, 0.01, this);
+      elementData.a = PropertyFactory.getProp(this, data.a || {
+        k: 0
+      }, 0, degToRads, this);
+      elementData.g = new GradientProperty(this, data.g, this);
+    }
+
+    elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      styleElem.lc = lineCapEnum[data.lc || 2];
+      styleElem.lj = lineJoinEnum[data.lj || 2];
+
+      if (data.lj == 1) {
+        // eslint-disable-line eqeqeq
+        styleElem.ml = data.ml;
+      }
+
+      elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
+
+      if (!elementData.w.k) {
+        styleElem.wi = elementData.w.v;
+      }
+
+      if (data.d) {
+        var d = new DashProperty(this, data.d, 'canvas', this);
+        elementData.d = d;
+
+        if (!elementData.d.k) {
+          styleElem.da = elementData.d.dashArray;
+          styleElem["do"] = elementData.d.dashoffset[0];
+        }
+      }
+    } else {
+      styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
+    }
+
+    this.stylesList.push(styleElem);
+    elementData.style = styleElem;
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createGroupElement = function () {
+    var elementData = {
+      it: [],
+      prevViewData: []
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createTransformElement = function (data) {
+    var elementData = {
+      transform: {
+        opacity: 1,
+        _opMdf: false,
+        key: this.transformsManager.getNewKey(),
+        op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
+        mProps: TransformPropertyFactory.getTransformProperty(this, data, this)
+      }
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createShapeElement = function (data) {
+    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    return elementData;
+  };
+
+  CVShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+  };
+
+  CVShapeElement.prototype.addTransformToStyleList = function (transform) {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.push(transform);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.removeTransformFromStyleList = function () {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.pop();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.closeStyles = function (styles) {
+    var i;
+    var len = styles.length;
+
+    for (i = 0; i < len; i += 1) {
+      styles[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var processedPos;
+    var modifier;
+    var currentTransform;
+    var ownTransforms = [].concat(transforms);
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._shouldRender = shouldRender;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          currentTransform = this.createTransformElement(arr[i]);
+          itemsData[i] = currentTransform;
+        }
+
+        ownTransforms.push(itemsData[i]);
+        this.addTransformToStyleList(itemsData[i]);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i]);
+        }
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          shouldRender = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    this.removeTransformFromStyleList();
+    this.closeStyles(ownStyles);
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.renderInnerContent = function () {
+    this.transformHelper.opacity = 1;
+    this.transformHelper._opMdf = false;
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+    this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
+  };
+
+  CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
+    if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+      groupTransform.opacity = parentTransform.opacity;
+      groupTransform.opacity *= groupTransform.op.v;
+      groupTransform._opMdf = true;
+    }
+  };
+
+  CVShapeElement.prototype.drawLayer = function () {
+    var i;
+    var len = this.stylesList.length;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var elems;
+    var nodes;
+    var renderer = this.globalData.renderer;
+    var ctx = this.globalData.canvasContext;
+    var type;
+    var currentStyle;
+
+    for (i = 0; i < len; i += 1) {
+      currentStyle = this.stylesList[i];
+      type = currentStyle.type; // Skipping style when
+      // Stroke width equals 0
+      // style should not be rendered (extra unused repeaters)
+      // current opacity equals 0
+      // global opacity equals 0
+
+      if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
+        renderer.save();
+        elems = currentStyle.elements;
+
+        if (type === 'st' || type === 'gs') {
+          ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
+          ctx.lineWidth = currentStyle.wi;
+          ctx.lineCap = currentStyle.lc;
+          ctx.lineJoin = currentStyle.lj;
+          ctx.miterLimit = currentStyle.ml || 0;
+        } else {
+          ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
+        }
+
+        renderer.ctxOpacity(currentStyle.coOp);
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.beginPath();
+        }
+
+        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
+        jLen = elems.length;
+
+        for (j = 0; j < jLen; j += 1) {
+          if (type === 'st' || type === 'gs') {
+            ctx.beginPath();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(currentStyle.da);
+              ctx.lineDashOffset = currentStyle["do"];
+            }
+          }
+
+          nodes = elems[j].trNodes;
+          kLen = nodes.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            if (nodes[k].t === 'm') {
+              ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
+            } else if (nodes[k].t === 'c') {
+              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]);
+            } else {
+              ctx.closePath();
+            }
+          }
+
+          if (type === 'st' || type === 'gs') {
+            ctx.stroke();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(this.dashResetter);
+            }
+          }
+        }
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.fill(currentStyle.r);
+        }
+
+        renderer.restore();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
+    var i;
+    var len = items.length - 1;
+    var groupTransform;
+    groupTransform = parentTransform;
+
+    for (i = len; i >= 0; i -= 1) {
+      if (items[i].ty === 'tr') {
+        groupTransform = data[i].transform;
+        this.renderShapeTransform(parentTransform, groupTransform);
+      } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
+        this.renderPath(items[i], data[i]);
+      } else if (items[i].ty === 'fl') {
+        this.renderFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'st') {
+        this.renderStroke(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
+        this.renderGradientFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gr') {
+        this.renderShape(groupTransform, items[i].it, data[i].it);
+      } else if (items[i].ty === 'tm') {//
+      }
+    }
+
+    if (isMain) {
+      this.drawLayer();
+    }
+  };
+
+  CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
+    if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
+      var shapeNodes = styledShape.trNodes;
+      var paths = shape.paths;
+      var i;
+      var len;
+      var j;
+      var jLen = paths._length;
+      shapeNodes.length = 0;
+      var groupTransformMat = styledShape.transforms.finalTransform;
+
+      for (j = 0; j < jLen; j += 1) {
+        var pathNodes = paths.shapes[j];
+
+        if (pathNodes && pathNodes.v) {
+          len = pathNodes._length;
+
+          for (i = 1; i < len; i += 1) {
+            if (i === 1) {
+              shapeNodes.push({
+                t: 'm',
+                p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+              });
+            }
+
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
+            });
+          }
+
+          if (len === 1) {
+            shapeNodes.push({
+              t: 'm',
+              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+            });
+          }
+
+          if (pathNodes.c && len) {
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
+            });
+            shapeNodes.push({
+              t: 'z'
+            });
+          }
+        }
+      }
+
+      styledShape.trNodes = shapeNodes;
+    }
+  };
+
+  CVShapeElement.prototype.renderPath = function (pathData, itemData) {
+    if (pathData.hd !== true && pathData._shouldRender) {
+      var i;
+      var len = itemData.styledShapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+  };
+
+  CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var grd;
+
+    if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {
+      var ctx = this.globalData.canvasContext;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (styleData.t === 1) {
+        grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
+      } else {
+        var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+        var percent = itemData.h.v;
+
+        if (percent >= 1) {
+          percent = 0.99;
+        } else if (percent <= -1) {
+          percent = -0.99;
+        }
+
+        var dist = rad * percent;
+        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+        grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
+      }
+
+      var i;
+      var len = styleData.g.p;
+      var cValues = itemData.g.c;
+      var opacity = 1;
+
+      for (i = 0; i < len; i += 1) {
+        if (itemData.g._hasOpacity && itemData.g._collapsable) {
+          opacity = itemData.g.o[i * 2 + 1];
+        }
+
+        grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
+      }
+
+      styleElem.grd = grd;
+    }
+
+    styleElem.coOp = itemData.o.v * groupTransform.opacity;
+  };
+
+  CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var d = itemData.d;
+
+    if (d && (d._mdf || this._isFirstFrame)) {
+      styleElem.da = d.dashArray;
+      styleElem["do"] = d.dashoffset[0];
+    }
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+
+    if (itemData.w._mdf || this._isFirstFrame) {
+      styleElem.wi = itemData.w.v;
+    }
+  };
+
+  CVShapeElement.prototype.destroy = function () {
+    this.shapesData = null;
+    this.globalData = null;
+    this.canvasContext = null;
+    this.stylesList.length = 0;
+    this.itemsData.length = 0;
+  };
+
+  function CVTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.yOffset = 0;
+    this.fillColorAnim = false;
+    this.strokeColorAnim = false;
+    this.strokeWidthAnim = false;
+    this.stroke = false;
+    this.fill = false;
+    this.justifyOffset = 0;
+    this.currentRender = null;
+    this.renderType = 'canvas';
+    this.values = {
+      fill: 'rgba(0,0,0,0)',
+      stroke: 'rgba(0,0,0,0)',
+      sWidth: 0,
+      fValue: ''
+    };
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
+  CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
+
+  CVTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var hasFill = false;
+
+    if (documentData.fc) {
+      hasFill = true;
+      this.values.fill = this.buildColor(documentData.fc);
+    } else {
+      this.values.fill = 'rgba(0,0,0,0)';
+    }
+
+    this.fill = hasFill;
+    var hasStroke = false;
+
+    if (documentData.sc) {
+      hasStroke = true;
+      this.values.stroke = this.buildColor(documentData.sc);
+      this.values.sWidth = documentData.sw;
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+    var i;
+    var len;
+    var letters = documentData.l;
+    var matrixHelper = this.mHelper;
+    this.stroke = hasStroke;
+    this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
+    len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;
+
+    var charData;
+    var shapeData;
+    var k;
+    var kLen;
+    var shapes;
+    var j;
+    var jLen;
+    var pathNodes;
+    var commands;
+    var pathArr;
+    var singleShape = this.data.singleShape;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+      shapeData = charData && charData.data || {};
+      matrixHelper.reset();
+
+      if (singleShape && letters[i].n) {
+        xPos = -trackingOffset;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        firstLine = false;
+      }
+
+      shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
+      jLen = shapes.length;
+      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+      if (singleShape) {
+        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+      }
+
+      commands = createSizedArray(jLen - 1);
+      var commandsCounter = 0;
+
+      for (j = 0; j < jLen; j += 1) {
+        if (shapes[j].ty === 'sh') {
+          kLen = shapes[j].ks.k.i.length;
+          pathNodes = shapes[j].ks.k;
+          pathArr = [];
+
+          for (k = 1; k < kLen; k += 1) {
+            if (k === 1) {
+              pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+            }
+
+            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));
+          }
+
+          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));
+          commands[commandsCounter] = pathArr;
+          commandsCounter += 1;
+        }
+      }
+
+      if (singleShape) {
+        xPos += letters[i].l;
+        xPos += trackingOffset;
+      }
+
+      if (this.textSpans[cnt]) {
+        this.textSpans[cnt].elem = commands;
+      } else {
+        this.textSpans[cnt] = {
+          elem: commands
+        };
+      }
+
+      cnt += 1;
+    }
+  };
+
+  CVTextElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.font = this.values.fValue;
+    ctx.lineCap = 'butt';
+    ctx.lineJoin = 'miter';
+    ctx.miterLimit = 4;
+
+    if (!this.data.singleShape) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+    }
+
+    var i;
+    var len;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var lastFill = null;
+    var lastStroke = null;
+    var lastStrokeW = null;
+    var commands;
+    var pathArr;
+
+    for (i = 0; i < len; i += 1) {
+      if (!letters[i].n) {
+        renderedLetter = renderedLetters[i];
+
+        if (renderedLetter) {
+          this.globalData.renderer.save();
+          this.globalData.renderer.ctxTransform(renderedLetter.p);
+          this.globalData.renderer.ctxOpacity(renderedLetter.o);
+        }
+
+        if (this.fill) {
+          if (renderedLetter && renderedLetter.fc) {
+            if (lastFill !== renderedLetter.fc) {
+              lastFill = renderedLetter.fc;
+              ctx.fillStyle = renderedLetter.fc;
+            }
+          } else if (lastFill !== this.values.fill) {
+            lastFill = this.values.fill;
+            ctx.fillStyle = this.values.fill;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);
+        }
+
+        if (this.stroke) {
+          if (renderedLetter && renderedLetter.sw) {
+            if (lastStrokeW !== renderedLetter.sw) {
+              lastStrokeW = renderedLetter.sw;
+              ctx.lineWidth = renderedLetter.sw;
+            }
+          } else if (lastStrokeW !== this.values.sWidth) {
+            lastStrokeW = this.values.sWidth;
+            ctx.lineWidth = this.values.sWidth;
+          }
+
+          if (renderedLetter && renderedLetter.sc) {
+            if (lastStroke !== renderedLetter.sc) {
+              lastStroke = renderedLetter.sc;
+              ctx.strokeStyle = renderedLetter.sc;
+            }
+          } else if (lastStroke !== this.values.stroke) {
+            lastStroke = this.values.stroke;
+            ctx.strokeStyle = this.values.stroke;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);
+        }
+
+        if (renderedLetter) {
+          this.globalData.renderer.restore();
+        }
+      }
+    }
+  };
+
+  function CVImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.img = globalData.imageLoader.getAsset(this.assetData);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
+  CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVImageElement.prototype.createContent = function () {
+    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
+      var canvas = createTag('canvas');
+      canvas.width = this.assetData.w;
+      canvas.height = this.assetData.h;
+      var ctx = canvas.getContext('2d');
+      var imgW = this.img.width;
+      var imgH = this.img.height;
+      var imgRel = imgW / imgH;
+      var canvasRel = this.assetData.w / this.assetData.h;
+      var widthCrop;
+      var heightCrop;
+      var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
+
+      if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {
+        heightCrop = imgH;
+        widthCrop = heightCrop * canvasRel;
+      } else {
+        widthCrop = imgW;
+        heightCrop = widthCrop / canvasRel;
+      }
+
+      ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
+      this.img = canvas;
+    }
+  };
+
+  CVImageElement.prototype.renderInnerContent = function () {
+    this.canvasContext.drawImage(this.img, 0, 0);
+  };
+
+  CVImageElement.prototype.destroy = function () {
+    this.img = null;
+  };
+
+  function CVSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
+  CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVSolidElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.fillStyle = this.data.sc;
+    ctx.fillRect(0, 0, this.data.sw, this.data.sh); //
+  };
+
+  function CanvasRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([BaseRenderer], CanvasRendererBase);
+
+  CanvasRendererBase.prototype.createShape = function (data) {
+    return new CVShapeElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createText = function (data) {
+    return new CVTextElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createImage = function (data) {
+    return new CVImageElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createSolid = function (data) {
+    return new CVSolidElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  CanvasRendererBase.prototype.ctxTransform = function (props) {
+    if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
+      return;
+    }
+
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
+      return;
+    }
+
+    this.transformMat.cloneFromProps(props);
+    var cProps = this.contextData.cTr.props;
+    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]); // 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]);
+
+    this.contextData.cTr.cloneFromProps(this.transformMat.props);
+    var trProps = this.contextData.cTr.props;
+    this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
+  };
+
+  CanvasRendererBase.prototype.ctxOpacity = function (op) {
+    /* if(op === 1){
+          return;
+      } */
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+      return;
+    }
+
+    this.contextData.cO *= op < 0 ? 0 : op;
+
+    if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
+      this.canvasContext.globalAlpha = this.contextData.cO;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+    }
+  };
+
+  CanvasRendererBase.prototype.reset = function () {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    this.contextData.reset();
+  };
+
+  CanvasRendererBase.prototype.save = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.save();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.save();
+    }
+
+    var props = this.contextData.cTr.props;
+
+    if (this.contextData._length <= this.contextData.cArrPos) {
+      this.contextData.duplicate();
+    }
+
+    var i;
+    var arr = this.contextData.saved[this.contextData.cArrPos];
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = props[i];
+    }
+
+    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
+    this.contextData.cArrPos += 1;
+  };
+
+  CanvasRendererBase.prototype.restore = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.restore();
+      this.globalData.blendMode = 'source-over';
+    }
+
+    this.contextData.cArrPos -= 1;
+    var popped = this.contextData.saved[this.contextData.cArrPos];
+    var i;
+    var arr = this.contextData.cTr.props;
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = popped[i];
+    }
+
+    this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
+    popped = this.contextData.savedOp[this.contextData.cArrPos];
+    this.contextData.cO = popped;
+
+    if (this.globalData.currentGlobalAlpha !== popped) {
+      this.canvasContext.globalAlpha = popped;
+      this.globalData.currentGlobalAlpha = popped;
+    }
+  };
+
+  CanvasRendererBase.prototype.configAnimation = function (animData) {
+    if (this.animationItem.wrapper) {
+      this.animationItem.container = createTag('canvas');
+      var containerStyle = this.animationItem.container.style;
+      containerStyle.width = '100%';
+      containerStyle.height = '100%';
+      var origin = '0px 0px 0px';
+      containerStyle.transformOrigin = origin;
+      containerStyle.mozTransformOrigin = origin;
+      containerStyle.webkitTransformOrigin = origin;
+      containerStyle['-webkit-transform'] = origin;
+      containerStyle.contentVisibility = this.renderConfig.contentVisibility;
+      this.animationItem.wrapper.appendChild(this.animationItem.container);
+      this.canvasContext = this.animationItem.container.getContext('2d');
+
+      if (this.renderConfig.className) {
+        this.animationItem.container.setAttribute('class', this.renderConfig.className);
+      }
+
+      if (this.renderConfig.id) {
+        this.animationItem.container.setAttribute('id', this.renderConfig.id);
+      }
+    } else {
+      this.canvasContext = this.renderConfig.context;
+    }
+
+    this.data = animData;
+    this.layers = animData.layers;
+    this.transformCanvas = {
+      w: animData.w,
+      h: animData.h,
+      sx: 0,
+      sy: 0,
+      tx: 0,
+      ty: 0
+    };
+    this.setupGlobalData(animData, document.body);
+    this.globalData.canvasContext = this.canvasContext;
+    this.globalData.renderer = this;
+    this.globalData.isDashed = false;
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.transformCanvas = this.transformCanvas;
+    this.elements = createSizedArray(animData.layers.length);
+    this.updateContainerSize();
+  };
+
+  CanvasRendererBase.prototype.updateContainerSize = function () {
+    this.reset();
+    var elementWidth;
+    var elementHeight;
+
+    if (this.animationItem.wrapper && this.animationItem.container) {
+      elementWidth = this.animationItem.wrapper.offsetWidth;
+      elementHeight = this.animationItem.wrapper.offsetHeight;
+      this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
+      this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
+    } else {
+      elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+      elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
+    }
+
+    var elementRel;
+    var animationRel;
+
+    if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
+      var par = this.renderConfig.preserveAspectRatio.split(' ');
+      var fillType = par[1] || 'meet';
+      var pos = par[0] || 'xMidYMid';
+      var xPos = pos.substr(0, 4);
+      var yPos = pos.substr(4);
+      elementRel = elementWidth / elementHeight;
+      animationRel = this.transformCanvas.w / this.transformCanvas.h;
+
+      if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {
+        this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      } else {
+        this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      }
+
+      if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;
+      } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.tx = 0;
+      }
+
+      if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;
+      } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.ty = 0;
+      }
+    } else if (this.renderConfig.preserveAspectRatio === 'none') {
+      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    } else {
+      this.transformCanvas.sx = this.renderConfig.dpr;
+      this.transformCanvas.sy = this.renderConfig.dpr;
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    }
+
+    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];
+    /* var i, len = this.elements.length;
+      for(i=0;i<len;i+=1){
+          if(this.elements[i] && this.elements[i].data.ty === 0){
+              this.elements[i].resize(this.globalData.transformCanvas);
+          }
+      } */
+
+    this.ctxTransform(this.transformCanvas.props);
+    this.canvasContext.beginPath();
+    this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+    this.canvasContext.closePath();
+    this.canvasContext.clip();
+    this.renderFrame(this.renderedFrame, true);
+  };
+
+  CanvasRendererBase.prototype.destroy = function () {
+    if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.globalData.canvasContext = null;
+    this.animationItem.container = null;
+    this.destroyed = true;
+  };
+
+  CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {
+    if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {
+      return;
+    }
+
+    this.renderedFrame = num;
+    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+    this.globalData.frameId += 1;
+    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
+    this.globalData.projectInterface.currentFrame = num; // console.log('--------');
+    // console.log('NEW: ',num);
+
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      if (this.renderConfig.clearCanvas === true) {
+        this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+      } else {
+        this.save();
+      }
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+
+      if (this.renderConfig.clearCanvas !== true) {
+        this.restore();
+      }
+    }
+  };
+
+  CanvasRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    var element = this.createItem(this.layers[pos], this, this.globalData);
+    elements[pos] = element;
+    element.initExpressions();
+    /* if(this.layers[pos].ty === 0){
+          element.resize(this.globalData.transformCanvas);
+      } */
+  };
+
+  CanvasRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  CanvasRendererBase.prototype.hide = function () {
+    this.animationItem.container.style.display = 'none';
+  };
+
+  CanvasRendererBase.prototype.show = function () {
+    this.animationItem.container.style.display = 'block';
+  };
+
+  function CVCompElement(data, globalData, comp) {
+    this.completeLayers = false;
+    this.layers = data.layers;
+    this.pendingElements = [];
+    this.elements = createSizedArray(this.layers.length);
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);
+
+  CVCompElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.beginPath();
+    ctx.moveTo(0, 0);
+    ctx.lineTo(this.data.w, 0);
+    ctx.lineTo(this.data.w, this.data.h);
+    ctx.lineTo(0, this.data.h);
+    ctx.lineTo(0, 0);
+    ctx.clip();
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  CVCompElement.prototype.destroy = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.layers = null;
+    this.elements = null;
+  };
+
+  CVCompElement.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function CanvasRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([CanvasRendererBase], CanvasRenderer);
+
+  CanvasRenderer.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  registerRenderer('canvas', CanvasRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+  var Expressions = function () {
+    var ob = {};
+    ob.initExpressions = initExpressions;
+
+    function initExpressions(animation) {
+      var stackCount = 0;
+      var registers = [];
+
+      function pushExpression() {
+        stackCount += 1;
+      }
+
+      function popExpression() {
+        stackCount -= 1;
+
+        if (stackCount === 0) {
+          releaseInstances();
+        }
+      }
+
+      function registerExpressionProperty(expression) {
+        if (registers.indexOf(expression) === -1) {
+          registers.push(expression);
+        }
+      }
+
+      function releaseInstances() {
+        var i;
+        var len = registers.length;
+
+        for (i = 0; i < len; i += 1) {
+          registers[i].release();
+        }
+
+        registers.length = 0;
+      }
+
+      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
+      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
+      animation.renderer.globalData.pushExpression = pushExpression;
+      animation.renderer.globalData.popExpression = popExpression;
+      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
+    }
+
+    return ob;
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+  /* eslint-disable */
+
+  /*
+   Copyright 2014 David Bau.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+   */
+  function seedRandom(pool, math) {
+    //
+    // The following constants are related to IEEE 754 limits.
+    //
+    var global = this,
+        width = 256,
+        // each RC4 output is 0 <= x < 256
+    chunks = 6,
+        // at least six RC4 outputs for each double
+    digits = 52,
+        // there are 52 significant digits in a double
+    rngname = 'random',
+        // rngname: name for Math.random and Math.seedrandom
+    startdenom = math.pow(width, chunks),
+        significance = math.pow(2, digits),
+        overflow = significance * 2,
+        mask = width - 1,
+        nodecrypto; // node.js crypto module, initialized at the bottom.
+    //
+    // seedrandom()
+    // This is the seedrandom function described above.
+    //
+
+    function seedrandom(seed, options, callback) {
+      var key = [];
+      options = options === true ? {
+        entropy: true
+      } : options || {}; // Flatten the seed string or build one from local entropy if needed.
+
+      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.
+
+      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains
+      // randomness in every bit of the mantissa of the IEEE 754 value.
+
+      var prng = function prng() {
+        var n = arc4.g(chunks),
+            // Start with a numerator n < 2 ^ 48
+        d = startdenom,
+            //   and denominator d = 2 ^ 48.
+        x = 0; //   and no 'extra last byte'.
+
+        while (n < significance) {
+          // Fill up all significant digits by
+          n = (n + x) * width; //   shifting numerator and
+
+          d *= width; //   denominator and generating a
+
+          x = arc4.g(1); //   new least-significant-byte.
+        }
+
+        while (n >= overflow) {
+          // To avoid rounding up, before adding
+          n /= 2; //   last byte, shift everything
+
+          d /= 2; //   right using integer math until
+
+          x >>>= 1; //   we have exactly the desired bits.
+        }
+
+        return (n + x) / d; // Form the number within [0, 1).
+      };
+
+      prng.int32 = function () {
+        return arc4.g(4) | 0;
+      };
+
+      prng.quick = function () {
+        return arc4.g(4) / 0x100000000;
+      };
+
+      prng["double"] = prng; // Mix the randomness into accumulated entropy.
+
+      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.
+
+      return (options.pass || callback || function (prng, seed, is_math_call, state) {
+        if (state) {
+          // Load the arc4 state from the given state if it has an S array.
+          if (state.S) {
+            copy(state, arc4);
+          } // Only provide the .state method if requested via options.state.
+
+
+          prng.state = function () {
+            return copy(arc4, {});
+          };
+        } // If called as a method of Math (Math.seedrandom()), mutate
+        // Math.random because that is how seedrandom.js has worked since v1.0.
+
+
+        if (is_math_call) {
+          math[rngname] = prng;
+          return seed;
+        } // Otherwise, it is a newer calling convention, so return the
+        // prng directly.
+        else return prng;
+      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);
+    }
+
+    math['seed' + rngname] = seedrandom; //
+    // ARC4
+    //
+    // An ARC4 implementation.  The constructor takes a key in the form of
+    // an array of at most (width) integers that should be 0 <= x < (width).
+    //
+    // The g(count) method returns a pseudorandom integer that concatenates
+    // the next (count) outputs from ARC4.  Its return value is a number x
+    // that is in the range 0 <= x < (width ^ count).
+    //
+
+    function ARC4(key) {
+      var t,
+          keylen = key.length,
+          me = this,
+          i = 0,
+          j = me.i = me.j = 0,
+          s = me.S = []; // The empty key [] is treated as [0].
+
+      if (!keylen) {
+        key = [keylen++];
+      } // Set up S using the standard key scheduling algorithm.
+
+
+      while (i < width) {
+        s[i] = i++;
+      }
+
+      for (i = 0; i < width; i++) {
+        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
+        s[j] = t;
+      } // The "g" method returns the next (count) outputs as one number.
+
+
+      me.g = function (count) {
+        // Using instance members instead of closure state nearly doubles speed.
+        var t,
+            r = 0,
+            i = me.i,
+            j = me.j,
+            s = me.S;
+
+        while (count--) {
+          t = s[i = mask & i + 1];
+          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];
+        }
+
+        me.i = i;
+        me.j = j;
+        return r; // For robust unpredictability, the function call below automatically
+        // discards an initial batch of values.  This is called RC4-drop[256].
+        // See http://google.com/search?q=rsa+fluhrer+response&btnI
+      };
+    } //
+    // copy()
+    // Copies internal state of ARC4 to or from a plain object.
+    //
+
+
+    function copy(f, t) {
+      t.i = f.i;
+      t.j = f.j;
+      t.S = f.S.slice();
+      return t;
+    } //
+    // flatten()
+    // Converts an object tree to nested arrays of strings.
+    //
+
+
+    function flatten(obj, depth) {
+      var result = [],
+          typ = _typeof$1(obj),
+          prop;
+
+      if (depth && typ == 'object') {
+        for (prop in obj) {
+          try {
+            result.push(flatten(obj[prop], depth - 1));
+          } catch (e) {}
+        }
+      }
+
+      return result.length ? result : typ == 'string' ? obj : obj + '\0';
+    } //
+    // mixkey()
+    // Mixes a string seed into a key that is an array of integers, and
+    // returns a shortened string seed that is equivalent to the result key.
+    //
+
+
+    function mixkey(seed, key) {
+      var stringseed = seed + '',
+          smear,
+          j = 0;
+
+      while (j < stringseed.length) {
+        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
+      }
+
+      return tostring(key);
+    } //
+    // autoseed()
+    // Returns an object for autoseeding, using window.crypto and Node crypto
+    // module if available.
+    //
+
+
+    function autoseed() {
+      try {
+        if (nodecrypto) {
+          return tostring(nodecrypto.randomBytes(width));
+        }
+
+        var out = new Uint8Array(width);
+        (global.crypto || global.msCrypto).getRandomValues(out);
+        return tostring(out);
+      } catch (e) {
+        var browser = global.navigator,
+            plugins = browser && browser.plugins;
+        return [+new Date(), global, plugins, global.screen, tostring(pool)];
+      }
+    } //
+    // tostring()
+    // Converts an array of charcodes to a string
+    //
+
+
+    function tostring(a) {
+      return String.fromCharCode.apply(0, a);
+    } //
+    // When seedrandom.js is loaded, we immediately mix a few bits
+    // from the built-in RNG into the entropy pool.  Because we do
+    // not want to interfere with deterministic PRNG state later,
+    // seedrandom will not call math.random on its own again after
+    // initialization.
+    //
+
+
+    mixkey(math.random(), pool); //
+    // Nodejs and AMD support: export the implementation as a module using
+    // either convention.
+    //
+    // End anonymous scope, and pass initial values.
+  }
+
+  ;
+
+  function initialize$2(BMMath) {
+    seedRandom([], BMMath);
+  }
+
+  var propTypes = {
+    SHAPE: 'shape'
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var ExpressionManager = function () {
+    'use strict';
+
+    var ob = {};
+    var Math = BMMath;
+    var window = null;
+    var document = null;
+    var XMLHttpRequest = null;
+    var fetch = null;
+    var frames = null;
+    initialize$2(BMMath);
+
+    function $bm_isInstanceOfArray(arr) {
+      return arr.constructor === Array || arr.constructor === Float32Array;
+    }
+
+    function isNumerable(tOfV, v) {
+      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
+    }
+
+    function $bm_neg(a) {
+      var tOfA = _typeof(a);
+
+      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
+        return -a;
+      }
+
+      if ($bm_isInstanceOfArray(a)) {
+        var i;
+        var lenA = a.length;
+        var retArr = [];
+
+        for (i = 0; i < lenA; i += 1) {
+          retArr[i] = -a[i];
+        }
+
+        return retArr;
+      }
+
+      if (a.propType) {
+        return a.v;
+      }
+
+      return -a;
+    }
+
+    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
+    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
+    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
+
+    function sum(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (tOfA === 'string' || tOfB === 'string') {
+        return a + b;
+      }
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a + b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] += b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a + b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] + b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    var add = sum;
+
+    function sub(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        if (tOfA === 'string') {
+          a = parseInt(a, 10);
+        }
+
+        if (tOfB === 'string') {
+          b = parseInt(b, 10);
+        }
+
+        return a - b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] -= b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a - b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] - b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    function mul(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a * b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] * b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a * b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function div(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a / b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] / b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a / b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function mod(a, b) {
+      if (typeof a === 'string') {
+        a = parseInt(a, 10);
+      }
+
+      if (typeof b === 'string') {
+        b = parseInt(b, 10);
+      }
+
+      return a % b;
+    }
+
+    var $bm_sum = sum;
+    var $bm_sub = sub;
+    var $bm_mul = mul;
+    var $bm_div = div;
+    var $bm_mod = mod;
+
+    function clamp(num, min, max) {
+      if (min > max) {
+        var mm = max;
+        max = min;
+        min = mm;
+      }
+
+      return Math.min(Math.max(num, min), max);
+    }
+
+    function radiansToDegrees(val) {
+      return val / degToRads;
+    }
+
+    var radians_to_degrees = radiansToDegrees;
+
+    function degreesToRadians(val) {
+      return val * degToRads;
+    }
+
+    var degrees_to_radians = radiansToDegrees;
+    var helperLengthArray = [0, 0, 0, 0, 0, 0];
+
+    function length(arr1, arr2) {
+      if (typeof arr1 === 'number' || arr1 instanceof Number) {
+        arr2 = arr2 || 0;
+        return Math.abs(arr1 - arr2);
+      }
+
+      if (!arr2) {
+        arr2 = helperLengthArray;
+      }
+
+      var i;
+      var len = Math.min(arr1.length, arr2.length);
+      var addedLength = 0;
+
+      for (i = 0; i < len; i += 1) {
+        addedLength += Math.pow(arr2[i] - arr1[i], 2);
+      }
+
+      return Math.sqrt(addedLength);
+    }
+
+    function normalize(vec) {
+      return div(vec, length(vec));
+    }
+
+    function rgbToHsl(val) {
+      var r = val[0];
+      var g = val[1];
+      var b = val[2];
+      var max = Math.max(r, g, b);
+      var min = Math.min(r, g, b);
+      var h;
+      var s;
+      var l = (max + min) / 2;
+
+      if (max === min) {
+        h = 0; // achromatic
+
+        s = 0; // achromatic
+      } else {
+        var d = max - min;
+        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+
+        switch (max) {
+          case r:
+            h = (g - b) / d + (g < b ? 6 : 0);
+            break;
+
+          case g:
+            h = (b - r) / d + 2;
+            break;
+
+          case b:
+            h = (r - g) / d + 4;
+            break;
+
+          default:
+            break;
+        }
+
+        h /= 6;
+      }
+
+      return [h, s, l, val[3]];
+    }
+
+    function hue2rgb(p, q, t) {
+      if (t < 0) t += 1;
+      if (t > 1) t -= 1;
+      if (t < 1 / 6) return p + (q - p) * 6 * t;
+      if (t < 1 / 2) return q;
+      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+      return p;
+    }
+
+    function hslToRgb(val) {
+      var h = val[0];
+      var s = val[1];
+      var l = val[2];
+      var r;
+      var g;
+      var b;
+
+      if (s === 0) {
+        r = l; // achromatic
+
+        b = l; // achromatic
+
+        g = l; // achromatic
+      } else {
+        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+        var p = 2 * l - q;
+        r = hue2rgb(p, q, h + 1 / 3);
+        g = hue2rgb(p, q, h);
+        b = hue2rgb(p, q, h - 1 / 3);
+      }
+
+      return [r, g, b, val[3]];
+    }
+
+    function linear(t, tMin, tMax, value1, value2) {
+      if (value1 === undefined || value2 === undefined) {
+        value1 = tMin;
+        value2 = tMax;
+        tMin = 0;
+        tMax = 1;
+      }
+
+      if (tMax < tMin) {
+        var _tMin = tMax;
+        tMax = tMin;
+        tMin = _tMin;
+      }
+
+      if (t <= tMin) {
+        return value1;
+      }
+
+      if (t >= tMax) {
+        return value2;
+      }
+
+      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
+
+      if (!value1.length) {
+        return value1 + (value2 - value1) * perc;
+      }
+
+      var i;
+      var len = value1.length;
+      var arr = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
+      }
+
+      return arr;
+    }
+
+    function random(min, max) {
+      if (max === undefined) {
+        if (min === undefined) {
+          min = 0;
+          max = 1;
+        } else {
+          max = min;
+          min = undefined;
+        }
+      }
+
+      if (max.length) {
+        var i;
+        var len = max.length;
+
+        if (!min) {
+          min = createTypedArray('float32', len);
+        }
+
+        var arr = createTypedArray('float32', len);
+        var rnd = BMMath.random();
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = min[i] + rnd * (max[i] - min[i]);
+        }
+
+        return arr;
+      }
+
+      if (min === undefined) {
+        min = 0;
+      }
+
+      var rndm = BMMath.random();
+      return min + rndm * (max - min);
+    }
+
+    function createPath(points, inTangents, outTangents, closed) {
+      var i;
+      var len = points.length;
+      var path = shapePool.newElement();
+      path.setPathData(!!closed, len);
+      var arrPlaceholder = [0, 0];
+      var inVertexPoint;
+      var outVertexPoint;
+
+      for (i = 0; i < len; i += 1) {
+        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
+        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
+        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);
+      }
+
+      return path;
+    }
+
+    function initiateExpression(elem, data, property) {
+      var val = data.x;
+      var needsVelocity = /velocity(?![\w\d])/.test(val);
+
+      var _needsRandom = val.indexOf('random') !== -1;
+
+      var elemType = elem.data.ty;
+      var transform;
+      var $bm_transform;
+      var content;
+      var effect;
+      var thisProperty = property;
+      thisProperty.valueAtTime = thisProperty.getValueAtTime;
+      Object.defineProperty(thisProperty, 'value', {
+        get: function get() {
+          return thisProperty.v;
+        }
+      });
+      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
+      elem.comp.displayStartTime = 0;
+      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      var outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      var width = elem.data.sw ? elem.data.sw : 0;
+      var height = elem.data.sh ? elem.data.sh : 0;
+      var name = elem.data.nm;
+      var loopIn;
+      var loop_in;
+      var loopOut;
+      var loop_out;
+      var smooth;
+      var toWorld;
+      var fromWorld;
+      var fromComp;
+      var toComp;
+      var fromCompToSurface;
+      var position;
+      var rotation;
+      var anchorPoint;
+      var scale;
+      var thisLayer;
+      var thisComp;
+      var mask;
+      var valueAtTime;
+      var velocityAtTime;
+      var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
+
+      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
+
+      var numKeys = property.kf ? data.k.length : 0;
+      var active = !this.data || this.data.hd !== true;
+
+      var wiggle = function wiggle(freq, amp) {
+        var iWiggle;
+        var j;
+        var lenWiggle = this.pv.length ? this.pv.length : 1;
+        var addedAmps = createTypedArray('float32', lenWiggle);
+        freq = 5;
+        var iterations = Math.floor(time * freq);
+        iWiggle = 0;
+        j = 0;
+
+        while (iWiggle < iterations) {
+          // var rnd = BMMath.random();
+          for (j = 0; j < lenWiggle; j += 1) {
+            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;
+          }
+
+          iWiggle += 1;
+        } // var rnd2 = BMMath.random();
+
+
+        var periods = time * freq;
+        var perc = periods - Math.floor(periods);
+        var arr = createTypedArray('float32', lenWiggle);
+
+        if (lenWiggle > 1) {
+          for (j = 0; j < lenWiggle; j += 1) {
+            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
+            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
+          }
+
+          return arr;
+        }
+
+        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
+      }.bind(this);
+
+      if (thisProperty.loopIn) {
+        loopIn = thisProperty.loopIn.bind(thisProperty);
+        loop_in = loopIn;
+      }
+
+      if (thisProperty.loopOut) {
+        loopOut = thisProperty.loopOut.bind(thisProperty);
+        loop_out = loopOut;
+      }
+
+      if (thisProperty.smooth) {
+        smooth = thisProperty.smooth.bind(thisProperty);
+      }
+
+      function loopInDuration(type, duration) {
+        return loopIn(type, duration, true);
+      }
+
+      function loopOutDuration(type, duration) {
+        return loopOut(type, duration, true);
+      }
+
+      if (this.getValueAtTime) {
+        valueAtTime = this.getValueAtTime.bind(this);
+      }
+
+      if (this.getVelocityAtTime) {
+        velocityAtTime = this.getVelocityAtTime.bind(this);
+      }
+
+      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
+
+      function lookAt(elem1, elem2) {
+        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
+        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
+        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
+        return [yaw, pitch, 0];
+      }
+
+      function easeOut(t, tMin, tMax, val1, val2) {
+        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function easeIn(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInBez, t, tMin, tMax, val1, val2);
+      }
+
+      function ease(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function applyEase(fn, t, tMin, tMax, val1, val2) {
+        if (val1 === undefined) {
+          val1 = tMin;
+          val2 = tMax;
+        } else {
+          t = (t - tMin) / (tMax - tMin);
+        }
+
+        if (t > 1) {
+          t = 1;
+        } else if (t < 0) {
+          t = 0;
+        }
+
+        var mult = fn(t);
+
+        if ($bm_isInstanceOfArray(val1)) {
+          var iKey;
+          var lenKey = val1.length;
+          var arr = createTypedArray('float32', lenKey);
+
+          for (iKey = 0; iKey < lenKey; iKey += 1) {
+            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
+          }
+
+          return arr;
+        }
+
+        return (val2 - val1) * mult + val1;
+      }
+
+      function nearestKey(time) {
+        var iKey;
+        var lenKey = data.k.length;
+        var index;
+        var keyTime;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          index = 0;
+          keyTime = 0;
+        } else {
+          index = -1;
+          time *= elem.comp.globalData.frameRate;
+
+          if (time < data.k[0].t) {
+            index = 1;
+            keyTime = data.k[0].t;
+          } else {
+            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
+              if (time === data.k[iKey].t) {
+                index = iKey + 1;
+                keyTime = data.k[iKey].t;
+                break;
+              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
+                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
+                  index = iKey + 2;
+                  keyTime = data.k[iKey + 1].t;
+                } else {
+                  index = iKey + 1;
+                  keyTime = data.k[iKey].t;
+                }
+
+                break;
+              }
+            }
+
+            if (index === -1) {
+              index = iKey + 1;
+              keyTime = data.k[iKey].t;
+            }
+          }
+        }
+
+        var obKey = {};
+        obKey.index = index;
+        obKey.time = keyTime / elem.comp.globalData.frameRate;
+        return obKey;
+      }
+
+      function key(ind) {
+        var obKey;
+        var iKey;
+        var lenKey;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          throw new Error('The property has no keyframe at index ' + ind);
+        }
+
+        ind -= 1;
+        obKey = {
+          time: data.k[ind].t / elem.comp.globalData.frameRate,
+          value: []
+        };
+        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
+        lenKey = arr.length;
+
+        for (iKey = 0; iKey < lenKey; iKey += 1) {
+          obKey[iKey] = arr[iKey];
+          obKey.value[iKey] = arr[iKey];
+        }
+
+        return obKey;
+      }
+
+      function framesToTime(fr, fps) {
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return fr / fps;
+      }
+
+      function timeToFrames(t, fps) {
+        if (!t && t !== 0) {
+          t = time;
+        }
+
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return t * fps;
+      }
+
+      function seedRandom(seed) {
+        BMMath.seedrandom(randSeed + seed);
+      }
+
+      function sourceRectAtTime() {
+        return elem.sourceRectAtTime();
+      }
+
+      function substring(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substring(init);
+          }
+
+          return value.substring(init, end);
+        }
+
+        return '';
+      }
+
+      function substr(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substr(init);
+          }
+
+          return value.substr(init, end);
+        }
+
+        return '';
+      }
+
+      function posterizeTime(framesPerSecond) {
+        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
+        value = valueAtTime(time);
+      }
+
+      var time;
+      var velocity;
+      var value;
+      var text;
+      var textIndex;
+      var textTotal;
+      var selectorValue;
+      var index = elem.data.ind;
+      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+      var parent;
+      var randSeed = Math.floor(Math.random() * 1000000);
+      var globalData = elem.globalData;
+
+      function executeExpression(_value) {
+        // globalData.pushExpression();
+        value = _value;
+
+        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
+          return value;
+        }
+
+        if (this.propType === 'textSelector') {
+          textIndex = this.textIndex;
+          textTotal = this.textTotal;
+          selectorValue = this.selectorValue;
+        }
+
+        if (!thisLayer) {
+          text = elem.layerInterface.text;
+          thisLayer = elem.layerInterface;
+          thisComp = elem.comp.compInterface;
+          toWorld = thisLayer.toWorld.bind(thisLayer);
+          fromWorld = thisLayer.fromWorld.bind(thisLayer);
+          fromComp = thisLayer.fromComp.bind(thisLayer);
+          toComp = thisLayer.toComp.bind(thisLayer);
+          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
+          fromCompToSurface = fromComp;
+        }
+
+        if (!transform) {
+          transform = elem.layerInterface('ADBE Transform Group');
+          $bm_transform = transform;
+
+          if (transform) {
+            anchorPoint = transform.anchorPoint;
+            /* position = transform.position;
+                      rotation = transform.rotation;
+                      scale = transform.scale; */
+          }
+        }
+
+        if (elemType === 4 && !content) {
+          content = thisLayer('ADBE Root Vectors Group');
+        }
+
+        if (!effect) {
+          effect = thisLayer(4);
+        }
+
+        hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+
+        if (hasParent && !parent) {
+          parent = elem.hierarchy[0].layerInterface;
+        }
+
+        time = this.comp.renderedFrame / this.comp.globalData.frameRate;
+
+        if (_needsRandom) {
+          seedRandom(randSeed + time);
+        }
+
+        if (needsVelocity) {
+          velocity = velocityAtTime(time);
+        }
+
+        expression_function();
+        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value
+        // Changed this to a ternary operation because Rollup failed compiling it correctly
+
+        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;
+        return scoped_bm_rt;
+      } // Bundlers will see these as dead code and unless we reference them
+
+
+      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
+      return executeExpression;
+    }
+
+    ob.initiateExpression = initiateExpression;
+    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
+    return ob;
+  }();
+
+  var expressionHelpers = function () {
+    function searchExpressions(elem, data, prop) {
+      if (data.x) {
+        prop.k = true;
+        prop.x = true;
+        prop.initiateExpression = ExpressionManager.initiateExpression;
+        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
+      }
+    }
+
+    function getValueAtTime(frameNum) {
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastFrame) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
+        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
+        this._cachingAtTime.lastFrame = frameNum;
+      }
+
+      return this._cachingAtTime.value;
+    }
+
+    function getSpeedAtTime(frameNum) {
+      var delta = -0.01;
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var speed = 0;
+
+      if (v1.length) {
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          speed += Math.pow(v2[i] - v1[i], 2);
+        }
+
+        speed = Math.sqrt(speed) * 100;
+      } else {
+        speed = 0;
+      }
+
+      return speed;
+    }
+
+    function getVelocityAtTime(frameNum) {
+      if (this.vel !== undefined) {
+        return this.vel;
+      }
+
+      var delta = -0.001; // frameNum += this.elem.data.st;
+
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var velocity;
+
+      if (v1.length) {
+        velocity = createTypedArray('float32', v1.length);
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          // removing frameRate
+          // if needed, don't add it here
+          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
+          velocity[i] = (v2[i] - v1[i]) / delta;
+        }
+      } else {
+        velocity = (v2 - v1) / delta;
+      }
+
+      return velocity;
+    }
+
+    function getStaticValueAtTime() {
+      return this.pv;
+    }
+
+    function setGroupProperty(propertyGroup) {
+      this.propertyGroup = propertyGroup;
+    }
+
+    return {
+      searchExpressions: searchExpressions,
+      getSpeedAtTime: getSpeedAtTime,
+      getVelocityAtTime: getVelocityAtTime,
+      getValueAtTime: getValueAtTime,
+      getStaticValueAtTime: getStaticValueAtTime,
+      setGroupProperty: setGroupProperty
+    };
+  }();
+
+  function addPropertyDecorator() {
+    function loopOut(type, duration, durationFlag) {
+      if (!this.k || !this.keyframes) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var lastKeyFrame = keyframes[keyframes.length - 1].t;
+
+      if (currentFrame <= lastKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var firstKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
+        } else {
+          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
+        }
+
+        firstKeyFrame = lastKeyFrame - cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (iterations % 2 !== 0) {
+          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+
+        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = (endV[i] - initV[i]) * repeats + current[i];
+          }
+
+          return ret;
+        }
+
+        return (endV - initV) * repeats + current;
+      } else if (type === 'continue') {
+        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(lastValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
+          }
+
+          return ret;
+        }
+
+        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);
+      }
+
+      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function loopIn(type, duration, durationFlag) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var firstKeyFrame = keyframes[0].t;
+
+      if (currentFrame >= firstKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var lastKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        lastKeyFrame = keyframes[duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
+        } else {
+          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
+        }
+
+        lastKeyFrame = firstKeyFrame + cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
+
+        if (iterations % 2 === 0) {
+          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);
+        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
+          }
+
+          return ret;
+        }
+
+        return current - (endV - initV) * repeats;
+      } else if (type === 'continue') {
+        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(firstValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;
+          }
+
+          return ret;
+        }
+
+        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;
+      }
+
+      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function smooth(width, samples) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      width = (width || 0.4) * 0.5;
+      samples = Math.floor(samples || 5);
+
+      if (samples <= 1) {
+        return this.pv;
+      }
+
+      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
+      var initFrame = currentTime - width;
+      var endFrame = currentTime + width;
+      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
+      var i = 0;
+      var j = 0;
+      var value;
+
+      if (this.pv.length) {
+        value = createTypedArray('float32', this.pv.length);
+      } else {
+        value = 0;
+      }
+
+      var sampleValue;
+
+      while (i < samples) {
+        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
+
+        if (this.pv.length) {
+          for (j = 0; j < this.pv.length; j += 1) {
+            value[j] += sampleValue[j];
+          }
+        } else {
+          value += sampleValue;
+        }
+
+        i += 1;
+      }
+
+      if (this.pv.length) {
+        for (j = 0; j < this.pv.length; j += 1) {
+          value[j] /= samples;
+        }
+      } else {
+        value /= samples;
+      }
+
+      return value;
+    }
+
+    function getTransformValueAtTime(time) {
+      if (!this._transformCachingAtTime) {
+        this._transformCachingAtTime = {
+          v: new Matrix()
+        };
+      } /// /
+
+
+      var matrix = this._transformCachingAtTime.v;
+      matrix.cloneFromProps(this.pre.props);
+
+      if (this.appliedTransformations < 1) {
+        var anchor = this.a.getValueAtTime(time);
+        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);
+      }
+
+      if (this.appliedTransformations < 2) {
+        var scale = this.s.getValueAtTime(time);
+        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);
+      }
+
+      if (this.sk && this.appliedTransformations < 3) {
+        var skew = this.sk.getValueAtTime(time);
+        var skewAxis = this.sa.getValueAtTime(time);
+        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
+      }
+
+      if (this.r && this.appliedTransformations < 4) {
+        var rotation = this.r.getValueAtTime(time);
+        matrix.rotate(-rotation * this.r.mult);
+      } else if (!this.r && this.appliedTransformations < 4) {
+        var rotationZ = this.rz.getValueAtTime(time);
+        var rotationY = this.ry.getValueAtTime(time);
+        var rotationX = this.rx.getValueAtTime(time);
+        var orientation = this.or.getValueAtTime(time);
+        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);
+      }
+
+      if (this.data.p && this.data.p.s) {
+        var positionX = this.px.getValueAtTime(time);
+        var positionY = this.py.getValueAtTime(time);
+
+        if (this.data.p.z) {
+          var positionZ = this.pz.getValueAtTime(time);
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);
+        } else {
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
+        }
+      } else {
+        var position = this.p.getValueAtTime(time);
+        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);
+      }
+
+      return matrix; /// /
+    }
+
+    function getTransformStaticValueAtTime() {
+      return this.v.clone(new Matrix());
+    }
+
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+
+    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
+      var prop = getTransformProperty(elem, data, container);
+
+      if (prop.dynamicProperties.length) {
+        prop.getValueAtTime = getTransformValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      return prop;
+    };
+
+    var propertyGetProp = PropertyFactory.getProp;
+
+    PropertyFactory.getProp = function (elem, data, type, mult, container) {
+      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;
+      // prop.loopOut = loopOut;
+      // prop.loopIn = loopIn;
+
+      if (prop.kf) {
+        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      prop.loopOut = loopOut;
+      prop.loopIn = loopIn;
+      prop.smooth = smooth;
+      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
+      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
+      prop.numKeys = data.a === 1 ? data.k.length : 0;
+      prop.propertyIndex = data.ix;
+      var value = 0;
+
+      if (type !== 0) {
+        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
+      }
+
+      prop._cachingAtTime = {
+        lastFrame: initialDefaultFrame,
+        lastIndex: 0,
+        value: value
+      };
+      expressionHelpers.searchExpressions(elem, data, prop);
+
+      if (prop.k) {
+        container.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+
+    function getShapeValueAtTime(frameNum) {
+      // For now this caching object is created only when needed instead of creating it when the shape is initialized.
+      if (!this._cachingAtTime) {
+        this._cachingAtTime = {
+          shapeValue: shapePool.clone(this.pv),
+          lastIndex: 0,
+          lastTime: initialDefaultFrame
+        };
+      }
+
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastTime) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
+        this._cachingAtTime.lastTime = frameNum;
+        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
+      }
+
+      return this._cachingAtTime.shapeValue;
+    }
+
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
+
+    function ShapeExpressions() {}
+
+    ShapeExpressions.prototype = {
+      vertices: function vertices(prop, time) {
+        if (this.k) {
+          this.getValue();
+        }
+
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        var i;
+        var len = shapePath._length;
+        var vertices = shapePath[prop];
+        var points = shapePath.v;
+        var arr = createSizedArray(len);
+
+        for (i = 0; i < len; i += 1) {
+          if (prop === 'i' || prop === 'o') {
+            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
+          } else {
+            arr[i] = [vertices[i][0], vertices[i][1]];
+          }
+        }
+
+        return arr;
+      },
+      points: function points(time) {
+        return this.vertices('v', time);
+      },
+      inTangents: function inTangents(time) {
+        return this.vertices('i', time);
+      },
+      outTangents: function outTangents(time) {
+        return this.vertices('o', time);
+      },
+      isClosed: function isClosed() {
+        return this.v.c;
+      },
+      pointOnPath: function pointOnPath(perc, time) {
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        if (!this._segmentsLength) {
+          this._segmentsLength = bez.getSegmentsLength(shapePath);
+        }
+
+        var segmentsLength = this._segmentsLength;
+        var lengths = segmentsLength.lengths;
+        var lengthPos = segmentsLength.totalLength * perc;
+        var i = 0;
+        var len = lengths.length;
+        var accumulatedLength = 0;
+        var pt;
+
+        while (i < len) {
+          if (accumulatedLength + lengths[i].addedLength > lengthPos) {
+            var initIndex = i;
+            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;
+            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
+            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
+            break;
+          } else {
+            accumulatedLength += lengths[i].addedLength;
+          }
+
+          i += 1;
+        }
+
+        if (!pt) {
+          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
+        }
+
+        return pt;
+      },
+      vectorOnPath: function vectorOnPath(perc, time, vectorType) {
+        // perc doesn't use triple equality because it can be a Number object as well as a primitive.
+        if (perc == 1) {
+          // eslint-disable-line eqeqeq
+          perc = this.v.c;
+        } else if (perc == 0) {
+          // eslint-disable-line eqeqeq
+          perc = 0.999;
+        }
+
+        var pt1 = this.pointOnPath(perc, time);
+        var pt2 = this.pointOnPath(perc + 0.001, time);
+        var xLength = pt2[0] - pt1[0];
+        var yLength = pt2[1] - pt1[1];
+        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
+
+        if (magnitude === 0) {
+          return [0, 0];
+        }
+
+        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
+        return unitVector;
+      },
+      tangentOnPath: function tangentOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'tangent');
+      },
+      normalOnPath: function normalOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'normal');
+      },
+      setGroupProperty: expressionHelpers.setGroupProperty,
+      getValueAtTime: expressionHelpers.getStaticValueAtTime
+    };
+    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
+    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+
+    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
+      var prop = propertyGetShapeProp(elem, data, type, arr, trims);
+      prop.propertyIndex = data.ix;
+      prop.lock = false;
+
+      if (type === 3) {
+        expressionHelpers.searchExpressions(elem, data.pt, prop);
+      } else if (type === 4) {
+        expressionHelpers.searchExpressions(elem, data.ks, prop);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+  }
+
+  function initialize$1() {
+    addPropertyDecorator();
+  }
+
+  function addDecorator() {
+    function searchExpressions() {
+      if (this.data.d.x) {
+        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
+        this.addEffect(this.getExpressionValue.bind(this));
+        return true;
+      }
+
+      return null;
+    }
+
+    TextProperty.prototype.getExpressionValue = function (currentValue, text) {
+      var newValue = this.calculateExpression(text);
+
+      if (currentValue.t !== newValue) {
+        var newData = {};
+        this.copyData(newData, currentValue);
+        newData.t = newValue.toString();
+        newData.__complete = false;
+        return newData;
+      }
+
+      return currentValue;
+    };
+
+    TextProperty.prototype.searchProperty = function () {
+      var isKeyframed = this.searchKeyframes();
+      var hasExpressions = this.searchExpressions();
+      this.kf = isKeyframed || hasExpressions;
+      return this.kf;
+    };
+
+    TextProperty.prototype.searchExpressions = searchExpressions;
+  }
+
+  function initialize() {
+    addDecorator();
+  }
+
+  setExpressionsPlugin(Expressions);
+  initialize$1();
+  initialize();
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie_canvas.min.js b/build/player/lottie_canvas.min.js
index 8600653..63cee9c 100644
--- a/build/player/lottie_canvas.min.js
+++ b/build/player/lottie_canvas.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,_useWebWorker=!1,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bmRnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}roundValues(!1);var createElementID=(F=0,function(){return idPrefix+"__lottie_element_"+(F+=1)}),F;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var getBlendMode=(Na={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Na[t]||""}),Na,lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"},Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function m(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function f(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,m,f,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return y[12]=y[12]*t+y[15]*f,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],P=y[2],b=y[3],x=y[4],S=y[5],C=y[6],E=y[7],T=y[8],A=y[9],_=y[10],k=y[11],D=y[12],I=y[13],M=y[14],F=y[15];return y[0]=g*t+v*s+P*h+b*f,y[1]=g*e+v*a+P*l+b*c,y[2]=g*r+v*n+P*p+b*d,y[3]=g*i+v*o+P*m+b*u,y[4]=x*t+S*s+C*h+E*f,y[5]=x*e+S*a+C*l+E*c,y[6]=x*r+S*n+C*p+E*d,y[7]=x*i+S*o+C*m+E*u,y[8]=T*t+A*s+_*h+k*f,y[9]=T*e+A*a+_*l+k*c,y[10]=T*r+A*n+_*p+k*d,y[11]=T*i+A*o+_*m+k*u,y[12]=D*t+I*s+M*h+F*f,y[13]=D*e+I*a+M*l+F*c,y[14]=D*r+I*n+M*p+F*d,y[15]=D*i+I*o+M*m+F*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function P(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function b(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function x(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function S(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function C(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function E(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function T(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function A(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=T(t[e]);return i}function _(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function k(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function I(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function M(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function F(){var t=this.props;return"matrix("+M(t[0])+","+M(t[1])+","+M(t[4])+","+M(t[5])+","+M(t[12])+","+M(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=m,this.shear=l,this.scale=f,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=b,this.applyToX=x,this.applyToY=S,this.applyToZ=C,this.applyToPointArray=k,this.applyToTriplePoints=_,this.applyToPointStringified=D,this.toCSS=I,this.to2dCSS=F,this.clone=v,this.cloneFromProps=P,this.equals=g,this.inversePoints=A,this.inversePoint=T,this.getInverseMatrix=E,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var l,p=this,m=256,f=6,c="random",d=h.pow(m,f),u=h.pow(2,52),y=2*u,g=m-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<m;)a[i]=i++;for(i=0;i<m;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*m+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function P(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function b(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return x(e)}function x(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=b(function t(e,r){var i,s=[],a=typeof e;if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,x(o)]:null===t?function(){try{if(l)return x(l.randomBytes(m));var t=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(t),x(t)}catch(t){var e=p.navigator,r=e&&e.plugins;return[+new Date,p,r,p.screen,x(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(f),e=d,r=0;t<u;)t=(t+r)*m,e*=m,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,b(x(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&P(i,a),t.state=function(){return P(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},b(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function m(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function f(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:m(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<l;++r)this._mSampleValues[r]=m(r*p,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&i[a]<=t;++a)s+=p;var o=s+(t-i[--a])/(i[a+1]-i[a])*p,h=f(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=f(e,r,i);if(0===a)return e;e-=(m(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=m(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,r)}},t}();function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){var D=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var p=function(t,e,r,i){var s,a,n,o,h,l,p=defaultCurveSegments,m=0,f=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],f[a]=o,null!==c[a]&&(l+=bmPow(f[a]-c[a],2)),c[a]=f[a];l&&(m+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=m}return d.addedLength=m,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var P,t=(P={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!P[s]){var a,n,o,h,l,p,m,f=defaultCurveSegments,c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(f=2);var u=new g(f);for(o=r.length,a=0;a<f;a+=1){for(m=createSizedArray(o),l=a/(f-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+r[n])+3*(1-l)*bmPow(l,2)*(e[n]+i[n])+bmPow(l,3)*e[n],m[n]=h,null!==d&&(p+=bmPow(m[n]-d[n],2));c+=p=bmSqrt(p),u.points[a]=new v(p,m),d=m}u.segmentLength=c,P[s]=u}return P[s]});function I(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var M=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),r.totalLength=l,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=I(s,n),l=I(a=1<a?1:a,n),p=t.length,m=1-h,f=1-l,c=m*m*m,d=h*m*m*3,u=h*h*m*3,y=h*h*h,g=m*m*f,v=h*m*f+m*h*f+m*m*l,P=h*h*f+m*h*l+h*m*l,b=h*h*l,x=m*f*f,S=h*f*f+m*l*f+m*f*l,C=h*l*f+m*l*l+h*f*l,E=h*l*l,T=f*f*f,A=l*f*f+f*l*f+f*f*l,_=l*l*f+f*l*l+l*f*l,k=l*l*l;for(o=0;o<p;o+=1)M[4*o]=D.round(1e3*(c*t[o]+d*r[o]+u*i[o]+y*e[o]))/1e3,M[4*o+1]=D.round(1e3*(g*t[o]+v*r[o]+P*i[o]+b*e[o]))/1e3,M[4*o+2]=D.round(1e3*(x*t[o]+S*r[o]+C*i[o]+E*e[o]))/1e3,M[4*o+3]=D.round(1e3*(T*t[o]+A*r[o]+_*i[o]+k*e[o]))/1e3;return M},getPointInSegment:function(t,e,r,i,s,a){var n=I(s,a),o=1-n;return[D.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,D.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var l,p=D.sqrt(D.pow(i-t,2)+D.pow(s-e,2)+D.pow(a-r,2)),m=D.sqrt(D.pow(n-t,2)+D.pow(o-e,2)+D.pow(h-r,2)),f=D.sqrt(D.pow(n-i,2)+D.pow(o-s,2)+D.pow(h-a,2));return-1e-4<(l=m<p?f<p?p-m-f:f-m-p:m<f?f-m-p:m-p-f)&&l<1e-4}}}!function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-s)),i=setTimeout(function(){t(e+r)},r);return s=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&_useWebWorker){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function m(t,e){var r,i,s,a,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var p=r.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)d(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&d(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&d(p[s].pt.k[n].e[0])}0===r.ty?(r.layers=f(r.refId,e),m(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0!==(h=r).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function f(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}return null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&d(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&d(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var h,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,r,i,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(a=t.chars[e].data.shapes[0].it).length,r=0;r<i;r+=1)(s=a[r].ks.k).__converted||(d(a[r].ks.k),s.__converted=!0)}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),s=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,4,18];function l(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(s(t),e(t),r(t),i(t),a(t),m(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=s,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=a,t.completeLayers=m,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}();function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}var FontManager=function(){var a={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function f(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=f(i[r].fFamily,"monospace"),i[r].sansCase=f(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.setAttribute("f-family",i[r].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(l)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.type="text/css",p.rel="stylesheet",p.href=i[r].fPath,document.body.appendChild(p)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.setAttribute("rel","stylesheet"),m.setAttribute("href",i[r].fPath),e.appendChild(m)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),PropertyFactory=function(){var m=initialDefaultFrame,s=Math.abs;function f(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,m,f,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,P,b,x,S,C,E,T,A,_=a.t-i,k=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var D=n.bezierData;if(_<=t||t<k){var I=_<=t?D.points.length-1:0;for(h=D.points[I].point.length,o=0;o<h;o+=1)r[o]=D.points[I].point[o]}else{n.__fnct?f=n.__fnct:(f=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=f),l=f((t-k)/(_-k));var M,F=D.segmentLength*l,w=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,p=D.points.length;y;){if(w+=D.points[m].partialLength,0===F||0===l||m===D.points.length-1){for(h=D.points[m].point.length,o=0;o<h;o+=1)r[o]=D.points[m].point[o];break}if(w<=F&&F<w+D.points[m+1].partialLength){for(M=(F-w)/D.points[m+1].partialLength,h=D.points[m].point.length,o=0;o<h;o+=1)r[o]=D.points[m].point[o]+(D.points[m+1].point[o]-D.points[m].point[o])*M;break}m<p-1?m+=1:y=!1}e._lastPoint=m,e._lastAddedLength=w-D.points[m].partialLength,e._lastKeyframeIndex=d}}else{var V,R,L,O,B;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(_<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=k)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var z=N(s.s),G=N(g);v=r,P=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],m=t[2],f=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+m*u+f*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*m+o*u,h[3]=n*f+o*y,h}(z,G,(t-k)/(_-k)),b=P[0],x=P[1],S=P[2],C=P[3],E=Math.atan2(2*x*C-2*b*S,1-2*x*x-2*S*S),T=Math.asin(2*b*x+2*S*C),A=Math.atan2(2*b*C-2*x*S,1-2*b*b-2*S*S),v[0]=E/degToRads,v[1]=T/degToRads,v[2]=A/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(l=_<=t?1:t<k?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?f=n.__fnct[d]:(V=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],R=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],L=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],O=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],f=BezierFactory.getBezierEasing(V,R,L,O).get,n.__fnct[d]=f)):n.__fnct?f=n.__fnct:(V=s.o.x,R=s.o.y,L=s.i.x,O=s.i.y,f=BezierFactory.getBezierEasing(V,R,L,O).get,s.keyframeMetadata=f),f((t-k)/(_-k)))),g=a.s||s.e,B=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*l,"multidimensional"===this.propType?r[d]=B:r=B}return e.lastIndex=c,r}function N(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==m&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:m,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=m,this.pv=m,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=m,this.pv[s]=m;this._caching={lastFrame:m,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new l(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,l,p,m,f=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,f=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=f,v=c.length-1,P=!0;P&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:P=!1;if(y=this.keyframesMetadata[g]||{},f=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var b;y.__fnct?b=y.__fnct:(b=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=b),p=b((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=f,n=0;n<h;n+=1)for(o=0;o<l;o+=1)m=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=m,m=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=m,m=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=m}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*s),f=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?l:p,i=n?m:f;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-m*a*s*o,h+p*a*s*o,l+m*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new p(t,e):6===r?i=new h(t,e):7===r&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return m}(),ShapeModifiers=(st={},tt={},st.registerModifier=function(t,e){tt[t]||(tt[t]=e)},st.getModifier=function(t,e,r){return new tt[t](e,r)},st),st,tt;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,m;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,m=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,m,f=this.shapes.length,c=0;if(r===e)for(s=0;s<f;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<f;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<f;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,m=0,!d.shape._mdf&&d.pathsData.length)m=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),m+=p.totalLength;d.totalShapeLength=m,d.pathsData=l}c+=m,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,P=r,b=0;for(s=f-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<f?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,b,c),b+=d.totalShapeLength):g=[[v,P]],h=g.length,o=0;o<h;o+=1){v=g[o][0],P=g[o][1],y.length=0,P<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*P}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(P-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(P-1)}));var x=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var S=x.pop();this.addPaths(x,u),x=this.addShapes(d,y[1],S)}else this.addPaths(x,u),x=this.addShapes(d,y[1]);this.addPaths(x,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),u.push(r),i=0;i<c;i+=1){for(h=m[i].lengths,r.c=f[i].c,a=f[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[s],f[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[s],f[i].o[s-1],f[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[0],f[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[0],f[i].o[s-1],f[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,m,f,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,m=u=s[1]-(s[1]-o[1])*l,f=p-(p-s[0])*roundCorner,c=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=f=s[0]+(o[0]-s[0])*l,m=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,m,f=shapePool.newElement();for(f.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,m=t.i[a][1]+(i[1]-t.i[a][1])*-r,f.setTripleAt(n,o,h,l,p,m,a);return f},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,m=p[p.length-1];0!==m.transform.op.v?(m.transform.op._mdf=!0,m.transform.op.v=0):m.transform.op._mdf=!1}a+=1}this._currentCopies=h;var f=this.o.v,c=f%1,d=0<f?Math.floor(f):Math.ceil(f),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,P,b=0;if(0<f){for(;b<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),b+=c)}else if(f<0){for(;d<b;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),b-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(P=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<P;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<P;v+=1)r[v]=this.matrix.props[v];b+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}(),featureSupport=(Ly={maskType:!0},(/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))&&(Ly.maskType=!1),Ly),Ly,filtersFactory=(My={},My.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},My.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},My),My;function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,m,f,c,d,u,y,g,v,P,b,x=this._moreOptions.alignment.v,S=this._animatorsData,C=this._textData,E=this.mHelper,T=this._renderType,A=this.renderedLetters.length,_=t.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var k,D=b.v;for(this._pathData.r.v&&(D=D.reverse()),n={tLength:0,segments:[]},a=D._length-1,s=g=0;s<a;s+=1)k=bez.buildBezierData(D.v[s],D.v[s+1],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[s+1][0]-D.v[s+1][0],D.i[s+1][1]-D.v[s+1][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength;s=a,b.v.c&&(k=bez.buildBezierData(D.v[s],D.v[0],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[0][0]-D.v[0][0],D.i[0][1]-D.v[0][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=1,p=!(l=f=0),u=n.segments,o<0&&b.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),m=(d=u[f=u.length-1].points).length-1;o<0;)o+=d[m].partialLength,(m-=1)<0&&(m=(d=u[f-=1].points).length-1);c=(d=u[f].points)[m-1],y=(h=d[m]).partialLength}a=_.length,i=r=0;var I,M,F,w,V,R=1.2*t.finalSize*.714,L=!0;F=S.length;var O,B,z,G,N,j,q,H,W,X,Y,$,K=-1,J=o,Z=f,U=m,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(_[s].n){for(rt&&(rt+=it);at<s;)_[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(M=0;M<F;M+=1)(I=S[M].a).t.propType&&(nt&&2===t.j&&(it+=I.t.v*st),(V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars)).length?rt+=I.t.v*V[0]*st:rt+=I.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)_[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(E.reset(),G=1,_[s].n)r=0,i+=t.yOffset,i+=L?1:0,o=J,L=!1,this._hasMaskedPath&&(m=U,c=(d=u[f=Z].points)[m-1],y=(h=d[m]).partialLength,l=0),$=W=Y=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==_[s].line){switch(t.j){case 1:o+=g-t.lineWidths[_[s].line];break;case 2:o+=(g-t.lineWidths[_[s].line])/2}Q=_[s].line}K!==_[s].ind&&(_[K]&&(o+=_[K].extra),o+=_[s].an/2,K=_[s].ind),o+=x[0]*_[s].an*.005;var ot=0;for(M=0;M<F;M+=1)(I=S[M].a).p.propType&&((V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars)).length?ot+=I.p.v[0]*V[0]:ot+=I.p.v[0]*V),I.a.propType&&((V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars)).length?ot+=I.a.v[0]*V[0]:ot+=I.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*_[0].an+(g-this._pathData.f.v-.5*_[0].an-.5*_[_.length-1].an)*K/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,B=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,E.translate(-x[0]*_[s].an*.005,-x[1]*R*.01),p=!1):d&&(l+=h.partialLength,(m+=1)>=d.length&&(m=0,d=u[f+=1]?u[f].points:b.v.c?u[f=m=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[m]).partialLength));O=_[s].an/2-_[s].add,E.translate(-O,0,0)}else O=_[s].an/2-_[s].add,E.translate(-O,0,0),E.translate(-x[0]*_[s].an*.005,-x[1]*R*.01,0);for(M=0;M<F;M+=1)(I=S[M].a).t.propType&&(V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=I.t.v*V[0]:o+=I.t.v*V:V.length?r+=I.t.v*V[0]:r+=I.t.v*V));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(N=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(q=[t.fc[0],t.fc[1],t.fc[2]]),M=0;M<F;M+=1)(I=S[M].a).a.propType&&((V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars)).length?E.translate(-I.a.v[0]*V[0],-I.a.v[1]*V[1],I.a.v[2]*V[2]):E.translate(-I.a.v[0]*V,-I.a.v[1]*V,I.a.v[2]*V));for(M=0;M<F;M+=1)(I=S[M].a).s.propType&&((V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars)).length?E.scale(1+(I.s.v[0]-1)*V[0],1+(I.s.v[1]-1)*V[1],1):E.scale(1+(I.s.v[0]-1)*V,1+(I.s.v[1]-1)*V,1));for(M=0;M<F;M+=1){if(I=S[M].a,V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars),I.sk.propType&&(V.length?E.skewFromAxis(-I.sk.v*V[0],I.sa.v*V[1]):E.skewFromAxis(-I.sk.v*V,I.sa.v*V)),I.r.propType&&(V.length?E.rotateZ(-I.r.v*V[2]):E.rotateZ(-I.r.v*V)),I.ry.propType&&(V.length?E.rotateY(I.ry.v*V[1]):E.rotateY(I.ry.v*V)),I.rx.propType&&(V.length?E.rotateX(I.rx.v*V[0]):E.rotateX(I.rx.v*V)),I.o.propType&&(V.length?G+=(I.o.v*V[0]-G)*V[0]:G+=(I.o.v*V-G)*V),t.strokeWidthAnim&&I.sw.propType&&(V.length?j+=I.sw.v*V[0]:j+=I.sw.v*V),t.strokeColorAnim&&I.sc.propType)for(H=0;H<3;H+=1)V.length?N[H]+=(I.sc.v[H]-N[H])*V[0]:N[H]+=(I.sc.v[H]-N[H])*V;if(t.fillColorAnim&&t.fc){if(I.fc.propType)for(H=0;H<3;H+=1)V.length?q[H]+=(I.fc.v[H]-q[H])*V[0]:q[H]+=(I.fc.v[H]-q[H])*V;I.fh.propType&&(q=V.length?addHueToRGB(q,I.fh.v*V[0]):addHueToRGB(q,I.fh.v*V)),I.fs.propType&&(q=V.length?addSaturationToRGB(q,I.fs.v*V[0]):addSaturationToRGB(q,I.fs.v*V)),I.fb.propType&&(q=V.length?addBrightnessToRGB(q,I.fb.v*V[0]):addBrightnessToRGB(q,I.fb.v*V))}}for(M=0;M<F;M+=1)(I=S[M].a).p.propType&&(V=S[M].s.getMult(_[s].anIndexes[M],C.a[M].s.totalChars),this._hasMaskedPath?V.length?E.translate(0,I.p.v[1]*V[0],-I.p.v[2]*V[1]):E.translate(0,I.p.v[1]*V,-I.p.v[2]*V):V.length?E.translate(I.p.v[0]*V[0],I.p.v[1]*V[1],-I.p.v[2]*V[2]):E.translate(I.p.v[0]*V,I.p.v[1]*V,-I.p.v[2]*V));if(t.strokeWidthAnim&&(W=j<0?0:j),t.strokeColorAnim&&(X="rgb("+Math.round(255*N[0])+","+Math.round(255*N[1])+","+Math.round(255*N[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*q[0])+","+Math.round(255*q[1])+","+Math.round(255*q[2])+")"),this._hasMaskedPath){if(E.translate(0,-t.ls),E.translate(0,x[1]*R*.01+i,0),this._pathData.p.v){P=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(P)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),E.rotate(-ht*Math.PI/180)}E.translate(B,z,0),o-=x[0]*_[s].an*.005,_[s+1]&&K!==_[s+1].ind&&(o+=_[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(E.translate(r,i,0),t.ps&&E.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:E.translate(_[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[_[s].line]),0,0);break;case 2:E.translate(_[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[_[s].line])/2,0,0)}E.translate(0,-t.ls),E.translate(O,0,0),E.translate(x[0]*_[s].an*.005,x[1]*R*.01,0),r+=_[s].l+.001*t.tr*t.finalSize}"html"===T?tt=E.toCSS():"svg"===T?tt=E.to2dCSS():et=[E.props[0],E.props[1],E.props[2],E.props[3],E.props[4],E.props[5],E.props[6],E.props[7],E.props[8],E.props[9],E.props[10],E.props[11],E.props[12],E.props[13],E.props[14],E.props[15]],$=G}this.lettersChangedFlag=A<=s?(w=new LetterProps($,W,X,Y,tt,et),this.renderedLetters.push(w),A+=1,!0):(w=this.renderedLetters[s]).update($,W,X,Y,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],m=0,f=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,P=h.getFontByName(t.f),b=0,x=getFontProperties(P);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var S,C=t.tr/1e3*t.finalSize;if(t.sz)for(var E,T,A=!0,_=t.sz[0],k=t.sz[1];A;){g=E=0,r=(T=this.buildFinalText(t.t)).length,C=t.tr/1e3*t.finalSize;var D=-1;for(e=0;e<r;e+=1)S=T[e].charCodeAt(0),i=!1," "===T[e]?D=e:13!==S&&3!==S||(i=!(g=0),E+=t.finalLineHeight||1.2*t.finalSize),_<g+(b=h.chars?(o=h.getCharData(T[e],P.fStyle,P.fFamily),i?0:o.w*t.finalSize/100):h.measureText(T[e],t.f,t.finalSize))&&" "!==T[e]?(-1===D?r+=1:e=D,E+=t.finalLineHeight||1.2*t.finalSize,T.splice(e,D===e?1:0,"\r"),D=-1,g=0):(g+=b,g+=C);E+=P.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&k<E?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=T,r=t.finalText.length,A=!1)}g=-C;var I,M=b=0;for(e=0;e<r;e+=1)if(i=!1,13===(S=(I=t.finalText[e]).charCodeAt(0))||3===S?(M=0,y.push(g),v=v<g?g:v,g=-2*C,i=!(s=""),u+=1):s=I,b=h.chars?(o=h.getCharData(I,P.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===I?M+=b+C:(g+=b+C+M,M=0),p.push({l:b,an:b,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==f){if(c+=b,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=b);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=b,d+=1;m+=1,c=0}}else if(3==f){if(c+=b,""===s||e===r-1){for(""===s&&(c-=b);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=b,d+=1;c=0,m+=1}}else p[m].ind=m,p[m].extra=0,m+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var F,w,V,R,L=l.a;n=L.length;var O=[];for(a=0;a<n;a+=1){for((F=L[a]).a.sc&&(t.strokeColorAnim=!0),F.a.sw&&(t.strokeWidthAnim=!0),(F.a.fc||F.a.fh||F.a.fs||F.a.fb)&&(t.fillColorAnim=!0),R=0,V=F.s.b,e=0;e<r;e+=1)(w=p[e]).anIndexes[a]=R,(1==V&&""!==w.val||2==V&&""!==w.val&&" "!==w.val||3==V&&(w.n||" "==w.val||e==r-1)||4==V&&(w.n||e==r-1))&&(1===F.s.rn&&O.push(R),R+=1);l.a[a].s.totalChars=R;var B,z=-1;if(1===F.s.rn)for(e=0;e<r;e+=1)z!=(w=p[e]).anIndexes[a]&&(z=w.anIndexes[a],B=O.splice(Math.floor(Math.random()*O.length),1)[0]),w.anIndexes[a]=B}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=P.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,m=-p/2+(t=y(u(0,t+.5-o),h-o)),f=p/2;n=Math.sqrt(1-m*m/(f*f))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}(),poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},pointPool=poolFactory(8,function(){return createTypedArray("float32",2)}),shapePool=(MC=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),MC.clone=function(t){var e,r=MC.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},MC),MC,shapeCollectionPool=(UC={newShapeCollection:function(){var t;t=VC?XC[VC-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,VC===WC&&(XC=pooling.double(XC),WC*=2);XC[VC]=t,VC+=1}},VC=0,WC=4,XC=createSizedArray(WC),UC),UC,VC,WC,XC,segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}),bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}),markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}();function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,m,f,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var P;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",f=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),P=createElementID(),(p=createNS("filter")).setAttribute("id",P),(m=createNS("feMorphology")).setAttribute("operator","erode"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),p.appendChild(m),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):f=m=null,this.storedData[i]={elem:s,x:f,expan:m,lastPath:"",lastOperator:"",filterId:P,lastRadius:0},"i"===c[i].mode){h=u.length;var b=createNS("g");for(o=0;o<h;o+=1)b.appendChild(u[o]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",y+"_"+d),x.appendChild(s),a.appendChild(x),b.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(b)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function BaseElement(){}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,r){this.initElement(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function CVBaseElement(){}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVEffects(){}BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRenderer.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRenderer.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRenderer.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRenderer.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=r<i&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRenderer.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);(e[t]=r).initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),m=createNS("path");m.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var f=createElementID();if(p.setAttribute("id",f),p.appendChild(m),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+f+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+f+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+locationHref+"#"+r.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,m,f,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=r[f-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)f?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(f)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(f||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(f||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(f?(m=e[o]).closed=!1:((m=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=m,this.shapeModifiers.push(m)),y.push(m)):"rp"===t[o].ty&&(f?(m=e[o]).closed=!0:(m=ShapeModifiers.getModifier(t[o].ty),(e[o]=m).init(this,t,o,e),this.shapeModifiers.push(m),n=!1),y.push(m));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o<n&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(r=a)*o:r=(e=s)/o,i.drawImage(this.img,(s-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,l,p,m=t.length-1,f=[],c=[],d=[].concat(s);for(a=m;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),f.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),(e[a]=l).init(this,t,a,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),m=c.length,a=0;a<m;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,m=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(m.strokeStyle="st"===o?h.co:h.grd,m.lineWidth=h.wi,m.lineCap=h.lc,m.lineJoin=h.lj,m.miterLimit=h.ml||0):m.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&m.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(m.beginPath(),h.da&&(m.setLineDash(h.da),m.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?m.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?m.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):m.closePath();"st"!==o&&"gs"!==o||(m.stroke(),h.da&&m.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&m.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),m=e.h.v;1<=m?m=.99:m<=-1&&(m=-.99);var f=l*m,c=Math.cos(p+e.a.v)*f+o[0],d=Math.sin(p+e.a.v)*f+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,s,a,n,o,h,l,p,m,f,c,d,u=this.globalData.fontManager.getFontByName(t.f),y=t.l,g=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var v=this.data.singleShape,P=.001*t.tr*t.finalSize,b=0,x=0,S=!0,C=0;for(i=0;i<s;i+=1){for(n=(a=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&a.data||{},g.reset(),v&&y[i].n&&(b=-P,x+=t.yOffset,x+=S?1:0,S=!1),m=(l=n.shapes?n.shapes[0].it:[]).length,g.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,g,y[i].line,b,x),c=createSizedArray(m),p=0;p<m;p+=1){for(h=l[p].ks.k.i.length,f=l[p].ks.k,d=[],o=1;o<h;o+=1)1===o&&d.push(g.applyToX(f.v[0][0],f.v[0][1],0),g.applyToY(f.v[0][0],f.v[0][1],0)),d.push(g.applyToX(f.o[o-1][0],f.o[o-1][1],0),g.applyToY(f.o[o-1][0],f.o[o-1][1],0),g.applyToX(f.i[o][0],f.i[o][1],0),g.applyToY(f.i[o][0],f.i[o][1],0),g.applyToX(f.v[o][0],f.v[o][1],0),g.applyToY(f.v[o][0],f.v[o][1],0));d.push(g.applyToX(f.o[o-1][0],f.o[o-1][1],0),g.applyToY(f.o[o-1][0],f.o[o-1][1],0),g.applyToX(f.i[0][0],f.i[0][1],0),g.applyToY(f.i[0][0],f.i[0][1],0),g.applyToX(f.v[0][0],f.v[0][1],0),g.applyToY(f.v[0][0],f.v[0][1],0)),c[p]=d}v&&(b+=y[i].l,b+=P),this.textSpans[C]?this.textSpans[C].elem=c:this.textSpans[C]={elem:c},C+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,s,a,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,m,f=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?f!==o.fc&&(f=o.fc,n.fillStyle=o.fc):f!==this.values.fill&&(f=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(m=p[r]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(m=p[r]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},CVEffects.prototype.renderFrame=function(){};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||m()),e+=1}function l(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return f(i,t),i.setData(t,e),i}function p(){n+=1,d()}function m(){n-=1}function f(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",p),t.addEventListener("_idle",m),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),l(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(GQ={},GQ.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},GQ),GQ;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=typeof t,i=typeof e;if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=typeof t,i=typeof e;if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var l=n-o;switch(r=.5<h?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=(f[a]-m[a])*d+c[a];return o}return(f-m)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(f[a]-m[a])*d;return o}return c-(f-m)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var m=this.px.getValueAtTime(t),f=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(m*this.px.mult,f*this.py.mult,-c*this.pz.mult)}else e.translate(m*this.px.mult,f*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,m=r.c&&o===h-1?0:o+1,f=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[m],r.o[p],r.i[m],f,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null};var ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(m(t[i],e[i],r)):"tm"===t[i].ty?s.push(f(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(d(t[i],e[i],r)):"sr"===t[i].ty?s.push(u(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(l(t[i],e[i],r)):s.push(p(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(){return function(){return null}}function m(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function f(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function m(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function f(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=p,i.applyPoint=l,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=m,i.sampleImage=f,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),FootageInterface=(s$=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"==typeof(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"==typeof(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=s$(t),e}),s$,CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function l(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(p(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function p(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(l(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TextExpressionSelectorPropFactory=function(){function r(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=r,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}TextSelectorProp.getTextSelectorProp=function(t,e,r){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,r):propertyGetTextProp(t,e,r)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}};var lottie={};function setLocationHref(t){locationHref=t}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){subframeEnabled=t}function setIDPrefix(t){idPrefix=t}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;default:case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocationHref,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=function(t){_useWebWorker=t},lottie.setIDPrefix=setIDPrefix,lottie.__getFactory=getFactory,lottie.version="5.8.1";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,a=t.length;for(r=0;r<a;r+=1)for(var s in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,s)&&(e.prototype[s]=i[s])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(t,e){var r,i=0,a=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)a.push(r);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,r){return"float32"===e?new Float32Array(r):"int16"===e?new Int16Array(r):"uint8c"===e?new Uint8ClampedArray(r):t(e,r)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,idPrefix="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,r){var i,a,s,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,a=p,s=h;break;case 1:i=l,a=r,s=h;break;case 2:i=h,a=r,s=p;break;case 3:i=h,a=l,s=r;break;case 4:i=p,a=h,s=r;break;case 5:i=r,a=h,s=l}return[i,a,s]}function RGBtoHSV(t,e,r){var i,a=Math.max(t,e,r),s=Math.min(t,e,r),n=a-s,o=0===a?0:n/a,h=a/255;switch(a){case s:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix=t},getIdPrefix=function(){return idPrefix};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,r=1,i=[],a={onmessage:function(){},postMessage:function(e){t({data:e})}},s={postMessage:function(t){a.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(r);return new Worker(i)}return t=e,a}((function(t){if(s.dataManager||(s.dataManager=function(){function t(a,s){var n,o,h,l,p,m,c=a.length;for(o=0;o<c;o+=1)if("ks"in(n=a[o])&&!n.completed){if(n.completed=!0,n.tt&&(a[o-1].td=n.tt),n.hasMask){var d=n.masksProperties;for(l=d.length,h=0;h<l;h+=1)if(d[h].pt.k.i)i(d[h].pt.k);else for(m=d[h].pt.k.length,p=0;p<m;p+=1)d[h].pt.k[p].s&&i(d[h].pt.k[p].s[0]),d[h].pt.k[p].e&&i(d[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,s),t(n.layers,s)):4===n.ty?r(n.shapes):5===n.ty&&f(n)}}function e(t,e){var r=function(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r];r+=1}return null}(t,e);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(t){var e,a,s;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(s=t[e].ks.k.length,a=0;a<s;a+=1)t[e].ks.k[a].s&&i(t[e].ks.k[a].s[0]),t[e].ks.k[a].e&&i(t[e].ks.k[a].e[0]);else"gr"===t[e].ty&&r(t[e].it)}function i(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function a(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var s,n=function(){var t=[4,4,14];function e(t){var e,r,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(i=void 0,i=(r=t[e]).t.d,r.t.d={k:[{s:i,t:0}]})}return function(r){if(a(t,r.v)&&(e(r.layers),r.assets)){var i,s=r.assets.length;for(i=0;i<s;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),o=(s=[4,7,99],function(t){if(t.chars&&!a(s,t.v)){var e,i=t.chars.length;for(e=0;e<i;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(r(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,r,i=t.length;for(e=0;e<i;e+=1)5===t[e].ty&&(r=void 0,"number"==typeof(r=t[e].t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(r){if(a(t,r.v)&&(e(r.layers),r.assets)){var i,s=r.assets.length;for(i=0;i<s;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var r,i,a,s=t.length;for(r=0;r<s;r+=1)if("gr"===t[r].ty)e(t[r].it);else if("fl"===t[r].ty||"st"===t[r].ty)if(t[r].c.k&&t[r].c.k[0].i)for(a=t[r].c.k.length,i=0;i<a;i+=1)t[r].c.k[i].s&&(t[r].c.k[i].s[0]/=255,t[r].c.k[i].s[1]/=255,t[r].c.k[i].s[2]/=255,t[r].c.k[i].s[3]/=255),t[r].c.k[i].e&&(t[r].c.k[i].e[0]/=255,t[r].c.k[i].e[1]/=255,t[r].c.k[i].e[2]/=255,t[r].c.k[i].e[3]/=255);else t[r].c.k[0]/=255,t[r].c.k[1]/=255,t[r].c.k[2]/=255,t[r].c.k[3]/=255}function r(t){var r,i=t.length;for(r=0;r<i;r+=1)4===t[r].ty&&e(t[r].shapes)}return function(e){if(a(t,e.v)&&(r(e.layers),e.assets)){var i,s=e.assets.length;for(i=0;i<s;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var r,i,a;for(r=t.length-1;r>=0;r-=1)if("sh"===t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(a=t[r].ks.k.length,i=0;i<a;i+=1)t[r].ks.k[i].s&&(t[r].ks.k[i].s[0].c=t[r].closed),t[r].ks.k[i].e&&(t[r].ks.k[i].e[0].c=t[r].closed);else"gr"===t[r].ty&&e(t[r].it)}function r(t){var r,i,a,s,n,o,h=t.length;for(i=0;i<h;i+=1){if((r=t[i]).hasMask){var l=r.masksProperties;for(s=l.length,a=0;a<s;a+=1)if(l[a].pt.k.i)l[a].pt.k.c=l[a].cl;else for(o=l[a].pt.k.length,n=0;n<o;n+=1)l[a].pt.k[n].s&&(l[a].pt.k[n].s[0].c=l[a].cl),l[a].pt.k[n].e&&(l[a].pt.k[n].e[0].c=l[a].cl)}4===r.ty&&e(r.shapes)}}return function(e){if(a(t,e.v)&&(r(e.layers),e.assets)){var i,s=e.assets.length;for(i=0;i<s;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var m={completeData:function(r){r.__complete||(l(r),n(r),o(r),h(r),p(r),t(r.layers,r.assets),function(r,i){if(r){var a=0,s=r.length;for(a=0;a<s;a+=1)1===r[a].t&&(r[a].data.layers=e(r[a].data.refId,i),t(r[a].data.layers,i))}}(r.chars,r.assets),r.__complete=!0)}};return m.checkColors=l,m.checkChars=o,m.checkPathProperties=h,m.checkShapes=p,m.completeLayers=t,m}()),s.assetLoader||(s.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,i,a){var s,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)s=t(n),i(s);else try{s=t(n),i(s)}catch(t){a&&a(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",r+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)s.assetLoader.load(t.data.path,t.data.fullPath,(function(e){s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){s.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&s.assetLoader.load(t.data.path,t.data.fullPath,(function(e){s.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){s.postMessage({id:t.data.id,status:"error"})}))})),e.onmessage=function(t){var e=t.data,r=e.id,a=i[r];i[r]=null,"success"===e.status?a.onComplete(e.payload):a.onError&&a.onError()})}function o(t,e){var a="processId_"+(r+=1);return i[a]={onComplete:t,onError:e},a}return{loadAnimation:function(t,r,i){n();var a=o(r,i);e.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:a})},loadData:function(t,r,i){n();var a=o(r,i);e.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:a})},completeAnimation:function(t,r,i){n();var a=o(r,i);e.postMessage({type:"complete",animation:t,id:a})}}}(),ImagePreloader=function(){var t=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,r){var i="";if(t.e)i=t.p;else if(e){var a=t.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),i=e+a}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function a(t){var e=0,r=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}function s(t){var e={assetData:t},r=i(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=s.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var r=i(e,this.assetsPath,this.path),a=createTag("img");a.crossOrigin="anonymous",a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){s.img=t,this._imageLoaded()}.bind(this),!1),a.src=r;var s={img:a,assetData:e};return s},createImageData:function(e){var r=i(e,this.assetsPath,this.path),a=createNS("image");isSafari?this.testImageLoaded(a):a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){s.img=t,this._imageLoaded()}.bind(this),!1),a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(a):this._elementHelper.appendChild(a);var s={img:a,assetData:e};return s},imageLoaded:e,footageLoaded:r,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},n}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(t){for(var e,r=t.split("\r\n"),i={},a=0,s=0;s<r.length;s+=1)2===(e=r[s].split(":")).length&&(i[e[0]]=e[1].trim(),a+=1);if(0===a)throw new Error;return i}return function(e){for(var r=[],i=0;i<e.length;i+=1){var a=e[i],s={time:a.tm,duration:a.dr};try{s.payload=JSON.parse(e[i].cm)}catch(r){try{s.payload=t(e[i].cm)}catch(t){s.payload={name:e[i]}}}r.push(s)}return r}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===a?r.loop=!1:"true"===a?r.loop=!0:""!==a&&(r.loop=parseInt(a,10));var s=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==s,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,a=i.length,s=t.layers,n=s.length;for(r=0;r<n;r+=1)for(e=0;e<a;){if(i[e].id===s[r].id){i[e]=s[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,i=0,a=0,s=!0,n=!1;function o(t){for(var r=0,a=t.target;r<i;)e[r].animation===a&&(e.splice(r,1),r-=1,i-=1,a.isPaused||p()),r+=1}function h(t,r){if(!t)return null;for(var a=0;a<i;){if(e[a].elem===t&&null!==e[a].elem)return e[a].animation;a+=1}var s=new AnimationItem;return f(s,t),s.setData(t,r),s}function l(){a+=1,d()}function p(){a-=1}function f(t,r){t.addEventListener("destroy",o),t.addEventListener("_active",l),t.addEventListener("_idle",p),e.push({elem:r,animation:t}),i+=1}function m(t){var o,h=t-r;for(o=0;o<i;o+=1)e[o].animation.advanceTime(h);r=t,a&&!n?window.requestAnimationFrame(m):s=!0}function c(t){r=t,window.requestAnimationFrame(m)}function d(){!n&&a&&s&&(window.requestAnimationFrame(c),s=!1)}return t.registerAnimation=h,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,r){var a;for(a=0;a<i;a+=1)e[a].animation.setSpeed(t,r)},t.setDirection=function(t,r){var a;for(a=0;a<i;a+=1)e[a].animation.setDirection(t,r)},t.play=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.play(t)},t.pause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.pause(t)},t.stop=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.stop(t)},t.togglePause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),s=a.length;for(i=0;i<s;i+=1)r&&a[i].setAttribute("data-bm-type",r),h(a[i],t);if(e&&0===s){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),h(o,t)}},t.resize=function(){var t;for(t=0;t<i;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,r,a){var s;for(s=0;s<i;s+=1)e[s].animation.goToAndStop(t,r,a)},t.destroy=function(t){var r;for(r=i-1;r>=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,d()},t.setVolume=function(t,r){var a;for(a=0;a<i;a+=1)e[a].animation.setVolume(t,r)},t.mute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.mute(t)},t.unmute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,r=e.length,i=[];for(t=0;t<r;t+=1)i.push(e[t].animation);return i},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,r,i,a,s){var n=s||("bez_"+t+"_"+r+"_"+i+"_"+a).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,r,i,a]);return e[n]=o,o}},e={};var r=.1,i="function"==typeof Float32Array;function a(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,r){return((a(e,r)*t+s(e,r))*t+n(e))*t}function h(t,e,r){return 3*a(e,r)*t*t+2*s(e,r)*t+n(e)}function l(t){this._p=t,this._mSampleValues=i?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===r&&i===a?t:0===t?0:1===t?1:o(this._getTForX(t),r,a)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<11;++i)this._mSampleValues[i]=o(i*r,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],a=this._mSampleValues,s=0,n=1;10!==n&&a[n]<=t;++n)s+=r;var l=s+(t-a[--n])/(a[n+1]-a[n])*r,p=h(l,e,i);return p>=.001?function(t,e,r,i){for(var a=0;a<4;++a){var s=h(e,r,i);if(0===s)return e;e-=(o(e,r,i)-t)/s}return e}(t,l,e,i):0===p?l:function(t,e,r,i,a){var s,n,h=0;do{(s=o(n=e+(r-e)/2,i,a)-t)>0?r=n:e=n}while(Math.abs(s)>1e-7&&++h<10);return n}(t,s,s+r,e,i)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,a=t,s=createSizedArray(a);return{newElement:function(){return i?s[i-=1]:e()},release:function(t){i===a&&(s=pooling.double(s),a*=2),r&&r(t),s[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}));function bezFunction(){var t=Math;function e(t,e,r,i,a,s){var n=t*i+e*a+r*s-a*i-s*t-r*e;return n>-.001&&n<.001}var r=function(t,e,r,i){var a,s,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,a=0;a<p;a+=1){for(h=a/(p-1),l=0,s=0;s<n;s+=1)o=bmPow(1-h,3)*t[s]+3*bmPow(1-h,2)*h*r[s]+3*(1-h)*bmPow(h,2)*i[s]+bmPow(h,3)*e[s],m[s]=o,null!==c[s]&&(l+=bmPow(m[s]-c[s],2)),c[s]=m[s];l&&(f+=l=bmSqrt(l)),d.percents[a]=h,d.lengths[a]=f}return d.addedLength=f,d};function i(t){this.segmentLength=0,this.points=new Array(t)}function a(t,e){this.partialLength=t,this.point=e}var s,n=(s={},function(t,r,n,o){var h=(t[0]+"_"+t[1]+"_"+r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!s[h]){var l,p,f,m,c,d,u,y=getDefaultCurveSegments(),g=0,v=null;2===t.length&&(t[0]!==r[0]||t[1]!==r[1])&&e(t[0],t[1],r[0],r[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(y=2);var b=new i(y);for(f=n.length,l=0;l<y;l+=1){for(u=createSizedArray(f),c=l/(y-1),d=0,p=0;p<f;p+=1)m=bmPow(1-c,3)*t[p]+3*bmPow(1-c,2)*c*(t[p]+n[p])+3*(1-c)*bmPow(c,2)*(r[p]+o[p])+bmPow(c,3)*r[p],u[p]=m,null!==v&&(d+=bmPow(u[p]-v[p],2));g+=d=bmSqrt(d),b.points[l]=new a(d,u),v=u}b.segmentLength=g,s[h]=b}return s[h]});function o(t,e){var r=e.percents,i=e.lengths,a=r.length,s=bmFloor((a-1)*t),n=t*e.addedLength,o=0;if(s===a-1||0===s||n===i[s])return r[s];for(var h=i[s]>n?-1:1,l=!0;l;)if(i[s]<=n&&i[s+1]>n?(o=(n-i[s])/(i[s+1]-i[s]),l=!1):s+=h,s<0||s>=a-1){if(s===a-1)return r[s];l=!1}return r[s]+(r[s+1]-r[s])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),a=t.c,s=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=r(s[e],s[e+1],n[e],o[e+1]),p+=l[e].addedLength;return a&&h&&(l[e]=r(s[e],s[0],n[e],o[0]),p+=l[e].addedLength),i.totalLength=p,i},getNewSegment:function(e,r,i,a,s,n,l){s<0?s=0:s>1&&(s=1);var p,f=o(s,l),m=o(n=n>1?1:n,l),c=e.length,d=1-f,u=1-m,y=d*d*d,g=f*d*d*3,v=f*f*d*3,b=f*f*f,P=d*d*u,S=f*d*u+d*f*u+d*d*m,x=f*f*u+d*f*m+f*d*m,E=f*f*m,_=d*u*u,A=f*u*u+d*m*u+d*u*m,C=f*m*u+d*m*m+f*u*m,T=f*m*m,k=u*u*u,D=m*u*u+u*m*u+u*u*m,M=m*m*u+u*m*m+m*u*m,F=m*m*m;for(p=0;p<c;p+=1)h[4*p]=t.round(1e3*(y*e[p]+g*i[p]+v*a[p]+b*r[p]))/1e3,h[4*p+1]=t.round(1e3*(P*e[p]+S*i[p]+x*a[p]+E*r[p]))/1e3,h[4*p+2]=t.round(1e3*(_*e[p]+A*i[p]+C*a[p]+T*r[p]))/1e3,h[4*p+3]=t.round(1e3*(k*e[p]+D*i[p]+M*a[p]+F*r[p]))/1e3;return h},getPointInSegment:function(e,r,i,a,s,n){var h=o(s,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*i[0]+(h*h*l+l*h*h+h*l*h)*a[0]+h*h*h*r[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*i[1]+(h*h*l+l*h*h+h*l*h)*a[1]+h*h*h*r[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(r,i,a,s,n,o,h,l,p){if(0===a&&0===o&&0===p)return e(r,i,s,n,h,l);var f,m=t.sqrt(t.pow(s-r,2)+t.pow(n-i,2)+t.pow(o-a,2)),c=t.sqrt(t.pow(h-r,2)+t.pow(l-i,2)+t.pow(p-a,2)),d=t.sqrt(t.pow(h-s,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=m>c?m>d?m-c-d:d-c-m:d>c?d-c-m:c-m-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(t,e){var r,a=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,n,o,h,l,p,f,m,c,d=e.lastIndex,u=d,y=this.keyframes.length-1,g=!0;g;){if(s=this.keyframes[u],n=this.keyframes[u+1],u===y-1&&t>=n.t-a){s.h&&(s=n),d=0;break}if(n.t-a>t){d=u;break}u<y-1?u+=1:(d=0,g=!1)}o=this.keyframesMetadata[u]||{};var v,b,P,S,x,E,_,A,C,T,k=n.t-a,D=s.t-a;if(s.to){o.bezierData||(o.bezierData=bez.buildBezierData(s.s,n.s||s.e,s.to,s.ti));var M=o.bezierData;if(t>=k||t<D){var F=t>=k?M.points.length-1:0;for(l=M.points[F].point.length,h=0;h<l;h+=1)r[h]=M.points[F].point[h]}else{o.__fnct?c=o.__fnct:(c=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,o.__fnct=c),p=c((t-D)/(k-D));var I,w=M.segmentLength*p,V=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastPoint:0,g=!0,f=M.points.length;g;){if(V+=M.points[m].partialLength,0===w||0===p||m===M.points.length-1){for(l=M.points[m].point.length,h=0;h<l;h+=1)r[h]=M.points[m].point[h];break}if(w>=V&&w<V+M.points[m+1].partialLength){for(I=(w-V)/M.points[m+1].partialLength,l=M.points[m].point.length,h=0;h<l;h+=1)r[h]=M.points[m].point[h]+(M.points[m+1].point[h]-M.points[m].point[h])*I;break}m<f-1?m+=1:g=!1}e._lastPoint=m,e._lastAddedLength=V-M.points[m].partialLength,e._lastKeyframeIndex=u}}else{var R,L,G,B,N;if(y=s.s.length,v=n.s||s.e,this.sh&&1!==s.h)if(t>=k)r[0]=v[0],r[1]=v[1],r[2]=v[2];else if(t<=D)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var O=i(s.s),z=i(v);b=r,P=function(t,e,r){var i,a,s,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];return(a=l*c+p*d+f*u+m*y)<0&&(a=-a,c=-c,d=-d,u=-u,y=-y),1-a>1e-6?(i=Math.acos(a),s=Math.sin(i),n=Math.sin((1-r)*i)/s,o=Math.sin(r*i)/s):(n=1-r,o=r),h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(O,z,(t-D)/(k-D)),S=P[0],x=P[1],E=P[2],_=P[3],A=Math.atan2(2*x*_-2*S*E,1-2*x*x-2*E*E),C=Math.asin(2*S*x+2*E*_),T=Math.atan2(2*S*_-2*x*E,1-2*S*S-2*E*E),b[0]=A/degToRads,b[1]=C/degToRads,b[2]=T/degToRads}else for(u=0;u<y;u+=1)1!==s.h&&(t>=k?p=1:t<D?p=0:(s.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[u]?c=o.__fnct[u]:(R=void 0===s.o.x[u]?s.o.x[0]:s.o.x[u],L=void 0===s.o.y[u]?s.o.y[0]:s.o.y[u],G=void 0===s.i.x[u]?s.i.x[0]:s.i.x[u],B=void 0===s.i.y[u]?s.i.y[0]:s.i.y[u],c=BezierFactory.getBezierEasing(R,L,G,B).get,o.__fnct[u]=c)):o.__fnct?c=o.__fnct:(R=s.o.x,L=s.o.y,G=s.i.x,B=s.i.y,c=BezierFactory.getBezierEasing(R,L,G,B).get,s.keyframeMetadata=c),p=c((t-D)/(k-D)))),v=n.s||s.e,N=1===s.h?s.s[u]:s.s[u]+(v[u]-s.s[u])*p,"multidimensional"===this.propType?r[u]=N:r=N}return e.lastIndex=d,r}function i(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,a=Math.cos(e/2),s=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+a*s*l,o*s*n+a*h*l,a*h*n-o*s*l,a*s*n-o*h*l]}function a(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<r&&e<r))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var a=this.interpolateValue(e,this._caching);this.pv=a}return this._caching.lastFrame=e,this.pv}function s(t){var r;if("unidimensional"===this.propType)r=t*this.mult,e(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var i=0,a=this.v.length;i<a;)r=t[i]*this.mult,e(this.v[i]-r)>1e-5&&(this.v[i]=r,this._mdf=!0),i+=1}function n(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=n,this.setVValue=s,this.addEffect=o}function l(t,e,r,i){var a;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var h=e.k.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),this.vel=createTypedArray("float32",h),a=0;a<h;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=n,this.setVValue=s,this.addEffect=o}function p(e,i,h,l){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=n,this.setVValue=s,this.interpolateValue=r,this.effectsSequence=[a.bind(this)],this.addEffect=o}function f(e,i,h,l){var p;this.propType="multidimensional";var f,m,c,d,u=i.k.length;for(p=0;p<u-1;p+=1)i.k[p].to&&i.k[p].s&&i.k[p+1]&&i.k[p+1].s&&(f=i.k[p].s,m=i.k[p+1].s,c=i.k[p].to,d=i.k[p].ti,(2===f.length&&(f[0]!==m[0]||f[1]!==m[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],f[0]+c[0],f[1]+c[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],m[0]+d[0],m[1]+d[1])||3===f.length&&(f[0]!==m[0]||f[1]!==m[1]||f[2]!==m[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],f[0]+c[0],f[1]+c[1],f[2]+c[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],m[0]+d[0],m[1]+d[1],m[2]+d[2]))&&(i.k[p].to=null,i.k[p].ti=null),f[0]===m[0]&&f[1]===m[1]&&0===c[0]&&0===c[1]&&0===d[0]&&0===d[1]&&(2===f.length||f[2]===m[2]&&0===c[2]&&0===d[2])&&(i.k[p].to=null,i.k[p].ti=null));this.effectsSequence=[a.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.getValue=n,this.setVValue=s,this.interpolateValue=r,this.frameId=-1;var y=i.k[0].s.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),p=0;p<y;p+=1)this.v[p]=t,this.pv[p]=t;this._caching={lastFrame:t,lastIndex:0,value:createTypedArray("float32",y)},this.addEffect=o}return{getProp:function(t,e,r,i,a){var s;if(e.k.length)if("number"==typeof e.k[0])s=new l(t,e,i,a);else switch(r){case 0:s=new p(t,e,i,a);break;case 1:s=new f(t,e,i,a)}else s=new h(t,e,i,a);return s.effectsSequence.length&&a.addDynamicProperty(s),s}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,a){var s;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[]}(!s[i]||s[i]&&!a)&&(s[i]=pointPool.newElement()),s[i][0]=t,s[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,a,s,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(a,s,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),a=1);var s,n=this._length-1,o=this._length;for(s=a;s<o;s+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],s,!1),n-=1;return t};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})),factory.clone=function(t){var e,r=factory.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var t=-999999;function e(t,e,r){var i,a,s,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],s=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],s=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(s=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=P),p=P((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}a=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=s?i.i[n][o]:i.i[n][o]+(a.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=s?i.o[n][o]:i.o[n][o]+(a.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=s?i.v[n][o]:i.v[n][o]+(a.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function r(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,a=this._caching.lastFrame;return a!==t&&(a<r&&e<r||a>i&&e>i)||(this._caching.lastIndex=a<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function a(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var a=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(e,a,s){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===s?a.pt.k:a.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[r.bind(this)]}n.prototype.interpolateShape=e,n.prototype.getValue=s,n.prototype.setVValue=a,n.prototype.addEffect=o,h.prototype.getValue=s,h.prototype.interpolateShape=e,h.prototype.setVValue=a,h.prototype.addEffect=o;var l=function(){var t=roundCorner;function e(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],r=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2,s=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=r-a,n.v[1][0]=s?e+i:e-i,n.v[1][1]=r,n.v[2][0]=e,n.v[2][1]=r+a,n.v[3][0]=s?e-i:e+i,n.v[3][1]=r,n.i[0][0]=s?e-i*t:e+i*t,n.i[0][1]=r-a,n.i[1][0]=s?e+i:e-i,n.i[1][1]=r-a*t,n.i[2][0]=s?e+i*t:e-i*t,n.i[2][1]=r+a,n.i[3][0]=s?e-i:e+i,n.i[3][1]=r+a*t,n.o[0][0]=s?e+i*t:e-i*t,n.o[0][1]=r-a,n.o[1][0]=s?e+i:e-i,n.o[1][1]=r+a*t,n.o[2][0]=s?e-i*t:e+i*t,n.o[2][1]=r+a,n.o[3][0]=s?e-i:e+i,n.o[3][1]=r-a*t}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,a=2*Math.floor(this.pt.v),s=2*Math.PI/a,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*a),m=2*Math.PI*h/(2*a),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<a;t+=1){r=n?l:p,i=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=s*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,a=this.os.v,s=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*s*a*o,l-f*s*a*o,h+p*s*a*o,l+f*s*a*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),f=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,a=bmMin(r,i,this.r.v),s=a*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+a,t+r,e-i+a,t+r,e-i+s,0,!0),this.v.setTripleAt(t+r,e+i-a,t+r,e+i-s,t+r,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+r-a,e+i,t+r-a,e+i,t+r-s,e+i,2,!0),this.v.setTripleAt(t-r+a,e+i,t-r+s,e+i,t-r+a,e+i,3,!0),this.v.setTripleAt(t-r,e+i-a,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r,e-i+a,t-r,e-i+s,t-r,e-i+a,5,!0),this.v.setTripleAt(t-r+a,e-i,t-r+a,e-i,t-r+s,e-i,6,!0),this.v.setTripleAt(t+r-a,e-i,t+r-s,e-i,t+r-a,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+s,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+s,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+a,t+r,e-i+s,t+r,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+r-a,e-i,t+r-a,e-i,t+r-s,e-i,1,!0),this.v.setTripleAt(t-r+a,e-i,t-r+s,e-i,t-r+a,e-i,2,!0),this.v.setTripleAt(t-r,e-i+a,t-r,e-i+a,t-r,e-i+s,3,!0),this.v.setTripleAt(t-r,e+i-a,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r+a,e+i,t-r+a,e+i,t-r+s,e+i,5,!0),this.v.setTripleAt(t+r-a,e+i,t+r-s,e+i,t+r-a,e+i,6,!0),this.v.setTripleAt(t+r,e+i-a,t+r,e+i-a,t+r,e+i-s,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+s,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-s,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-s,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new h(t,e,r):new n(t,e,r):5===r?i=new f(t,e):6===r?i=new l(t,e):7===r&&(i=new p(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return h}};return m}(),Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,i=Math.round;function a(){return 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,this}function s(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(i,-a,0,0,a,i,0,0,0,0,1,0,0,0,0,1)}function n(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(1,0,0,0,0,i,-a,0,0,a,i,0,0,0,0,1)}function o(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(i,0,a,0,0,1,0,0,-a,0,i,0,0,0,0,1)}function h(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(i,-a,0,0,a,i,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(r(t),r(e))}function f(i,a){var s=t(a),n=e(a);return this._t(s,n,0,0,-n,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(i),1,0,0,0,0,1,0,0,0,0,1)._t(s,-n,0,0,n,s,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,a,s,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=a,this.props[5]=s,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,a,s,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===a&&1===s&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*s+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],S=y[4],x=y[5],E=y[6],_=y[7],A=y[8],C=y[9],T=y[10],k=y[11],D=y[12],M=y[13],F=y[14],I=y[15];return y[0]=g*t+v*a+b*h+P*m,y[1]=g*e+v*s+b*l+P*c,y[2]=g*r+v*n+b*p+P*d,y[3]=g*i+v*o+b*f+P*u,y[4]=S*t+x*a+E*h+_*m,y[5]=S*e+x*s+E*l+_*c,y[6]=S*r+x*n+E*p+_*d,y[7]=S*i+x*o+E*f+_*u,y[8]=A*t+C*a+T*h+k*m,y[9]=A*e+C*s+T*l+k*c,y[10]=A*r+C*n+T*p+k*d,y[11]=A*i+C*o+T*f+k*u,y[12]=D*t+M*a+F*h+I*m,y[13]=D*e+M*s+F*l+I*c,y[14]=D*r+M*n+F*p+I*d,y[15]=D*i+M*o+F*f+I*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function S(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function x(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function E(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function _(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,a=this.props[0]/t,s=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=a,o.props[12]=s,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function C(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=A(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var a=this.props[0],s=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*a+t[1]*n+h,i[1]=t[0]*s+t[1]*o+l,i[2]=e[0]*a+e[1]*n+h,i[3]=e[0]*s+e[1]*o+l,i[4]=r[0]*a+r[1]*n+h,i[5]=r[0]*s+r[1]*o+l}return i}function k(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function M(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=a,this.rotate=s,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=S,this.applyToY=x,this.applyToZ=E,this.applyToPointArray=k,this.applyToTriplePoints=T,this.applyToPointStringified=D,this.toCSS=M,this.to2dCSS=I,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=C,this.inversePoint=A,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}if(lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.1",standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===("undefined"==typeof exports?"undefined":_typeof$3(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(t,r){e[t]||(e[t]=r)},t.getModifier=function(t,r,i){return new e[t](r,i)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,a){var s=[];e<=1?s.push({s:t,e:e}):t>=1?s.push({s:t-1,e:e-1}):(s.push({s:t,e:1}),s.push({s:0,e:e-1}));var n,o,h=[],l=s.length;for(n=0;n<l;n+=1){var p,f;if(!((o=s[n]).e*a<i||o.s*a>i+r))p=o.s*a<=i?0:(o.s*a-i)/r,f=o.e*a>=i+r?1:(o.e*a-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,a;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),(e=this.s.v>1?1+s:this.s.v<0?0+s:this.s.v+s)>(r=this.e.v>1?1+s:this.e.v<0?0+s:this.e.v+s)){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(a=0;a<m;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(a=0;a<m;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var d,u,y=[];for(a=0;a<m;a+=1)if((d=this.shapes[a]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,P=0;for(a=m-1;a>=0;a-=1)if((d=this.shapes[a]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):v>=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var S=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var x=S.pop();this.addPaths(S,u),S=this.addShapes(d,y[1],x)}else this.addPaths(S,u),S=this.addShapes(d,y[1]);this.addPaths(S,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,a,s,n){a.setXYAt(e[0],e[1],"o",s),a.setXYAt(r[0],r[1],"i",s+1),n&&a.setXYAt(t[0],t[1],"v",s),a.setXYAt(i[0],i[1],"v",s+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,a,s,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(r?(o=r._length,p=r._length):(r=shapePool.newElement(),o=0,p=0),u.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,s=m[i].c?h.length:h.length+1,a=1;a<s;a+=1)if(d+(n=h[a-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[a],m[i].v[a],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[a-1],m[i].v[a],m[i].o[a-1],m[i].i[a],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[a-1],d<=e.e){var g=h[a-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[a-1],m[i].v[0],m[i].o[a-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[a-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],a=t._length,s=0;for(s=0;s<a;s+=1)i[0]+=t.v[s][0],i[1]+=t.v[s][1];i[0]/=a,i[1]/=a;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,s=0;s<a;s+=1)n=t.v[s][0]+(i[0]-t.v[s][0])*r,o=t.v[s][1]+(i[1]-t.v[s][1])*r,h=t.o[s][0]+(i[0]-t.o[s][0])*-r,l=t.o[s][1]+(i[1]-t.o[s][1])*-r,p=t.i[s][0]+(i[0]-t.i[s][0])*-r,f=t.i[s][1]+(i[1]-t.i[s][1])*-r,m.setTripleAt(n,o,h,l,p,f,s);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,a,s,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(n.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var r;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var i,a;if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),a=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],a=[];var s=this.px,n=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(i[0]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),a[0]=s.getValueAtTime(s.keyframes[0].t/r,0),a[1]=n.getValueAtTime(n.keyframes[0].t/r,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(i[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),a[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0),a[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0)):(i=[s.pv,n.pv],a[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime),a[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime))}else i=a=t;this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",a=e.length,s=0;s<a;s+=1)switch(e[s].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,a,s){var n=s?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-a),h=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(s?1/o:o,s?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,a,s,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(s=0,i=0;i<=this._groups.length-1;i+=1){if(o=s<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}s+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=m>0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(m>0){for(;P<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(m<0){for(;P>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,s=this._currentCopies;s;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];P+=1,s-=1,i+=a}}else for(s=this._currentCopies,i=0,a=1;s;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,s-=1,i+=a;return n},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var a,s,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)a=t.v[r],n=t.o[r],s=t.i[r],a[0]===n[0]&&a[1]===n[1]&&a[0]===s[0]&&a[1]===s[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=a[0]+(o[0]-a[0])*l,f=u=a[1]-(a[1]-o[1])*l,m=p-(p-a[0])*roundCorner,c=f-(f-a[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=a[0]+(o[0]-a[0])*l,f=c=a[1]+(o[1]-a[1])*l,d=p-(p-a[0])*roundCorner,u=f-(f-a[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1):(i.setTripleAt(a[0],a[1],n[0],n[1],s[0],s[1],g),g+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,a,s,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(n.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function a(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var a=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,a=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&a.push(r[e]);return a.join(",")}(t)+", "+e,{node:i,w:a,parent:r}}function s(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var n=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};n.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},n.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},n.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var o={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,a=t.length,s=this.chars.length;for(e=0;e<a;e+=1){for(r=0,i=!1;r<s;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),s+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,n=i.length,o=n;for(r=0;r<n;r+=1){var h,l,p=!0;if(i[r].loaded=!1,i[r].monoCase=a(i[r].fFamily,"monospace"),i[r].sansCase=a(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if((h=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length>0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("f-family",i[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(f)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;l<h.length;l+=1)-1!==h[l].href.indexOf(i[r].fPath)&&(p=!1);if(p){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.type="text/css",m.rel="stylesheet",m.href=i[r].fPath,document.body.appendChild(m)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(h=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),l=0;l<h.length;l+=1)i[r].fPath===h[l].src&&(p=!1);if(p){var c=createTag("link");c.setAttribute("f-forigin",i[r].fOrigin),c.setAttribute("f-origin",i[r].origin),c.setAttribute("rel","stylesheet"),c.setAttribute("href",i[r].fPath),e.appendChild(c)}}}else i[r].loaded=!0,o-=1;i[r].helper=s(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,r,i){for(var a=0,s=this.chars.length;a<s;){if(this.chars[a].ch===e&&this.chars[a].style===r&&this.chars[a].fFamily===i)return this.chars[a];a+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,r,i)),t},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),a=t.charCodeAt(0);if(!i.cache[a+1]){var s=i.helper;if(" "===t){s.textContent="|"+t+"|";var n=s.getComputedTextLength();s.textContent="||";var o=s.getComputedTextLength();i.cache[a+1]=(n-o)/100}else s.textContent=t,i.cache[a+1]=s.getComputedTextLength()/100}return i.cache[a+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(a-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return n.prototype=o,n}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),a=e.viewData.length;for(r=0;r<a;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<a;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(t,e,r){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(i){if(!t.numKeys)return 0;var a="";a="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s;var s="unidimensional"===r?new Number(a):Object.assign({},a);return s.time=e.keyframes[i-1].t/e.elem.comp.globalData.frameRate,s.value="unidimensional"===r?a[0]:a,s},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function i(){return t}return function(a){return a?"unidimensional"===a.propType?function(e){e&&"pv"in e||(e=t);var i=1/e.mult,a=e.pv*i,s=new Number(a);return s.value=a,r(s,e,"unidimensional"),function(){return e.k&&e.getValue(),a=e.v*i,s.value!==a&&((s=new Number(a)).value=a,r(s,e,"unidimensional")),s}}(a):function(t){t&&"pv"in t||(t=e);var i=1/t.mult,a=t.data&&t.data.l||t.pv.length,s=createTypedArray("float32",a),n=createTypedArray("float32",a);return s.value=n,r(s,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<a;e+=1)n[e]=t.v[e]*i,s[e]=n[e];return s}}(a):i}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,a,s;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?s=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(a=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?s():[r(),i(),a?a():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function r(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function i(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function a(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function s(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function n(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function o(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function h(){return[1,1,1,1]}return function(l){var p;function f(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return f.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return f.effect;case"ADBE Text Properties":return f.textInterface;default:return null}}f.getMatrix=t,f.invertPoint=n,f.applyPoint=s,f.toWorld=r,f.toWorldVec=e,f.fromWorld=a,f.fromWorldVec=i,f.toComp=r,f.fromComp=o,f.sampleImage=h,f.sourceRectAtTime=l.sourceRectAtTime.bind(l),f._elem=l;var m=getDescriptor(p=TransformExpressionInterface(l.finalTransform.mProp),"anchorPoint");return Object.defineProperties(f,{hasParent:{get:function(){return l.hierarchy.length}},parent:{get:function(){return l.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return l.isInRange}}}),f.startTime=l.data.st,f.index=l.data.ind,f.source=l.data.refId,f.height=0===l.data.ty?l.data.h:100,f.width=0===l.data.ty?l.data.w:100,f.inPoint=l.data.ip/l.comp.globalData.frameRate,f.outPoint=l.data.op/l.comp.globalData.frameRate,f._name=l.data.nm,f.registerMaskInterface=function(t){f.mask=new MaskManagerInterface(t,l)},f.registerEffectsInterface=function(t){f.effect=t},f}}(),propertyGroupFactory=function(t,e){return function(r){return(r=void 0===r?1:r)<=0?t:e(r-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},EffectsExpressionInterface=function(){function t(r,i,a,s){function n(t){for(var e=r.ef,i=0,a=e.length;i<a;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?l[i]:l[i]();i+=1}throw new Error}var o,h=propertyGroupFactory(n,a),l=[],p=r.ef.length;for(o=0;o<p;o+=1)5===r.ef[o].ty?l.push(t(r.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,s)):l.push(e(i.effectElements[o],r.ef[o].ty,s,h));return"ADBE Color Control"===r.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:h}}),n.enabled=0!==r.en,n.active=n.enabled,n}function e(t,e,r,i){var a=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):a()}}return{createEffectsInterface:function(e,r){if(e.effectsManager){var i,a=[],s=e.data.ef,n=e.effectsManager.effectElements.length;for(i=0;i<n;i+=1)a.push(t(s[i],e.effectsManager.effectElements[i],r,e));var o=e.data.ef||[],h=function(t){for(i=0,n=o.length;i<n;){if(t===o[i].nm||t===o[i].mn||t===o[i].ix)return a[i];i+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),CompExpressionInterface=function(t){function e(e){for(var r=0,i=t.layers.length;r<i;){if(t.layers[r].nm===e||t.layers[r].ind===e)return t.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},ShapePathInterface=function(t,e,r){var i=e.sh;function a(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?a.path:null}var s=propertyGroupFactory(a,r);return i.setGroupProperty(PropertyInterface("Path",s)),Object.defineProperties(a,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),a},ShapeExpressionInterface=function(){function t(t,o,c){var d,u=[],y=t?t.length:0;for(d=0;d<y;d+=1)"gr"===t[d].ty?u.push(e(t[d],o[d],c)):"fl"===t[d].ty?u.push(r(t[d],o[d],c)):"st"===t[d].ty?u.push(s(t[d],o[d],c)):"tm"===t[d].ty?u.push(n(t[d],o[d],c)):"tr"===t[d].ty||("el"===t[d].ty?u.push(h(t[d],o[d],c)):"sr"===t[d].ty?u.push(l(t[d],o[d],c)):"sh"===t[d].ty?u.push(ShapePathInterface(t[d],o[d],c)):"rc"===t[d].ty?u.push(p(t[d],o[d],c)):"rd"===t[d].ty?u.push(f(t[d],o[d],c)):"rp"===t[d].ty?u.push(m(t[d],o[d],c)):"gf"===t[d].ty?u.push(i(t[d],o[d],c)):u.push(a(t[d],o[d])));return u}function e(e,r,i){var a=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return a.content;default:return a.transform}};a.propertyGroup=propertyGroupFactory(a,i);var s=function(e,r,i){var a,s=function(t){for(var e=0,r=a.length;e<r;){if(a[e]._name===t||a[e].mn===t||a[e].propertyIndex===t||a[e].ix===t||a[e].ind===t)return a[e];e+=1}return"number"==typeof t?a[t-1]:null};s.propertyGroup=propertyGroupFactory(s,i),a=t(e.it,r.it,s.propertyGroup),s.numProperties=a.length;var n=o(e.it[e.it.length-1],r.it[r.it.length-1],s.propertyGroup);return s.transform=n,s.propertyIndex=e.cix,s._name=e.nm,s}(e,r,a.propertyGroup),n=o(e.it[e.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.content=s,a.transform=n,Object.defineProperty(a,"_name",{get:function(){return e.nm}}),a.numProperties=e.np,a.propertyIndex=e.ix,a.nm=e.nm,a.mn=e.mn,a}function r(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function i(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function a(){return function(){return null}}function s(t,e,r){var i,a=propertyGroupFactory(l,r),s=propertyGroupFactory(h,a);function n(r){Object.defineProperty(h,t.d[r].nm,{get:ExpressionPropertyInterface(e.d.dataProps[r].p)})}var o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n(i),e.d.dataProps[i].p.setGroupProperty(s);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",a)),e.o.setGroupProperty(PropertyInterface("Opacity",a)),e.w.setGroupProperty(PropertyInterface("Stroke Width",a)),l}function n(t,e,r){function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:null}var a=propertyGroupFactory(i,r);return i.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",a)),e.e.setGroupProperty(PropertyInterface("End",a)),e.o.setGroupProperty(PropertyInterface("Offset",a)),i.propertyIndex=t.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),i.mn=t.mn,i}function o(t,e,r){function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:null}var a=propertyGroupFactory(i,r);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",a)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",a)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",a)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",a)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",a)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",a)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",a))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",a)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i.propertyGroup=r,i}function h(t,e,r){function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:null}var a=propertyGroupFactory(i,r);i.propertyIndex=t.ix;var s="tm"===e.sh.ty?e.sh.prop:e.sh;return s.s.setGroupProperty(PropertyInterface("Size",a)),s.p.setGroupProperty(PropertyInterface("Position",a)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(s.s)},position:{get:ExpressionPropertyInterface(s.p)},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:null:i.innerRadius}var a=propertyGroupFactory(i,r),s="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,s.or.setGroupProperty(PropertyInterface("Outer Radius",a)),s.os.setGroupProperty(PropertyInterface("Outer Roundness",a)),s.pt.setGroupProperty(PropertyInterface("Points",a)),s.p.setGroupProperty(PropertyInterface("Position",a)),s.r.setGroupProperty(PropertyInterface("Rotation",a)),t.ir&&(s.ir.setGroupProperty(PropertyInterface("Inner Radius",a)),s.is.setGroupProperty(PropertyInterface("Inner Roundness",a))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(s.p)},rotation:{get:ExpressionPropertyInterface(s.r)},points:{get:ExpressionPropertyInterface(s.pt)},outerRadius:{get:ExpressionPropertyInterface(s.or)},outerRoundness:{get:ExpressionPropertyInterface(s.os)},innerRadius:{get:ExpressionPropertyInterface(s.ir)},innerRoundness:{get:ExpressionPropertyInterface(s.is)},_name:{value:t.nm}}),i.mn=t.mn,i}function p(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:null}var a=propertyGroupFactory(i,r),s="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,s.p.setGroupProperty(PropertyInterface("Position",a)),s.s.setGroupProperty(PropertyInterface("Size",a)),s.r.setGroupProperty(PropertyInterface("Rotation",a)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(s.p)},roundness:{get:ExpressionPropertyInterface(s.r)},size:{get:ExpressionPropertyInterface(s.s)},_name:{value:t.nm}}),i.mn=t.mn,i}function f(t,e,r){function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:null}var a=propertyGroupFactory(i,r),s=e;return i.propertyIndex=t.ix,s.rd.setGroupProperty(PropertyInterface("Radius",a)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(s.rd)},_name:{value:t.nm}}),i.mn=t.mn,i}function m(t,e,r){function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:null}var a=propertyGroupFactory(i,r),s=e;return i.propertyIndex=t.ix,s.c.setGroupProperty(PropertyInterface("Copies",a)),s.o.setGroupProperty(PropertyInterface("Offset",a)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(s.c)},offset:{get:ExpressionPropertyInterface(s.o)},_name:{value:t.nm}}),i.mn=t.mn,i}return function(e,r,i){var a;function s(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:a[t-1];for(var e=0,r=a.length;e<r;){if(a[e]._name===t)return a[e];e+=1}return null}return s.propertyGroup=propertyGroupFactory(s,(function(){return i})),a=t(e,r,s.propertyGroup),s.numProperties=a.length,s._name="Contents",s}}(),TextExpressionInterface=function(t){var e,r;function i(t){return"ADBE Text Document"===t?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==e&&(t.textProperty.currentData.t=e,(r=new String(i)).value=i||new String(i)),r}}),i},getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var a,s=i.length;for(r=0;r<s;r+=1)a=new GroupEffect(i[r],e),this.effectElements.push(a)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function _typeof$2(t){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,a=this.data.ef.length,s=this.data.ef;for(r=0;r<a;r+=1){switch(i=null,s[r].ty){case 0:i=new SliderEffect(s[r],e,this);break;case 1:i=new AngleEffect(s[r],e,this);break;case 2:i=new ColorEffect(s[r],e,this);break;case 3:i=new PointEffect(s[r],e,this);break;case 4:case 7:i=new CheckboxEffect(s[r],e,this);break;case 10:i=new LayerIndexEffect(s[r],e,this);break;case 11:i=new MaskIndexEffect(s[r],e,this);break;case 5:i=new EffectsManager(s[r],e,this);break;default:i=new NoValueEffect(s[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var FootageInterface=(dataInterfaceFactory=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",r=t.getFootageData();function i(t){if(r[t])return e=t,"object"===_typeof$2(r=r[t])?i:r;var a=t.indexOf(e);if(-1!==a){var s=parseInt(t.substr(a+e.length),10);return"object"===_typeof$2(r=r[s])?i:r}return""}return function(){return e="",r=t.getFootageData(),i}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory;function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,a,s=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(g="mask",v="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),a=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:a,lastPath:""},s.appendChild(a);else{var b;if(d+=1,a.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(g="mask",v="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),s.appendChild(p),a.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):(f=null,m=null),this.storedData[i]={elem:a,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(u[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+d),S.appendChild(a),s.appendChild(S),P.setAttribute("mask","url("+getLocationHref()+"#"+y+"_"+d+")"),u.length=0,u.push(P)}else u.push(a);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);d>0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<a;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,a=this.layers,s=0,n=a.length;s<n;)a[s].ind==e&&(i[s]&&!0!==i[s]?(r.push(i[s]),i[s].setAsParent(),void 0!==a[s].parent?this.buildElementParenting(t,a[s].parent,r):t.setHierarchy(r)):(this.buildItem(s),this.addPendingElement(t))),s+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&e.splice(0,0,a.finalTransform),a=a.comp):i=!1;var s,n=e.length;for(r=0;r<n;r+=1)s=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-s[0],t[1]-s[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,a,s=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&a>1&&(s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==s){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+s:s),r.elem.setAttribute("d",n)),r.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var r=createNS("filter");r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%"));return r},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,a=createNS("feMerge");t.appendChild(a),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),a.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),a.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var a=createNS("feFuncR");a.setAttribute("type","table"),i.appendChild(a),this.feFuncR=a;var s=createNS("feFuncG");s.setAttribute("type","table"),i.appendChild(s),this.feFuncG=s;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var a=createNS("feOffset");a.setAttribute("dx","25"),a.setAttribute("dy","0"),a.setAttribute("in","drop_shadow_1"),a.setAttribute("result","drop_shadow_2"),this.feOffset=a,t.appendChild(a);var s=createNS("feFlood");s.setAttribute("flood-color","#00ff00"),s.setAttribute("flood-opacity","1"),s.setAttribute("result","drop_shadow_3"),this.feFlood=s,t.appendChild(s);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var s=createNS("mask"),n=createElementID();s.setAttribute("id",n),s.setAttribute("mask-type","alpha"),s.appendChild(e),this.elem.globalData.defs.appendChild(s);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+n+")");a[0];)o.appendChild(a[0]);this.elem.layerElement.appendChild(o),this.masker=s,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,a=this.paths.length;for(e=0;e<a;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var s;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();s="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)s+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";s+="0 "+10*h+" 0 0"}else s="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",s)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,a=i[0]+" "+r[0]+" "+e[0],s=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",s),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,a){for(var s,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=a-i,c=e-t;o<=256;)n=(s=o/256)<=h?c<0?a:i:s>=l?c<0?i:a:i+m*Math.pow((s-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,a=r*Math.cos(i),s=r*Math.sin(i);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",s)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,a=r.children,s=0,n=a.length;s<n&&a[s]!==t.layerElement;)s+=1;s<=n-2&&(i=a[s+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var a=t.globalData.defs;a.appendChild(i);var s=createNS("symbol");s.setAttribute("id",r),this.replaceInParent(e,r),s.appendChild(e.layerElement),a.appendChild(s);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,a=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+a);var s=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",s)}};var registeredEffects={};function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,a=createElementID(),s=filtersFactory.createFilter(a,!0),n=0;for(this.filters=[],e=0;e<i;e+=1){r=null;var o=t.data.ef[e].ty;if(registeredEffects[o])r=new(0,registeredEffects[o].effect)(s,t.effectsManager.effectElements[e],t),registeredEffects[o].countsAsEffect&&(n+=1);20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(s,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(s,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(s,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(s,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(s,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(s,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(s,t.effectsManager.effectElements[e])),r&&this.filters.push(r)}n&&(t.globalData.defs.appendChild(s),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+a+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),i=a,this.globalData.defs.appendChild(a),featureSupport.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,a.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type","alpha");var n=createNS("g");s.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(s.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(s)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,a=t.length;i<a;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var a;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var s,n=e.length||0;for(a=0;a<n;a+=1)s=PropertyFactory.getProp(t,e[a].v,0,0,this),this.k=s.k||this.k,this.dataProps[a]={n:e[a].n,p:s};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(Math.abs(t[4*r]-t[4*e+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,a=4*this.data.p;for(e=0;e<a;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var a,s,n,o=[];for(n=4*e.g.p,s=0;s<n;s+=4)a=createNS("stop"),i.appendChild(a),o.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,a,s=createNS("mask"),n=createNS("path");s.appendChild(n);var o=createElementID(),h=createElementID();s.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<a;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=s,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(0===e)return"";var a,s=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(a=1;a<e;a+=1)h+=" C"+i.applyToPointStringified(s[a-1][0],s[a-1][1])+" "+i.applyToPointStringified(n[a][0],n[a][1])+" "+i.applyToPointStringified(o[a][0],o[a][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(s[a-1][0],s[a-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function r(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(){}function a(r,i,a){var s,n,o,h,l,p,f,m,c,d,u,y=i.styles.length,g=i.lvl;for(p=0;p<y;p+=1){if(h=i.sh._mdf||a,i.styles[p].lvl<g){for(m=e.reset(),d=g-i.styles[p].lvl,u=i.transformers.length-1;!h&&d>0;)h=i.transformers[u].mProps._mdf||h,d-=1,u-=1;if(h)for(d=g-i.styles[p].lvl,u=i.transformers.length-1;d>0;)c=i.transformers[u].mProps.v.props,m.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),d-=1,u-=1}else m=t;if(n=(f=i.sh.paths)._length,h){for(o="",s=0;s<n;s+=1)(l=f.shapes[s])&&l._length&&(o+=buildShapeString(l,l._length,l.c,m));i.caches[p]=o}else o=i.caches[p];i.styles[p].d+=!0===r.hd?"":o,i.styles[p]._mdf=h||i.styles[p]._mdf}}function s(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,r){o(t,e,r),h(t,e,r)}function o(t,e,r){var i,a,s,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(s=i.length,a=0;a<s;a+=1)(n=i[a]).setAttribute("offset",u[4*a]+"%"),n.setAttribute("stop-color","rgb("+u[4*a+1]+","+u[4*a+2]+","+u[4*a+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(s=(i=e.g._collapsable?e.cst:e.ost).length,a=0;a<s;a+=1)n=i[a],e.g._collapsable||n.setAttribute("offset",y[2*a]+"%"),n.setAttribute("stop-opacity",y[2*a+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],S=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",S),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",S))}}function h(t,e,r){var i=e.style,a=e.d;a&&(a._mdf||r)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return s;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return a;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,a,s){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=a,this.p=s,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,a=this.shapes.length,s=this.stylesList.length,n=[],o=!1;for(r=0;r<s;r+=1){for(i=this.stylesList[r],o=!1,n.length=0,t=0;t<a;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),a=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),a.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else"no"===t.ty&&(r=new SVGNoStyleData(this,t,i));return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,a,s,n){var o,h,l,p,f,m,c=[].concat(s),d=t.length-1,u=[],y=[];for(o=d;o>=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,a+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,a)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,a,s){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==a&&(this.m=a,this._mdf.m=!0,n=!0),!s.length||this.p[0]===s[0]&&this.p[1]===s[1]&&this.p[4]===s[4]&&this.p[5]===s[5]&&this.p[12]===s[12]&&this.p[13]===s[13]||(this.p=s,this._mdf.p=!0,n=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,s=t||this.data.d.k[this.keysIndex].s;for(i=0;i<a;i+=1)s=r!==this.keysIndex?this.effectsSequence[i](s,s.t):this.effectsSequence[i](this.currentData,s.t);e!==s&&this.setCurrentData(s),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],a=0,s=t.length,n=!1;a<s;)e=t.charCodeAt(a),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(a):e>=55296&&e<=56319?(r=t.charCodeAt(a+1))>=56320&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):e>56319?(r=t.charCodeAt(a+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,a,s,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,S=getFontProperties(b);t.fWeight=S.weight,t.fStyle=S.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var x,E=t.tr/1e3*t.finalSize;if(t.sz)for(var _,A,C=!0,T=t.sz[0],k=t.sz[1];C;){_=0,g=0,r=(A=this.buildFinalText(t.t)).length,E=t.tr/1e3*t.finalSize;var D=-1;for(e=0;e<r;e+=1)x=A[e].charCodeAt(0),i=!1," "===A[e]?D=e:13!==x&&3!==x||(g=0,i=!0,_+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(A[e],b.fStyle,b.fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(A[e],t.f,t.finalSize),g+P>T&&" "!==A[e]?(-1===D?r+=1:e=D,_+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,D===e?1:0,"\r"),D=-1,g=0):(g+=P,g+=E);_+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&k<_?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,C=!1)}g=-E,P=0;var M,F=0;for(e=0;e<r;e+=1)if(i=!1,13===(x=(M=t.finalText[e]).charCodeAt(0))||3===x?(F=0,y.push(g),v=g>v?g:v,g=-2*E,a="",i=!0,u+=1):a=M,h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(a,t.f,t.finalSize)," "===M?F+=P+E:(g+=P+E+F,F=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==m){if(c+=P,""===a||" "===a||e===r-1){for(""!==a&&" "!==a||(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===a||e===r-1){for(""===a&&(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var I,w,V,R,L=l.a;n=L.length;var G=[];for(s=0;s<n;s+=1){for((I=L[s]).a.sc&&(t.strokeColorAnim=!0),I.a.sw&&(t.strokeWidthAnim=!0),(I.a.fc||I.a.fh||I.a.fs||I.a.fb)&&(t.fillColorAnim=!0),R=0,V=I.s.b,e=0;e<r;e+=1)(w=p[e]).anIndexes[s]=R,(1==V&&""!==w.val||2==V&&""!==w.val&&" "!==w.val||3==V&&(w.n||" "==w.val||e==r-1)||4==V&&(w.n||e==r-1))&&(1===I.s.rn&&G.push(R),R+=1);l.a[s].s.totalChars=R;var B,N=-1;if(1===I.s.rn)for(e=0;e<r;e+=1)N!=(w=p[e]).anIndexes[s]&&(N=w.anIndexes[s],B=G.splice(Math.floor(Math.random()*G.length),1)[0]),w.anIndexes[s]=B}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var a=0,s=0,n=1,o=1;this.ne.v>0?a=this.ne.v/100:s=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(a,s,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===m)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,d=-c/2+(i=e(t(0,i+.5-p),f-p)),u=c/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===m?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=r(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l<g?l=0:(l=(l-g)/y)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,a=this.e.v/e+r;if(i>a){var s=i;i=a,a=s}this.finalS=i,this.finalE=a}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},a=PropertyFactory.getProp,s=e.a;this.a={r:s.r?a(t,s.r,0,degToRads,r):i,rx:s.rx?a(t,s.rx,0,degToRads,r):i,ry:s.ry?a(t,s.ry,0,degToRads,r):i,sk:s.sk?a(t,s.sk,0,degToRads,r):i,sa:s.sa?a(t,s.sa,0,degToRads,r):i,s:s.s?a(t,s.s,1,.01,r):i,a:s.a?a(t,s.a,1,0,r):i,o:s.o?a(t,s.o,0,.01,r):i,p:s.p?a(t,s.p,1,0,r):i,sw:s.sw?a(t,s.sw,0,0,r):i,sc:s.sc?a(t,s.sc,1,0,r):i,fc:s.fc?a(t,s.fc,1,0,r):i,fh:s.fh?a(t,s.fh,0,0,r):i,fs:s.fs?a(t,s.fs,0,.01,r):i,fb:s.fb?a(t,s.fb,0,.01,r):i,t:s.t?a(t,s.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,a,s,n,o,h,l,p,f,m,c,d,u,y,g,v,b,P,S=this._moreOptions.alignment.v,x=this._animatorsData,E=this._textData,_=this.mHelper,A=this._renderType,C=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var k,D=P.v;for(this._pathData.r.v&&(D=D.reverse()),n={tLength:0,segments:[]},s=D._length-1,g=0,a=0;a<s;a+=1)k=bez.buildBezierData(D.v[a],D.v[a+1],[D.o[a][0]-D.v[a][0],D.o[a][1]-D.v[a][1]],[D.i[a+1][0]-D.v[a+1][0],D.i[a+1][1]-D.v[a+1][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength;a=s,P.v.c&&(k=bez.buildBezierData(D.v[a],D.v[0],[D.o[a][0]-D.v[a][0],D.o[a][1]-D.v[a][1]],[D.i[0][0]-D.v[0][0],D.i[0][1]-D.v[0][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=0,f=1,l=0,p=!0,u=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}s=T.length,r=0,i=0;var M,F,I,w,V,R=1.2*t.finalSize*.714,L=!0;I=x.length;var G,B,N,O,z,j,H,q,W,$,Y,X,K=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,at=2===t.j?-.5:-1,st=0,nt=!0;for(a=0;a<s;a+=1)if(T[a].n){for(rt&&(rt+=it);st<a;)T[st].animatorJustifyOffset=rt,st+=1;rt=0,nt=!0}else{for(F=0;F<I;F+=1)(M=x[F].a).t.propType&&(nt&&2===t.j&&(it+=M.t.v*at),(V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars)).length?rt+=M.t.v*V[0]*at:rt+=M.t.v*V*at);nt=!1}for(rt&&(rt+=it);st<a;)T[st].animatorJustifyOffset=rt,st+=1}for(a=0;a<s;a+=1){if(_.reset(),O=1,T[a].n)r=0,i+=t.yOffset,i+=L?1:0,o=J,L=!1,this._hasMaskedPath&&(f=U,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),tt="",Y="",W="",X="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[a].line){switch(t.j){case 1:o+=g-t.lineWidths[T[a].line];break;case 2:o+=(g-t.lineWidths[T[a].line])/2}Q=T[a].line}K!==T[a].ind&&(T[K]&&(o+=T[K].extra),o+=T[a].an/2,K=T[a].ind),o+=S[0]*T[a].an*.005;var ot=0;for(F=0;F<I;F+=1)(M=x[F].a).p.propType&&((V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars)).length?ot+=M.p.v[0]*V[0]:ot+=M.p.v[0]*V),M.a.propType&&((V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars)).length?ot+=M.a.v[0]*V[0]:ot+=M.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(s-1),o+=this._pathData.f.v);p;)l+y>=o+ot||!d?(v=(o+ot-l)/h.partialLength,B=c.point[0]+(h.point[0]-c.point[0])*v,N=c.point[1]+(h.point[1]-c.point[1])*v,_.translate(-S[0]*T[a].an*.005,-S[1]*R*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[m+=1]?d=u[m].points:P.v.c?(f=0,d=u[m=0].points):(l-=h.partialLength,d=null)),d&&(c=h,y=(h=d[f]).partialLength));G=T[a].an/2-T[a].add,_.translate(-G,0,0)}else G=T[a].an/2-T[a].add,_.translate(-G,0,0),_.translate(-S[0]*T[a].an*.005,-S[1]*R*.01,0);for(F=0;F<I;F+=1)(M=x[F].a).t.propType&&(V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=M.t.v*V[0]:o+=M.t.v*V:V.length?r+=M.t.v*V[0]:r+=M.t.v*V));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(z=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(H=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<I;F+=1)(M=x[F].a).a.propType&&((V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars)).length?_.translate(-M.a.v[0]*V[0],-M.a.v[1]*V[1],M.a.v[2]*V[2]):_.translate(-M.a.v[0]*V,-M.a.v[1]*V,M.a.v[2]*V));for(F=0;F<I;F+=1)(M=x[F].a).s.propType&&((V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars)).length?_.scale(1+(M.s.v[0]-1)*V[0],1+(M.s.v[1]-1)*V[1],1):_.scale(1+(M.s.v[0]-1)*V,1+(M.s.v[1]-1)*V,1));for(F=0;F<I;F+=1){if(M=x[F].a,V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars),M.sk.propType&&(V.length?_.skewFromAxis(-M.sk.v*V[0],M.sa.v*V[1]):_.skewFromAxis(-M.sk.v*V,M.sa.v*V)),M.r.propType&&(V.length?_.rotateZ(-M.r.v*V[2]):_.rotateZ(-M.r.v*V)),M.ry.propType&&(V.length?_.rotateY(M.ry.v*V[1]):_.rotateY(M.ry.v*V)),M.rx.propType&&(V.length?_.rotateX(M.rx.v*V[0]):_.rotateX(M.rx.v*V)),M.o.propType&&(V.length?O+=(M.o.v*V[0]-O)*V[0]:O+=(M.o.v*V-O)*V),t.strokeWidthAnim&&M.sw.propType&&(V.length?j+=M.sw.v*V[0]:j+=M.sw.v*V),t.strokeColorAnim&&M.sc.propType)for(q=0;q<3;q+=1)V.length?z[q]+=(M.sc.v[q]-z[q])*V[0]:z[q]+=(M.sc.v[q]-z[q])*V;if(t.fillColorAnim&&t.fc){if(M.fc.propType)for(q=0;q<3;q+=1)V.length?H[q]+=(M.fc.v[q]-H[q])*V[0]:H[q]+=(M.fc.v[q]-H[q])*V;M.fh.propType&&(H=V.length?addHueToRGB(H,M.fh.v*V[0]):addHueToRGB(H,M.fh.v*V)),M.fs.propType&&(H=V.length?addSaturationToRGB(H,M.fs.v*V[0]):addSaturationToRGB(H,M.fs.v*V)),M.fb.propType&&(H=V.length?addBrightnessToRGB(H,M.fb.v*V[0]):addBrightnessToRGB(H,M.fb.v*V))}}for(F=0;F<I;F+=1)(M=x[F].a).p.propType&&(V=x[F].s.getMult(T[a].anIndexes[F],E.a[F].s.totalChars),this._hasMaskedPath?V.length?_.translate(0,M.p.v[1]*V[0],-M.p.v[2]*V[1]):_.translate(0,M.p.v[1]*V,-M.p.v[2]*V):V.length?_.translate(M.p.v[0]*V[0],M.p.v[1]*V[1],-M.p.v[2]*V[2]):_.translate(M.p.v[0]*V,M.p.v[1]*V,-M.p.v[2]*V));if(t.strokeWidthAnim&&(W=j<0?0:j),t.strokeColorAnim&&($="rgb("+Math.round(255*z[0])+","+Math.round(255*z[1])+","+Math.round(255*z[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),this._hasMaskedPath){if(_.translate(0,-t.ls),_.translate(0,S[1]*R*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),_.rotate(-ht*Math.PI/180)}_.translate(B,N,0),o-=S[0]*T[a].an*.005,T[a+1]&&K!==T[a+1].ind&&(o+=T[a].an/2,o+=.001*t.tr*t.finalSize)}else{switch(_.translate(r,i,0),t.ps&&_.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:_.translate(T[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[a].line]),0,0);break;case 2:_.translate(T[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[a].line])/2,0,0)}_.translate(0,-t.ls),_.translate(G,0,0),_.translate(S[0]*T[a].an*.005,S[1]*R*.01,0),r+=T[a].l+.001*t.tr*t.finalSize}"html"===A?tt=_.toCSS():"svg"===A?tt=_.to2dCSS():et=[_.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]],X=O}C<=a?(w=new LetterProps(X,W,$,Y,tt,et),this.renderedLetters.push(w),C+=1,this.lettersChangedFlag=!0):(w=this.renderedLetters[a],this.lettersChangedFlag=w.update(X,W,$,Y,tt,et)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,a=e.length,s="";for(r=0;r<a;r+=1)"sh"===e[r].ty&&(i=e[r].ks.k,s+=buildShapeString(i,i.i.length,!0,t));return s},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,a,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),a=createElementID();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),r+=a}if(e&&e.description){var s=createNS("desc"),n=createElementID();s.setAttribute("id",n),s.textContent=e.description,this.svgElement.appendChild(s),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVEffects(){}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,a=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(a=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=a,a&&this.element.addRenderableComponent(this)}function CVBaseElement(){}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var a,s=4;"rc"===e.ty?s=5:"el"===e.ty?s=6:"sr"===e.ty&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var n,o=r.length;for(a=0;a<o;a+=1)r[a].closed||(n={transforms:i.addTransformSequence(r[a].transforms),trNodes:[]},this.styledShapes.push(n),r[a].elements.push(n))}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CanvasRendererBase(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],a="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(a),a=""):a+=t[e],e+=1;return i.push(a),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var a=r.fWeight,s=r.fStyle;this.layerElement.setAttribute("font-style",s),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,p=this.data.singleShape,f=0,m=0,c=!0,d=.001*r.tr*r.finalSize;if(!p||h||r.sz){var u,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!p||0===t){if(n=y>t?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(r.finalSize/100,r.finalSize/100),p&&(o[t].n&&(f=-d,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=u.data),v=new SVGShapeElement(b,this.globalData,this)}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var P=this.textContainer,S="start";switch(r.j){case 1:S="end";break;case 2:S="middle";break;default:S="start"}P.setAttribute("text-anchor",S),P.setAttribute("letter-spacing",d);var x=this.buildTextContents(r.finalText);for(e=x.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||createNS("tspan")).textContent=x[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",P.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=r.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,a,s=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(r=s[t],i=this.textSpans[t].span,(a=this.textSpans[t].glyph)&&a.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a=createElementID();r.setAttribute("id",a),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var a=this.sequences[i];return a||(a={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=a,this.sequenceList.push(a)),a},processSequence:function(t,e){for(var r,i=0,a=t.transforms.length,s=e;i<a&&!e;){if(t.transforms[i].transform.mProps._mdf){s=!0;break}i+=1}if(s)for(t.finalTransform.reset(),i=a-1;i>=0;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=s},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,a=this.element.finalTransform.mat,s=this.element.canvasContext,n=this.masksProperties.length;for(s.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(s.moveTo(0,0),s.lineTo(this.element.globalData.compSize.w,0),s.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),s.lineTo(0,this.element.globalData.compSize.h),s.lineTo(0,0)),i=this.viewData[t].v,e=a.applyToPointArray(i.v[0][0],i.v[0][1],0),s.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=a.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),s.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=a.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),s.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),s.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var a=new DashProperty(this,t.d,"canvas",this);i.d=a,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,a){var s,n,o,h,l,p,f=t.length-1,m=[],c=[],d=[].concat(a);for(s=f;s>=0;s-=1){if((h=this.searchProcessedElement(t[s]))?e[s]=r[h-1]:t[s]._shouldRender=i,"fl"===t[s].ty||"st"===t[s].ty||"gf"===t[s].ty||"gs"===t[s].ty)h?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],d),m.push(e[s].style);else if("gr"===t[s].ty){if(h)for(o=e[s].it.length,n=0;n<o;n+=1)e[s].prevViewData[n]=e[s].it[n];else e[s]=this.createGroupElement(t[s]);this.searchShapes(t[s].it,e[s].it,e[s].prevViewData,i,d)}else"tr"===t[s].ty?(h||(p=this.createTransformElement(t[s]),e[s]=p),d.push(e[s]),this.addTransformToStyleList(e[s])):"sh"===t[s].ty||"rc"===t[s].ty||"el"===t[s].ty||"sr"===t[s].ty?h||(e[s]=this.createShapeElement(t[s])):"tm"===t[s].ty||"rd"===t[s].ty||"pb"===t[s].ty?(h?(l=e[s]).closed=!1:((l=ShapeModifiers.getModifier(t[s].ty)).init(this,t[s]),e[s]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[s].ty&&(h?(l=e[s]).closed=!0:(l=ShapeModifiers.getModifier(t[s].ty),e[s]=l,l.init(this,t,s,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[s],s+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),f=c.length,s=0;s<f;s+=1)c[s].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,a,s,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),s=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=s.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),a=(n=s[e].trNodes).length,i=0;i<a;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var a,s;for(s=t,a=e.length-1;a>=0;a-=1)"tr"===e[a].ty?(s=r[a].transform,this.renderShapeTransform(t,s)):"sh"===e[a].ty||"el"===e[a].ty||"rc"===e[a].ty||"sr"===e[a].ty?this.renderPath(e[a],r[a]):"fl"===e[a].ty?this.renderFill(e[a],r[a],s):"st"===e[a].ty?this.renderStroke(e[a],r[a],s):"gf"===e[a].ty||"gs"===e[a].ty?this.renderGradientFill(e[a],r[a],s):"gr"===e[a].ty?this.renderShape(s,e[a].it,r[a].it):e[a].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,a,s=t.trNodes,n=e.paths,o=n._length;s.length=0;var h=t.transforms.finalTransform;for(a=0;a<o;a+=1){var l=n.shapes[a];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&s.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),s.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&s.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(s.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),s.push({t:"z"}))}}t.trNodes=s}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,a=e.style;if(!a.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var s,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;f>=1?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(s=0;s<u;s+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*s+1]),i.addColorStop(y[4*s]/100,"rgba("+y[4*s+1]+","+y[4*s+2]+","+y[4*s+3]+","+g+")");a.grd=i}a.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,a=e.d;a&&(a._mdf||this._isFirstFrame)&&(i.da=a.dashArray,i.do=a.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,a,s,n,o,h,l,p,f,m,c,d,u=this.globalData.fontManager.getFontByName(t.f),y=t.l,g=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,P=0,S=0,x=!0,E=0;for(i=0;i<a;i+=1){n=(s=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&s.data||{},g.reset(),v&&y[i].n&&(P=-b,S+=t.yOffset,S+=x?1:0,x=!1),f=(l=n.shapes?n.shapes[0].it:[]).length,g.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,g,y[i].line,P,S),c=createSizedArray(f-1);var _=0;for(p=0;p<f;p+=1)if("sh"===l[p].ty){for(h=l[p].ks.k.i.length,m=l[p].ks.k,d=[],o=1;o<h;o+=1)1===o&&d.push(g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[o][0],m.i[o][1],0),g.applyToY(m.i[o][0],m.i[o][1],0),g.applyToX(m.v[o][0],m.v[o][1],0),g.applyToY(m.v[o][0],m.v[o][1],0));d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[0][0],m.i[0][1],0),g.applyToY(m.i[0][0],m.i[0][1],0),g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),c[_]=d,_+=1}v&&(P+=y[i].l,P+=b),this.textSpans[E]?this.textSpans[E].elem=c:this.textSpans[E]={elem:c},E+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,a,s,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,f,m=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?m!==o.fc&&(m=o.fc,n.fillStyle=o.fc):m!==this.values.fill&&(m=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(s=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),a=2;a<s;a+=6)this.globalData.canvasContext.bezierCurveTo(f[a],f[a+1],f[a+2],f[a+3],f[a+4],f[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(s=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),a=2;a<s;a+=6)this.globalData.canvasContext.bezierCurveTo(f[a],f[a+1],f[a+2],f[a+3],f[a+4],f[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),a=this.img.width,s=this.img.height,n=a/s,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;n>o&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(r=s)*o:r=(e=a)/o,i.drawImage(this.img,(a-e)/2,(s-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var a=this.renderConfig.preserveAspectRatio.split(" "),s=a[1]||"meet",n=a[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,(i=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===s||i<r&&"slice"===s?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===s||i>r&&"slice"===s)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===s||i>r&&"slice"===s)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>r&&"meet"===s||i<r&&"slice"===s)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(i>r&&"meet"===s||i<r&&"slice"===s)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},registerRenderer("canvas",CanvasRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier);var Expressions=function(){var t={};return t.initExpressions=function(t){var e=0,r=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&function(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},t}();function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}function seedRandom(t,e){var r,i=this,a=256,s=e.pow(a,6),n=e.pow(2,52),o=2*n,h=255;function l(t){var e,r=t.length,i=this,s=0,n=i.i=i.j=0,o=i.S=[];for(r||(t=[r++]);s<a;)o[s]=s++;for(s=0;s<a;s++)o[s]=o[n=h&n+t[s%r]+(e=o[s])],o[n]=e;i.g=function(t){for(var e,r=0,s=i.i,n=i.j,o=i.S;t--;)e=o[s=h&s+1],r=r*a+o[h&(o[s]=o[n=h&n+e])+(o[n]=e)];return i.i=s,i.j=n,r}}function p(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function f(t,e){var r,i=[],a=_typeof$1(t);if(e&&"object"==a)for(r in t)try{i.push(f(t[r],e-1))}catch(t){}return i.length?i:"string"==a?t:t+"\0"}function m(t,e){for(var r,i=t+"",a=0;a<i.length;)e[h&a]=h&(r^=19*e[h&a])+i.charCodeAt(a++);return c(e)}function c(t){return String.fromCharCode.apply(0,t)}e.seedrandom=function(h,d,u){var y=[],g=m(f((d=!0===d?{entropy:!0}:d||{}).entropy?[h,c(t)]:null===h?function(){try{r;var e=new Uint8Array(a);return(i.crypto||i.msCrypto).getRandomValues(e),c(e)}catch(e){var s=i.navigator,n=s&&s.plugins;return[+new Date,i,n,i.screen,c(t)]}}():h,3),y),v=new l(y),b=function(){for(var t=v.g(6),e=s,r=0;t<n;)t=(t+r)*a,e*=a,r=v.g(1);for(;t>=o;)t/=2,e/=2,r>>>=1;return(t+r)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(d.pass||u||function(t,r,i,a){return a&&(a.S&&p(a,v),t.state=function(){return p(v,{})}),i?(e.random=t,r):t})(b,g,"global"in d?d.global:this==e,d.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,a=[];for(r=0;r<i;r+=1)a[r]=-t[r];return a}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var a=0,s=t.length,n=e.length,o=[];a<s||a<n;)("number"==typeof t[a]||t[a]instanceof Number)&&("number"==typeof e[a]||e[a]instanceof Number)?o[a]=t[a]+e[a]:o[a]=void 0===e[a]?t[a]:t[a]||e[a],a+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var a=0,s=t.length,n=e.length,o=[];a<s||a<n;)("number"==typeof t[a]||t[a]instanceof Number)&&("number"==typeof e[a]||e[a]instanceof Number)?o[a]=t[a]-e[a]:o[a]=void 0===e[a]?t[a]:t[a]||e[a],a+=1;return o}return 0}function mul(t,e){var r,i,a,s=_typeof(t),n=_typeof(e);if(isNumerable(s,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(a=t.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t[i]*e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(a=e.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,a,s=_typeof(t),n=_typeof(e);if(isNumerable(s,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(a=t.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t[i]/e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(a=e.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),a=0;for(r=0;r<i;r+=1)a+=Math.pow(e[r]-t[r],2);return Math.sqrt(a)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],a=t[1],s=t[2],n=Math.max(i,a,s),o=Math.min(i,a,s),h=(n+o)/2;if(n===o)e=0,r=0;else{var l=n-o;switch(r=h>.5?l/(2-n-o):l/(n+o),n){case i:e=(a-s)/l+(a<s?6:0);break;case a:e=(s-i)/l+2;break;case s:e=(i-a)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,a=t[0],s=t[1],n=t[2];if(0===s)e=n,i=n,r=n;else{var o=n<.5?n*(1+s):n+s-n*s,h=2*n-o;e=hue2rgb(h,o,a+1/3),r=hue2rgb(h,o,a),i=hue2rgb(h,o,a-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,a){if(void 0!==i&&void 0!==a||(i=e,a=r,e=0,r=1),r<e){var s=r;r=e,e=s}if(t<=e)return i;if(t>=r)return a;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(a-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(a[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var a=createTypedArray("float32",i),s=BMMath.random();for(r=0;r<i;r+=1)a[r]=t[r]+s*(e[r]-t[r]);return a}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var a,s=t.length,n=shapePool.newElement();n.setPathData(!!i,s);var o,h,l=[0,0];for(a=0;a<s;a+=1)o=e&&e[a]?e[a]:l,h=r&&r[a]?r[a]:l,n.setTripleAt(t[a][0],t[a][1],h[0]+t[a][0],h[1]+t[a][1],o[0]+t[a][0],o[1]+t[a][1],a,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,a=this.pv.length?this.pv.length:1,s=createTypedArray("float32",a);var n=Math.floor(5*time);for(r=0,i=0;r<n;){for(i=0;i<a;i+=1)s[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",a);if(a>1){for(i=0;i<a;i+=1)l[i]=this.pv[i]+s[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+s[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,a){return applyEase(easeOutBez,t,e,r,i,a)}function easeIn(t,e,r,i,a){return applyEase(easeInBez,t,e,r,i,a)}function ease(t,e,r,i,a){return applyEase(easeInOutBez,t,e,r,i,a)}function applyEase(t,e,r,i,a,s){void 0===a?(a=r,s=i):e=(e-r)/(i-r),e>1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(a)){var o,h=a.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(s[o]-a[o])*n+a[o];return l}return(s-a)*n+a}function nearestKey(t){var e,r,i,a=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<a-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var s={};return s.index=r,s.time=i/elem.comp.globalData.frameRate,s}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var a=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=a.length,r=0;r<i;r+=1)e[r]=a[r],e.value[r]=a[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var a;for(a=0;a<e.length;a+=1)i+=Math.pow(r[a]-e[a],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=-.001,a=this.getValueAtTime(t),s=this.getValueAtTime(t+i);if(a.length)for(e=createTypedArray("float32",a.length),r=0;r<a.length;r+=1)e[r]=(s[r]-a[r])/i;else e=(s-a)/i;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,a,s,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?a=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(a=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-a)/i)%2!=0)return this.getValueAtTime((i-(h-a)%i+a)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(a/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-a)%i+a)/this.comp.globalData.frameRate,0),d=Math.floor((h-a)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,s=0;s<n;s+=1)o[s]=(m[s]-f[s])*d+c[s];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,s=0;s<n;s+=1)o[s]=u[s]+(u[s]-y[s])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-a)%i+a)/this.comp.globalData.frameRate,0)}function e(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,a,s,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(h>=p)return this.pv;if(r?a=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(a=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(a/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,s=0;s<n;s+=1)o[s]=c[s]-(m[s]-f[s])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,s=0;s<n;s+=1)o[s]=u[s]+(u[s]-y[s])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function r(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,a=this.comp.renderedFrame/this.comp.globalData.frameRate,s=a-t,n=e>1?(a+t-s)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(s+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}function i(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var a=this.sk.getValueAtTime(t),s=this.sa.getValueAtTime(t);e.skewFromAxis(-a*this.sk.mult,s*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}function a(){return this.v.clone(new Matrix)}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var n=s(t,e,r);return n.dynamicProperties.length?n.getValueAtTime=i.bind(n):n.getValueAtTime=a.bind(n),n.setGroupProperty=expressionHelpers.setGroupProperty,n};var n=PropertyFactory.getProp;PropertyFactory.getProp=function(i,a,s,o,h){var l=n(i,a,s,o,h);l.kf?l.getValueAtTime=expressionHelpers.getValueAtTime.bind(l):l.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(l),l.setGroupProperty=expressionHelpers.setGroupProperty,l.loopOut=t,l.loopIn=e,l.smooth=r,l.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(l),l.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(l),l.numKeys=1===a.a?a.k.length:0,l.propertyIndex=a.ix;var p=0;return 0!==s&&(p=createTypedArray("float32",1===a.a?a.k[0].s.length:a.k.length)),l._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:p},expressionHelpers.searchExpressions(i,a,l),l.k&&h.addDynamicProperty(l),l};var o=ShapePropertyFactory.getConstructorFunction(),h=ShapePropertyFactory.getKeyframedConstructorFunction();function l(){}l.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var a=i._length,s=i[t],n=i.v,o=createSizedArray(a);for(r=0;r<a;r+=1)o[r]="i"===t||"o"===t?[s[r][0]-n[r][0],s[r][1]-n[r][1]]:[s[r][0],s[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,a=this._segmentsLength,s=a.lengths,n=a.totalLength*t,o=0,h=s.length,l=0;o<h;){if(l+s[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/s[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,s[o]);break}l+=s[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),a=this.pointOnPath(t+.001,e),s=a[0]-i[0],n=a[1]-i[1],o=Math.sqrt(Math.pow(s,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[s/o,n/o]:[-n/o,s/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},h.prototype.initiateExpression=ExpressionManager.initiateExpression;var p=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,a){var s=p(t,e,r,i,a);return s.propertyIndex=e.ix,s.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,s):4===r&&expressionHelpers.searchExpressions(t,e.ks,s),s.k&&t.addDynamicProperty(s),s}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t!==r){var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}return setExpressionsPlugin(Expressions),initialize$1(),initialize(),lottie}));
diff --git a/build/player/lottie_canvas_worker.js b/build/player/lottie_canvas_worker.js
index c2f7b72..48a60aa 100644
--- a/build/player/lottie_canvas_worker.js
+++ b/build/player/lottie_canvas_worker.js
@@ -10,10 +10,7 @@
         root.bodymovin = root.lottie;
     }
 }((self || {}), function(window) {
-	/* global defaultCurveSegments:writable, roundValues, animationManager, idPrefix:writable */
-/* exported idPrefix, document */
-
-function workerContent() {
+	function workerContent() {
   var localIdCounter = 0;
   var animations = {};
 
@@ -121,1893 +118,590 @@
     createElement: function (type) {
       return createElement('', type);
     },
+    getElementsByTagName: function () {
+      return [];
+    },
   };
   /* eslint-enable */
   var lottieInternal = (function () {
     'use strict';
 
-    /* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+    (typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-var locationHref = '';
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var initialDefaultFrame = -999999;
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var _useWebWorker = false;
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$6(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -2015,4860 +709,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$5(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6876,5562 +1748,6062 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$4(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,
-CVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */
-
-function CanvasRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.renderConfig = {
-    clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
-    context: (config && config.context) || null,
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.renderConfig.dpr = (config && config.dpr) || 1;
-  if (this.animationItem.wrapper) {
-    this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
-  }
-  this.renderedFrame = -1;
-  this.globalData = {
-    frameNum: -1,
-    _mdf: false,
-    renderConfig: this.renderConfig,
-    currentGlobalAlpha: -1,
-  };
-  this.contextData = new CVContextData();
-  this.elements = [];
-  this.pendingElements = [];
-  this.transformMat = new Matrix();
-  this.completeLayers = false;
-  this.rendererType = 'canvas';
-}
-extendPrototype([BaseRenderer], CanvasRenderer);
 
-CanvasRenderer.prototype.createShape = function (data) {
-  return new CVShapeElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createText = function (data) {
-  return new CVTextElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createImage = function (data) {
-  return new CVImageElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createComp = function (data) {
-  return new CVCompElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createSolid = function (data) {
-  return new CVSolidElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-CanvasRenderer.prototype.ctxTransform = function (props) {
-  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
-    return;
-  }
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
-    return;
-  }
-  this.transformMat.cloneFromProps(props);
-  var cProps = this.contextData.cTr.props;
-  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]);
-  // 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]);
-  this.contextData.cTr.cloneFromProps(this.transformMat.props);
-  var trProps = this.contextData.cTr.props;
-  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
-};
-
-CanvasRenderer.prototype.ctxOpacity = function (op) {
-  /* if(op === 1){
-        return;
-    } */
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-    return;
-  }
-  this.contextData.cO *= op < 0 ? 0 : op;
-  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
-    this.canvasContext.globalAlpha = this.contextData.cO;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-  }
-};
-
-CanvasRenderer.prototype.reset = function () {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  this.contextData.reset();
-};
-
-CanvasRenderer.prototype.save = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.save();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.save();
-  }
-  var props = this.contextData.cTr.props;
-  if (this.contextData._length <= this.contextData.cArrPos) {
-    this.contextData.duplicate();
-  }
-  var i;
-  var arr = this.contextData.saved[this.contextData.cArrPos];
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = props[i];
-  }
-  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
-  this.contextData.cArrPos += 1;
-};
-
-CanvasRenderer.prototype.restore = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.restore();
-    this.globalData.blendMode = 'source-over';
-  }
-  this.contextData.cArrPos -= 1;
-  var popped = this.contextData.saved[this.contextData.cArrPos];
-  var i;
-  var arr = this.contextData.cTr.props;
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = popped[i];
-  }
-  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
-  popped = this.contextData.savedOp[this.contextData.cArrPos];
-  this.contextData.cO = popped;
-  if (this.globalData.currentGlobalAlpha !== popped) {
-    this.canvasContext.globalAlpha = popped;
-    this.globalData.currentGlobalAlpha = popped;
-  }
-};
-
-CanvasRenderer.prototype.configAnimation = function (animData) {
-  if (this.animationItem.wrapper) {
-    this.animationItem.container = createTag('canvas');
-    var containerStyle = this.animationItem.container.style;
-    containerStyle.width = '100%';
-    containerStyle.height = '100%';
-    var origin = '0px 0px 0px';
-    containerStyle.transformOrigin = origin;
-    containerStyle.mozTransformOrigin = origin;
-    containerStyle.webkitTransformOrigin = origin;
-    containerStyle['-webkit-transform'] = origin;
-    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
-    this.animationItem.wrapper.appendChild(this.animationItem.container);
-    this.canvasContext = this.animationItem.container.getContext('2d');
-    if (this.renderConfig.className) {
-      this.animationItem.container.setAttribute('class', this.renderConfig.className);
-    }
-    if (this.renderConfig.id) {
-      this.animationItem.container.setAttribute('id', this.renderConfig.id);
-    }
-  } else {
-    this.canvasContext = this.renderConfig.context;
-  }
-  this.data = animData;
-  this.layers = animData.layers;
-  this.transformCanvas = {
-    w: animData.w,
-    h: animData.h,
-    sx: 0,
-    sy: 0,
-    tx: 0,
-    ty: 0,
-  };
-  this.setupGlobalData(animData, document.body);
-  this.globalData.canvasContext = this.canvasContext;
-  this.globalData.renderer = this;
-  this.globalData.isDashed = false;
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.globalData.transformCanvas = this.transformCanvas;
-  this.elements = createSizedArray(animData.layers.length);
-
-  this.updateContainerSize();
-};
-
-CanvasRenderer.prototype.updateContainerSize = function () {
-  this.reset();
-  var elementWidth;
-  var elementHeight;
-  if (this.animationItem.wrapper && this.animationItem.container) {
-    elementWidth = this.animationItem.wrapper.offsetWidth;
-    elementHeight = this.animationItem.wrapper.offsetHeight;
-    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
-    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
-  } else {
-    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
-    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
-  }
-  var elementRel;
-  var animationRel;
-  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
-    var par = this.renderConfig.preserveAspectRatio.split(' ');
-    var fillType = par[1] || 'meet';
-    var pos = par[0] || 'xMidYMid';
-    var xPos = pos.substr(0, 4);
-    var yPos = pos.substr(4);
-    elementRel = elementWidth / elementHeight;
-    animationRel = this.transformCanvas.w / this.transformCanvas.h;
-    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
-      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    } else {
-      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    }
-
-    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
-    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.tx = 0;
-    }
-    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
-    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.ty = 0;
-    }
-  } else if (this.renderConfig.preserveAspectRatio === 'none') {
-    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  } else {
-    this.transformCanvas.sx = this.renderConfig.dpr;
-    this.transformCanvas.sy = this.renderConfig.dpr;
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  }
-  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];
-  /* var i, len = this.elements.length;
-    for(i=0;i<len;i+=1){
-        if(this.elements[i] && this.elements[i].data.ty === 0){
-            this.elements[i].resize(this.globalData.transformCanvas);
-        }
-    } */
-  this.ctxTransform(this.transformCanvas.props);
-  this.canvasContext.beginPath();
-  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-  this.canvasContext.closePath();
-  this.canvasContext.clip();
-
-  this.renderFrame(this.renderedFrame, true);
-};
-
-CanvasRenderer.prototype.destroy = function () {
-  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.globalData.canvasContext = null;
-  this.animationItem.container = null;
-  this.destroyed = true;
-};
-
-CanvasRenderer.prototype.renderFrame = function (num, forceRender) {
-  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
-    return;
-  }
-  this.renderedFrame = num;
-  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
-  this.globalData.frameId += 1;
-  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
-  this.globalData.projectInterface.currentFrame = num;
-
-  // console.log('--------');
-  // console.log('NEW: ',num);
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    if (this.renderConfig.clearCanvas === true) {
-      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-    } else {
-      this.save();
-    }
-    for (i = len - 1; i >= 0; i -= 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-    if (this.renderConfig.clearCanvas !== true) {
-      this.restore();
-    }
-  }
-};
-
-CanvasRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  var element = this.createItem(this.layers[pos], this, this.globalData);
-  elements[pos] = element;
-  element.initExpressions();
-  /* if(this.layers[pos].ty === 0){
-        element.resize(this.globalData.transformCanvas);
-    } */
-};
-
-CanvasRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-CanvasRenderer.prototype.hide = function () {
-  this.animationItem.container.style.display = 'none';
-};
-
-CanvasRenderer.prototype.show = function () {
-  this.animationItem.container.style.display = 'block';
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
-    }
-
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
-    } else {
-      rect = null;
-    }
-
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
-    } else {
-      count += 1;
-
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
-
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      } else {
-        feMorph = null;
-        x = null;
-      }
-
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
-
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
-      }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
-      }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
-      }
-    }
-  }
-
-  this.maskElement = createNS(maskType);
-
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
-
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
-    }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
-    }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
-      }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
-        } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
-          }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
-        }
-      }
-    }
-  }
-};
-
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
-
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
-
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
-
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
-      }
-      viewData.elem.setAttribute('d', pathShapeValue);
-    }
-    viewData.lastPath = pathString;
-  }
-};
-
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
-
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
-
-function HierarchyElement() {}
-
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
-    }
-  },
-};
-
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
-
-function FrameElement() {}
-
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
-          this._mdf = true;
-        }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
-
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
-        while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
-          }
-          i += 1;
-        }
-      }
-
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
-        return;
-      }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
-      }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
-      this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
-    }
-    i += 1;
-  }
-}
-
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
-
-/* global createNS */
-/* exported ShapeGroupData */
-
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global ShapePropertyFactory, SVGShapeData */
-
-function CVShapeData(element, data, styles, transformsManager) {
-  this.styledShapes = [];
-  this.tr = [0, 0, 0, 0, 0, 0];
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
-  var i;
-  var len = styles.length;
-  var styledShape;
-  for (i = 0; i < len; i += 1) {
-    if (!styles[i].closed) {
-      styledShape = {
-        transforms: transformsManager.addTransformSequence(styles[i].transforms),
-        trNodes: [],
-      };
-      this.styledShapes.push(styledShape);
-      styles[i].elements.push(styledShape);
-    }
-  }
-}
-
-CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
-
-function FootageElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.footageData = globalData.imageLoader.getAsset(this.assetData);
-  this.initBaseData(data, globalData, comp);
-}
-
-FootageElement.prototype.prepareFrame = function () {
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
-
-FootageElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-FootageElement.prototype.renderFrame = function () {
-};
-
-FootageElement.prototype.destroy = function () {
-};
-
-FootageElement.prototype.initExpressions = function () {
-  this.layerInterface = FootageInterface(this);
-};
-
-FootageElement.prototype.getFootageData = function () {
-  return this.footageData;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global Matrix, createTypedArray */
-
-function CVContextData() {
-  this.saved = [];
-  this.cArrPos = 0;
-  this.cTr = new Matrix();
-  this.cO = 1;
-  var i;
-  var len = 15;
-  this.savedOp = createTypedArray('float32', len);
-  for (i = 0; i < len; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = len;
-}
-
-CVContextData.prototype.duplicate = function () {
-  var newLength = this._length * 2;
-  var currentSavedOp = this.savedOp;
-  this.savedOp = createTypedArray('float32', newLength);
-  this.savedOp.set(currentSavedOp);
-  var i = 0;
-  for (i = this._length; i < newLength; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = newLength;
-};
-
-CVContextData.prototype.reset = function () {
-  this.cArrPos = 0;
-  this.cTr.reset();
-  this.cO = 1;
-};
-
-/* global CVEffects, getBlendMode, CVMaskElement, Matrix */
-
-function CVBaseElement() {
-}
-
-CVBaseElement.prototype = {
-  createElements: function () {},
-  initRendererElement: function () {},
-  createContainerElements: function () {
-    this.canvasContext = this.globalData.canvasContext;
-    this.renderableEffectsManager = new CVEffects(this);
-  },
-  createContent: function () {},
-  setBlendMode: function () {
-    var globalData = this.globalData;
-    if (globalData.blendMode !== this.data.bm) {
-      globalData.blendMode = this.data.bm;
-      var blendModeValue = getBlendMode(this.data.bm);
-      globalData.canvasContext.globalCompositeOperation = blendModeValue;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new CVMaskElement(this.data, this);
-  },
-  hideElement: function () {
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-      this.hidden = true;
-    }
-  },
-  showElement: function () {
-    if (this.isInRange && !this.isTransparent) {
-      this.hidden = false;
-      this._isFirstFrame = true;
-      this.maskManager._isFirstFrame = true;
-    }
-  },
-  renderFrame: function () {
-    if (this.hidden || this.data.hd) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.setBlendMode();
-    var forceRealStack = this.data.ty === 0;
-    this.globalData.renderer.save(forceRealStack);
-    this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
-    this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
-    this.renderInnerContent();
-    this.globalData.renderer.restore(forceRealStack);
-    if (this.maskManager.hasMasks) {
-      this.globalData.renderer.restore(true);
-    }
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.canvasContext = null;
-    this.data = null;
-    this.globalData = null;
-    this.maskManager.destroy();
-  },
-  mHelper: new Matrix(),
-};
-CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
-CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
-
-/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */
-
-function CVCompElement(data, globalData, comp) {
-  this.completeLayers = false;
-  this.layers = data.layers;
-  this.pendingElements = [];
-  this.elements = createSizedArray(this.layers.length);
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
-
-CVCompElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.beginPath();
-  ctx.moveTo(0, 0);
-  ctx.lineTo(this.data.w, 0);
-  ctx.lineTo(this.data.w, this.data.h);
-  ctx.lineTo(0, this.data.h);
-  ctx.lineTo(0, 0);
-  ctx.clip();
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-CVCompElement.prototype.destroy = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.layers = null;
-  this.elements = null;
-};
-
-/* global createSizedArray, ShapePropertyFactory, MaskElement */
-
-function CVMaskElement(data, element) {
-  this.data = data;
-  this.element = element;
-  this.masksProperties = this.data.masksProperties || [];
-  this.viewData = createSizedArray(this.masksProperties.length);
-  var i;
-  var len = this.masksProperties.length;
-  var hasMasks = false;
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      hasMasks = true;
-    }
-    this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
-  }
-  this.hasMasks = hasMasks;
-  if (hasMasks) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-CVMaskElement.prototype.renderFrame = function () {
-  if (!this.hasMasks) {
-    return;
-  }
-  var transform = this.element.finalTransform.mat;
-  var ctx = this.element.canvasContext;
-  var i;
-  var len = this.masksProperties.length;
-  var pt;
-  var pts;
-  var data;
-  ctx.beginPath();
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.masksProperties[i].inv) {
-        ctx.moveTo(0, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
-        ctx.lineTo(0, this.element.globalData.compSize.h);
-        ctx.lineTo(0, 0);
-      }
-      data = this.viewData[i].v;
-      pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
-      ctx.moveTo(pt[0], pt[1]);
-      var j;
-      var jLen = data._length;
-      for (j = 1; j < jLen; j += 1) {
-        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
-        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-      }
-      pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
-      ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-    }
-  }
-  this.element.globalData.renderer.save(true);
-  ctx.clip();
-};
-
-CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
-
-CVMaskElement.prototype.destroy = function () {
-  this.element = null;
-};
-
-/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,
-HierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,
-DashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */
-
-function CVShapeElement(data, globalData, comp) {
-  this.shapes = [];
-  this.shapesData = data.shapes;
-  this.stylesList = [];
-  this.itemsData = [];
-  this.prevViewData = [];
-  this.shapeModifiers = [];
-  this.processedElements = [];
-  this.transformsManager = new ShapeTransformManager();
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
-
-CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
-
-CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false };
-
-CVShapeElement.prototype.dashResetter = [];
-
-CVShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-};
-
-CVShapeElement.prototype.createStyleElement = function (data, transforms) {
-  var styleElem = {
-    data: data,
-    type: data.ty,
-    preTransforms: this.transformsManager.addTransformSequence(transforms),
-    transforms: [],
-    elements: [],
-    closed: data.hd === true,
-  };
-  var elementData = {};
-  if (data.ty === 'fl' || data.ty === 'st') {
-    elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
-    if (!elementData.c.k) {
-      styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
-    }
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
-    elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
-    elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this);
-    elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this);
-    elementData.g = new GradientProperty(this, data.g, this);
-  }
-  elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
-  if (data.ty === 'st' || data.ty === 'gs') {
-    styleElem.lc = lineCapEnum[data.lc || 2];
-    styleElem.lj = lineJoinEnum[data.lj || 2];
-    if (data.lj == 1) { // eslint-disable-line eqeqeq
-      styleElem.ml = data.ml;
-    }
-    elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
-    if (!elementData.w.k) {
-      styleElem.wi = elementData.w.v;
-    }
-    if (data.d) {
-      var d = new DashProperty(this, data.d, 'canvas', this);
-      elementData.d = d;
-      if (!elementData.d.k) {
-        styleElem.da = elementData.d.dashArray;
-        styleElem.do = elementData.d.dashoffset[0];
-      }
-    }
-  } else {
-    styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
-  }
-  this.stylesList.push(styleElem);
-  elementData.style = styleElem;
-  return elementData;
-};
-
-CVShapeElement.prototype.createGroupElement = function () {
-  var elementData = {
-    it: [],
-    prevViewData: [],
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createTransformElement = function (data) {
-  var elementData = {
-    transform: {
-      opacity: 1,
-      _opMdf: false,
-      key: this.transformsManager.getNewKey(),
-      op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
-      mProps: TransformPropertyFactory.getTransformProperty(this, data, this),
-    },
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createShapeElement = function (data) {
-  var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
-
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  return elementData;
-};
-
-CVShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-};
-
-CVShapeElement.prototype.addTransformToStyleList = function (transform) {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.push(transform);
-    }
-  }
-};
-
-CVShapeElement.prototype.removeTransformFromStyleList = function () {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.pop();
-    }
-  }
-};
-
-CVShapeElement.prototype.closeStyles = function (styles) {
-  var i;
-  var len = styles.length;
-  for (i = 0; i < len; i += 1) {
-    styles[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var processedPos;
-  var modifier;
-  var currentTransform;
-  var ownTransforms = [].concat(transforms);
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._shouldRender = shouldRender;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        currentTransform = this.createTransformElement(arr[i]);
-        itemsData[i] = currentTransform;
-      }
-      ownTransforms.push(itemsData[i]);
-      this.addTransformToStyleList(itemsData[i]);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i]);
-      }
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        shouldRender = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  this.removeTransformFromStyleList();
-  this.closeStyles(ownStyles);
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.renderInnerContent = function () {
-  this.transformHelper.opacity = 1;
-  this.transformHelper._opMdf = false;
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-  this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
-};
-
-CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
-  if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
-    groupTransform.opacity = parentTransform.opacity;
-    groupTransform.opacity *= groupTransform.op.v;
-    groupTransform._opMdf = true;
-  }
-};
-
-CVShapeElement.prototype.drawLayer = function () {
-  var i;
-  var len = this.stylesList.length;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var elems;
-  var nodes;
-  var renderer = this.globalData.renderer;
-  var ctx = this.globalData.canvasContext;
-  var type;
-  var currentStyle;
-  for (i = 0; i < len; i += 1) {
-    currentStyle = this.stylesList[i];
-    type = currentStyle.type;
-
-    // Skipping style when
-    // Stroke width equals 0
-    // style should not be rendered (extra unused repeaters)
-    // current opacity equals 0
-    // global opacity equals 0
-    if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
-      renderer.save();
-      elems = currentStyle.elements;
-      if (type === 'st' || type === 'gs') {
-        ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
-        ctx.lineWidth = currentStyle.wi;
-        ctx.lineCap = currentStyle.lc;
-        ctx.lineJoin = currentStyle.lj;
-        ctx.miterLimit = currentStyle.ml || 0;
-      } else {
-        ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
-      }
-      renderer.ctxOpacity(currentStyle.coOp);
-      if (type !== 'st' && type !== 'gs') {
-        ctx.beginPath();
-      }
-      renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
-      jLen = elems.length;
-      for (j = 0; j < jLen; j += 1) {
-        if (type === 'st' || type === 'gs') {
-          ctx.beginPath();
-          if (currentStyle.da) {
-            ctx.setLineDash(currentStyle.da);
-            ctx.lineDashOffset = currentStyle.do;
-          }
-        }
-        nodes = elems[j].trNodes;
-        kLen = nodes.length;
-
-        for (k = 0; k < kLen; k += 1) {
-          if (nodes[k].t === 'm') {
-            ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
-          } else if (nodes[k].t === 'c') {
-            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]);
-          } else {
-            ctx.closePath();
-          }
-        }
-        if (type === 'st' || type === 'gs') {
-          ctx.stroke();
-          if (currentStyle.da) {
-            ctx.setLineDash(this.dashResetter);
-          }
-        }
-      }
-      if (type !== 'st' && type !== 'gs') {
-        ctx.fill(currentStyle.r);
-      }
-      renderer.restore();
-    }
-  }
-};
-
-CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
-  var i;
-  var len = items.length - 1;
-  var groupTransform;
-  groupTransform = parentTransform;
-  for (i = len; i >= 0; i -= 1) {
-    if (items[i].ty === 'tr') {
-      groupTransform = data[i].transform;
-      this.renderShapeTransform(parentTransform, groupTransform);
-    } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
-      this.renderPath(items[i], data[i]);
-    } else if (items[i].ty === 'fl') {
-      this.renderFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'st') {
-      this.renderStroke(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
-      this.renderGradientFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gr') {
-      this.renderShape(groupTransform, items[i].it, data[i].it);
-    } else if (items[i].ty === 'tm') {
-      //
-    }
-  }
-  if (isMain) {
-    this.drawLayer();
-  }
-};
-
-CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
-  if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
-    var shapeNodes = styledShape.trNodes;
-    var paths = shape.paths;
-    var i;
-    var len;
-    var j;
-    var jLen = paths._length;
-    shapeNodes.length = 0;
-    var groupTransformMat = styledShape.transforms.finalTransform;
-    for (j = 0; j < jLen; j += 1) {
-      var pathNodes = paths.shapes[j];
-      if (pathNodes && pathNodes.v) {
-        len = pathNodes._length;
-        for (i = 1; i < len; i += 1) {
-          if (i === 1) {
-            shapeNodes.push({
-              t: 'm',
-              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-            });
-          }
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]),
-          });
-        }
-        if (len === 1) {
-          shapeNodes.push({
-            t: 'm',
-            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-          });
-        }
-        if (pathNodes.c && len) {
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]),
-          });
-          shapeNodes.push({
-            t: 'z',
-          });
-        }
-      }
-    }
-    styledShape.trNodes = shapeNodes;
-  }
-};
-
-CVShapeElement.prototype.renderPath = function (pathData, itemData) {
-  if (pathData.hd !== true && pathData._shouldRender) {
-    var i;
-    var len = itemData.styledShapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
-    }
-  }
-};
-
-CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb('
-        + bmFloor(itemData.c.v[0]) + ','
-        + bmFloor(itemData.c.v[1]) + ','
-        + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-};
-
-CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var grd;
-  if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {
-    var ctx = this.globalData.canvasContext;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
-    if (styleData.t === 1) {
-      grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
-    } else {
-      var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-      var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-      var percent = itemData.h.v;
-      if (percent >= 1) {
-        percent = 0.99;
-      } else if (percent <= -1) {
-        percent = -0.99;
-      }
-      var dist = rad * percent;
-      var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-      var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-      grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
-    }
-
-    var i;
-    var len = styleData.g.p;
-    var cValues = itemData.g.c;
-    var opacity = 1;
-
-    for (i = 0; i < len; i += 1) {
-      if (itemData.g._hasOpacity && itemData.g._collapsable) {
-        opacity = itemData.g.o[i * 2 + 1];
-      }
-      grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
-    }
-    styleElem.grd = grd;
-  }
-  styleElem.coOp = itemData.o.v * groupTransform.opacity;
-};
-
-CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var d = itemData.d;
-  if (d && (d._mdf || this._isFirstFrame)) {
-    styleElem.da = d.dashArray;
-    styleElem.do = d.dashoffset[0];
-  }
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-  if (itemData.w._mdf || this._isFirstFrame) {
-    styleElem.wi = itemData.w.v;
-  }
-};
-
-CVShapeElement.prototype.destroy = function () {
-  this.shapesData = null;
-  this.globalData = null;
-  this.canvasContext = null;
-  this.stylesList.length = 0;
-  this.itemsData.length = 0;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,
-SVGShapeElement, IImageElement */
-
-function CVSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
-
-CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVSolidElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.fillStyle = this.data.sc;
-  ctx.fillRect(0, 0, this.data.sw, this.data.sh);
-  //
-};
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
 
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
     if (expressionsPlugin) {
       expressionsPlugin.initExpressions(this);
     }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
+
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-  }
-};
 
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
+  };
 
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
-  }
-};
 
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
+    this.loadNextSegment();
+  };
 
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
 
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
 
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
     }
-  }
-  return null;
-};
 
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
+    try {
+      this.animationData = animData;
 
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
+      }
+
+      this.renderer.configAnimation(animData);
+
+      if (!animData.assets) {
+        animData.assets = [];
+      }
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
+      }
+    } catch (error) {
+      this.triggerConfigError(error);
+    }
+  };
+
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
+    }
+
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
+    } else {
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
       }
     }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
+  };
 
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
+
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
+
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
+
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
+    }
+
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
+    }
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
       }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
+    } else {
+      this.pause();
+    }
+  };
+
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
+
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
+
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
+      }
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
+      }
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
+        } else {
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
       if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
+          }
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
       }
     } else {
       this.setCurrentRawFrameValue(nextValue);
     }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
         } else {
-          this.trigger('loopComplete');
+          this.setDirection(-1);
         }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
       }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
 
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
       }
     }
-    this.totalFrames = arr[0] - arr[1];
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
     this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$4(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
       }
+    } else {
+      this.segments.push(arr);
     }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
     }
-  }
 
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
+    if (this.isPaused) {
+      this.play();
+    }
+  };
 
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
     this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
+    this.segments.push([this.animationData.ip, this.animationData.op]);
 
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
-
-var Expressions = (function () {
-  var ob = {};
-  ob.initExpressions = initExpressions;
-
-  function initExpressions(animation) {
-    var stackCount = 0;
-    var registers = [];
-
-    function pushExpression() {
-      stackCount += 1;
-    }
-
-    function popExpression() {
-      stackCount -= 1;
-      if (stackCount === 0) {
-        releaseInstances();
-      }
-    }
-
-    function registerExpressionProperty(expression) {
-      if (registers.indexOf(expression) === -1) {
-        registers.push(expression);
-      }
-    }
-
-    function releaseInstances() {
-      var i;
-      var len = registers.length;
-      for (i = 0; i < len; i += 1) {
-        registers[i].release();
-      }
-      registers.length = 0;
-    }
-
-    animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-    animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
-    animation.renderer.globalData.pushExpression = pushExpression;
-    animation.renderer.globalData.popExpression = popExpression;
-    animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
-  }
-  return ob;
-}());
-
-expressionsPlugin = Expressions;
-
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
-
-var ExpressionManager = (function () {
-  'use strict';
-
-  var ob = {};
-  var Math = BMMath;
-  var window = null;
-  var document = null;
-  var XMLHttpRequest = null;
-  var fetch = null;
-  var frames = null;
-
-  function $bm_isInstanceOfArray(arr) {
-    return arr.constructor === Array || arr.constructor === Float32Array;
-  }
-
-  function isNumerable(tOfV, v) {
-    return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
-  }
-
-  function $bm_neg(a) {
-    var tOfA = typeof a;
-    if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
-      return -a;
-    }
-    if ($bm_isInstanceOfArray(a)) {
-      var i;
-      var lenA = a.length;
-      var retArr = [];
-      for (i = 0; i < lenA; i += 1) {
-        retArr[i] = -a[i];
-      }
-      return retArr;
-    }
-    if (a.propType) {
-      return a.v;
-    }
-    return -a;
-  }
-
-  var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
-  var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
-  var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
-
-  function sum(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (tOfA === 'string' || tOfB === 'string') {
-      return a + b;
-    }
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a + b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] += b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a + b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] + b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-  var add = sum;
-
-  function sub(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      if (tOfA === 'string') {
-        a = parseInt(a, 10);
-      }
-      if (tOfB === 'string') {
-        b = parseInt(b, 10);
-      }
-      return a - b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] -= b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a - b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] - b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-
-  function mul(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a * b;
-    }
-
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] * b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a * b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-
-  function div(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a / b;
-    }
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] / b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a / b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-  function mod(a, b) {
-    if (typeof a === 'string') {
-      a = parseInt(a, 10);
-    }
-    if (typeof b === 'string') {
-      b = parseInt(b, 10);
-    }
-    return a % b;
-  }
-  var $bm_sum = sum;
-  var $bm_sub = sub;
-  var $bm_mul = mul;
-  var $bm_div = div;
-  var $bm_mod = mod;
-
-  function clamp(num, min, max) {
-    if (min > max) {
-      var mm = max;
-      max = min;
-      min = mm;
-    }
-    return Math.min(Math.max(num, min), max);
-  }
-
-  function radiansToDegrees(val) {
-    return val / degToRads;
-  }
-  var radians_to_degrees = radiansToDegrees;
-
-  function degreesToRadians(val) {
-    return val * degToRads;
-  }
-  var degrees_to_radians = radiansToDegrees;
-
-  var helperLengthArray = [0, 0, 0, 0, 0, 0];
-
-  function length(arr1, arr2) {
-    if (typeof arr1 === 'number' || arr1 instanceof Number) {
-      arr2 = arr2 || 0;
-      return Math.abs(arr1 - arr2);
-    }
-    if (!arr2) {
-      arr2 = helperLengthArray;
-    }
-    var i;
-    var len = Math.min(arr1.length, arr2.length);
-    var addedLength = 0;
-    for (i = 0; i < len; i += 1) {
-      addedLength += Math.pow(arr2[i] - arr1[i], 2);
-    }
-    return Math.sqrt(addedLength);
-  }
-
-  function normalize(vec) {
-    return div(vec, length(vec));
-  }
-
-  function rgbToHsl(val) {
-    var r = val[0]; var g = val[1]; var b = val[2];
-    var max = Math.max(r, g, b);
-    var min = Math.min(r, g, b);
-    var h;
-    var s;
-    var l = (max + min) / 2;
-
-    if (max === min) {
-      h = 0; // achromatic
-      s = 0; // achromatic
-    } else {
-      var d = max - min;
-      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
-      switch (max) {
-        case r: h = (g - b) / d + (g < b ? 6 : 0); break;
-        case g: h = (b - r) / d + 2; break;
-        case b: h = (r - g) / d + 4; break;
-        default: break;
-      }
-      h /= 6;
-    }
-
-    return [h, s, l, val[3]];
-  }
-
-  function hue2rgb(p, q, t) {
-    if (t < 0) t += 1;
-    if (t > 1) t -= 1;
-    if (t < 1 / 6) return p + (q - p) * 6 * t;
-    if (t < 1 / 2) return q;
-    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
-    return p;
-  }
-
-  function hslToRgb(val) {
-    var h = val[0];
-    var s = val[1];
-    var l = val[2];
-
-    var r;
-    var g;
-    var b;
-
-    if (s === 0) {
-      r = l; // achromatic
-      b = l; // achromatic
-      g = l; // achromatic
-    } else {
-      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-      var p = 2 * l - q;
-      r = hue2rgb(p, q, h + 1 / 3);
-      g = hue2rgb(p, q, h);
-      b = hue2rgb(p, q, h - 1 / 3);
-    }
-
-    return [r, g, b, val[3]];
-  }
-
-  function linear(t, tMin, tMax, value1, value2) {
-    if (value1 === undefined || value2 === undefined) {
-      value1 = tMin;
-      value2 = tMax;
-      tMin = 0;
-      tMax = 1;
-    }
-    if (tMax < tMin) {
-      var _tMin = tMax;
-      tMax = tMin;
-      tMin = _tMin;
-    }
-    if (t <= tMin) {
-      return value1;
-    } if (t >= tMax) {
-      return value2;
-    }
-    var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
-    if (!value1.length) {
-      return value1 + (value2 - value1) * perc;
-    }
-    var i;
-    var len = value1.length;
-    var arr = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
-    }
-    return arr;
-  }
-  function random(min, max) {
-    if (max === undefined) {
-      if (min === undefined) {
-        min = 0;
-        max = 1;
-      } else {
-        max = min;
-        min = undefined;
-      }
-    }
-    if (max.length) {
-      var i;
-      var len = max.length;
-      if (!min) {
-        min = createTypedArray('float32', len);
-      }
-      var arr = createTypedArray('float32', len);
-      var rnd = BMMath.random();
-      for (i = 0; i < len; i += 1) {
-        arr[i] = min[i] + rnd * (max[i] - min[i]);
-      }
-      return arr;
-    }
-    if (min === undefined) {
-      min = 0;
-    }
-    var rndm = BMMath.random();
-    return min + rndm * (max - min);
-  }
-
-  function createPath(points, inTangents, outTangents, closed) {
-    var i;
-    var len = points.length;
-    var path = shapePool.newElement();
-    path.setPathData(!!closed, len);
-    var arrPlaceholder = [0, 0];
-    var inVertexPoint;
-    var outVertexPoint;
-    for (i = 0; i < len; i += 1) {
-      inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
-      outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
-      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);
-    }
-    return path;
-  }
-
-  function initiateExpression(elem, data, property) {
-    var val = data.x;
-    var needsVelocity = /velocity(?![\w\d])/.test(val);
-    var _needsRandom = val.indexOf('random') !== -1;
-    var elemType = elem.data.ty;
-    var transform;
-    var $bm_transform;
-    var content;
-    var effect;
-    var thisProperty = property;
-    thisProperty.valueAtTime = thisProperty.getValueAtTime;
-    Object.defineProperty(thisProperty, 'value', {
-      get: function () {
-        return thisProperty.v;
-      },
-    });
-    elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
-    elem.comp.displayStartTime = 0;
-    var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    var outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    var width = elem.data.sw ? elem.data.sw : 0;
-    var height = elem.data.sh ? elem.data.sh : 0;
-    var name = elem.data.nm;
-    var loopIn;
-    var loop_in;
-    var loopOut;
-    var loop_out;
-    var smooth;
-    var toWorld;
-    var fromWorld;
-    var fromComp;
-    var toComp;
-    var fromCompToSurface;
-    var position;
-    var rotation;
-    var anchorPoint;
-    var scale;
-    var thisLayer;
-    var thisComp;
-    var mask;
-    var valueAtTime;
-    var velocityAtTime;
-
-    var scoped_bm_rt;
-    // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
-    var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
-    var numKeys = property.kf ? data.k.length : 0;
-
-    var active = !this.data || this.data.hd !== true;
-
-    var wiggle = function wiggle(freq, amp) {
-      var iWiggle;
-      var j;
-      var lenWiggle = this.pv.length ? this.pv.length : 1;
-      var addedAmps = createTypedArray('float32', lenWiggle);
-      freq = 5;
-      var iterations = Math.floor(time * freq);
-      iWiggle = 0;
-      j = 0;
-      while (iWiggle < iterations) {
-        // var rnd = BMMath.random();
-        for (j = 0; j < lenWiggle; j += 1) {
-          addedAmps[j] += -amp + amp * 2 * BMMath.random();
-          // addedAmps[j] += -amp + amp*2*rnd;
-        }
-        iWiggle += 1;
-      }
-      // var rnd2 = BMMath.random();
-      var periods = time * freq;
-      var perc = periods - Math.floor(periods);
-      var arr = createTypedArray('float32', lenWiggle);
-      if (lenWiggle > 1) {
-        for (j = 0; j < lenWiggle; j += 1) {
-          arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;
-          // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
-          // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
-        }
-        return arr;
-      }
-      return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
-    }.bind(this);
-
-    if (thisProperty.loopIn) {
-      loopIn = thisProperty.loopIn.bind(thisProperty);
-      loop_in = loopIn;
-    }
-
-    if (thisProperty.loopOut) {
-      loopOut = thisProperty.loopOut.bind(thisProperty);
-      loop_out = loopOut;
-    }
-
-    if (thisProperty.smooth) {
-      smooth = thisProperty.smooth.bind(thisProperty);
-    }
-
-    function loopInDuration(type, duration) {
-      return loopIn(type, duration, true);
-    }
-
-    function loopOutDuration(type, duration) {
-      return loopOut(type, duration, true);
-    }
-
-    if (this.getValueAtTime) {
-      valueAtTime = this.getValueAtTime.bind(this);
-    }
-
-    if (this.getVelocityAtTime) {
-      velocityAtTime = this.getVelocityAtTime.bind(this);
-    }
-
-    var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
-
-    function lookAt(elem1, elem2) {
-      var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
-      var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
-      var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
-      return [yaw, pitch, 0];
-    }
-
-    function easeOut(t, tMin, tMax, val1, val2) {
-      return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function easeIn(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInBez, t, tMin, tMax, val1, val2);
-    }
-
-    function ease(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function applyEase(fn, t, tMin, tMax, val1, val2) {
-      if (val1 === undefined) {
-        val1 = tMin;
-        val2 = tMax;
-      } else {
-        t = (t - tMin) / (tMax - tMin);
-      }
-      if (t > 1) {
-        t = 1;
-      } else if (t < 0) {
-        t = 0;
-      }
-      var mult = fn(t);
-      if ($bm_isInstanceOfArray(val1)) {
-        var iKey;
-        var lenKey = val1.length;
-        var arr = createTypedArray('float32', lenKey);
-        for (iKey = 0; iKey < lenKey; iKey += 1) {
-          arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
-        }
-        return arr;
-      }
-      return (val2 - val1) * mult + val1;
-    }
-
-    function nearestKey(time) {
-      var iKey;
-      var lenKey = data.k.length;
-      var index;
-      var keyTime;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        index = 0;
-        keyTime = 0;
-      } else {
-        index = -1;
-        time *= elem.comp.globalData.frameRate;
-        if (time < data.k[0].t) {
-          index = 1;
-          keyTime = data.k[0].t;
-        } else {
-          for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
-            if (time === data.k[iKey].t) {
-              index = iKey + 1;
-              keyTime = data.k[iKey].t;
-              break;
-            } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
-              if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
-                index = iKey + 2;
-                keyTime = data.k[iKey + 1].t;
-              } else {
-                index = iKey + 1;
-                keyTime = data.k[iKey].t;
-              }
-              break;
-            }
-          }
-          if (index === -1) {
-            index = iKey + 1;
-            keyTime = data.k[iKey].t;
-          }
-        }
-      }
-      var obKey = {};
-      obKey.index = index;
-      obKey.time = keyTime / elem.comp.globalData.frameRate;
-      return obKey;
-    }
-
-    function key(ind) {
-      var obKey;
-      var iKey;
-      var lenKey;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        throw new Error('The property has no keyframe at index ' + ind);
-      }
-      ind -= 1;
-      obKey = {
-        time: data.k[ind].t / elem.comp.globalData.frameRate,
-        value: [],
-      };
-      var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
-
-      lenKey = arr.length;
-      for (iKey = 0; iKey < lenKey; iKey += 1) {
-        obKey[iKey] = arr[iKey];
-        obKey.value[iKey] = arr[iKey];
-      }
-      return obKey;
-    }
-
-    function framesToTime(fr, fps) {
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return fr / fps;
-    }
-
-    function timeToFrames(t, fps) {
-      if (!t && t !== 0) {
-        t = time;
-      }
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return t * fps;
-    }
-
-    function seedRandom(seed) {
-      BMMath.seedrandom(randSeed + seed);
-    }
-
-    function sourceRectAtTime() {
-      return elem.sourceRectAtTime();
-    }
-
-    function substring(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substring(init);
-        }
-        return value.substring(init, end);
-      }
-      return '';
-    }
-
-    function substr(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substr(init);
-        }
-        return value.substr(init, end);
-      }
-      return '';
-    }
-
-    function posterizeTime(framesPerSecond) {
-      time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
-      value = valueAtTime(time);
-    }
-
-    var time;
-    var velocity;
-    var value;
-    var text;
-    var textIndex;
-    var textTotal;
-    var selectorValue;
-    var index = elem.data.ind;
-    var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-    var parent;
-    var randSeed = Math.floor(Math.random() * 1000000);
-    var globalData = elem.globalData;
-    function executeExpression(_value) {
-      // globalData.pushExpression();
-      value = _value;
-      if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
-        return value;
-      }
-      if (this.propType === 'textSelector') {
-        textIndex = this.textIndex;
-        textTotal = this.textTotal;
-        selectorValue = this.selectorValue;
-      }
-      if (!thisLayer) {
-        text = elem.layerInterface.text;
-        thisLayer = elem.layerInterface;
-        thisComp = elem.comp.compInterface;
-        toWorld = thisLayer.toWorld.bind(thisLayer);
-        fromWorld = thisLayer.fromWorld.bind(thisLayer);
-        fromComp = thisLayer.fromComp.bind(thisLayer);
-        toComp = thisLayer.toComp.bind(thisLayer);
-        mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
-        fromCompToSurface = fromComp;
-      }
-      if (!transform) {
-        transform = elem.layerInterface('ADBE Transform Group');
-        $bm_transform = transform;
-        if (transform) {
-          anchorPoint = transform.anchorPoint;
-          /* position = transform.position;
-                    rotation = transform.rotation;
-                    scale = transform.scale; */
-        }
-      }
-
-      if (elemType === 4 && !content) {
-        content = thisLayer('ADBE Root Vectors Group');
-      }
-      if (!effect) {
-        effect = thisLayer(4);
-      }
-      hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-      if (hasParent && !parent) {
-        parent = elem.hierarchy[0].layerInterface;
-      }
-      time = this.comp.renderedFrame / this.comp.globalData.frameRate;
-      if (_needsRandom) {
-        seedRandom(randSeed + time);
-      }
-      if (needsVelocity) {
-        velocity = velocityAtTime(time);
-      }
-      expression_function();
-      this.frameExpressionId = elem.globalData.frameId;
-
-      // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
-      return scoped_bm_rt;
-    }
-    return executeExpression;
-  }
-
-  ob.initiateExpression = initiateExpression;
-  return ob;
-}());
-
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
-
-var expressionHelpers = (function () {
-  function searchExpressions(elem, data, prop) {
-    if (data.x) {
-      prop.k = true;
-      prop.x = true;
-      prop.initiateExpression = ExpressionManager.initiateExpression;
-      prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
-    }
-  }
-
-  function getValueAtTime(frameNum) {
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastFrame) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
-      this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
-      this._cachingAtTime.lastFrame = frameNum;
-    }
-    return this._cachingAtTime.value;
-  }
-
-  function getSpeedAtTime(frameNum) {
-    var delta = -0.01;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var speed = 0;
-    if (v1.length) {
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        speed += Math.pow(v2[i] - v1[i], 2);
-      }
-      speed = Math.sqrt(speed) * 100;
-    } else {
-      speed = 0;
-    }
-    return speed;
-  }
-
-  function getVelocityAtTime(frameNum) {
-    if (this.vel !== undefined) {
-      return this.vel;
-    }
-    var delta = -0.001;
-    // frameNum += this.elem.data.st;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var velocity;
-    if (v1.length) {
-      velocity = createTypedArray('float32', v1.length);
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        // removing frameRate
-        // if needed, don't add it here
-        // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
-        velocity[i] = (v2[i] - v1[i]) / delta;
-      }
-    } else {
-      velocity = (v2 - v1) / delta;
-    }
-    return velocity;
-  }
-
-  function getStaticValueAtTime() {
-    return this.pv;
-  }
-
-  function setGroupProperty(propertyGroup) {
-    this.propertyGroup = propertyGroup;
-  }
-
-  return {
-    searchExpressions: searchExpressions,
-    getSpeedAtTime: getSpeedAtTime,
-    getVelocityAtTime: getVelocityAtTime,
-    getValueAtTime: getValueAtTime,
-    getStaticValueAtTime: getStaticValueAtTime,
-    setGroupProperty: setGroupProperty,
-  };
-}());
-
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
-
-(function addPropertyDecorator() {
-  function loopOut(type, duration, durationFlag) {
-    if (!this.k || !this.keyframes) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var lastKeyFrame = keyframes[keyframes.length - 1].t;
-    if (currentFrame <= lastKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var firstKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
-      } else {
-        cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
-      }
-      firstKeyFrame = lastKeyFrame - cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (iterations % 2 !== 0) {
-          return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = (endV[i] - initV[i]) * repeats + current[i];
-        }
-        return ret;
-      }
-      return (endV - initV) * repeats + current;
-    } else if (type === 'continue') {
-      var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(lastValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
-        }
-        return ret;
-      }
-      return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);
-    }
-      return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function loopIn(type, duration, durationFlag) {
-    if (!this.k) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var firstKeyFrame = keyframes[0].t;
-    if (currentFrame >= firstKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var lastKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      lastKeyFrame = keyframes[duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
-      } else {
-        cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
-      }
-      lastKeyFrame = firstKeyFrame + cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
-      if (iterations % 2 === 0) {
-          return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);
-      var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
-        }
-        return ret;
-      }
-      return current - (endV - initV) * repeats;
-    } else if (type === 'continue') {
-      var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(firstValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;
-        }
-        return ret;
-      }
-      return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;
-    }
-      return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function smooth(width, samples) {
-    if (!this.k) {
-      return this.pv;
-    }
-    width = (width || 0.4) * 0.5;
-    samples = Math.floor(samples || 5);
-    if (samples <= 1) {
-      return this.pv;
-    }
-    var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
-    var initFrame = currentTime - width;
-    var endFrame = currentTime + width;
-    var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
-    var i = 0;
-    var j = 0;
-    var value;
-    if (this.pv.length) {
-      value = createTypedArray('float32', this.pv.length);
-    } else {
-      value = 0;
-    }
-    var sampleValue;
-    while (i < samples) {
-      sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
-      if (this.pv.length) {
-        for (j = 0; j < this.pv.length; j += 1) {
-          value[j] += sampleValue[j];
-        }
-      } else {
-        value += sampleValue;
-      }
-      i += 1;
-    }
-    if (this.pv.length) {
-      for (j = 0; j < this.pv.length; j += 1) {
-        value[j] /= samples;
-      }
-    } else {
-      value /= samples;
-    }
-    return value;
-  }
-
-  function getTransformValueAtTime(time) {
-    if (!this._transformCachingAtTime) {
-      this._transformCachingAtTime = {
-        v: new Matrix(),
-      };
-    }
-    /// /
-    var matrix = this._transformCachingAtTime.v;
-    matrix.cloneFromProps(this.pre.props);
-    if (this.appliedTransformations < 1) {
-      var anchor = this.a.getValueAtTime(time);
-      matrix.translate(
-        -anchor[0] * this.a.mult,
-        -anchor[1] * this.a.mult,
-        anchor[2] * this.a.mult
-      );
-    }
-    if (this.appliedTransformations < 2) {
-      var scale = this.s.getValueAtTime(time);
-      matrix.scale(
-        scale[0] * this.s.mult,
-        scale[1] * this.s.mult,
-        scale[2] * this.s.mult
-      );
-    }
-    if (this.sk && this.appliedTransformations < 3) {
-      var skew = this.sk.getValueAtTime(time);
-      var skewAxis = this.sa.getValueAtTime(time);
-      matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
-    }
-    if (this.r && this.appliedTransformations < 4) {
-      var rotation = this.r.getValueAtTime(time);
-      matrix.rotate(-rotation * this.r.mult);
-    } else if (!this.r && this.appliedTransformations < 4) {
-      var rotationZ = this.rz.getValueAtTime(time);
-      var rotationY = this.ry.getValueAtTime(time);
-      var rotationX = this.rx.getValueAtTime(time);
-      var orientation = this.or.getValueAtTime(time);
-      matrix.rotateZ(-rotationZ * this.rz.mult)
-        .rotateY(rotationY * this.ry.mult)
-        .rotateX(rotationX * this.rx.mult)
-        .rotateZ(-orientation[2] * this.or.mult)
-        .rotateY(orientation[1] * this.or.mult)
-        .rotateX(orientation[0] * this.or.mult);
-    }
-    if (this.data.p && this.data.p.s) {
-      var positionX = this.px.getValueAtTime(time);
-      var positionY = this.py.getValueAtTime(time);
-      if (this.data.p.z) {
-        var positionZ = this.pz.getValueAtTime(time);
-        matrix.translate(
-          positionX * this.px.mult,
-          positionY * this.py.mult,
-          -positionZ * this.pz.mult
-        );
-      } else {
-        matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
-      }
-    } else {
-      var position = this.p.getValueAtTime(time);
-      matrix.translate(
-        position[0] * this.p.mult,
-        position[1] * this.p.mult,
-        -position[2] * this.p.mult
-      );
-    }
-    return matrix;
-    /// /
-  }
-
-  function getTransformStaticValueAtTime() {
-    return this.v.clone(new Matrix());
-  }
-
-  var getTransformProperty = TransformPropertyFactory.getTransformProperty;
-  TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
-    var prop = getTransformProperty(elem, data, container);
-    if (prop.dynamicProperties.length) {
-      prop.getValueAtTime = getTransformValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+    if (forceFlag) {
+      this.checkSegments(0);
     }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    return prop;
   };
 
-  var propertyGetProp = PropertyFactory.getProp;
-  PropertyFactory.getProp = function (elem, data, type, mult, container) {
-    var prop = propertyGetProp(elem, data, type, mult, container);
-    // prop.getVelocityAtTime = getVelocityAtTime;
-    // prop.loopOut = loopOut;
-    // prop.loopIn = loopIn;
-    if (prop.kf) {
-      prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    prop.loopOut = loopOut;
-    prop.loopIn = loopIn;
-    prop.smooth = smooth;
-    prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
-    prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
-    prop.numKeys = data.a === 1 ? data.k.length : 0;
-    prop.propertyIndex = data.ix;
-    var value = 0;
-    if (type !== 0) {
-      value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
-    }
-    prop._cachingAtTime = {
-      lastFrame: initialDefaultFrame,
-      lastIndex: 0,
-      value: value,
-    };
-    expressionHelpers.searchExpressions(elem, data, prop);
-    if (prop.k) {
-      container.addDynamicProperty(prop);
-    }
-
-    return prop;
-  };
-
-  function getShapeValueAtTime(frameNum) {
-    // For now this caching object is created only when needed instead of creating it when the shape is initialized.
-    if (!this._cachingAtTime) {
-      this._cachingAtTime = {
-        shapeValue: shapePool.clone(this.pv),
-        lastIndex: 0,
-        lastTime: initialDefaultFrame,
-      };
-    }
-
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastTime) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
-      this._cachingAtTime.lastTime = frameNum;
-      this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
-    }
-    return this._cachingAtTime.shapeValue;
-  }
-
-  var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
-  var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
-
-  function ShapeExpressions() {}
-  ShapeExpressions.prototype = {
-    vertices: function (prop, time) {
-      if (this.k) {
-        this.getValue();
-      }
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      var i;
-      var len = shapePath._length;
-      var vertices = shapePath[prop];
-      var points = shapePath.v;
-      var arr = createSizedArray(len);
-      for (i = 0; i < len; i += 1) {
-        if (prop === 'i' || prop === 'o') {
-          arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
-        } else {
-          arr[i] = [vertices[i][0], vertices[i][1]];
-        }
-      }
-      return arr;
-    },
-    points: function (time) {
-      return this.vertices('v', time);
-    },
-    inTangents: function (time) {
-      return this.vertices('i', time);
-    },
-    outTangents: function (time) {
-      return this.vertices('o', time);
-    },
-    isClosed: function () {
-      return this.v.c;
-    },
-    pointOnPath: function (perc, time) {
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      if (!this._segmentsLength) {
-        this._segmentsLength = bez.getSegmentsLength(shapePath);
-      }
-
-      var segmentsLength = this._segmentsLength;
-      var lengths = segmentsLength.lengths;
-      var lengthPos = segmentsLength.totalLength * perc;
-      var i = 0;
-      var len = lengths.length;
-      var accumulatedLength = 0;
-      var pt;
-      while (i < len) {
-        if (accumulatedLength + lengths[i].addedLength > lengthPos) {
-          var initIndex = i;
-          var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
-          var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
-          pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
-          break;
-        } else {
-          accumulatedLength += lengths[i].addedLength;
-        }
-        i += 1;
-      }
-      if (!pt) {
-        pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
-      }
-      return pt;
-    },
-    vectorOnPath: function (perc, time, vectorType) {
-      // perc doesn't use triple equality because it can be a Number object as well as a primitive.
-      if (perc == 1) { // eslint-disable-line eqeqeq
-        perc = this.v.c;
-      } else if (perc == 0) { // eslint-disable-line eqeqeq
-        perc = 0.999;
-      }
-      var pt1 = this.pointOnPath(perc, time);
-      var pt2 = this.pointOnPath(perc + 0.001, time);
-      var xLength = pt2[0] - pt1[0];
-      var yLength = pt2[1] - pt1[1];
-      var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
-      if (magnitude === 0) {
-        return [0, 0];
-      }
-      var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
-      return unitVector;
-    },
-    tangentOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'tangent');
-    },
-    normalOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'normal');
-    },
-    setGroupProperty: expressionHelpers.setGroupProperty,
-    getValueAtTime: expressionHelpers.getStaticValueAtTime,
-  };
-  extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
-  extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-  KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
-  KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
-
-  var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
-  ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
-    var prop = propertyGetShapeProp(elem, data, type, arr, trims);
-    prop.propertyIndex = data.ix;
-    prop.lock = false;
-    if (type === 3) {
-      expressionHelpers.searchExpressions(elem, data.pt, prop);
-    } else if (type === 4) {
-      expressionHelpers.searchExpressions(elem, data.ks, prop);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  };
-}());
-
-/* global ExpressionManager, TextProperty */
-
-(function addDecorator() {
-  function searchExpressions() {
-    if (this.data.d.x) {
-      this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
-      this.addEffect(this.getExpressionValue.bind(this));
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
       return true;
     }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
+        }
+      }
+    }
+
+    function freeze() {
+      _isFrozen = true;
+    }
+
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
+
+    function setVolume(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
+      }
+    }
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
+  }
+
+  var bez = bezFunction();
+
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
+
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
+
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
+    }
+
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
+
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
+
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
+          this._mdf = true;
+        }
+      } else {
+        var i = 0;
+        var len = this.v.length;
+
+        while (i < len) {
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
+          }
+
+          i += 1;
+        }
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
+    }
+
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
+
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
+      }
+    }
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
+  }
+
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
+
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
+
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
+
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
+
+    return animationManager.loadAnimation(params);
+  }
+
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
+
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
+
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
+
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
+
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
+      default:
+        return null;
+    }
+  }
+
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
+
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
+
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
+    }
+  }
+
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
+
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
+
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
+      }
+    }
+
     return null;
   }
 
-  TextProperty.prototype.getExpressionValue = function (currentValue, text) {
-    var newValue = this.calculateExpression(text);
-    if (currentValue.t !== newValue) {
-      var newData = {};
-      this.copyData(newData, currentValue);
-      newData.t = newValue.toString();
-      newData.__complete = false;
-      return newData;
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
     }
-    return currentValue;
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
   };
 
-  TextProperty.prototype.searchProperty = function () {
-    var isKeyframed = this.searchKeyframes();
-    var hasExpressions = this.searchExpressions();
-    this.kf = isKeyframed || hasExpressions;
-    return this.kf;
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
   };
 
-  TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
 
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-var ShapePathInterface = (
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-  function () {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
       var prop = view.sh;
 
@@ -12439,1465 +7811,10874 @@
         if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
           return interfaceFunction.path;
         }
+
         return null;
       }
 
       var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
       prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
       Object.defineProperties(interfaceFunction, {
         path: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
         shape: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
-        _name: { value: shape.nm },
-        ix: { value: shape.ix },
-        propertyIndex: { value: shape.ix },
-        mn: { value: shape.mn },
-        propertyGroup: { value: propertyGroup },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
       });
       return interfaceFunction;
     };
-  }()
-);
+  }();
 
-/* exported propertyGroupFactory */
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
 
-var propertyGroupFactory = (function () {
-  return function (interfaceFunction, parentPropertyGroup) {
-    return function (val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return parentPropertyGroup(val - 1);
-    };
-  };
-}());
-
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
-  return function (propertyName, propertyGroup) {
-    var interfaceFunction = {
-      _name: propertyName,
-    };
-
-    function _propertyGroup(val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return propertyGroup(val - 1);
-    }
-
-    return _propertyGroup;
-  };
-}());
-
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
-
-var ShapeExpressionInterface = (function () {
-  function iterateElements(shapes, view, propertyGroup) {
-    var arr = [];
-    var i;
-    var len = shapes ? shapes.length : 0;
-    for (i = 0; i < len; i += 1) {
-      if (shapes[i].ty === 'gr') {
-        arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'fl') {
-        arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'st') {
-        arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tm') {
-        arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tr') {
-        // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
-      } else if (shapes[i].ty === 'el') {
-        arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sr') {
-        arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sh') {
-        arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rc') {
-        arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rd') {
-        arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rp') {
-        arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'gf') {
-        arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else {
-        arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
-      }
-    }
-    return arr;
-  }
-
-  function contentsInterfaceFactory(shape, view, propertyGroup) {
-    var interfaces;
-    var interfaceFunction = function _interfaceFunction(value) {
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
-          return interfaces[i];
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
         }
-        i += 1;
       }
-      if (typeof value === 'number') {
-        return interfaces[value - 1];
-      }
-      return null;
-    };
 
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
-    interfaceFunction.numProperties = interfaces.length;
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.transform = transformInterface;
-    interfaceFunction.propertyIndex = shape.cix;
-    interfaceFunction._name = shape.nm;
+      return arr;
+    }
 
-    return interfaceFunction;
-  }
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
 
-  function groupInterfaceFactory(shape, view, propertyGroup) {
-    var interfaceFunction = function _interfaceFunction(value) {
-      switch (value) {
-        case 'ADBE Vectors Group':
-        case 'Contents':
-        case 2:
-          return interfaceFunction.content;
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
           // Not necessary for now. Keeping them here in case a new case appears
           // case 'ADBE Vector Transform Group':
           // case 3:
-        default:
-          return interfaceFunction.transform;
-      }
-    };
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.content = content;
-    interfaceFunction.transform = transformInterface;
-    Object.defineProperty(interfaceFunction, '_name', {
-      get: function () {
-        return shape.nm;
-      },
-    });
-    // interfaceFunction.content = interfaceFunction;
-    interfaceFunction.numProperties = shape.np;
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.nm = shape.nm;
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
 
-  function fillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
     }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
 
-    view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
 
-  function gradientFillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Start Point' || val === 'start point') {
-        return interfaceFunction.startPoint;
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      if (val === 'End Point' || val === 'end point') {
-        return interfaceFunction.endPoint;
-      }
-      if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      startPoint: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      endPoint: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      type: {
-        get: function () {
-          return 'a';
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
-  function defaultInterfaceFactory() {
-    function interfaceFunction() {
-      return null;
-    }
-    return interfaceFunction;
-  }
-
-  function strokeInterfaceFactory(shape, view, propertyGroup) {
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
-    function addPropertyToDashOb(i) {
-      Object.defineProperty(dashOb, shape.d[i].nm, {
-        get: ExpressionPropertyInterface(view.d.dataProps[i].p),
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
       });
-    }
-    var i;
-    var len = shape.d ? shape.d.length : 0;
-    var dashOb = {};
-    for (i = 0; i < len; i += 1) {
-      addPropertyToDashOb(i);
-      view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      } if (val === 'Stroke Width' || val === 'stroke width') {
-        return interfaceFunction.strokeWidth;
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      strokeWidth: {
-        get: ExpressionPropertyInterface(view.w),
-      },
-      dash: {
-        get: function () {
-          return dashOb;
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
-    return interfaceFunction;
-  }
-
-  function trimInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === shape.e.ix || val === 'End' || val === 'end') {
-        return interfaceFunction.end;
-      }
-      if (val === shape.s.ix) {
-        return interfaceFunction.start;
-      }
-      if (val === shape.o.ix) {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-
-    view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.propertyGroup = propertyGroup;
-
-    Object.defineProperties(interfaceFunction, {
-      start: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      end: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function transformInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.a.ix === value || value === 'Anchor Point') {
-        return interfaceFunction.anchorPoint;
-      }
-      if (shape.o.ix === value || value === 'Opacity') {
-        return interfaceFunction.opacity;
-      }
-      if (shape.p.ix === value || value === 'Position') {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
-        return interfaceFunction.rotation;
-      }
-      if (shape.s.ix === value || value === 'Scale') {
-        return interfaceFunction.scale;
-      }
-      if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {
-        return interfaceFunction.skew;
-      }
-      if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {
-        return interfaceFunction.skewAxis;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
-    view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
-    view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (view.transform.mProps.sk) {
-      view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
-      view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
-    }
-    view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      opacity: {
-        get: ExpressionPropertyInterface(view.transform.mProps.o),
-      },
-      position: {
-        get: ExpressionPropertyInterface(view.transform.mProps.p),
-      },
-      anchorPoint: {
-        get: ExpressionPropertyInterface(view.transform.mProps.a),
-      },
-      scale: {
-        get: ExpressionPropertyInterface(view.transform.mProps.s),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(view.transform.mProps.r),
-      },
-      skew: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sk),
-      },
-      skewAxis: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sa),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.ty = 'tr';
-    interfaceFunction.mn = shape.mn;
-    interfaceFunction.propertyGroup = propertyGroup;
-    return interfaceFunction;
-  }
-
-  function ellipseInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.s.ix === value) {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function starInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.rotation;
-      }
-      if (shape.pt.ix === value) {
-        return interfaceFunction.points;
-      }
-      if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
-        return interfaceFunction.outerRadius;
-      }
-      if (shape.os.ix === value) {
-        return interfaceFunction.outerRoundness;
-      }
-      if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
-        return interfaceFunction.innerRadius;
-      }
-      if (shape.is && shape.is.ix === value) {
-        return interfaceFunction.innerRoundness;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
-    prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
-    prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (shape.ir) {
-      prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
-      prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
-    }
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      points: {
-        get: ExpressionPropertyInterface(prop.pt),
-      },
-      outerRadius: {
-        get: ExpressionPropertyInterface(prop.or),
-      },
-      outerRoundness: {
-        get: ExpressionPropertyInterface(prop.os),
-      },
-      innerRadius: {
-        get: ExpressionPropertyInterface(prop.ir),
-      },
-      innerRoundness: {
-        get: ExpressionPropertyInterface(prop.is),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function rectInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.roundness;
-      }
-      if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      roundness: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function roundedInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.r.ix === value || value === 'Round Corners 1') {
-        return interfaceFunction.radius;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      radius: {
-        get: ExpressionPropertyInterface(prop.rd),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function repeaterInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.c.ix === value || value === 'Copies') {
-        return interfaceFunction.copies;
-      } if (shape.o.ix === value || value === 'Offset') {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
-    prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      copies: {
-        get: ExpressionPropertyInterface(prop.c),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(prop.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  return function (shapes, view, propertyGroup) {
-    var interfaces;
-    function _interfaceFunction(value) {
-      if (typeof value === 'number') {
-        value = value === undefined ? 1 : value;
-        if (value === 0) {
-          return propertyGroup;
-        }
-        return interfaces[value - 1];
-      }
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value) {
-          return interfaces[i];
-        }
-        i += 1;
-      }
-      return null;
-    }
-    function parentGroupWrapper() {
-      return propertyGroup;
-    }
-    _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
-    interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
-    _interfaceFunction.numProperties = interfaces.length;
-    _interfaceFunction._name = 'Contents';
-    return _interfaceFunction;
-  };
-}());
-
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
-  return function (elem) {
-    var _prevValue;
-    var _sourceText;
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Text Document':
-          return _thisLayerFunction.sourceText;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisLayerFunction, 'sourceText', {
-      get: function () {
-        elem.textProperty.getValue();
-        var stringValue = elem.textProperty.currentData.t;
-        if (stringValue !== _prevValue) {
-          elem.textProperty.currentData.t = _prevValue;
-          _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
-          // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
-          _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
-        }
-        return _sourceText;
-      },
-    });
-    return _thisLayerFunction;
-  };
-}());
-
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
-
-var LayerExpressionInterface = (function () {
-  function getMatrix(time) {
-    var toWorldMat = new Matrix();
-    if (time !== undefined) {
-      var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
-      propMatrix.clone(toWorldMat);
-    } else {
-      var transformMat = this._elem.finalTransform.mProp;
-      transformMat.applyToMatrix(toWorldMat);
-    }
-    return toWorldMat;
-  }
-
-  function toWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function toWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function fromWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function fromWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function applyPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
-  }
-
-  function invertPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.inversePoint(arr);
-  }
-
-  function fromComp(arr) {
-    var toWorldMat = new Matrix();
-    toWorldMat.reset();
-    this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
-      }
-      return toWorldMat.inversePoint(arr);
-    }
-    return toWorldMat.inversePoint(arr);
-  }
-
-  function sampleImage() {
-    return [1, 1, 1, 1];
-  }
-
-  return function (elem) {
-    var transformInterface;
-
-    function _registerMaskInterface(maskManager) {
-      _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
-    }
-    function _registerEffectsInterface(effects) {
-      _thisLayerFunction.effect = effects;
-    }
-
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Root Vectors Group':
-        case 'Contents':
-        case 2:
-          return _thisLayerFunction.shapeInterface;
-        case 1:
-        case 6:
-        case 'Transform':
-        case 'transform':
-        case 'ADBE Transform Group':
-          return transformInterface;
-        case 4:
-        case 'ADBE Effect Parade':
-        case 'effects':
-        case 'Effects':
-          return _thisLayerFunction.effect;
-        case 'ADBE Text Properties':
-          return _thisLayerFunction.textInterface;
-        default:
-          return null;
-      }
-    }
-    _thisLayerFunction.getMatrix = getMatrix;
-    _thisLayerFunction.invertPoint = invertPoint;
-    _thisLayerFunction.applyPoint = applyPoint;
-    _thisLayerFunction.toWorld = toWorld;
-    _thisLayerFunction.toWorldVec = toWorldVec;
-    _thisLayerFunction.fromWorld = fromWorld;
-    _thisLayerFunction.fromWorldVec = fromWorldVec;
-    _thisLayerFunction.toComp = toWorld;
-    _thisLayerFunction.fromComp = fromComp;
-    _thisLayerFunction.sampleImage = sampleImage;
-    _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-    _thisLayerFunction._elem = elem;
-    transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
-    var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-    Object.defineProperties(_thisLayerFunction, {
-      hasParent: {
-        get: function () {
-          return elem.hierarchy.length;
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
         },
-      },
-      parent: {
-        get: function () {
-          return elem.hierarchy[0].layerInterface;
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
         },
-      },
-      rotation: getDescriptor(transformInterface, 'rotation'),
-      scale: getDescriptor(transformInterface, 'scale'),
-      position: getDescriptor(transformInterface, 'position'),
-      opacity: getDescriptor(transformInterface, 'opacity'),
-      anchorPoint: anchorPointDescriptor,
-      anchor_point: anchorPointDescriptor,
-      transform: {
-        get: function () {
-          return transformInterface;
-        },
-      },
-      active: {
-        get: function () {
-          return elem.isInRange;
-        },
-      },
-    });
-
-    _thisLayerFunction.startTime = elem.data.st;
-    _thisLayerFunction.index = elem.data.ind;
-    _thisLayerFunction.source = elem.data.refId;
-    _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
-    _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
-    _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    _thisLayerFunction._name = elem.data.nm;
-
-    _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
-    _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
-  var outlineInterfaceFactory = (function (elem) {
-    var currentPropertyName = '';
-    var currentProperty = elem.getFootageData();
-    function init() {
-      currentPropertyName = '';
-      currentProperty = elem.getFootageData();
-      return searchProperty;
-    }
-    function searchProperty(value) {
-      if (currentProperty[value]) {
-        currentPropertyName = value;
-        currentProperty = currentProperty[value];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      var propertyNameIndex = value.indexOf(currentPropertyName);
-      if (propertyNameIndex !== -1) {
-        var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
-        currentProperty = currentProperty[index];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      return '';
-    }
-    return init;
-  });
-
-  var dataInterfaceFactory = function (elem) {
-    function interfaceFunction(value) {
-      if (value === 'Outline') {
-        return interfaceFunction.outlineInterface();
-      }
-      return null;
-    }
-
-    interfaceFunction._name = 'Outline';
-    interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
-    return interfaceFunction;
-  };
-
-  return function (elem) {
-    function _interfaceFunction(value) {
-      if (value === 'Data') {
-        return _interfaceFunction.dataInterface;
-      }
-      return null;
-    }
-
-    _interfaceFunction._name = 'Data';
-    _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
-    return _interfaceFunction;
-  };
-}());
-
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
-  return function (comp) {
-    function _thisLayerFunction(name) {
-      var i = 0;
-      var len = comp.layers.length;
-      while (i < len) {
-        if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
-          return comp.elements[i].layerInterface;
-        }
-        i += 1;
-      }
-      return null;
-      // return {active:false};
-    }
-    Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });
-    _thisLayerFunction.layer = _thisLayerFunction;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
-    _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
-    _thisLayerFunction.displayStartTime = 0;
-    _thisLayerFunction.numLayers = comp.layers.length;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
-
-var TransformExpressionInterface = (function () {
-  return function (transform) {
-    function _thisFunction(name) {
-      switch (name) {
-        case 'scale':
-        case 'Scale':
-        case 'ADBE Scale':
-        case 6:
-          return _thisFunction.scale;
-        case 'rotation':
-        case 'Rotation':
-        case 'ADBE Rotation':
-        case 'ADBE Rotate Z':
-        case 10:
-          return _thisFunction.rotation;
-        case 'ADBE Rotate X':
-          return _thisFunction.xRotation;
-        case 'ADBE Rotate Y':
-          return _thisFunction.yRotation;
-        case 'position':
-        case 'Position':
-        case 'ADBE Position':
-        case 2:
-          return _thisFunction.position;
-        case 'ADBE Position_0':
-          return _thisFunction.xPosition;
-        case 'ADBE Position_1':
-          return _thisFunction.yPosition;
-        case 'ADBE Position_2':
-          return _thisFunction.zPosition;
-        case 'anchorPoint':
-        case 'AnchorPoint':
-        case 'Anchor Point':
-        case 'ADBE AnchorPoint':
-        case 1:
-          return _thisFunction.anchorPoint;
-        case 'opacity':
-        case 'Opacity':
-        case 11:
-          return _thisFunction.opacity;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisFunction, 'rotation', {
-      get: ExpressionPropertyInterface(transform.r || transform.rz),
-    });
-
-    Object.defineProperty(_thisFunction, 'zRotation', {
-      get: ExpressionPropertyInterface(transform.rz || transform.r),
-    });
-
-    Object.defineProperty(_thisFunction, 'xRotation', {
-      get: ExpressionPropertyInterface(transform.rx),
-    });
-
-    Object.defineProperty(_thisFunction, 'yRotation', {
-      get: ExpressionPropertyInterface(transform.ry),
-    });
-    Object.defineProperty(_thisFunction, 'scale', {
-      get: ExpressionPropertyInterface(transform.s),
-    });
-    var _px;
-    var _py;
-    var _pz;
-    var _transformFactory;
-    if (transform.p) {
-      _transformFactory = ExpressionPropertyInterface(transform.p);
-    } else {
-      _px = ExpressionPropertyInterface(transform.px);
-      _py = ExpressionPropertyInterface(transform.py);
-      if (transform.pz) {
-        _pz = ExpressionPropertyInterface(transform.pz);
-      }
-    }
-    Object.defineProperty(_thisFunction, 'position', {
-      get: function () {
-        if (transform.p) {
-          return _transformFactory();
-        }
-        return [
-          _px(),
-          _py(),
-          _pz ? _pz() : 0];
-      },
-    });
-
-    Object.defineProperty(_thisFunction, 'xPosition', {
-      get: ExpressionPropertyInterface(transform.px),
-    });
-
-    Object.defineProperty(_thisFunction, 'yPosition', {
-      get: ExpressionPropertyInterface(transform.py),
-    });
-
-    Object.defineProperty(_thisFunction, 'zPosition', {
-      get: ExpressionPropertyInterface(transform.pz),
-    });
-
-    Object.defineProperty(_thisFunction, 'anchorPoint', {
-      get: ExpressionPropertyInterface(transform.a),
-    });
-
-    Object.defineProperty(_thisFunction, 'opacity', {
-      get: ExpressionPropertyInterface(transform.o),
-    });
-
-    Object.defineProperty(_thisFunction, 'skew', {
-      get: ExpressionPropertyInterface(transform.sk),
-    });
-
-    Object.defineProperty(_thisFunction, 'skewAxis', {
-      get: ExpressionPropertyInterface(transform.sa),
-    });
-
-    Object.defineProperty(_thisFunction, 'orientation', {
-      get: ExpressionPropertyInterface(transform.or),
-    });
-
-    return _thisFunction;
-  };
-}());
-
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
-  function registerComposition(comp) {
-    this.compositions.push(comp);
-  }
-
-  return function () {
-    function _thisProjectFunction(name) {
-      var i = 0;
-      var len = this.compositions.length;
-      while (i < len) {
-        if (this.compositions[i].data && this.compositions[i].data.nm === name) {
-          if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
-            this.compositions[i].prepareFrame(this.currentFrame);
+        type: {
+          get: function get() {
+            return 'a';
           }
-          return this.compositions[i].compInterface;
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
         }
-        i += 1;
-      }
-      return null;
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    _thisProjectFunction.compositions = [];
-    _thisProjectFunction.currentFrame = 0;
-
-    _thisProjectFunction.registerComposition = registerComposition;
-
-    return _thisProjectFunction;
-  };
-}());
-
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
-
-var EffectsExpressionInterface = (function () {
-  var ob = {
-    createEffectsInterface: createEffectsInterface,
-  };
-
-  function createEffectsInterface(elem, propertyGroup) {
-    if (elem.effectsManager) {
-      var effectElements = [];
-      var effectsData = elem.data.ef;
-      var i;
-      var len = elem.effectsManager.effectElements.length;
-      for (i = 0; i < len; i += 1) {
-        effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
       }
 
-      var effects = elem.data.ef || [];
-      var groupInterface = function (name) {
-        i = 0;
-        len = effects.length;
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
         while (i < len) {
-          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-            return effectElements[i];
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
           }
+
           i += 1;
         }
+
         return null;
-      };
-      Object.defineProperty(groupInterface, 'numProperties', {
-        get: function () {
-          return effects.length;
-        },
-      });
-      return groupInterface;
-    }
-    return null;
-  }
+      }
 
-  function createGroupInterface(data, elements, propertyGroup, elem) {
-    function groupInterface(name) {
-      var effects = data.ef;
-      var i = 0;
-      var len = effects.length;
-      while (i < len) {
-        if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-          if (effects[i].ty === 5) {
-            return effectElements[i];
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
           }
-          return effectElements[i]();
+
+          return _sourceText;
         }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
         i += 1;
       }
-      throw new Error();
-    }
-    var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
 
-    var effectElements = [];
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
     var i;
-    var len = data.ef.length;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
     for (i = 0; i < len; i += 1) {
-      if (data.ef[i].ty === 5) {
-        effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
     }
 
-    if (data.mn === 'ADBE Color Control') {
-      Object.defineProperty(groupInterface, 'color', {
-        get: function () {
-          return effectElements[0]();
-        },
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
       });
     }
-    Object.defineProperties(groupInterface, {
-      numProperties: {
-        get: function () {
-          return data.np;
-        },
-      },
-      _name: { value: data.nm },
-      propertyGroup: { value: _propertyGroup },
-    });
-    groupInterface.enabled = data.en !== 0;
-    groupInterface.active = groupInterface.enabled;
-    return groupInterface;
-  }
 
-  function createValueInterface(element, type, elem, propertyGroup) {
-    var expressionProperty = ExpressionPropertyInterface(element.p);
-    function interfaceFunction() {
-      if (type === 10) {
-        return elem.comp.compInterface(element.p.v);
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
       }
-      return expressionProperty();
-    }
 
-    if (element.p.setGroupProperty) {
-      element.p.setGroupProperty(PropertyInterface('', propertyGroup));
-    }
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
 
-    return interfaceFunction;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray */
-/* exported MaskManagerInterface */
-
-var MaskManagerInterface = (function () {
-  function MaskInterface(mask, data) {
-    this._mask = mask;
-    this._data = data;
-  }
-  Object.defineProperty(MaskInterface.prototype, 'maskPath', {
-    get: function () {
-      if (this._mask.prop.k) {
-        this._mask.prop.getValue();
-      }
-      return this._mask.prop;
-    },
-  });
-  Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
-    get: function () {
-      if (this._mask.op.k) {
-        this._mask.op.getValue();
-      }
-      return this._mask.op.v * 100;
-    },
-  });
-
-  var MaskManager = function (maskManager) {
-    var _masksInterfaces = createSizedArray(maskManager.viewData.length);
-    var i;
-    var len = maskManager.viewData.length;
-    for (i = 0; i < len; i += 1) {
-      _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
-    }
-
-    var maskFunction = function (name) {
-      i = 0;
-      while (i < len) {
-        if (maskManager.masksProperties[i].nm === name) {
-          return _masksInterfaces[i];
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
         }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
         i += 1;
       }
-      return null;
-    };
-    return maskFunction;
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
   };
-  return MaskManager;
-}());
 
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
-
-var ExpressionPropertyInterface = (function () {
-  var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
-  var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
-
-  function completeProperty(expressionValue, property, type) {
-    Object.defineProperty(expressionValue, 'velocity', {
-      get: function () {
-        return property.getVelocityAtTime(property.comp.currentFrame);
-      },
-    });
-    expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
-    expressionValue.key = function (pos) {
-      if (!expressionValue.numKeys) {
-        return 0;
-      }
-      var value = '';
-      if ('s' in property.keyframes[pos - 1]) {
-        value = property.keyframes[pos - 1].s;
-      } else if ('e' in property.keyframes[pos - 2]) {
-        value = property.keyframes[pos - 2].e;
-      } else {
-        value = property.keyframes[pos - 2].s;
-      }
-      var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
-      valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
-      valueProp.value = type === 'unidimensional' ? value[0] : value;
-      return valueProp;
-    };
-    expressionValue.valueAtTime = property.getValueAtTime;
-    expressionValue.speedAtTime = property.getSpeedAtTime;
-    expressionValue.velocityAtTime = property.getVelocityAtTime;
-    expressionValue.propertyGroup = property.propertyGroup;
-  }
-
-  function UnidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultUnidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var val = property.pv * mult;
-    var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-    expressionValue.value = val;
-    completeProperty(expressionValue, property, 'unidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      val = property.v * mult;
-      if (expressionValue.value !== val) {
-        expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-        expressionValue.value = val;
-        completeProperty(expressionValue, property, 'unidimensional');
-      }
-      return expressionValue;
-    };
-  }
-
-  function MultidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultMultidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var len = (property.data && property.data.l) || property.pv.length;
-    var expressionValue = createTypedArray('float32', len);
-    var arrValue = createTypedArray('float32', len);
-    expressionValue.value = arrValue;
-    completeProperty(expressionValue, property, 'multidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      for (var i = 0; i < len; i += 1) {
-        arrValue[i] = property.v[i] * mult;
-        expressionValue[i] = arrValue[i];
-      }
-      return expressionValue;
-    };
-  }
-
-  // TODO: try to avoid using this getter
-  function defaultGetter() {
-    return defaultUnidimensionalValue;
-  }
-
-  return function (property) {
-    if (!property) {
-      return defaultGetter;
-    } if (property.propType === 'unidimensional') {
-      return UnidimensionalPropertyInterface(property);
-    }
-    return MultidimensionalPropertyInterface(property);
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
   };
-}());
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
 
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
-  function getValueProxy(index, total) {
-    this.textIndex = index + 1;
-    this.textTotal = total;
-    this.v = this.getValue() * this.mult;
-    return this.v;
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
   }
 
-  return function (elem, data) {
-    this.pv = 1;
-    this.comp = elem.comp;
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
     this.elem = elem;
-    this.mult = 0.01;
-    this.propType = 'textSelector';
-    this.textTotal = data.totalChars;
-    this.selectorValue = 100;
-    this.lastValue = [1, 1, 1];
-    this.k = true;
-    this.x = true;
-    this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);
-    this.getMult = getValueProxy;
-    this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
-    if (this.kf) {
-      this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
-    } else {
-      this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
     }
-    this.setGroupProperty = expressionHelpers.setGroupProperty;
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
   };
-}());
 
-var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
-TextSelectorProp.getTextSelectorProp = function (elem, data, arr) {
-  if (data.t === 1) {
-    return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
   }
-  return propertyGetTextProp(elem, data, arr);
-};
 
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
 
-function SliderEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function AngleEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function ColorEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function PointEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function LayerIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function MaskIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function CheckboxEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function NoValueEffect() {
-  this.p = {};
-}
-
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
-
-function EffectsManager(data, element) {
-  var effects = data.ef || [];
-  this.effectElements = [];
-  var i;
-  var len = effects.length;
-  var effectItem;
-  for (i = 0; i < len; i += 1) {
-    effectItem = new GroupEffect(effects[i], element);
-    this.effectElements.push(effectItem);
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
   }
-}
 
-function GroupEffect(data, element) {
-  this.init(data, element);
-}
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
 
-extendPrototype([DynamicPropertyContainer], GroupEffect);
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
 
-GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
 
-GroupEffect.prototype.init = function (data, element) {
-  this.data = data;
-  this.effectElements = [];
-  this.initDynamicPropertyContainer(element);
-  var i;
-  var len = this.data.ef.length;
-  var eff;
-  var effects = this.data.ef;
-  for (i = 0; i < len; i += 1) {
-    eff = null;
-    switch (effects[i].ty) {
-      case 0:
-        eff = new SliderEffect(effects[i], element, this);
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
+    if (this.kf) {
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
         break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
+    } else {
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
+    }
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
+  };
+
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
+  }
+
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
+  }
+
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
+
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
+
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
+
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
       case 1:
-        eff = new AngleEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
         break;
+
       case 2:
-        eff = new ColorEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
         break;
-      case 3:
-        eff = new PointEffect(effects[i], element, this);
-        break;
-      case 4:
-      case 7:
-        eff = new CheckboxEffect(effects[i], element, this);
-        break;
-      case 10:
-        eff = new LayerIndexEffect(effects[i], element, this);
-        break;
-      case 11:
-        eff = new MaskIndexEffect(effects[i], element, this);
-        break;
-      case 5:
-        eff = new EffectsManager(effects[i], element, this);
-        break;
-        // case 6:
+
       default:
-        eff = new NoValueEffect(effects[i], element, this);
         break;
     }
-    if (eff) {
-      this.effectElements.push(eff);
+
+    matrixHelper.translate(xPos, yPos, 0);
+  };
+
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVContextData() {
+    this.saved = [];
+    this.cArrPos = 0;
+    this.cTr = new Matrix();
+    this.cO = 1;
+    var i;
+    var len = 15;
+    this.savedOp = createTypedArray('float32', len);
+
+    for (i = 0; i < len; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = len;
+  }
+
+  CVContextData.prototype.duplicate = function () {
+    var newLength = this._length * 2;
+    var currentSavedOp = this.savedOp;
+    this.savedOp = createTypedArray('float32', newLength);
+    this.savedOp.set(currentSavedOp);
+    var i = 0;
+
+    for (i = this._length; i < newLength; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = newLength;
+  };
+
+  CVContextData.prototype.reset = function () {
+    this.cArrPos = 0;
+    this.cTr.reset();
+    this.cO = 1;
+  };
+
+  function ShapeTransformManager() {
+    this.sequences = {};
+    this.sequenceList = [];
+    this.transform_key_count = 0;
+  }
+
+  ShapeTransformManager.prototype = {
+    addTransformSequence: function addTransformSequence(transforms) {
+      var i;
+      var len = transforms.length;
+      var key = '_';
+
+      for (i = 0; i < len; i += 1) {
+        key += transforms[i].transform.key + '_';
+      }
+
+      var sequence = this.sequences[key];
+
+      if (!sequence) {
+        sequence = {
+          transforms: [].concat(transforms),
+          finalTransform: new Matrix(),
+          _mdf: false
+        };
+        this.sequences[key] = sequence;
+        this.sequenceList.push(sequence);
+      }
+
+      return sequence;
+    },
+    processSequence: function processSequence(sequence, isFirstFrame) {
+      var i = 0;
+      var len = sequence.transforms.length;
+      var _mdf = isFirstFrame;
+
+      while (i < len && !isFirstFrame) {
+        if (sequence.transforms[i].transform.mProps._mdf) {
+          _mdf = true;
+          break;
+        }
+
+        i += 1;
+      }
+
+      if (_mdf) {
+        var props;
+        sequence.finalTransform.reset();
+
+        for (i = len - 1; i >= 0; i -= 1) {
+          props = sequence.transforms[i].transform.mProps.v.props;
+          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]);
+        }
+      }
+
+      sequence._mdf = _mdf;
+    },
+    processSequences: function processSequences(isFirstFrame) {
+      var i;
+      var len = this.sequenceList.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.processSequence(this.sequenceList[i], isFirstFrame);
+      }
+    },
+    getNewKey: function getNewKey() {
+      this.transform_key_count += 1;
+      return '_' + this.transform_key_count;
+    }
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function CVMaskElement(data, element) {
+    this.data = data;
+    this.element = element;
+    this.masksProperties = this.data.masksProperties || [];
+    this.viewData = createSizedArray(this.masksProperties.length);
+    var i;
+    var len = this.masksProperties.length;
+    var hasMasks = false;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        hasMasks = true;
+      }
+
+      this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
+    }
+
+    this.hasMasks = hasMasks;
+
+    if (hasMasks) {
+      this.element.addRenderableComponent(this);
     }
   }
-};
+
+  CVMaskElement.prototype.renderFrame = function () {
+    if (!this.hasMasks) {
+      return;
+    }
+
+    var transform = this.element.finalTransform.mat;
+    var ctx = this.element.canvasContext;
+    var i;
+    var len = this.masksProperties.length;
+    var pt;
+    var pts;
+    var data;
+    ctx.beginPath();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.masksProperties[i].inv) {
+          ctx.moveTo(0, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
+          ctx.lineTo(0, this.element.globalData.compSize.h);
+          ctx.lineTo(0, 0);
+        }
+
+        data = this.viewData[i].v;
+        pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
+        ctx.moveTo(pt[0], pt[1]);
+        var j;
+        var jLen = data._length;
+
+        for (j = 1; j < jLen; j += 1) {
+          pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
+          ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+        }
+
+        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
+        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+      }
+    }
+
+    this.element.globalData.renderer.save(true);
+    ctx.clip();
+  };
+
+  CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
+
+  CVMaskElement.prototype.destroy = function () {
+    this.element = null;
+  };
+
+  function CVBaseElement() {}
+
+  CVBaseElement.prototype = {
+    createElements: function createElements() {},
+    initRendererElement: function initRendererElement() {},
+    createContainerElements: function createContainerElements() {
+      this.canvasContext = this.globalData.canvasContext;
+      this.renderableEffectsManager = new CVEffects(this);
+    },
+    createContent: function createContent() {},
+    setBlendMode: function setBlendMode() {
+      var globalData = this.globalData;
+
+      if (globalData.blendMode !== this.data.bm) {
+        globalData.blendMode = this.data.bm;
+        var blendModeValue = getBlendMode(this.data.bm);
+        globalData.canvasContext.globalCompositeOperation = blendModeValue;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new CVMaskElement(this.data, this);
+    },
+    hideElement: function hideElement() {
+      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+        this.hidden = true;
+      }
+    },
+    showElement: function showElement() {
+      if (this.isInRange && !this.isTransparent) {
+        this.hidden = false;
+        this._isFirstFrame = true;
+        this.maskManager._isFirstFrame = true;
+      }
+    },
+    renderFrame: function renderFrame() {
+      if (this.hidden || this.data.hd) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.setBlendMode();
+      var forceRealStack = this.data.ty === 0;
+      this.globalData.renderer.save(forceRealStack);
+      this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
+      this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
+      this.renderInnerContent();
+      this.globalData.renderer.restore(forceRealStack);
+
+      if (this.maskManager.hasMasks) {
+        this.globalData.renderer.restore(true);
+      }
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.canvasContext = null;
+      this.data = null;
+      this.globalData = null;
+      this.maskManager.destroy();
+    },
+    mHelper: new Matrix()
+  };
+  CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
+  CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
+
+  function CVShapeData(element, data, styles, transformsManager) {
+    this.styledShapes = [];
+    this.tr = [0, 0, 0, 0, 0, 0];
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
+    var i;
+    var len = styles.length;
+    var styledShape;
+
+    for (i = 0; i < len; i += 1) {
+      if (!styles[i].closed) {
+        styledShape = {
+          transforms: transformsManager.addTransformSequence(styles[i].transforms),
+          trNodes: []
+        };
+        this.styledShapes.push(styledShape);
+        styles[i].elements.push(styledShape);
+      }
+    }
+  }
+
+  CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
+
+  function CVShapeElement(data, globalData, comp) {
+    this.shapes = [];
+    this.shapesData = data.shapes;
+    this.stylesList = [];
+    this.itemsData = [];
+    this.prevViewData = [];
+    this.shapeModifiers = [];
+    this.processedElements = [];
+    this.transformsManager = new ShapeTransformManager();
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
+  CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
+  CVShapeElement.prototype.transformHelper = {
+    opacity: 1,
+    _opMdf: false
+  };
+  CVShapeElement.prototype.dashResetter = [];
+
+  CVShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+  };
+
+  CVShapeElement.prototype.createStyleElement = function (data, transforms) {
+    var styleElem = {
+      data: data,
+      type: data.ty,
+      preTransforms: this.transformsManager.addTransformSequence(transforms),
+      transforms: [],
+      elements: [],
+      closed: data.hd === true
+    };
+    var elementData = {};
+
+    if (data.ty === 'fl' || data.ty === 'st') {
+      elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
+
+      if (!elementData.c.k) {
+        styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
+      }
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
+      elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
+      elementData.h = PropertyFactory.getProp(this, data.h || {
+        k: 0
+      }, 0, 0.01, this);
+      elementData.a = PropertyFactory.getProp(this, data.a || {
+        k: 0
+      }, 0, degToRads, this);
+      elementData.g = new GradientProperty(this, data.g, this);
+    }
+
+    elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      styleElem.lc = lineCapEnum[data.lc || 2];
+      styleElem.lj = lineJoinEnum[data.lj || 2];
+
+      if (data.lj == 1) {
+        // eslint-disable-line eqeqeq
+        styleElem.ml = data.ml;
+      }
+
+      elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
+
+      if (!elementData.w.k) {
+        styleElem.wi = elementData.w.v;
+      }
+
+      if (data.d) {
+        var d = new DashProperty(this, data.d, 'canvas', this);
+        elementData.d = d;
+
+        if (!elementData.d.k) {
+          styleElem.da = elementData.d.dashArray;
+          styleElem["do"] = elementData.d.dashoffset[0];
+        }
+      }
+    } else {
+      styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
+    }
+
+    this.stylesList.push(styleElem);
+    elementData.style = styleElem;
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createGroupElement = function () {
+    var elementData = {
+      it: [],
+      prevViewData: []
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createTransformElement = function (data) {
+    var elementData = {
+      transform: {
+        opacity: 1,
+        _opMdf: false,
+        key: this.transformsManager.getNewKey(),
+        op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
+        mProps: TransformPropertyFactory.getTransformProperty(this, data, this)
+      }
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createShapeElement = function (data) {
+    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    return elementData;
+  };
+
+  CVShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+  };
+
+  CVShapeElement.prototype.addTransformToStyleList = function (transform) {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.push(transform);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.removeTransformFromStyleList = function () {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.pop();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.closeStyles = function (styles) {
+    var i;
+    var len = styles.length;
+
+    for (i = 0; i < len; i += 1) {
+      styles[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var processedPos;
+    var modifier;
+    var currentTransform;
+    var ownTransforms = [].concat(transforms);
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._shouldRender = shouldRender;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          currentTransform = this.createTransformElement(arr[i]);
+          itemsData[i] = currentTransform;
+        }
+
+        ownTransforms.push(itemsData[i]);
+        this.addTransformToStyleList(itemsData[i]);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i]);
+        }
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          shouldRender = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    this.removeTransformFromStyleList();
+    this.closeStyles(ownStyles);
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.renderInnerContent = function () {
+    this.transformHelper.opacity = 1;
+    this.transformHelper._opMdf = false;
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+    this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
+  };
+
+  CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
+    if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+      groupTransform.opacity = parentTransform.opacity;
+      groupTransform.opacity *= groupTransform.op.v;
+      groupTransform._opMdf = true;
+    }
+  };
+
+  CVShapeElement.prototype.drawLayer = function () {
+    var i;
+    var len = this.stylesList.length;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var elems;
+    var nodes;
+    var renderer = this.globalData.renderer;
+    var ctx = this.globalData.canvasContext;
+    var type;
+    var currentStyle;
+
+    for (i = 0; i < len; i += 1) {
+      currentStyle = this.stylesList[i];
+      type = currentStyle.type; // Skipping style when
+      // Stroke width equals 0
+      // style should not be rendered (extra unused repeaters)
+      // current opacity equals 0
+      // global opacity equals 0
+
+      if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
+        renderer.save();
+        elems = currentStyle.elements;
+
+        if (type === 'st' || type === 'gs') {
+          ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
+          ctx.lineWidth = currentStyle.wi;
+          ctx.lineCap = currentStyle.lc;
+          ctx.lineJoin = currentStyle.lj;
+          ctx.miterLimit = currentStyle.ml || 0;
+        } else {
+          ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
+        }
+
+        renderer.ctxOpacity(currentStyle.coOp);
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.beginPath();
+        }
+
+        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
+        jLen = elems.length;
+
+        for (j = 0; j < jLen; j += 1) {
+          if (type === 'st' || type === 'gs') {
+            ctx.beginPath();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(currentStyle.da);
+              ctx.lineDashOffset = currentStyle["do"];
+            }
+          }
+
+          nodes = elems[j].trNodes;
+          kLen = nodes.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            if (nodes[k].t === 'm') {
+              ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
+            } else if (nodes[k].t === 'c') {
+              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]);
+            } else {
+              ctx.closePath();
+            }
+          }
+
+          if (type === 'st' || type === 'gs') {
+            ctx.stroke();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(this.dashResetter);
+            }
+          }
+        }
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.fill(currentStyle.r);
+        }
+
+        renderer.restore();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
+    var i;
+    var len = items.length - 1;
+    var groupTransform;
+    groupTransform = parentTransform;
+
+    for (i = len; i >= 0; i -= 1) {
+      if (items[i].ty === 'tr') {
+        groupTransform = data[i].transform;
+        this.renderShapeTransform(parentTransform, groupTransform);
+      } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
+        this.renderPath(items[i], data[i]);
+      } else if (items[i].ty === 'fl') {
+        this.renderFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'st') {
+        this.renderStroke(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
+        this.renderGradientFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gr') {
+        this.renderShape(groupTransform, items[i].it, data[i].it);
+      } else if (items[i].ty === 'tm') {//
+      }
+    }
+
+    if (isMain) {
+      this.drawLayer();
+    }
+  };
+
+  CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
+    if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
+      var shapeNodes = styledShape.trNodes;
+      var paths = shape.paths;
+      var i;
+      var len;
+      var j;
+      var jLen = paths._length;
+      shapeNodes.length = 0;
+      var groupTransformMat = styledShape.transforms.finalTransform;
+
+      for (j = 0; j < jLen; j += 1) {
+        var pathNodes = paths.shapes[j];
+
+        if (pathNodes && pathNodes.v) {
+          len = pathNodes._length;
+
+          for (i = 1; i < len; i += 1) {
+            if (i === 1) {
+              shapeNodes.push({
+                t: 'm',
+                p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+              });
+            }
+
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
+            });
+          }
+
+          if (len === 1) {
+            shapeNodes.push({
+              t: 'm',
+              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+            });
+          }
+
+          if (pathNodes.c && len) {
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
+            });
+            shapeNodes.push({
+              t: 'z'
+            });
+          }
+        }
+      }
+
+      styledShape.trNodes = shapeNodes;
+    }
+  };
+
+  CVShapeElement.prototype.renderPath = function (pathData, itemData) {
+    if (pathData.hd !== true && pathData._shouldRender) {
+      var i;
+      var len = itemData.styledShapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+  };
+
+  CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var grd;
+
+    if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {
+      var ctx = this.globalData.canvasContext;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (styleData.t === 1) {
+        grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
+      } else {
+        var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+        var percent = itemData.h.v;
+
+        if (percent >= 1) {
+          percent = 0.99;
+        } else if (percent <= -1) {
+          percent = -0.99;
+        }
+
+        var dist = rad * percent;
+        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+        grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
+      }
+
+      var i;
+      var len = styleData.g.p;
+      var cValues = itemData.g.c;
+      var opacity = 1;
+
+      for (i = 0; i < len; i += 1) {
+        if (itemData.g._hasOpacity && itemData.g._collapsable) {
+          opacity = itemData.g.o[i * 2 + 1];
+        }
+
+        grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
+      }
+
+      styleElem.grd = grd;
+    }
+
+    styleElem.coOp = itemData.o.v * groupTransform.opacity;
+  };
+
+  CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var d = itemData.d;
+
+    if (d && (d._mdf || this._isFirstFrame)) {
+      styleElem.da = d.dashArray;
+      styleElem["do"] = d.dashoffset[0];
+    }
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+
+    if (itemData.w._mdf || this._isFirstFrame) {
+      styleElem.wi = itemData.w.v;
+    }
+  };
+
+  CVShapeElement.prototype.destroy = function () {
+    this.shapesData = null;
+    this.globalData = null;
+    this.canvasContext = null;
+    this.stylesList.length = 0;
+    this.itemsData.length = 0;
+  };
+
+  function CVTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.yOffset = 0;
+    this.fillColorAnim = false;
+    this.strokeColorAnim = false;
+    this.strokeWidthAnim = false;
+    this.stroke = false;
+    this.fill = false;
+    this.justifyOffset = 0;
+    this.currentRender = null;
+    this.renderType = 'canvas';
+    this.values = {
+      fill: 'rgba(0,0,0,0)',
+      stroke: 'rgba(0,0,0,0)',
+      sWidth: 0,
+      fValue: ''
+    };
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
+  CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
+
+  CVTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var hasFill = false;
+
+    if (documentData.fc) {
+      hasFill = true;
+      this.values.fill = this.buildColor(documentData.fc);
+    } else {
+      this.values.fill = 'rgba(0,0,0,0)';
+    }
+
+    this.fill = hasFill;
+    var hasStroke = false;
+
+    if (documentData.sc) {
+      hasStroke = true;
+      this.values.stroke = this.buildColor(documentData.sc);
+      this.values.sWidth = documentData.sw;
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+    var i;
+    var len;
+    var letters = documentData.l;
+    var matrixHelper = this.mHelper;
+    this.stroke = hasStroke;
+    this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
+    len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;
+
+    var charData;
+    var shapeData;
+    var k;
+    var kLen;
+    var shapes;
+    var j;
+    var jLen;
+    var pathNodes;
+    var commands;
+    var pathArr;
+    var singleShape = this.data.singleShape;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+      shapeData = charData && charData.data || {};
+      matrixHelper.reset();
+
+      if (singleShape && letters[i].n) {
+        xPos = -trackingOffset;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        firstLine = false;
+      }
+
+      shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
+      jLen = shapes.length;
+      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+      if (singleShape) {
+        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+      }
+
+      commands = createSizedArray(jLen - 1);
+      var commandsCounter = 0;
+
+      for (j = 0; j < jLen; j += 1) {
+        if (shapes[j].ty === 'sh') {
+          kLen = shapes[j].ks.k.i.length;
+          pathNodes = shapes[j].ks.k;
+          pathArr = [];
+
+          for (k = 1; k < kLen; k += 1) {
+            if (k === 1) {
+              pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+            }
+
+            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));
+          }
+
+          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));
+          commands[commandsCounter] = pathArr;
+          commandsCounter += 1;
+        }
+      }
+
+      if (singleShape) {
+        xPos += letters[i].l;
+        xPos += trackingOffset;
+      }
+
+      if (this.textSpans[cnt]) {
+        this.textSpans[cnt].elem = commands;
+      } else {
+        this.textSpans[cnt] = {
+          elem: commands
+        };
+      }
+
+      cnt += 1;
+    }
+  };
+
+  CVTextElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.font = this.values.fValue;
+    ctx.lineCap = 'butt';
+    ctx.lineJoin = 'miter';
+    ctx.miterLimit = 4;
+
+    if (!this.data.singleShape) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+    }
+
+    var i;
+    var len;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var lastFill = null;
+    var lastStroke = null;
+    var lastStrokeW = null;
+    var commands;
+    var pathArr;
+
+    for (i = 0; i < len; i += 1) {
+      if (!letters[i].n) {
+        renderedLetter = renderedLetters[i];
+
+        if (renderedLetter) {
+          this.globalData.renderer.save();
+          this.globalData.renderer.ctxTransform(renderedLetter.p);
+          this.globalData.renderer.ctxOpacity(renderedLetter.o);
+        }
+
+        if (this.fill) {
+          if (renderedLetter && renderedLetter.fc) {
+            if (lastFill !== renderedLetter.fc) {
+              lastFill = renderedLetter.fc;
+              ctx.fillStyle = renderedLetter.fc;
+            }
+          } else if (lastFill !== this.values.fill) {
+            lastFill = this.values.fill;
+            ctx.fillStyle = this.values.fill;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);
+        }
+
+        if (this.stroke) {
+          if (renderedLetter && renderedLetter.sw) {
+            if (lastStrokeW !== renderedLetter.sw) {
+              lastStrokeW = renderedLetter.sw;
+              ctx.lineWidth = renderedLetter.sw;
+            }
+          } else if (lastStrokeW !== this.values.sWidth) {
+            lastStrokeW = this.values.sWidth;
+            ctx.lineWidth = this.values.sWidth;
+          }
+
+          if (renderedLetter && renderedLetter.sc) {
+            if (lastStroke !== renderedLetter.sc) {
+              lastStroke = renderedLetter.sc;
+              ctx.strokeStyle = renderedLetter.sc;
+            }
+          } else if (lastStroke !== this.values.stroke) {
+            lastStroke = this.values.stroke;
+            ctx.strokeStyle = this.values.stroke;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);
+        }
+
+        if (renderedLetter) {
+          this.globalData.renderer.restore();
+        }
+      }
+    }
+  };
+
+  function CVImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.img = globalData.imageLoader.getAsset(this.assetData);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
+  CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVImageElement.prototype.createContent = function () {
+    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
+      var canvas = createTag('canvas');
+      canvas.width = this.assetData.w;
+      canvas.height = this.assetData.h;
+      var ctx = canvas.getContext('2d');
+      var imgW = this.img.width;
+      var imgH = this.img.height;
+      var imgRel = imgW / imgH;
+      var canvasRel = this.assetData.w / this.assetData.h;
+      var widthCrop;
+      var heightCrop;
+      var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
+
+      if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {
+        heightCrop = imgH;
+        widthCrop = heightCrop * canvasRel;
+      } else {
+        widthCrop = imgW;
+        heightCrop = widthCrop / canvasRel;
+      }
+
+      ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
+      this.img = canvas;
+    }
+  };
+
+  CVImageElement.prototype.renderInnerContent = function () {
+    this.canvasContext.drawImage(this.img, 0, 0);
+  };
+
+  CVImageElement.prototype.destroy = function () {
+    this.img = null;
+  };
+
+  function CVSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
+  CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVSolidElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.fillStyle = this.data.sc;
+    ctx.fillRect(0, 0, this.data.sw, this.data.sh); //
+  };
+
+  function CanvasRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([BaseRenderer], CanvasRendererBase);
+
+  CanvasRendererBase.prototype.createShape = function (data) {
+    return new CVShapeElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createText = function (data) {
+    return new CVTextElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createImage = function (data) {
+    return new CVImageElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createSolid = function (data) {
+    return new CVSolidElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  CanvasRendererBase.prototype.ctxTransform = function (props) {
+    if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
+      return;
+    }
+
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
+      return;
+    }
+
+    this.transformMat.cloneFromProps(props);
+    var cProps = this.contextData.cTr.props;
+    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]); // 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]);
+
+    this.contextData.cTr.cloneFromProps(this.transformMat.props);
+    var trProps = this.contextData.cTr.props;
+    this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
+  };
+
+  CanvasRendererBase.prototype.ctxOpacity = function (op) {
+    /* if(op === 1){
+          return;
+      } */
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+      return;
+    }
+
+    this.contextData.cO *= op < 0 ? 0 : op;
+
+    if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
+      this.canvasContext.globalAlpha = this.contextData.cO;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+    }
+  };
+
+  CanvasRendererBase.prototype.reset = function () {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    this.contextData.reset();
+  };
+
+  CanvasRendererBase.prototype.save = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.save();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.save();
+    }
+
+    var props = this.contextData.cTr.props;
+
+    if (this.contextData._length <= this.contextData.cArrPos) {
+      this.contextData.duplicate();
+    }
+
+    var i;
+    var arr = this.contextData.saved[this.contextData.cArrPos];
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = props[i];
+    }
+
+    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
+    this.contextData.cArrPos += 1;
+  };
+
+  CanvasRendererBase.prototype.restore = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.restore();
+      this.globalData.blendMode = 'source-over';
+    }
+
+    this.contextData.cArrPos -= 1;
+    var popped = this.contextData.saved[this.contextData.cArrPos];
+    var i;
+    var arr = this.contextData.cTr.props;
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = popped[i];
+    }
+
+    this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
+    popped = this.contextData.savedOp[this.contextData.cArrPos];
+    this.contextData.cO = popped;
+
+    if (this.globalData.currentGlobalAlpha !== popped) {
+      this.canvasContext.globalAlpha = popped;
+      this.globalData.currentGlobalAlpha = popped;
+    }
+  };
+
+  CanvasRendererBase.prototype.configAnimation = function (animData) {
+    if (this.animationItem.wrapper) {
+      this.animationItem.container = createTag('canvas');
+      var containerStyle = this.animationItem.container.style;
+      containerStyle.width = '100%';
+      containerStyle.height = '100%';
+      var origin = '0px 0px 0px';
+      containerStyle.transformOrigin = origin;
+      containerStyle.mozTransformOrigin = origin;
+      containerStyle.webkitTransformOrigin = origin;
+      containerStyle['-webkit-transform'] = origin;
+      containerStyle.contentVisibility = this.renderConfig.contentVisibility;
+      this.animationItem.wrapper.appendChild(this.animationItem.container);
+      this.canvasContext = this.animationItem.container.getContext('2d');
+
+      if (this.renderConfig.className) {
+        this.animationItem.container.setAttribute('class', this.renderConfig.className);
+      }
+
+      if (this.renderConfig.id) {
+        this.animationItem.container.setAttribute('id', this.renderConfig.id);
+      }
+    } else {
+      this.canvasContext = this.renderConfig.context;
+    }
+
+    this.data = animData;
+    this.layers = animData.layers;
+    this.transformCanvas = {
+      w: animData.w,
+      h: animData.h,
+      sx: 0,
+      sy: 0,
+      tx: 0,
+      ty: 0
+    };
+    this.setupGlobalData(animData, document.body);
+    this.globalData.canvasContext = this.canvasContext;
+    this.globalData.renderer = this;
+    this.globalData.isDashed = false;
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.transformCanvas = this.transformCanvas;
+    this.elements = createSizedArray(animData.layers.length);
+    this.updateContainerSize();
+  };
+
+  CanvasRendererBase.prototype.updateContainerSize = function () {
+    this.reset();
+    var elementWidth;
+    var elementHeight;
+
+    if (this.animationItem.wrapper && this.animationItem.container) {
+      elementWidth = this.animationItem.wrapper.offsetWidth;
+      elementHeight = this.animationItem.wrapper.offsetHeight;
+      this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
+      this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
+    } else {
+      elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+      elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
+    }
+
+    var elementRel;
+    var animationRel;
+
+    if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
+      var par = this.renderConfig.preserveAspectRatio.split(' ');
+      var fillType = par[1] || 'meet';
+      var pos = par[0] || 'xMidYMid';
+      var xPos = pos.substr(0, 4);
+      var yPos = pos.substr(4);
+      elementRel = elementWidth / elementHeight;
+      animationRel = this.transformCanvas.w / this.transformCanvas.h;
+
+      if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {
+        this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      } else {
+        this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      }
+
+      if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;
+      } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.tx = 0;
+      }
+
+      if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;
+      } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.ty = 0;
+      }
+    } else if (this.renderConfig.preserveAspectRatio === 'none') {
+      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    } else {
+      this.transformCanvas.sx = this.renderConfig.dpr;
+      this.transformCanvas.sy = this.renderConfig.dpr;
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    }
+
+    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];
+    /* var i, len = this.elements.length;
+      for(i=0;i<len;i+=1){
+          if(this.elements[i] && this.elements[i].data.ty === 0){
+              this.elements[i].resize(this.globalData.transformCanvas);
+          }
+      } */
+
+    this.ctxTransform(this.transformCanvas.props);
+    this.canvasContext.beginPath();
+    this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+    this.canvasContext.closePath();
+    this.canvasContext.clip();
+    this.renderFrame(this.renderedFrame, true);
+  };
+
+  CanvasRendererBase.prototype.destroy = function () {
+    if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.globalData.canvasContext = null;
+    this.animationItem.container = null;
+    this.destroyed = true;
+  };
+
+  CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {
+    if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {
+      return;
+    }
+
+    this.renderedFrame = num;
+    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+    this.globalData.frameId += 1;
+    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
+    this.globalData.projectInterface.currentFrame = num; // console.log('--------');
+    // console.log('NEW: ',num);
+
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      if (this.renderConfig.clearCanvas === true) {
+        this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+      } else {
+        this.save();
+      }
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+
+      if (this.renderConfig.clearCanvas !== true) {
+        this.restore();
+      }
+    }
+  };
+
+  CanvasRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    var element = this.createItem(this.layers[pos], this, this.globalData);
+    elements[pos] = element;
+    element.initExpressions();
+    /* if(this.layers[pos].ty === 0){
+          element.resize(this.globalData.transformCanvas);
+      } */
+  };
+
+  CanvasRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  CanvasRendererBase.prototype.hide = function () {
+    this.animationItem.container.style.display = 'none';
+  };
+
+  CanvasRendererBase.prototype.show = function () {
+    this.animationItem.container.style.display = 'block';
+  };
+
+  function CVCompElement(data, globalData, comp) {
+    this.completeLayers = false;
+    this.layers = data.layers;
+    this.pendingElements = [];
+    this.elements = createSizedArray(this.layers.length);
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);
+
+  CVCompElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.beginPath();
+    ctx.moveTo(0, 0);
+    ctx.lineTo(this.data.w, 0);
+    ctx.lineTo(this.data.w, this.data.h);
+    ctx.lineTo(0, this.data.h);
+    ctx.lineTo(0, 0);
+    ctx.clip();
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  CVCompElement.prototype.destroy = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.layers = null;
+    this.elements = null;
+  };
+
+  CVCompElement.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function CanvasRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([CanvasRendererBase], CanvasRenderer);
+
+  CanvasRenderer.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function HBaseElement() {}
+
+  HBaseElement.prototype = {
+    checkBlendMode: function checkBlendMode() {},
+    initRendererElement: function initRendererElement() {
+      this.baseElement = createTag(this.data.tg || 'div');
+
+      if (this.data.hasMask) {
+        this.svgElement = createNS('svg');
+        this.layerElement = createNS('g');
+        this.maskedElement = this.layerElement;
+        this.svgElement.appendChild(this.layerElement);
+        this.baseElement.appendChild(this.svgElement);
+      } else {
+        this.layerElement = this.baseElement;
+      }
+
+      styleDiv(this.baseElement);
+    },
+    createContainerElements: function createContainerElements() {
+      this.renderableEffectsManager = new CVEffects(this);
+      this.transformedElement = this.baseElement;
+      this.maskedElement = this.layerElement;
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
+
+      if (this.finalTransform._matMdf) {
+        var matrixValue = this.finalTransform.mat.toCSS();
+        transformedElementStyle.transform = matrixValue;
+        transformedElementStyle.webkitTransform = matrixValue;
+      }
+
+      if (this.finalTransform._opMdf) {
+        transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
+      }
+    },
+    renderFrame: function renderFrame() {
+      // If it is exported as hidden (data.hd === true) no need to render
+      // If it is not visible no need to render
+      if (this.data.hd || this.hidden) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.renderElement();
+      this.renderInnerContent();
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.layerElement = null;
+      this.transformedElement = null;
+
+      if (this.matteElement) {
+        this.matteElement = null;
+      }
+
+      if (this.maskManager) {
+        this.maskManager.destroy();
+        this.maskManager = null;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+    },
+    addEffects: function addEffects() {},
+    setMatte: function setMatte() {}
+  };
+  HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
+  HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
+  HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;
+
+  function HSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
+
+  HSolidElement.prototype.createContent = function () {
+    var rect;
+
+    if (this.data.hasMask) {
+      rect = createNS('rect');
+      rect.setAttribute('width', this.data.sw);
+      rect.setAttribute('height', this.data.sh);
+      rect.setAttribute('fill', this.data.sc);
+      this.svgElement.setAttribute('width', this.data.sw);
+      this.svgElement.setAttribute('height', this.data.sh);
+    } else {
+      rect = createTag('div');
+      rect.style.width = this.data.sw + 'px';
+      rect.style.height = this.data.sh + 'px';
+      rect.style.backgroundColor = this.data.sc;
+    }
+
+    this.layerElement.appendChild(rect);
+  };
+
+  function HShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.shapesContainer = createNS('g');
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
+  HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
+
+  HShapeElement.prototype.createContent = function () {
+    var cont;
+    this.baseElement.style.fontSize = 0;
+
+    if (this.data.hasMask) {
+      this.layerElement.appendChild(this.shapesContainer);
+      cont = this.svgElement;
+    } else {
+      cont = createNS('svg');
+      var size = this.comp.data ? this.comp.data : this.globalData.compSize;
+      cont.setAttribute('width', size.w);
+      cont.setAttribute('height', size.h);
+      cont.appendChild(this.shapesContainer);
+      this.layerElement.appendChild(cont);
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
+    this.filterUniqueShapes();
+    this.shapeCont = cont;
+  };
+
+  HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
+    var i;
+    var len = transformers.length;
+
+    for (i = 0; i < len; i += 1) {
+      point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
+    }
+
+    return point;
+  };
+
+  HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
+    var shape = item.sh.v;
+    var transformers = item.transformers;
+    var i;
+    var len = shape._length;
+    var vPoint;
+    var oPoint;
+    var nextIPoint;
+    var nextVPoint;
+
+    if (len <= 1) {
+      return;
+    }
+
+    for (i = 0; i < len - 1; i += 1) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+
+    if (shape.c) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+  };
+
+  HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
+    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
+    var bounds = this.shapeBoundingBox;
+    boundingBox.x = bmMin(bounds.left, boundingBox.x);
+    boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
+    boundingBox.y = bmMin(bounds.top, boundingBox.y);
+    boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
+  };
+
+  HShapeElement.prototype.shapeBoundingBox = {
+    left: 0,
+    right: 0,
+    top: 0,
+    bottom: 0
+  };
+  HShapeElement.prototype.tempBoundingBox = {
+    x: 0,
+    xMax: 0,
+    y: 0,
+    yMax: 0,
+    width: 0,
+    height: 0
+  };
+
+  HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
+    var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
+
+    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {
+      // eslint-disable-line no-plusplus
+      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
+      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
+      c = 3 * p1[i] - 3 * p0[i];
+      b |= 0; // eslint-disable-line no-bitwise
+
+      a |= 0; // eslint-disable-line no-bitwise
+
+      c |= 0; // eslint-disable-line no-bitwise
+
+      if (a === 0 && b === 0) {//
+      } else if (a === 0) {
+        t = -c / b;
+
+        if (t > 0 && t < 1) {
+          bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
+        }
+      } else {
+        b2ac = b * b - 4 * c * a;
+
+        if (b2ac >= 0) {
+          t1 = (-b + bmSqrt(b2ac)) / (2 * a);
+          if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
+          t2 = (-b - bmSqrt(b2ac)) / (2 * a);
+          if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
+        }
+      }
+    }
+
+    this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
+    this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
+    this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
+    this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
+  };
+
+  HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
+    return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];
+  };
+
+  HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
+    var i;
+    var len = itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (itemsData[i] && itemsData[i].sh) {
+        this.calculateShapeBoundingBox(itemsData[i], boundingBox);
+      } else if (itemsData[i] && itemsData[i].it) {
+        this.calculateBoundingBox(itemsData[i].it, boundingBox);
+      }
+    }
+  };
+
+  HShapeElement.prototype.currentBoxContains = function (box) {
+    return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
+  };
+
+  HShapeElement.prototype.renderInnerContent = function () {
+    this._renderShapeFrame();
+
+    if (!this.hidden && (this._isFirstFrame || this._mdf)) {
+      var tempBoundingBox = this.tempBoundingBox;
+      var max = 999999;
+      tempBoundingBox.x = max;
+      tempBoundingBox.xMax = -max;
+      tempBoundingBox.y = max;
+      tempBoundingBox.yMax = -max;
+      this.calculateBoundingBox(this.itemsData, tempBoundingBox);
+      tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
+      tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();
+
+      if (this.currentBoxContains(tempBoundingBox)) {
+        return;
+      }
+
+      var changed = false;
+
+      if (this.currentBBox.w !== tempBoundingBox.width) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.shapeCont.setAttribute('width', tempBoundingBox.width);
+        changed = true;
+      }
+
+      if (this.currentBBox.h !== tempBoundingBox.height) {
+        this.currentBBox.h = tempBoundingBox.height;
+        this.shapeCont.setAttribute('height', tempBoundingBox.height);
+        changed = true;
+      }
+
+      if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.currentBBox.h = tempBoundingBox.height;
+        this.currentBBox.x = tempBoundingBox.x;
+        this.currentBBox.y = tempBoundingBox.y;
+        this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        var shapeStyle = this.shapeCont.style;
+        var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        shapeStyle.transform = shapeTransform;
+        shapeStyle.webkitTransform = shapeTransform;
+      }
+    }
+  };
+
+  function HTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.textPaths = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+    this.renderType = 'svg';
+    this.isMasked = false;
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
+
+  HTextElement.prototype.createContent = function () {
+    this.isMasked = this.checkMasks();
+
+    if (this.isMasked) {
+      this.renderType = 'svg';
+      this.compW = this.comp.data.w;
+      this.compH = this.comp.data.h;
+      this.svgElement.setAttribute('width', this.compW);
+      this.svgElement.setAttribute('height', this.compH);
+      var g = createNS('g');
+      this.maskedElement.appendChild(g);
+      this.innerElem = g;
+    } else {
+      this.renderType = 'html';
+      this.innerElem = this.layerElement;
+    }
+
+    this.checkParenting();
+  };
+
+  HTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var innerElemStyle = this.innerElem.style;
+    var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
+    innerElemStyle.fill = textColor;
+    innerElemStyle.color = textColor;
+
+    if (documentData.sc) {
+      innerElemStyle.stroke = this.buildColor(documentData.sc);
+      innerElemStyle.strokeWidth = documentData.sw + 'px';
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (!this.globalData.fontManager.chars) {
+      innerElemStyle.fontSize = documentData.finalSize + 'px';
+      innerElemStyle.lineHeight = documentData.finalSize + 'px';
+
+      if (fontData.fClass) {
+        this.innerElem.className = fontData.fClass;
+      } else {
+        innerElemStyle.fontFamily = fontData.fFamily;
+        var fWeight = documentData.fWeight;
+        var fStyle = documentData.fStyle;
+        innerElemStyle.fontStyle = fStyle;
+        innerElemStyle.fontWeight = fWeight;
+      }
+    }
+
+    var i;
+    var len;
+    var letters = documentData.l;
+    len = letters.length;
+    var tSpan;
+    var tParent;
+    var tCont;
+    var matrixHelper = this.mHelper;
+    var shapes;
+    var shapeStr = '';
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.globalData.fontManager.chars) {
+        if (!this.textPaths[cnt]) {
+          tSpan = createNS('path');
+          tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
+          tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
+          tSpan.setAttribute('stroke-miterlimit', '4');
+        } else {
+          tSpan = this.textPaths[cnt];
+        }
+
+        if (!this.isMasked) {
+          if (this.textSpans[cnt]) {
+            tParent = this.textSpans[cnt];
+            tCont = tParent.children[0];
+          } else {
+            tParent = createTag('div');
+            tParent.style.lineHeight = 0;
+            tCont = createNS('svg');
+            tCont.appendChild(tSpan);
+            styleDiv(tParent);
+          }
+        }
+      } else if (!this.isMasked) {
+        if (this.textSpans[cnt]) {
+          tParent = this.textSpans[cnt];
+          tSpan = this.textPaths[cnt];
+        } else {
+          tParent = createTag('span');
+          styleDiv(tParent);
+          tSpan = createTag('span');
+          styleDiv(tSpan);
+          tParent.appendChild(tSpan);
+        }
+      } else {
+        tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
+      } // tSpan.setAttribute('visibility', 'hidden');
 
 
-    var lottiejs = {};
+      if (this.globalData.fontManager.chars) {
+        var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+        var shapeData;
+
+        if (charData) {
+          shapeData = charData.data;
+        } else {
+          shapeData = null;
+        }
+
+        matrixHelper.reset();
+
+        if (shapeData && shapeData.shapes && shapeData.shapes.length) {
+          shapes = shapeData.shapes[0].it;
+          matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+          shapeStr = this.createPathShape(matrixHelper, shapes);
+          tSpan.setAttribute('d', shapeStr);
+        }
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent);
+
+          if (shapeData && shapeData.shapes) {
+            // document.body.appendChild is needed to get exact measure of shape
+            document.body.appendChild(tCont);
+            var boundingBox = tCont.getBBox();
+            tCont.setAttribute('width', boundingBox.width + 2);
+            tCont.setAttribute('height', boundingBox.height + 2);
+            tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
+            var tContStyle = tCont.style;
+            var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
+            tContStyle.transform = tContTranslation;
+            tContStyle.webkitTransform = tContTranslation;
+            letters[i].yOffset = boundingBox.y - 1;
+          } else {
+            tCont.setAttribute('width', 1);
+            tCont.setAttribute('height', 1);
+          }
+
+          tParent.appendChild(tCont);
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } else {
+        tSpan.textContent = letters[i].val;
+        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent); //
+
+          var tStyle = tSpan.style;
+          var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
+          tStyle.transform = tSpanTranslation;
+          tStyle.webkitTransform = tSpanTranslation;
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } //
+
+
+      if (!this.isMasked) {
+        this.textSpans[cnt] = tParent;
+      } else {
+        this.textSpans[cnt] = tSpan;
+      }
+
+      this.textSpans[cnt].style.display = 'block';
+      this.textPaths[cnt] = tSpan;
+      cnt += 1;
+    }
+
+    while (cnt < this.textSpans.length) {
+      this.textSpans[cnt].style.display = 'none';
+      cnt += 1;
+    }
+  };
+
+  HTextElement.prototype.renderInnerContent = function () {
+    var svgStyle;
+
+    if (this.data.singleShape) {
+      if (!this._isFirstFrame && !this.lettersChangedFlag) {
+        return;
+      }
+
+      if (this.isMasked && this.finalTransform._matMdf) {
+        // Todo Benchmark if using this is better than getBBox
+        this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
+        svgStyle = this.svgElement.style;
+        var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
+        svgStyle.transform = translation;
+        svgStyle.webkitTransform = translation;
+      }
+    }
+
+    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+    if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
+      return;
+    }
+
+    var i;
+    var len;
+    var count = 0;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var textSpan;
+    var textPath;
+
+    for (i = 0; i < len; i += 1) {
+      if (letters[i].n) {
+        count += 1;
+      } else {
+        textSpan = this.textSpans[i];
+        textPath = this.textPaths[i];
+        renderedLetter = renderedLetters[count];
+        count += 1;
+
+        if (renderedLetter._mdf.m) {
+          if (!this.isMasked) {
+            textSpan.style.webkitTransform = renderedLetter.m;
+            textSpan.style.transform = renderedLetter.m;
+          } else {
+            textSpan.setAttribute('transform', renderedLetter.m);
+          }
+        } /// /textSpan.setAttribute('opacity',renderedLetter.o);
+
+
+        textSpan.style.opacity = renderedLetter.o;
+
+        if (renderedLetter.sw && renderedLetter._mdf.sw) {
+          textPath.setAttribute('stroke-width', renderedLetter.sw);
+        }
+
+        if (renderedLetter.sc && renderedLetter._mdf.sc) {
+          textPath.setAttribute('stroke', renderedLetter.sc);
+        }
+
+        if (renderedLetter.fc && renderedLetter._mdf.fc) {
+          textPath.setAttribute('fill', renderedLetter.fc);
+          textPath.style.color = renderedLetter.fc;
+        }
+      }
+    }
+
+    if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
+      var boundingBox = this.innerElem.getBBox();
+
+      if (this.currentBBox.w !== boundingBox.width) {
+        this.currentBBox.w = boundingBox.width;
+        this.svgElement.setAttribute('width', boundingBox.width);
+      }
+
+      if (this.currentBBox.h !== boundingBox.height) {
+        this.currentBBox.h = boundingBox.height;
+        this.svgElement.setAttribute('height', boundingBox.height);
+      }
+
+      var margin = 1;
+
+      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) {
+        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;
+        this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        svgStyle = this.svgElement.style;
+        var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        svgStyle.transform = svgTransform;
+        svgStyle.webkitTransform = svgTransform;
+      }
+    }
+  };
+
+  function HCameraElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initHierarchy();
+    var getProp = PropertyFactory.getProp;
+    this.pe = getProp(this, data.pe, 0, 0, this);
+
+    if (data.ks.p.s) {
+      this.px = getProp(this, data.ks.p.x, 1, 0, this);
+      this.py = getProp(this, data.ks.p.y, 1, 0, this);
+      this.pz = getProp(this, data.ks.p.z, 1, 0, this);
+    } else {
+      this.p = getProp(this, data.ks.p, 1, 0, this);
+    }
+
+    if (data.ks.a) {
+      this.a = getProp(this, data.ks.a, 1, 0, this);
+    }
+
+    if (data.ks.or.k.length && data.ks.or.k[0].to) {
+      var i;
+      var len = data.ks.or.k.length;
+
+      for (i = 0; i < len; i += 1) {
+        data.ks.or.k[i].to = null;
+        data.ks.or.k[i].ti = null;
+      }
+    }
+
+    this.or = getProp(this, data.ks.or, 1, degToRads, this);
+    this.or.sh = true;
+    this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
+    this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
+    this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
+    this.mat = new Matrix();
+    this._prevMat = new Matrix();
+    this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
+
+    this.finalTransform = {
+      mProp: this
+    };
+  }
+
+  extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
+
+  HCameraElement.prototype.setup = function () {
+    var i;
+    var len = this.comp.threeDElements.length;
+    var comp;
+    var perspectiveStyle;
+    var containerStyle;
+
+    for (i = 0; i < len; i += 1) {
+      // [perspectiveElem,container]
+      comp = this.comp.threeDElements[i];
+
+      if (comp.type === '3d') {
+        perspectiveStyle = comp.perspectiveElem.style;
+        containerStyle = comp.container.style;
+        var perspective = this.pe.v + 'px';
+        var origin = '0px 0px 0px';
+        var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+        perspectiveStyle.perspective = perspective;
+        perspectiveStyle.webkitPerspective = perspective;
+        containerStyle.transformOrigin = origin;
+        containerStyle.mozTransformOrigin = origin;
+        containerStyle.webkitTransformOrigin = origin;
+        perspectiveStyle.transform = matrix;
+        perspectiveStyle.webkitTransform = matrix;
+      }
+    }
+  };
+
+  HCameraElement.prototype.createElements = function () {};
+
+  HCameraElement.prototype.hide = function () {};
+
+  HCameraElement.prototype.renderFrame = function () {
+    var _mdf = this._isFirstFrame;
+    var i;
+    var len;
+
+    if (this.hierarchy) {
+      len = this.hierarchy.length;
+
+      for (i = 0; i < len; i += 1) {
+        _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
+      }
+    }
+
+    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) {
+      this.mat.reset();
+
+      if (this.hierarchy) {
+        len = this.hierarchy.length - 1;
+
+        for (i = len; i >= 0; i -= 1) {
+          var mTransf = this.hierarchy[i].finalTransform.mProp;
+          this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
+          this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
+          this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
+          this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
+          this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
+        }
+      }
+
+      if (this.p) {
+        this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
+      } else {
+        this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
+      }
+
+      if (this.a) {
+        var diffVector;
+
+        if (this.p) {
+          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]];
+        } else {
+          diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
+        }
+
+        var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
+
+        var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
+        var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
+        var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);
+        var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);
+        this.mat.rotateY(mRotationY).rotateX(-mRotationX);
+      }
+
+      this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
+      this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
+      this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
+      this.mat.translate(0, 0, this.pe.v);
+      var hasMatrixChanged = !this._prevMat.equals(this.mat);
+
+      if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
+        len = this.comp.threeDElements.length;
+        var comp;
+        var perspectiveStyle;
+        var containerStyle;
+
+        for (i = 0; i < len; i += 1) {
+          comp = this.comp.threeDElements[i];
+
+          if (comp.type === '3d') {
+            if (hasMatrixChanged) {
+              var matValue = this.mat.toCSS();
+              containerStyle = comp.container.style;
+              containerStyle.transform = matValue;
+              containerStyle.webkitTransform = matValue;
+            }
+
+            if (this.pe._mdf) {
+              perspectiveStyle = comp.perspectiveElem.style;
+              perspectiveStyle.perspective = this.pe.v + 'px';
+              perspectiveStyle.webkitPerspective = this.pe.v + 'px';
+            }
+          }
+        }
+
+        this.mat.clone(this._prevMat);
+      }
+    }
+
+    this._isFirstFrame = false;
+  };
+
+  HCameraElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  HCameraElement.prototype.destroy = function () {};
+
+  HCameraElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  function HImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
+
+  HImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    var img = new Image();
+
+    if (this.data.hasMask) {
+      this.imageElem = createNS('image');
+      this.imageElem.setAttribute('width', this.assetData.w + 'px');
+      this.imageElem.setAttribute('height', this.assetData.h + 'px');
+      this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+      this.layerElement.appendChild(this.imageElem);
+      this.baseElement.setAttribute('width', this.assetData.w);
+      this.baseElement.setAttribute('height', this.assetData.h);
+    } else {
+      this.layerElement.appendChild(img);
+    }
+
+    img.crossOrigin = 'anonymous';
+    img.src = assetPath;
+
+    if (this.data.ln) {
+      this.baseElement.setAttribute('id', this.data.ln);
+    }
+  };
+
+  function HybridRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([BaseRenderer], HybridRendererBase);
+  HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;
+
+  HybridRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  HybridRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newDOMElement = element.getBaseElement();
+
+    if (!newDOMElement) {
+      return;
+    }
+
+    var layer = this.layers[pos];
+
+    if (!layer.ddd || !this.supports3d) {
+      if (this.threeDElements) {
+        this.addTo3dContainer(newDOMElement, pos);
+      } else {
+        var i = 0;
+        var nextDOMElement;
+        var nextLayer;
+        var tmpDOMElement;
+
+        while (i < pos) {
+          if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
+            nextLayer = this.elements[i];
+            tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+            nextDOMElement = tmpDOMElement || nextDOMElement;
+          }
+
+          i += 1;
+        }
+
+        if (nextDOMElement) {
+          if (!layer.ddd || !this.supports3d) {
+            this.layerElement.insertBefore(newDOMElement, nextDOMElement);
+          }
+        } else if (!layer.ddd || !this.supports3d) {
+          this.layerElement.appendChild(newDOMElement);
+        }
+      }
+    } else {
+      this.addTo3dContainer(newDOMElement, pos);
+    }
+  };
+
+  HybridRendererBase.prototype.createShape = function (data) {
+    if (!this.supports3d) {
+      return new SVGShapeElement(data, this.globalData, this);
+    }
+
+    return new HShapeElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createText = function (data) {
+    if (!this.supports3d) {
+      return new SVGTextLottieElement(data, this.globalData, this);
+    }
+
+    return new HTextElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createCamera = function (data) {
+    this.camera = new HCameraElement(data, this.globalData, this);
+    return this.camera;
+  };
+
+  HybridRendererBase.prototype.createImage = function (data) {
+    if (!this.supports3d) {
+      return new IImageElement(data, this.globalData, this);
+    }
+
+    return new HImageElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createSolid = function (data) {
+    if (!this.supports3d) {
+      return new ISolidElement(data, this.globalData, this);
+    }
+
+    return new HSolidElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
+        return this.threeDElements[i].perspectiveElem;
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {
+    var perspectiveElem = createTag('div');
+    var style;
+    var containerStyle;
+    styleDiv(perspectiveElem);
+    var container = createTag('div');
+    styleDiv(container);
+
+    if (type === '3d') {
+      style = perspectiveElem.style;
+      style.width = this.globalData.compSize.w + 'px';
+      style.height = this.globalData.compSize.h + 'px';
+      var center = '50% 50%';
+      style.webkitTransformOrigin = center;
+      style.mozTransformOrigin = center;
+      style.transformOrigin = center;
+      containerStyle = container.style;
+      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+      containerStyle.transform = matrix;
+      containerStyle.webkitTransform = matrix;
+    }
+
+    perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);
+
+    var threeDContainerData = {
+      container: container,
+      perspectiveElem: perspectiveElem,
+      startPos: pos,
+      endPos: pos,
+      type: type
+    };
+    this.threeDElements.push(threeDContainerData);
+    return threeDContainerData;
+  };
+
+  HybridRendererBase.prototype.build3dContainers = function () {
+    var i;
+    var len = this.layers.length;
+    var lastThreeDContainerData;
+    var currentContainer = '';
+
+    for (i = 0; i < len; i += 1) {
+      if (this.layers[i].ddd && this.layers[i].ty !== 3) {
+        if (currentContainer !== '3d') {
+          currentContainer = '3d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '3d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      } else {
+        if (currentContainer !== '2d') {
+          currentContainer = '2d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '2d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      }
+    }
+
+    len = this.threeDElements.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
+    }
+  };
+
+  HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (pos <= this.threeDElements[i].endPos) {
+        var j = this.threeDElements[i].startPos;
+        var nextElement;
+
+        while (j < pos) {
+          if (this.elements[j] && this.elements[j].getBaseElement) {
+            nextElement = this.elements[j].getBaseElement();
+          }
+
+          j += 1;
+        }
+
+        if (nextElement) {
+          this.threeDElements[i].container.insertBefore(elem, nextElement);
+        } else {
+          this.threeDElements[i].container.appendChild(elem);
+        }
+
+        break;
+      }
+
+      i += 1;
+    }
+  };
+
+  HybridRendererBase.prototype.configAnimation = function (animData) {
+    var resizerElem = createTag('div');
+    var wrapper = this.animationItem.wrapper;
+    var style = resizerElem.style;
+    style.width = animData.w + 'px';
+    style.height = animData.h + 'px';
+    this.resizerElem = resizerElem;
+    styleDiv(resizerElem);
+    style.transformStyle = 'flat';
+    style.mozTransformStyle = 'flat';
+    style.webkitTransformStyle = 'flat';
+
+    if (this.renderConfig.className) {
+      resizerElem.setAttribute('class', this.renderConfig.className);
+    }
+
+    wrapper.appendChild(resizerElem);
+    style.overflow = 'hidden';
+    var svg = createNS('svg');
+    svg.setAttribute('width', '1');
+    svg.setAttribute('height', '1');
+    styleDiv(svg);
+    this.resizerElem.appendChild(svg);
+    var defs = createNS('defs');
+    svg.appendChild(defs);
+    this.data = animData; // Mask animation
+
+    this.setupGlobalData(animData, svg);
+    this.globalData.defs = defs;
+    this.layers = animData.layers;
+    this.layerElement = this.resizerElem;
+    this.build3dContainers();
+    this.updateContainerSize();
+  };
+
+  HybridRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.animationItem.container = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      this.elements[i].destroy();
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  HybridRendererBase.prototype.updateContainerSize = function () {
+    var elementWidth = this.animationItem.wrapper.offsetWidth;
+    var elementHeight = this.animationItem.wrapper.offsetHeight;
+    var elementRel = elementWidth / elementHeight;
+    var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
+    var sx;
+    var sy;
+    var tx;
+    var ty;
+
+    if (animationRel > elementRel) {
+      sx = elementWidth / this.globalData.compSize.w;
+      sy = elementWidth / this.globalData.compSize.w;
+      tx = 0;
+      ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;
+    } else {
+      sx = elementHeight / this.globalData.compSize.h;
+      sy = elementHeight / this.globalData.compSize.h;
+      tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
+      ty = 0;
+    }
+
+    var style = this.resizerElem.style;
+    style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
+    style.transform = style.webkitTransform;
+  };
+
+  HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
+
+  HybridRendererBase.prototype.hide = function () {
+    this.resizerElem.style.display = 'none';
+  };
+
+  HybridRendererBase.prototype.show = function () {
+    this.resizerElem.style.display = 'block';
+  };
+
+  HybridRendererBase.prototype.initItems = function () {
+    this.buildAllItems();
+
+    if (this.camera) {
+      this.camera.setup();
+    } else {
+      var cWidth = this.globalData.compSize.w;
+      var cHeight = this.globalData.compSize.h;
+      var i;
+      var len = this.threeDElements.length;
+
+      for (i = 0; i < len; i += 1) {
+        var style = this.threeDElements[i].perspectiveElem.style;
+        style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
+        style.perspective = style.webkitPerspective;
+      }
+    }
+  };
+
+  HybridRendererBase.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+    var floatingContainer = createTag('div');
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  function HCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = !data.hasMask;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);
+  HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
+
+  HCompElement.prototype.createContainerElements = function () {
+    this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
+
+
+    if (this.data.hasMask) {
+      this.svgElement.setAttribute('width', this.data.w);
+      this.svgElement.setAttribute('height', this.data.h);
+      this.transformedElement = this.baseElement;
+    } else {
+      this.transformedElement = this.layerElement;
+    }
+  };
+
+  HCompElement.prototype.addTo3dContainer = function (elem, pos) {
+    var j = 0;
+    var nextElement;
+
+    while (j < pos) {
+      if (this.elements[j] && this.elements[j].getBaseElement) {
+        nextElement = this.elements[j].getBaseElement();
+      }
+
+      j += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(elem, nextElement);
+    } else {
+      this.layerElement.appendChild(elem);
+    }
+  };
+
+  HCompElement.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  function HybridRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([HybridRendererBase], HybridRenderer);
+
+  HybridRenderer.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  var Expressions = function () {
+    var ob = {};
+    ob.initExpressions = initExpressions;
+
+    function initExpressions(animation) {
+      var stackCount = 0;
+      var registers = [];
+
+      function pushExpression() {
+        stackCount += 1;
+      }
+
+      function popExpression() {
+        stackCount -= 1;
+
+        if (stackCount === 0) {
+          releaseInstances();
+        }
+      }
+
+      function registerExpressionProperty(expression) {
+        if (registers.indexOf(expression) === -1) {
+          registers.push(expression);
+        }
+      }
+
+      function releaseInstances() {
+        var i;
+        var len = registers.length;
+
+        for (i = 0; i < len; i += 1) {
+          registers[i].release();
+        }
+
+        registers.length = 0;
+      }
+
+      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
+      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
+      animation.renderer.globalData.pushExpression = pushExpression;
+      animation.renderer.globalData.popExpression = popExpression;
+      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
+    }
+
+    return ob;
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+  /* eslint-disable */
+
+  /*
+   Copyright 2014 David Bau.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+   */
+  function seedRandom(pool, math) {
+    //
+    // The following constants are related to IEEE 754 limits.
+    //
+    var global = this,
+        width = 256,
+        // each RC4 output is 0 <= x < 256
+    chunks = 6,
+        // at least six RC4 outputs for each double
+    digits = 52,
+        // there are 52 significant digits in a double
+    rngname = 'random',
+        // rngname: name for Math.random and Math.seedrandom
+    startdenom = math.pow(width, chunks),
+        significance = math.pow(2, digits),
+        overflow = significance * 2,
+        mask = width - 1,
+        nodecrypto; // node.js crypto module, initialized at the bottom.
+    //
+    // seedrandom()
+    // This is the seedrandom function described above.
+    //
+
+    function seedrandom(seed, options, callback) {
+      var key = [];
+      options = options === true ? {
+        entropy: true
+      } : options || {}; // Flatten the seed string or build one from local entropy if needed.
+
+      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.
+
+      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains
+      // randomness in every bit of the mantissa of the IEEE 754 value.
+
+      var prng = function prng() {
+        var n = arc4.g(chunks),
+            // Start with a numerator n < 2 ^ 48
+        d = startdenom,
+            //   and denominator d = 2 ^ 48.
+        x = 0; //   and no 'extra last byte'.
+
+        while (n < significance) {
+          // Fill up all significant digits by
+          n = (n + x) * width; //   shifting numerator and
+
+          d *= width; //   denominator and generating a
+
+          x = arc4.g(1); //   new least-significant-byte.
+        }
+
+        while (n >= overflow) {
+          // To avoid rounding up, before adding
+          n /= 2; //   last byte, shift everything
+
+          d /= 2; //   right using integer math until
+
+          x >>>= 1; //   we have exactly the desired bits.
+        }
+
+        return (n + x) / d; // Form the number within [0, 1).
+      };
+
+      prng.int32 = function () {
+        return arc4.g(4) | 0;
+      };
+
+      prng.quick = function () {
+        return arc4.g(4) / 0x100000000;
+      };
+
+      prng["double"] = prng; // Mix the randomness into accumulated entropy.
+
+      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.
+
+      return (options.pass || callback || function (prng, seed, is_math_call, state) {
+        if (state) {
+          // Load the arc4 state from the given state if it has an S array.
+          if (state.S) {
+            copy(state, arc4);
+          } // Only provide the .state method if requested via options.state.
+
+
+          prng.state = function () {
+            return copy(arc4, {});
+          };
+        } // If called as a method of Math (Math.seedrandom()), mutate
+        // Math.random because that is how seedrandom.js has worked since v1.0.
+
+
+        if (is_math_call) {
+          math[rngname] = prng;
+          return seed;
+        } // Otherwise, it is a newer calling convention, so return the
+        // prng directly.
+        else return prng;
+      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);
+    }
+
+    math['seed' + rngname] = seedrandom; //
+    // ARC4
+    //
+    // An ARC4 implementation.  The constructor takes a key in the form of
+    // an array of at most (width) integers that should be 0 <= x < (width).
+    //
+    // The g(count) method returns a pseudorandom integer that concatenates
+    // the next (count) outputs from ARC4.  Its return value is a number x
+    // that is in the range 0 <= x < (width ^ count).
+    //
+
+    function ARC4(key) {
+      var t,
+          keylen = key.length,
+          me = this,
+          i = 0,
+          j = me.i = me.j = 0,
+          s = me.S = []; // The empty key [] is treated as [0].
+
+      if (!keylen) {
+        key = [keylen++];
+      } // Set up S using the standard key scheduling algorithm.
+
+
+      while (i < width) {
+        s[i] = i++;
+      }
+
+      for (i = 0; i < width; i++) {
+        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
+        s[j] = t;
+      } // The "g" method returns the next (count) outputs as one number.
+
+
+      me.g = function (count) {
+        // Using instance members instead of closure state nearly doubles speed.
+        var t,
+            r = 0,
+            i = me.i,
+            j = me.j,
+            s = me.S;
+
+        while (count--) {
+          t = s[i = mask & i + 1];
+          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];
+        }
+
+        me.i = i;
+        me.j = j;
+        return r; // For robust unpredictability, the function call below automatically
+        // discards an initial batch of values.  This is called RC4-drop[256].
+        // See http://google.com/search?q=rsa+fluhrer+response&btnI
+      };
+    } //
+    // copy()
+    // Copies internal state of ARC4 to or from a plain object.
+    //
+
+
+    function copy(f, t) {
+      t.i = f.i;
+      t.j = f.j;
+      t.S = f.S.slice();
+      return t;
+    } //
+    // flatten()
+    // Converts an object tree to nested arrays of strings.
+    //
+
+
+    function flatten(obj, depth) {
+      var result = [],
+          typ = _typeof$1(obj),
+          prop;
+
+      if (depth && typ == 'object') {
+        for (prop in obj) {
+          try {
+            result.push(flatten(obj[prop], depth - 1));
+          } catch (e) {}
+        }
+      }
+
+      return result.length ? result : typ == 'string' ? obj : obj + '\0';
+    } //
+    // mixkey()
+    // Mixes a string seed into a key that is an array of integers, and
+    // returns a shortened string seed that is equivalent to the result key.
+    //
+
+
+    function mixkey(seed, key) {
+      var stringseed = seed + '',
+          smear,
+          j = 0;
+
+      while (j < stringseed.length) {
+        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
+      }
+
+      return tostring(key);
+    } //
+    // autoseed()
+    // Returns an object for autoseeding, using window.crypto and Node crypto
+    // module if available.
+    //
+
+
+    function autoseed() {
+      try {
+        if (nodecrypto) {
+          return tostring(nodecrypto.randomBytes(width));
+        }
+
+        var out = new Uint8Array(width);
+        (global.crypto || global.msCrypto).getRandomValues(out);
+        return tostring(out);
+      } catch (e) {
+        var browser = global.navigator,
+            plugins = browser && browser.plugins;
+        return [+new Date(), global, plugins, global.screen, tostring(pool)];
+      }
+    } //
+    // tostring()
+    // Converts an array of charcodes to a string
+    //
+
+
+    function tostring(a) {
+      return String.fromCharCode.apply(0, a);
+    } //
+    // When seedrandom.js is loaded, we immediately mix a few bits
+    // from the built-in RNG into the entropy pool.  Because we do
+    // not want to interfere with deterministic PRNG state later,
+    // seedrandom will not call math.random on its own again after
+    // initialization.
+    //
+
+
+    mixkey(math.random(), pool); //
+    // Nodejs and AMD support: export the implementation as a module using
+    // either convention.
+    //
+    // End anonymous scope, and pass initial values.
+  }
+
+  ;
+
+  function initialize$2(BMMath) {
+    seedRandom([], BMMath);
+  }
+
+  var propTypes = {
+    SHAPE: 'shape'
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var ExpressionManager = function () {
+    'use strict';
+
+    var ob = {};
+    var Math = BMMath;
+    var window = null;
+    var document = null;
+    var XMLHttpRequest = null;
+    var fetch = null;
+    var frames = null;
+    initialize$2(BMMath);
+
+    function $bm_isInstanceOfArray(arr) {
+      return arr.constructor === Array || arr.constructor === Float32Array;
+    }
+
+    function isNumerable(tOfV, v) {
+      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
+    }
+
+    function $bm_neg(a) {
+      var tOfA = _typeof(a);
+
+      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
+        return -a;
+      }
+
+      if ($bm_isInstanceOfArray(a)) {
+        var i;
+        var lenA = a.length;
+        var retArr = [];
+
+        for (i = 0; i < lenA; i += 1) {
+          retArr[i] = -a[i];
+        }
+
+        return retArr;
+      }
+
+      if (a.propType) {
+        return a.v;
+      }
+
+      return -a;
+    }
+
+    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
+    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
+    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
+
+    function sum(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (tOfA === 'string' || tOfB === 'string') {
+        return a + b;
+      }
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a + b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] += b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a + b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] + b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    var add = sum;
+
+    function sub(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        if (tOfA === 'string') {
+          a = parseInt(a, 10);
+        }
+
+        if (tOfB === 'string') {
+          b = parseInt(b, 10);
+        }
+
+        return a - b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] -= b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a - b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] - b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    function mul(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a * b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] * b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a * b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function div(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a / b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] / b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a / b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function mod(a, b) {
+      if (typeof a === 'string') {
+        a = parseInt(a, 10);
+      }
+
+      if (typeof b === 'string') {
+        b = parseInt(b, 10);
+      }
+
+      return a % b;
+    }
+
+    var $bm_sum = sum;
+    var $bm_sub = sub;
+    var $bm_mul = mul;
+    var $bm_div = div;
+    var $bm_mod = mod;
+
+    function clamp(num, min, max) {
+      if (min > max) {
+        var mm = max;
+        max = min;
+        min = mm;
+      }
+
+      return Math.min(Math.max(num, min), max);
+    }
+
+    function radiansToDegrees(val) {
+      return val / degToRads;
+    }
+
+    var radians_to_degrees = radiansToDegrees;
+
+    function degreesToRadians(val) {
+      return val * degToRads;
+    }
+
+    var degrees_to_radians = radiansToDegrees;
+    var helperLengthArray = [0, 0, 0, 0, 0, 0];
+
+    function length(arr1, arr2) {
+      if (typeof arr1 === 'number' || arr1 instanceof Number) {
+        arr2 = arr2 || 0;
+        return Math.abs(arr1 - arr2);
+      }
+
+      if (!arr2) {
+        arr2 = helperLengthArray;
+      }
+
+      var i;
+      var len = Math.min(arr1.length, arr2.length);
+      var addedLength = 0;
+
+      for (i = 0; i < len; i += 1) {
+        addedLength += Math.pow(arr2[i] - arr1[i], 2);
+      }
+
+      return Math.sqrt(addedLength);
+    }
+
+    function normalize(vec) {
+      return div(vec, length(vec));
+    }
+
+    function rgbToHsl(val) {
+      var r = val[0];
+      var g = val[1];
+      var b = val[2];
+      var max = Math.max(r, g, b);
+      var min = Math.min(r, g, b);
+      var h;
+      var s;
+      var l = (max + min) / 2;
+
+      if (max === min) {
+        h = 0; // achromatic
+
+        s = 0; // achromatic
+      } else {
+        var d = max - min;
+        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+
+        switch (max) {
+          case r:
+            h = (g - b) / d + (g < b ? 6 : 0);
+            break;
+
+          case g:
+            h = (b - r) / d + 2;
+            break;
+
+          case b:
+            h = (r - g) / d + 4;
+            break;
+
+          default:
+            break;
+        }
+
+        h /= 6;
+      }
+
+      return [h, s, l, val[3]];
+    }
+
+    function hue2rgb(p, q, t) {
+      if (t < 0) t += 1;
+      if (t > 1) t -= 1;
+      if (t < 1 / 6) return p + (q - p) * 6 * t;
+      if (t < 1 / 2) return q;
+      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+      return p;
+    }
+
+    function hslToRgb(val) {
+      var h = val[0];
+      var s = val[1];
+      var l = val[2];
+      var r;
+      var g;
+      var b;
+
+      if (s === 0) {
+        r = l; // achromatic
+
+        b = l; // achromatic
+
+        g = l; // achromatic
+      } else {
+        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+        var p = 2 * l - q;
+        r = hue2rgb(p, q, h + 1 / 3);
+        g = hue2rgb(p, q, h);
+        b = hue2rgb(p, q, h - 1 / 3);
+      }
+
+      return [r, g, b, val[3]];
+    }
+
+    function linear(t, tMin, tMax, value1, value2) {
+      if (value1 === undefined || value2 === undefined) {
+        value1 = tMin;
+        value2 = tMax;
+        tMin = 0;
+        tMax = 1;
+      }
+
+      if (tMax < tMin) {
+        var _tMin = tMax;
+        tMax = tMin;
+        tMin = _tMin;
+      }
+
+      if (t <= tMin) {
+        return value1;
+      }
+
+      if (t >= tMax) {
+        return value2;
+      }
+
+      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
+
+      if (!value1.length) {
+        return value1 + (value2 - value1) * perc;
+      }
+
+      var i;
+      var len = value1.length;
+      var arr = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
+      }
+
+      return arr;
+    }
+
+    function random(min, max) {
+      if (max === undefined) {
+        if (min === undefined) {
+          min = 0;
+          max = 1;
+        } else {
+          max = min;
+          min = undefined;
+        }
+      }
+
+      if (max.length) {
+        var i;
+        var len = max.length;
+
+        if (!min) {
+          min = createTypedArray('float32', len);
+        }
+
+        var arr = createTypedArray('float32', len);
+        var rnd = BMMath.random();
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = min[i] + rnd * (max[i] - min[i]);
+        }
+
+        return arr;
+      }
+
+      if (min === undefined) {
+        min = 0;
+      }
+
+      var rndm = BMMath.random();
+      return min + rndm * (max - min);
+    }
+
+    function createPath(points, inTangents, outTangents, closed) {
+      var i;
+      var len = points.length;
+      var path = shapePool.newElement();
+      path.setPathData(!!closed, len);
+      var arrPlaceholder = [0, 0];
+      var inVertexPoint;
+      var outVertexPoint;
+
+      for (i = 0; i < len; i += 1) {
+        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
+        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
+        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);
+      }
+
+      return path;
+    }
+
+    function initiateExpression(elem, data, property) {
+      var val = data.x;
+      var needsVelocity = /velocity(?![\w\d])/.test(val);
+
+      var _needsRandom = val.indexOf('random') !== -1;
+
+      var elemType = elem.data.ty;
+      var transform;
+      var $bm_transform;
+      var content;
+      var effect;
+      var thisProperty = property;
+      thisProperty.valueAtTime = thisProperty.getValueAtTime;
+      Object.defineProperty(thisProperty, 'value', {
+        get: function get() {
+          return thisProperty.v;
+        }
+      });
+      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
+      elem.comp.displayStartTime = 0;
+      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      var outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      var width = elem.data.sw ? elem.data.sw : 0;
+      var height = elem.data.sh ? elem.data.sh : 0;
+      var name = elem.data.nm;
+      var loopIn;
+      var loop_in;
+      var loopOut;
+      var loop_out;
+      var smooth;
+      var toWorld;
+      var fromWorld;
+      var fromComp;
+      var toComp;
+      var fromCompToSurface;
+      var position;
+      var rotation;
+      var anchorPoint;
+      var scale;
+      var thisLayer;
+      var thisComp;
+      var mask;
+      var valueAtTime;
+      var velocityAtTime;
+      var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
+
+      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
+
+      var numKeys = property.kf ? data.k.length : 0;
+      var active = !this.data || this.data.hd !== true;
+
+      var wiggle = function wiggle(freq, amp) {
+        var iWiggle;
+        var j;
+        var lenWiggle = this.pv.length ? this.pv.length : 1;
+        var addedAmps = createTypedArray('float32', lenWiggle);
+        freq = 5;
+        var iterations = Math.floor(time * freq);
+        iWiggle = 0;
+        j = 0;
+
+        while (iWiggle < iterations) {
+          // var rnd = BMMath.random();
+          for (j = 0; j < lenWiggle; j += 1) {
+            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;
+          }
+
+          iWiggle += 1;
+        } // var rnd2 = BMMath.random();
+
+
+        var periods = time * freq;
+        var perc = periods - Math.floor(periods);
+        var arr = createTypedArray('float32', lenWiggle);
+
+        if (lenWiggle > 1) {
+          for (j = 0; j < lenWiggle; j += 1) {
+            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
+            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
+          }
+
+          return arr;
+        }
+
+        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
+      }.bind(this);
+
+      if (thisProperty.loopIn) {
+        loopIn = thisProperty.loopIn.bind(thisProperty);
+        loop_in = loopIn;
+      }
+
+      if (thisProperty.loopOut) {
+        loopOut = thisProperty.loopOut.bind(thisProperty);
+        loop_out = loopOut;
+      }
+
+      if (thisProperty.smooth) {
+        smooth = thisProperty.smooth.bind(thisProperty);
+      }
+
+      function loopInDuration(type, duration) {
+        return loopIn(type, duration, true);
+      }
+
+      function loopOutDuration(type, duration) {
+        return loopOut(type, duration, true);
+      }
+
+      if (this.getValueAtTime) {
+        valueAtTime = this.getValueAtTime.bind(this);
+      }
+
+      if (this.getVelocityAtTime) {
+        velocityAtTime = this.getVelocityAtTime.bind(this);
+      }
+
+      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
+
+      function lookAt(elem1, elem2) {
+        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
+        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
+        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
+        return [yaw, pitch, 0];
+      }
+
+      function easeOut(t, tMin, tMax, val1, val2) {
+        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function easeIn(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInBez, t, tMin, tMax, val1, val2);
+      }
+
+      function ease(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function applyEase(fn, t, tMin, tMax, val1, val2) {
+        if (val1 === undefined) {
+          val1 = tMin;
+          val2 = tMax;
+        } else {
+          t = (t - tMin) / (tMax - tMin);
+        }
+
+        if (t > 1) {
+          t = 1;
+        } else if (t < 0) {
+          t = 0;
+        }
+
+        var mult = fn(t);
+
+        if ($bm_isInstanceOfArray(val1)) {
+          var iKey;
+          var lenKey = val1.length;
+          var arr = createTypedArray('float32', lenKey);
+
+          for (iKey = 0; iKey < lenKey; iKey += 1) {
+            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
+          }
+
+          return arr;
+        }
+
+        return (val2 - val1) * mult + val1;
+      }
+
+      function nearestKey(time) {
+        var iKey;
+        var lenKey = data.k.length;
+        var index;
+        var keyTime;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          index = 0;
+          keyTime = 0;
+        } else {
+          index = -1;
+          time *= elem.comp.globalData.frameRate;
+
+          if (time < data.k[0].t) {
+            index = 1;
+            keyTime = data.k[0].t;
+          } else {
+            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
+              if (time === data.k[iKey].t) {
+                index = iKey + 1;
+                keyTime = data.k[iKey].t;
+                break;
+              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
+                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
+                  index = iKey + 2;
+                  keyTime = data.k[iKey + 1].t;
+                } else {
+                  index = iKey + 1;
+                  keyTime = data.k[iKey].t;
+                }
+
+                break;
+              }
+            }
+
+            if (index === -1) {
+              index = iKey + 1;
+              keyTime = data.k[iKey].t;
+            }
+          }
+        }
+
+        var obKey = {};
+        obKey.index = index;
+        obKey.time = keyTime / elem.comp.globalData.frameRate;
+        return obKey;
+      }
+
+      function key(ind) {
+        var obKey;
+        var iKey;
+        var lenKey;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          throw new Error('The property has no keyframe at index ' + ind);
+        }
+
+        ind -= 1;
+        obKey = {
+          time: data.k[ind].t / elem.comp.globalData.frameRate,
+          value: []
+        };
+        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
+        lenKey = arr.length;
+
+        for (iKey = 0; iKey < lenKey; iKey += 1) {
+          obKey[iKey] = arr[iKey];
+          obKey.value[iKey] = arr[iKey];
+        }
+
+        return obKey;
+      }
+
+      function framesToTime(fr, fps) {
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return fr / fps;
+      }
+
+      function timeToFrames(t, fps) {
+        if (!t && t !== 0) {
+          t = time;
+        }
+
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return t * fps;
+      }
+
+      function seedRandom(seed) {
+        BMMath.seedrandom(randSeed + seed);
+      }
+
+      function sourceRectAtTime() {
+        return elem.sourceRectAtTime();
+      }
+
+      function substring(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substring(init);
+          }
+
+          return value.substring(init, end);
+        }
+
+        return '';
+      }
+
+      function substr(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substr(init);
+          }
+
+          return value.substr(init, end);
+        }
+
+        return '';
+      }
+
+      function posterizeTime(framesPerSecond) {
+        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
+        value = valueAtTime(time);
+      }
+
+      var time;
+      var velocity;
+      var value;
+      var text;
+      var textIndex;
+      var textTotal;
+      var selectorValue;
+      var index = elem.data.ind;
+      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+      var parent;
+      var randSeed = Math.floor(Math.random() * 1000000);
+      var globalData = elem.globalData;
+
+      function executeExpression(_value) {
+        // globalData.pushExpression();
+        value = _value;
+
+        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
+          return value;
+        }
+
+        if (this.propType === 'textSelector') {
+          textIndex = this.textIndex;
+          textTotal = this.textTotal;
+          selectorValue = this.selectorValue;
+        }
+
+        if (!thisLayer) {
+          text = elem.layerInterface.text;
+          thisLayer = elem.layerInterface;
+          thisComp = elem.comp.compInterface;
+          toWorld = thisLayer.toWorld.bind(thisLayer);
+          fromWorld = thisLayer.fromWorld.bind(thisLayer);
+          fromComp = thisLayer.fromComp.bind(thisLayer);
+          toComp = thisLayer.toComp.bind(thisLayer);
+          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
+          fromCompToSurface = fromComp;
+        }
+
+        if (!transform) {
+          transform = elem.layerInterface('ADBE Transform Group');
+          $bm_transform = transform;
+
+          if (transform) {
+            anchorPoint = transform.anchorPoint;
+            /* position = transform.position;
+                      rotation = transform.rotation;
+                      scale = transform.scale; */
+          }
+        }
+
+        if (elemType === 4 && !content) {
+          content = thisLayer('ADBE Root Vectors Group');
+        }
+
+        if (!effect) {
+          effect = thisLayer(4);
+        }
+
+        hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+
+        if (hasParent && !parent) {
+          parent = elem.hierarchy[0].layerInterface;
+        }
+
+        time = this.comp.renderedFrame / this.comp.globalData.frameRate;
+
+        if (_needsRandom) {
+          seedRandom(randSeed + time);
+        }
+
+        if (needsVelocity) {
+          velocity = velocityAtTime(time);
+        }
+
+        expression_function();
+        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value
+        // Changed this to a ternary operation because Rollup failed compiling it correctly
+
+        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;
+        return scoped_bm_rt;
+      } // Bundlers will see these as dead code and unless we reference them
+
+
+      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
+      return executeExpression;
+    }
+
+    ob.initiateExpression = initiateExpression;
+    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
+    return ob;
+  }();
+
+  var expressionHelpers = function () {
+    function searchExpressions(elem, data, prop) {
+      if (data.x) {
+        prop.k = true;
+        prop.x = true;
+        prop.initiateExpression = ExpressionManager.initiateExpression;
+        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
+      }
+    }
+
+    function getValueAtTime(frameNum) {
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastFrame) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
+        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
+        this._cachingAtTime.lastFrame = frameNum;
+      }
+
+      return this._cachingAtTime.value;
+    }
+
+    function getSpeedAtTime(frameNum) {
+      var delta = -0.01;
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var speed = 0;
+
+      if (v1.length) {
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          speed += Math.pow(v2[i] - v1[i], 2);
+        }
+
+        speed = Math.sqrt(speed) * 100;
+      } else {
+        speed = 0;
+      }
+
+      return speed;
+    }
+
+    function getVelocityAtTime(frameNum) {
+      if (this.vel !== undefined) {
+        return this.vel;
+      }
+
+      var delta = -0.001; // frameNum += this.elem.data.st;
+
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var velocity;
+
+      if (v1.length) {
+        velocity = createTypedArray('float32', v1.length);
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          // removing frameRate
+          // if needed, don't add it here
+          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
+          velocity[i] = (v2[i] - v1[i]) / delta;
+        }
+      } else {
+        velocity = (v2 - v1) / delta;
+      }
+
+      return velocity;
+    }
+
+    function getStaticValueAtTime() {
+      return this.pv;
+    }
+
+    function setGroupProperty(propertyGroup) {
+      this.propertyGroup = propertyGroup;
+    }
+
+    return {
+      searchExpressions: searchExpressions,
+      getSpeedAtTime: getSpeedAtTime,
+      getVelocityAtTime: getVelocityAtTime,
+      getValueAtTime: getValueAtTime,
+      getStaticValueAtTime: getStaticValueAtTime,
+      setGroupProperty: setGroupProperty
+    };
+  }();
+
+  function addPropertyDecorator() {
+    function loopOut(type, duration, durationFlag) {
+      if (!this.k || !this.keyframes) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var lastKeyFrame = keyframes[keyframes.length - 1].t;
+
+      if (currentFrame <= lastKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var firstKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
+        } else {
+          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
+        }
+
+        firstKeyFrame = lastKeyFrame - cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (iterations % 2 !== 0) {
+          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+
+        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = (endV[i] - initV[i]) * repeats + current[i];
+          }
+
+          return ret;
+        }
+
+        return (endV - initV) * repeats + current;
+      } else if (type === 'continue') {
+        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(lastValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
+          }
+
+          return ret;
+        }
+
+        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);
+      }
+
+      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function loopIn(type, duration, durationFlag) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var firstKeyFrame = keyframes[0].t;
+
+      if (currentFrame >= firstKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var lastKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        lastKeyFrame = keyframes[duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
+        } else {
+          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
+        }
+
+        lastKeyFrame = firstKeyFrame + cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
+
+        if (iterations % 2 === 0) {
+          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);
+        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
+          }
+
+          return ret;
+        }
+
+        return current - (endV - initV) * repeats;
+      } else if (type === 'continue') {
+        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(firstValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;
+          }
+
+          return ret;
+        }
+
+        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;
+      }
+
+      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function smooth(width, samples) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      width = (width || 0.4) * 0.5;
+      samples = Math.floor(samples || 5);
+
+      if (samples <= 1) {
+        return this.pv;
+      }
+
+      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
+      var initFrame = currentTime - width;
+      var endFrame = currentTime + width;
+      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
+      var i = 0;
+      var j = 0;
+      var value;
+
+      if (this.pv.length) {
+        value = createTypedArray('float32', this.pv.length);
+      } else {
+        value = 0;
+      }
+
+      var sampleValue;
+
+      while (i < samples) {
+        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
+
+        if (this.pv.length) {
+          for (j = 0; j < this.pv.length; j += 1) {
+            value[j] += sampleValue[j];
+          }
+        } else {
+          value += sampleValue;
+        }
+
+        i += 1;
+      }
+
+      if (this.pv.length) {
+        for (j = 0; j < this.pv.length; j += 1) {
+          value[j] /= samples;
+        }
+      } else {
+        value /= samples;
+      }
+
+      return value;
+    }
+
+    function getTransformValueAtTime(time) {
+      if (!this._transformCachingAtTime) {
+        this._transformCachingAtTime = {
+          v: new Matrix()
+        };
+      } /// /
+
+
+      var matrix = this._transformCachingAtTime.v;
+      matrix.cloneFromProps(this.pre.props);
+
+      if (this.appliedTransformations < 1) {
+        var anchor = this.a.getValueAtTime(time);
+        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);
+      }
+
+      if (this.appliedTransformations < 2) {
+        var scale = this.s.getValueAtTime(time);
+        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);
+      }
+
+      if (this.sk && this.appliedTransformations < 3) {
+        var skew = this.sk.getValueAtTime(time);
+        var skewAxis = this.sa.getValueAtTime(time);
+        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
+      }
+
+      if (this.r && this.appliedTransformations < 4) {
+        var rotation = this.r.getValueAtTime(time);
+        matrix.rotate(-rotation * this.r.mult);
+      } else if (!this.r && this.appliedTransformations < 4) {
+        var rotationZ = this.rz.getValueAtTime(time);
+        var rotationY = this.ry.getValueAtTime(time);
+        var rotationX = this.rx.getValueAtTime(time);
+        var orientation = this.or.getValueAtTime(time);
+        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);
+      }
+
+      if (this.data.p && this.data.p.s) {
+        var positionX = this.px.getValueAtTime(time);
+        var positionY = this.py.getValueAtTime(time);
+
+        if (this.data.p.z) {
+          var positionZ = this.pz.getValueAtTime(time);
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);
+        } else {
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
+        }
+      } else {
+        var position = this.p.getValueAtTime(time);
+        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);
+      }
+
+      return matrix; /// /
+    }
+
+    function getTransformStaticValueAtTime() {
+      return this.v.clone(new Matrix());
+    }
+
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+
+    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
+      var prop = getTransformProperty(elem, data, container);
+
+      if (prop.dynamicProperties.length) {
+        prop.getValueAtTime = getTransformValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      return prop;
+    };
+
+    var propertyGetProp = PropertyFactory.getProp;
+
+    PropertyFactory.getProp = function (elem, data, type, mult, container) {
+      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;
+      // prop.loopOut = loopOut;
+      // prop.loopIn = loopIn;
+
+      if (prop.kf) {
+        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      prop.loopOut = loopOut;
+      prop.loopIn = loopIn;
+      prop.smooth = smooth;
+      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
+      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
+      prop.numKeys = data.a === 1 ? data.k.length : 0;
+      prop.propertyIndex = data.ix;
+      var value = 0;
+
+      if (type !== 0) {
+        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
+      }
+
+      prop._cachingAtTime = {
+        lastFrame: initialDefaultFrame,
+        lastIndex: 0,
+        value: value
+      };
+      expressionHelpers.searchExpressions(elem, data, prop);
+
+      if (prop.k) {
+        container.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+
+    function getShapeValueAtTime(frameNum) {
+      // For now this caching object is created only when needed instead of creating it when the shape is initialized.
+      if (!this._cachingAtTime) {
+        this._cachingAtTime = {
+          shapeValue: shapePool.clone(this.pv),
+          lastIndex: 0,
+          lastTime: initialDefaultFrame
+        };
+      }
+
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastTime) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
+        this._cachingAtTime.lastTime = frameNum;
+        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
+      }
+
+      return this._cachingAtTime.shapeValue;
+    }
+
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
+
+    function ShapeExpressions() {}
+
+    ShapeExpressions.prototype = {
+      vertices: function vertices(prop, time) {
+        if (this.k) {
+          this.getValue();
+        }
+
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        var i;
+        var len = shapePath._length;
+        var vertices = shapePath[prop];
+        var points = shapePath.v;
+        var arr = createSizedArray(len);
+
+        for (i = 0; i < len; i += 1) {
+          if (prop === 'i' || prop === 'o') {
+            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
+          } else {
+            arr[i] = [vertices[i][0], vertices[i][1]];
+          }
+        }
+
+        return arr;
+      },
+      points: function points(time) {
+        return this.vertices('v', time);
+      },
+      inTangents: function inTangents(time) {
+        return this.vertices('i', time);
+      },
+      outTangents: function outTangents(time) {
+        return this.vertices('o', time);
+      },
+      isClosed: function isClosed() {
+        return this.v.c;
+      },
+      pointOnPath: function pointOnPath(perc, time) {
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        if (!this._segmentsLength) {
+          this._segmentsLength = bez.getSegmentsLength(shapePath);
+        }
+
+        var segmentsLength = this._segmentsLength;
+        var lengths = segmentsLength.lengths;
+        var lengthPos = segmentsLength.totalLength * perc;
+        var i = 0;
+        var len = lengths.length;
+        var accumulatedLength = 0;
+        var pt;
+
+        while (i < len) {
+          if (accumulatedLength + lengths[i].addedLength > lengthPos) {
+            var initIndex = i;
+            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;
+            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
+            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
+            break;
+          } else {
+            accumulatedLength += lengths[i].addedLength;
+          }
+
+          i += 1;
+        }
+
+        if (!pt) {
+          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
+        }
+
+        return pt;
+      },
+      vectorOnPath: function vectorOnPath(perc, time, vectorType) {
+        // perc doesn't use triple equality because it can be a Number object as well as a primitive.
+        if (perc == 1) {
+          // eslint-disable-line eqeqeq
+          perc = this.v.c;
+        } else if (perc == 0) {
+          // eslint-disable-line eqeqeq
+          perc = 0.999;
+        }
+
+        var pt1 = this.pointOnPath(perc, time);
+        var pt2 = this.pointOnPath(perc + 0.001, time);
+        var xLength = pt2[0] - pt1[0];
+        var yLength = pt2[1] - pt1[1];
+        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
+
+        if (magnitude === 0) {
+          return [0, 0];
+        }
+
+        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
+        return unitVector;
+      },
+      tangentOnPath: function tangentOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'tangent');
+      },
+      normalOnPath: function normalOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'normal');
+      },
+      setGroupProperty: expressionHelpers.setGroupProperty,
+      getValueAtTime: expressionHelpers.getStaticValueAtTime
+    };
+    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
+    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+
+    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
+      var prop = propertyGetShapeProp(elem, data, type, arr, trims);
+      prop.propertyIndex = data.ix;
+      prop.lock = false;
+
+      if (type === 3) {
+        expressionHelpers.searchExpressions(elem, data.pt, prop);
+      } else if (type === 4) {
+        expressionHelpers.searchExpressions(elem, data.ks, prop);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+  }
+
+  function initialize$1() {
+    addPropertyDecorator();
+  }
+
+  function addDecorator() {
+    function searchExpressions() {
+      if (this.data.d.x) {
+        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
+        this.addEffect(this.getExpressionValue.bind(this));
+        return true;
+      }
+
+      return null;
+    }
+
+    TextProperty.prototype.getExpressionValue = function (currentValue, text) {
+      var newValue = this.calculateExpression(text);
+
+      if (currentValue.t !== newValue) {
+        var newData = {};
+        this.copyData(newData, currentValue);
+        newData.t = newValue.toString();
+        newData.__complete = false;
+        return newData;
+      }
+
+      return currentValue;
+    };
+
+    TextProperty.prototype.searchProperty = function () {
+      var isKeyframed = this.searchKeyframes();
+      var hasExpressions = this.searchExpressions();
+      this.kf = isKeyframed || hasExpressions;
+      return this.kf;
+    };
+
+    TextProperty.prototype.searchExpressions = searchExpressions;
+  }
+
+  function initialize() {
+    addDecorator();
+  }
+
+  registerRenderer('canvas', CanvasRenderer);
+  registerRenderer('html', HybridRenderer);
+  registerRenderer('svg', SVGRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier); // Registering expression plugin
+
+  setExpressionsPlugin(Expressions);
+  initialize$1();
+  initialize(); // Registering svg effects
+
+  registerEffect(20, SVGTintFilter, true);
+  registerEffect(21, SVGFillFilter, true);
+  registerEffect(22, SVGStrokeEffect, false);
+  registerEffect(23, SVGTritoneFilter, true);
+  registerEffect(24, SVGProLevelsFilter, true);
+  registerEffect(25, SVGDropShadowEffect, true);
+  registerEffect(28, SVGMatte3Effect, false);
+  registerEffect(29, SVGGaussianBlurEffect, true);
+
+  return lottie;
+
+}));
+
+
 
     function addElementToList(element, list) {
       list.push(element);
@@ -13957,7 +18738,7 @@
         var ctx = canvas.getContext('2d');
         params.rendererSettings.context = ctx;
       }
-      animation = animationManager.loadAnimation(params);
+      animation = lottie.loadAnimation(params);
       animation.addEventListener('error', function (error) {
         console.log(error); // eslint-disable-line
       });
@@ -14010,56 +18791,9 @@
       animations[payload.id] = animation;
     }
 
-    function setQuality(value) {
-      if (typeof value === 'string') {
-        switch (value) {
-          case 'high':
-            defaultCurveSegments = 200;
-            break;
-          case 'medium':
-            defaultCurveSegments = 50;
-            break;
-          case 'low':
-          default:
-            defaultCurveSegments = 10;
-            break;
-        }
-      } else if (!isNaN(value) && value > 1) {
-        defaultCurveSegments = value;
-      }
-      if (defaultCurveSegments >= 50) {
-        roundValues(false);
-      } else {
-        roundValues(true);
-      }
-    }
-
-    function setIDPrefix(prefix) {
-      idPrefix = prefix;
-    }
-
-    lottiejs.play = animationManager.play;
-    lottiejs.pause = animationManager.pause;
-    lottiejs.togglePause = animationManager.togglePause;
-    lottiejs.setSpeed = animationManager.setSpeed;
-    lottiejs.setDirection = animationManager.setDirection;
-    lottiejs.stop = animationManager.stop;
-    lottiejs.registerAnimation = animationManager.registerAnimation;
-    lottiejs.loadAnimation = loadAnimation;
-    lottiejs.resize = animationManager.resize;
-    lottiejs.goToAndStop = animationManager.goToAndStop;
-    lottiejs.destroy = animationManager.destroy;
-    lottiejs.setQuality = setQuality;
-    lottiejs.freeze = animationManager.freeze;
-    lottiejs.unfreeze = animationManager.unfreeze;
-    lottiejs.setVolume = animationManager.setVolume;
-    lottiejs.mute = animationManager.mute;
-    lottiejs.unmute = animationManager.unmute;
-    lottiejs.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-    lottiejs.setIDPrefix = setIDPrefix;
-    lottiejs.version = '5.8.1';
-
-    return lottiejs;
+    return {
+      loadAnimation: loadAnimation,
+    };
   }({}));
   onmessage = function (evt) {
     var data = evt.data;
diff --git a/build/player/lottie_canvas_worker.min.js b/build/player/lottie_canvas_worker.min.js
index 6ace48e..c4c4637 100644
--- a/build/player/lottie_canvas_worker.min.js
+++ b/build/player/lottie_canvas_worker.min.js
@@ -10,6 +10,6 @@
         root.bodymovin = root.lottie;
     }
 }((self || {}), function(window) {
-	function workerContent(){var localIdCounter=0,animations={},styleProperties=["width","height","display","transform","opacity","contentVisibility"];function createElement(t,e){var r={serialize:function(){for(var t={},e=0;e<styleProperties.length;e+=1){var r=styleProperties[e],i="_"+r;i in this&&(t[r]=this[i])}return t}};styleProperties.forEach(function(e){Object.defineProperty(r,e,{set:function(t){i._isDirty||(i._isDirty=!0),i._changedStyles.push(e),this["_"+e]=t},get:function(){return this["_"+e]}})});var i={_state:"init",_isDirty:!1,_changedStyles:[],_changedAttributes:[],_changedElements:[],type:e,namespace:t,children:[],attributes:{id:"l_d_"+(localIdCounter+=1)},style:r,appendChild:function(t){(t.parentNode=this).children.push(t),this._isDirty=!0,this._changedElements.push([t,this.attributes.id])},insertBefore:function(t,e){for(var r=this.children,i=0;i<r.length;i+=1)if(r[i]===e)return r.splice(i,0,t),this._isDirty=!0,void this._changedElements.push([t,this.attributes.id,e.attributes.id]);r.push(e)},setAttribute:function(t,e){this.attributes[t]=e,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(t)},serialize:function(){return{type:this.type,namespace:this.namespace,style:this.style.serialize(),attributes:this.attributes,children:this.children.map(function(t){return t.serialize()})}},getContext:function(){return{fillRect:function(){}}},addEventListener:function(t,e){setTimeout(e,1)},setAttributeNS:function(t,e,r){this.attributes[e]=r,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(e)}};return i.style=r,i}var window=self,document={createElementNS:function(t,e){return createElement(t,e)},createElement:function(t){return createElement("",t)}},lottieInternal=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,_useWebWorker=!1,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bmRnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}roundValues(!1);var createElementID=(fa=0,function(){return idPrefix+"__lottie_element_"+(fa+=1)}),fa;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,p,l;switch(h=r*(1-e),p=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),l=r*(1-(1-o)*e),n%6){case 0:i=r,s=l,a=h;break;case 1:i=p,s=r,a=h;break;case 2:i=h,s=r,a=l;break;case 3:i=h,s=p,a=r;break;case 4:i=l,s=h,a=r;break;case 5:i=r,s=h,a=p}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var getBlendMode=(nb={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return nb[t]||""}),nb,lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"},Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function p(t,e){return this._t(1,e,t,1,0,0)}function l(t,e){return this.shear(n(t),n(e))}function m(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function f(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,p,l,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=p,this.props[10]=l,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,p,l,m,f,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===p&&1===l&&0===m)return y[12]=y[12]*t+y[15]*f,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*l+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],P=y[2],b=y[3],x=y[4],S=y[5],E=y[6],_=y[7],A=y[8],T=y[9],C=y[10],D=y[11],k=y[12],I=y[13],M=y[14],F=y[15];return y[0]=g*t+v*s+P*h+b*f,y[1]=g*e+v*a+P*p+b*c,y[2]=g*r+v*n+P*l+b*d,y[3]=g*i+v*o+P*m+b*u,y[4]=x*t+S*s+E*h+_*f,y[5]=x*e+S*a+E*p+_*c,y[6]=x*r+S*n+E*l+_*d,y[7]=x*i+S*o+E*m+_*u,y[8]=A*t+T*s+C*h+D*f,y[9]=A*e+T*a+C*p+D*c,y[10]=A*r+T*n+C*l+D*d,y[11]=A*i+T*o+C*m+D*u,y[12]=k*t+I*s+M*h+F*f,y[13]=k*e+I*a+M*p+F*c,y[14]=k*r+I*n+M*l+F*d,y[15]=k*i+I*o+M*m+F*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function P(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function b(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function x(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function S(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function E(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function _(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function T(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=A(t[e]);return i}function C(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],p=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+p,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+p,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+p}return i}function D(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function k(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function I(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function M(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function F(){var t=this.props;return"matrix("+M(t[0])+","+M(t[1])+","+M(t[4])+","+M(t[5])+","+M(t[12])+","+M(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=l,this.skewFromAxis=m,this.shear=p,this.scale=f,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=b,this.applyToX=x,this.applyToY=S,this.applyToZ=E,this.applyToPointArray=D,this.applyToTriplePoints=C,this.applyToPointStringified=k,this.toCSS=I,this.to2dCSS=F,this.clone=v,this.cloneFromProps=P,this.equals=g,this.inversePoints=T,this.inversePoint=A,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var p,l=this,m=256,f=6,c="random",d=h.pow(m,f),u=h.pow(2,52),y=2*u,g=m-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<m;)a[i]=i++;for(i=0;i<m;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*m+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function P(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function b(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return x(e)}function x(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=b(function t(e,r){var i,s=[],a=typeof e;if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,x(o)]:null===t?function(){try{if(p)return x(p.randomBytes(m));var t=new Uint8Array(m);return(l.crypto||l.msCrypto).getRandomValues(t),x(t)}catch(t){var e=l.navigator,r=e&&e.plugins;return[+new Date,l,r,l.screen,x(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(f),e=d,r=0;t<u;)t=(t+r)*m,e*=m,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,b(x(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&P(i,a),t.state=function(){return P(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},b(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var p=11,l=1/(p-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function m(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function f(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(p):new Array(p),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:m(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<p;++r)this._mSampleValues[r]=m(r*l,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=p-1;a!==n&&i[a]<=t;++a)s+=l;var o=s+(t-i[--a])/(i[a+1]-i[a])*l,h=f(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=f(e,r,i);if(0===a)return e;e-=(m(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=m(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+l,e,r)}},t}();function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){var k=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var l=function(t,e,r,i){var s,a,n,o,h,p,l=defaultCurveSegments,m=0,f=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<l;s+=1){for(h=s/(l-1),a=p=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],f[a]=o,null!==c[a]&&(p+=bmPow(f[a]-c[a],2)),c[a]=f[a];p&&(m+=p=bmSqrt(p)),d.percents[s]=h,d.lengths[s]=m}return d.addedLength=m,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var P,t=(P={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!P[s]){var a,n,o,h,p,l,m,f=defaultCurveSegments,c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(f=2);var u=new g(f);for(o=r.length,a=0;a<f;a+=1){for(m=createSizedArray(o),p=a/(f-1),n=l=0;n<o;n+=1)h=bmPow(1-p,3)*t[n]+3*bmPow(1-p,2)*p*(t[n]+r[n])+3*(1-p)*bmPow(p,2)*(e[n]+i[n])+bmPow(p,3)*e[n],m[n]=h,null!==d&&(l+=bmPow(m[n]-d[n],2));c+=l=bmSqrt(l),u.points[a]=new v(l,m),d=m}u.segmentLength=c,P[s]=u}return P[s]});function I(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,p=!0;p;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),p=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];p=!1}return r[a]+(r[a+1]-r[a])*o}var M=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,p=0;for(e=0;e<o-1;e+=1)h[e]=l(s[e],s[e+1],a[e],n[e+1]),p+=h[e].addedLength;return i&&o&&(h[e]=l(s[e],s[0],a[e],n[0]),p+=h[e].addedLength),r.totalLength=p,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=I(s,n),p=I(a=1<a?1:a,n),l=t.length,m=1-h,f=1-p,c=m*m*m,d=h*m*m*3,u=h*h*m*3,y=h*h*h,g=m*m*f,v=h*m*f+m*h*f+m*m*p,P=h*h*f+m*h*p+h*m*p,b=h*h*p,x=m*f*f,S=h*f*f+m*p*f+m*f*p,E=h*p*f+m*p*p+h*f*p,_=h*p*p,A=f*f*f,T=p*f*f+f*p*f+f*f*p,C=p*p*f+f*p*p+p*f*p,D=p*p*p;for(o=0;o<l;o+=1)M[4*o]=k.round(1e3*(c*t[o]+d*r[o]+u*i[o]+y*e[o]))/1e3,M[4*o+1]=k.round(1e3*(g*t[o]+v*r[o]+P*i[o]+b*e[o]))/1e3,M[4*o+2]=k.round(1e3*(x*t[o]+S*r[o]+E*i[o]+_*e[o]))/1e3,M[4*o+3]=k.round(1e3*(A*t[o]+T*r[o]+C*i[o]+D*e[o]))/1e3;return M},getPointInSegment:function(t,e,r,i,s,a){var n=I(s,a),o=1-n;return[k.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,k.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var p,l=k.sqrt(k.pow(i-t,2)+k.pow(s-e,2)+k.pow(a-r,2)),m=k.sqrt(k.pow(n-t,2)+k.pow(o-e,2)+k.pow(h-r,2)),f=k.sqrt(k.pow(n-i,2)+k.pow(o-s,2)+k.pow(h-a,2));return-1e-4<(p=m<l?f<l?l-m-f:f-m-l:m<f?f-m-l:m-l-f)&&p<1e-4}}}!function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-s)),i=setTimeout(function(){t(e+r)},r);return s=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&_useWebWorker){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function m(t,e){var r,i,s,a,n,o,h,p=t.length;for(i=0;i<p;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var l=r.masksProperties;for(a=l.length,s=0;s<a;s+=1)if(l[s].pt.k.i)d(l[s].pt.k);else for(o=l[s].pt.k.length,n=0;n<o;n+=1)l[s].pt.k[n].s&&d(l[s].pt.k[n].s[0]),l[s].pt.k[n].e&&d(l[s].pt.k[n].e[0])}0===r.ty?(r.layers=f(r.refId,e),m(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0!==(h=r).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function f(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}return null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&d(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&d(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var h,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,r,i,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(a=t.chars[e].data.shapes[0].it).length,r=0;r<i;r+=1)(s=a[r].ks.k).__converted||(d(a[r].ks.k),s.__converted=!0)}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),s=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,4,18];function p(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&p(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&p(e.shapes)}}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(s(t),e(t),r(t),i(t),a(t),m(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=s,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=a,t.completeLayers=m,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function p(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=p(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=p(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=p(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}();function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}var FontManager=function(){var a={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function f(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=f(i[r].fFamily,"monospace"),i[r].sansCase=f(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var p=createTag("style");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.setAttribute("f-family",i[r].fFamily),p.type="text/css",p.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(p)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var l=createTag("link");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.type="text/css",l.rel="stylesheet",l.href=i[r].fPath,document.body.appendChild(l)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.setAttribute("rel","stylesheet"),m.setAttribute("href",i[r].fPath),e.appendChild(m)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),PropertyFactory=function(){var m=initialDefaultFrame,s=Math.abs;function f(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,p,l,m,f,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,P,b,x,S,E,_,A,T,C=a.t-i,D=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var k=n.bezierData;if(C<=t||t<D){var I=C<=t?k.points.length-1:0;for(h=k.points[I].point.length,o=0;o<h;o+=1)r[o]=k.points[I].point[o]}else{n.__fnct?f=n.__fnct:(f=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=f),p=f((t-D)/(C-D));var M,F=k.segmentLength*p,w=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,l=k.points.length;y;){if(w+=k.points[m].partialLength,0===F||0===p||m===k.points.length-1){for(h=k.points[m].point.length,o=0;o<h;o+=1)r[o]=k.points[m].point[o];break}if(w<=F&&F<w+k.points[m+1].partialLength){for(M=(F-w)/k.points[m+1].partialLength,h=k.points[m].point.length,o=0;o<h;o+=1)r[o]=k.points[m].point[o]+(k.points[m+1].point[o]-k.points[m].point[o])*M;break}m<l-1?m+=1:y=!1}e._lastPoint=m,e._lastAddedLength=w-k.points[m].partialLength,e._lastKeyframeIndex=d}}else{var V,R,L,O,z;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(C<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=D)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var B=N(s.s),G=N(g);v=r,P=function(t,e,r){var i,s,a,n,o,h=[],p=t[0],l=t[1],m=t[2],f=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=p*c+l*d+m*u+f*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*p+o*c,h[1]=n*l+o*d,h[2]=n*m+o*u,h[3]=n*f+o*y,h}(B,G,(t-D)/(C-D)),b=P[0],x=P[1],S=P[2],E=P[3],_=Math.atan2(2*x*E-2*b*S,1-2*x*x-2*S*S),A=Math.asin(2*b*x+2*S*E),T=Math.atan2(2*b*E-2*x*S,1-2*b*b-2*S*S),v[0]=_/degToRads,v[1]=A/degToRads,v[2]=T/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(p=C<=t?1:t<D?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?f=n.__fnct[d]:(V=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],R=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],L=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],O=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],f=BezierFactory.getBezierEasing(V,R,L,O).get,n.__fnct[d]=f)):n.__fnct?f=n.__fnct:(V=s.o.x,R=s.o.y,L=s.i.x,O=s.i.y,f=BezierFactory.getBezierEasing(V,R,L,O).get,s.keyframeMetadata=f),f((t-D)/(C-D)))),g=a.s||s.e,z=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*p,"multidimensional"===this.propType?r[d]=z:r=z}return e.lastIndex=c,r}function N(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),p=Math.sin(i/2);return[o*h*n+s*a*p,o*a*n+s*h*p,s*h*n-o*a*p,s*a*n-o*h*p]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==m&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:m,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=m,this.pv=m,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.effectsSequence=[c.bind(this)],this.addEffect=y}function p(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,p=e.k.length;for(s=0;s<p-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.frameId=-1;var l=e.k[0].s.length;for(this.v=createTypedArray("float32",l),this.pv=createTypedArray("float32",l),s=0;s<l;s+=1)this.v[s]=m,this.pv[s]=m;this._caching={lastFrame:m,lastIndex:0,value:createTypedArray("float32",l)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new p(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,p,l,m,f=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,f=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=f,v=c.length-1,P=!0;P&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:P=!1;if(y=this.keyframesMetadata[g]||{},f=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)l=1;else if(t<d.t-this.offsetTime)l=0;else{var b;y.__fnct?b=y.__fnct:(b=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=b),l=b((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,p=i.i[0].length,r.lastIndex=f,n=0;n<h;n+=1)for(o=0;o<p;o+=1)m=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*l,e.i[n][o]=m,m=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*l,e.o[n][o]=m,m=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*l,e.v[n][o]=m}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,p=this.os.v,l=this.is.v,m=2*Math.PI*o/(2*s),f=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?p:l,i=n?m:f;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),p=i*Math.sin(n),l=0===h&&0===p?0:p/Math.sqrt(h*h+p*p),m=0===h&&0===p?0:-h/Math.sqrt(h*h+p*p);h+=+this.p.v[0],p+=+this.p.v[1],this.v.setTripleAt(h,p,h-l*a*s*o,p-m*a*s*o,h+l*a*s*o,p+m*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new l(t,e):6===r?i=new h(t,e):7===r&&(i=new p(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return m}(),ShapeModifiers=(Ut={},Vt={},Ut.registerModifier=function(t,e){Vt[t]||(Vt[t]=e)},Ut.getModifier=function(t,e,r){return new Vt[t](e,r)},Ut),Ut,Vt;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],p=a.length;for(n=0;n<p;n+=1){var l,m;if(!((o=a[n]).e*s<i||o.s*s>i+r))l=o.s*s<=i?0:(o.s*s-i)/r,m=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([l,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,p,l,m,f=this.shapes.length,c=0;if(r===e)for(s=0;s<f;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<f;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<f;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,m=0,!d.shape._mdf&&d.pathsData.length)m=d.totalShapeLength;else{for(p=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)l=bez.getSegmentsLength(i.shapes[o]),p.push(l),m+=l.totalLength;d.totalShapeLength=m,d.pathsData=p}c+=m,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,P=r,b=0;for(s=f-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<f?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,b,c),b+=d.totalShapeLength):g=[[v,P]],h=g.length,o=0;o<h;o+=1){v=g[o][0],P=g[o][1],y.length=0,P<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*P}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(P-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(P-1)}));var x=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var S=x.pop();this.addPaths(x,u),x=this.addShapes(d,y[1],S)}else this.addPaths(x,u),x=this.addShapes(d,y[1]);this.addPaths(x,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,p,l,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(l=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),u.push(r),i=0;i<c;i+=1){for(h=m[i].lengths,r.c=f[i].c,a=f[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[s],f[i].v[s],r,o,y),y=!1):(p=bez.getNewSegment(f[i].v[s-1],f[i].v[s],f[i].o[s-1],f[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(p,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[0],f[i].v[0],r,o,y),y=!1):(p=bez.getNewSegment(f[i].v[s-1],f[i].v[0],f[i].o[s-1],f[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(p,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[l][0],r.v[l][1],"i",l),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,p,l,m,f,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],p=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,l=d=s[0]+(o[0]-s[0])*p,m=u=s[1]-(s[1]-o[1])*p,f=l-(l-s[0])*roundCorner,c=m-(m-s[1])*roundCorner,i.setTripleAt(l,m,f,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],p=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,l=f=s[0]+(o[0]-s[0])*p,m=c=s[1]+(o[1]-s[1])*p,d=l-(l-s[0])*roundCorner,u=m-(m-s[1])*roundCorner,i.setTripleAt(l,m,f,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,p,l,m,f=shapePool.newElement();for(f.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,p=t.o[a][1]+(i[1]-t.o[a][1])*-r,l=t.i[a][0]+(i[0]-t.i[a][0])*-r,m=t.i[a][1]+(i[1]-t.i[a][1])*-r,f.setTripleAt(n,o,h,p,l,m,a);return f},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var p={it:this.cloneElements(this._elements),ty:"gr"};p.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"}),this.arr.splice(0,0,p),this._groups.splice(0,0,p),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var l=this.elemsData[i].it,m=l[l.length-1];0!==m.transform.op.v?(m.transform.op._mdf=!0,m.transform.op.v=0):m.transform.op._mdf=!1}a+=1}this._currentCopies=h;var f=this.o.v,c=f%1,d=0<f?Math.floor(f):Math.ceil(f),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,P,b=0;if(0<f){for(;b<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),b+=c)}else if(f<0){for(;d<b;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),b-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(P=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<P;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<P;v+=1)r[v]=this.matrix.props[v];b+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}(),featureSupport=(lz={maskType:!0},(/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))&&(lz.maskType=!1),lz),lz,filtersFactory=(mz={},mz.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},mz.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},mz),mz;function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,p,l,m,f,c,d,u,y,g,v,P,b,x=this._moreOptions.alignment.v,S=this._animatorsData,E=this._textData,_=this.mHelper,A=this._renderType,T=this.renderedLetters.length,C=t.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var D,k=b.v;for(this._pathData.r.v&&(k=k.reverse()),n={tLength:0,segments:[]},a=k._length-1,s=g=0;s<a;s+=1)D=bez.buildBezierData(k.v[s],k.v[s+1],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[s+1][0]-k.v[s+1][0],k.i[s+1][1]-k.v[s+1][1]]),n.tLength+=D.segmentLength,n.segments.push(D),g+=D.segmentLength;s=a,b.v.c&&(D=bez.buildBezierData(k.v[s],k.v[0],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[0][0]-k.v[0][0],k.i[0][1]-k.v[0][1]]),n.tLength+=D.segmentLength,n.segments.push(D),g+=D.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=1,l=!(p=f=0),u=n.segments,o<0&&b.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),m=(d=u[f=u.length-1].points).length-1;o<0;)o+=d[m].partialLength,(m-=1)<0&&(m=(d=u[f-=1].points).length-1);c=(d=u[f].points)[m-1],y=(h=d[m]).partialLength}a=C.length,i=r=0;var I,M,F,w,V,R=1.2*t.finalSize*.714,L=!0;F=S.length;var O,z,B,G,N,j,q,H,W,Y,X,K,$=-1,J=o,U=f,Z=m,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(C[s].n){for(rt&&(rt+=it);at<s;)C[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(M=0;M<F;M+=1)(I=S[M].a).t.propType&&(nt&&2===t.j&&(it+=I.t.v*st),(V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars)).length?rt+=I.t.v*V[0]*st:rt+=I.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)C[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(_.reset(),G=1,C[s].n)r=0,i+=t.yOffset,i+=L?1:0,o=J,L=!1,this._hasMaskedPath&&(m=Z,c=(d=u[f=U].points)[m-1],y=(h=d[m]).partialLength,p=0),K=W=X=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==C[s].line){switch(t.j){case 1:o+=g-t.lineWidths[C[s].line];break;case 2:o+=(g-t.lineWidths[C[s].line])/2}Q=C[s].line}$!==C[s].ind&&(C[$]&&(o+=C[$].extra),o+=C[s].an/2,$=C[s].ind),o+=x[0]*C[s].an*.005;var ot=0;for(M=0;M<F;M+=1)(I=S[M].a).p.propType&&((V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars)).length?ot+=I.p.v[0]*V[0]:ot+=I.p.v[0]*V),I.a.propType&&((V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars)).length?ot+=I.a.v[0]*V[0]:ot+=I.a.v[0]*V);for(l=!0,this._pathData.a.v&&(o=.5*C[0].an+(g-this._pathData.f.v-.5*C[0].an-.5*C[C.length-1].an)*$/(a-1),o+=this._pathData.f.v);l;)o+ot<=p+y||!d?(v=(o+ot-p)/h.partialLength,z=c.point[0]+(h.point[0]-c.point[0])*v,B=c.point[1]+(h.point[1]-c.point[1])*v,_.translate(-x[0]*C[s].an*.005,-x[1]*R*.01),l=!1):d&&(p+=h.partialLength,(m+=1)>=d.length&&(m=0,d=u[f+=1]?u[f].points:b.v.c?u[f=m=0].points:(p-=h.partialLength,null)),d&&(c=h,y=(h=d[m]).partialLength));O=C[s].an/2-C[s].add,_.translate(-O,0,0)}else O=C[s].an/2-C[s].add,_.translate(-O,0,0),_.translate(-x[0]*C[s].an*.005,-x[1]*R*.01,0);for(M=0;M<F;M+=1)(I=S[M].a).t.propType&&(V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=I.t.v*V[0]:o+=I.t.v*V:V.length?r+=I.t.v*V[0]:r+=I.t.v*V));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(N=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(q=[t.fc[0],t.fc[1],t.fc[2]]),M=0;M<F;M+=1)(I=S[M].a).a.propType&&((V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars)).length?_.translate(-I.a.v[0]*V[0],-I.a.v[1]*V[1],I.a.v[2]*V[2]):_.translate(-I.a.v[0]*V,-I.a.v[1]*V,I.a.v[2]*V));for(M=0;M<F;M+=1)(I=S[M].a).s.propType&&((V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars)).length?_.scale(1+(I.s.v[0]-1)*V[0],1+(I.s.v[1]-1)*V[1],1):_.scale(1+(I.s.v[0]-1)*V,1+(I.s.v[1]-1)*V,1));for(M=0;M<F;M+=1){if(I=S[M].a,V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars),I.sk.propType&&(V.length?_.skewFromAxis(-I.sk.v*V[0],I.sa.v*V[1]):_.skewFromAxis(-I.sk.v*V,I.sa.v*V)),I.r.propType&&(V.length?_.rotateZ(-I.r.v*V[2]):_.rotateZ(-I.r.v*V)),I.ry.propType&&(V.length?_.rotateY(I.ry.v*V[1]):_.rotateY(I.ry.v*V)),I.rx.propType&&(V.length?_.rotateX(I.rx.v*V[0]):_.rotateX(I.rx.v*V)),I.o.propType&&(V.length?G+=(I.o.v*V[0]-G)*V[0]:G+=(I.o.v*V-G)*V),t.strokeWidthAnim&&I.sw.propType&&(V.length?j+=I.sw.v*V[0]:j+=I.sw.v*V),t.strokeColorAnim&&I.sc.propType)for(H=0;H<3;H+=1)V.length?N[H]+=(I.sc.v[H]-N[H])*V[0]:N[H]+=(I.sc.v[H]-N[H])*V;if(t.fillColorAnim&&t.fc){if(I.fc.propType)for(H=0;H<3;H+=1)V.length?q[H]+=(I.fc.v[H]-q[H])*V[0]:q[H]+=(I.fc.v[H]-q[H])*V;I.fh.propType&&(q=V.length?addHueToRGB(q,I.fh.v*V[0]):addHueToRGB(q,I.fh.v*V)),I.fs.propType&&(q=V.length?addSaturationToRGB(q,I.fs.v*V[0]):addSaturationToRGB(q,I.fs.v*V)),I.fb.propType&&(q=V.length?addBrightnessToRGB(q,I.fb.v*V[0]):addBrightnessToRGB(q,I.fb.v*V))}}for(M=0;M<F;M+=1)(I=S[M].a).p.propType&&(V=S[M].s.getMult(C[s].anIndexes[M],E.a[M].s.totalChars),this._hasMaskedPath?V.length?_.translate(0,I.p.v[1]*V[0],-I.p.v[2]*V[1]):_.translate(0,I.p.v[1]*V,-I.p.v[2]*V):V.length?_.translate(I.p.v[0]*V[0],I.p.v[1]*V[1],-I.p.v[2]*V[2]):_.translate(I.p.v[0]*V,I.p.v[1]*V,-I.p.v[2]*V));if(t.strokeWidthAnim&&(W=j<0?0:j),t.strokeColorAnim&&(Y="rgb("+Math.round(255*N[0])+","+Math.round(255*N[1])+","+Math.round(255*N[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*q[0])+","+Math.round(255*q[1])+","+Math.round(255*q[2])+")"),this._hasMaskedPath){if(_.translate(0,-t.ls),_.translate(0,x[1]*R*.01+i,0),this._pathData.p.v){P=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(P)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),_.rotate(-ht*Math.PI/180)}_.translate(z,B,0),o-=x[0]*C[s].an*.005,C[s+1]&&$!==C[s+1].ind&&(o+=C[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(_.translate(r,i,0),t.ps&&_.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:_.translate(C[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[s].line]),0,0);break;case 2:_.translate(C[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[s].line])/2,0,0)}_.translate(0,-t.ls),_.translate(O,0,0),_.translate(x[0]*C[s].an*.005,x[1]*R*.01,0),r+=C[s].l+.001*t.tr*t.finalSize}"html"===A?tt=_.toCSS():"svg"===A?tt=_.to2dCSS():et=[_.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]],K=G}this.lettersChangedFlag=T<=s?(w=new LetterProps(K,W,Y,X,tt,et),this.renderedLetters.push(w),T+=1,!0):(w=this.renderedLetters[s]).update(K,W,Y,X,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,p=this.data,l=[],m=0,f=p.m.g,c=0,d=0,u=0,y=[],g=0,v=0,P=h.getFontByName(t.f),b=0,x=getFontProperties(P);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var S,E=t.tr/1e3*t.finalSize;if(t.sz)for(var _,A,T=!0,C=t.sz[0],D=t.sz[1];T;){g=_=0,r=(A=this.buildFinalText(t.t)).length,E=t.tr/1e3*t.finalSize;var k=-1;for(e=0;e<r;e+=1)S=A[e].charCodeAt(0),i=!1," "===A[e]?k=e:13!==S&&3!==S||(i=!(g=0),_+=t.finalLineHeight||1.2*t.finalSize),C<g+(b=h.chars?(o=h.getCharData(A[e],P.fStyle,P.fFamily),i?0:o.w*t.finalSize/100):h.measureText(A[e],t.f,t.finalSize))&&" "!==A[e]?(-1===k?r+=1:e=k,_+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,k===e?1:0,"\r"),k=-1,g=0):(g+=b,g+=E);_+=P.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&D<_?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,T=!1)}g=-E;var I,M=b=0;for(e=0;e<r;e+=1)if(i=!1,13===(S=(I=t.finalText[e]).charCodeAt(0))||3===S?(M=0,y.push(g),v=v<g?g:v,g=-2*E,i=!(s=""),u+=1):s=I,b=h.chars?(o=h.getCharData(I,P.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===I?M+=b+E:(g+=b+E+M,M=0),l.push({l:b,an:b,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==f){if(c+=b,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=b);d<=e;)l[d].an=c,l[d].ind=m,l[d].extra=b,d+=1;m+=1,c=0}}else if(3==f){if(c+=b,""===s||e===r-1){for(""===s&&(c-=b);d<=e;)l[d].an=c,l[d].ind=m,l[d].extra=b,d+=1;c=0,m+=1}}else l[m].ind=m,l[m].extra=0,m+=1;if(t.l=l,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var F,w,V,R,L=p.a;n=L.length;var O=[];for(a=0;a<n;a+=1){for((F=L[a]).a.sc&&(t.strokeColorAnim=!0),F.a.sw&&(t.strokeWidthAnim=!0),(F.a.fc||F.a.fh||F.a.fs||F.a.fb)&&(t.fillColorAnim=!0),R=0,V=F.s.b,e=0;e<r;e+=1)(w=l[e]).anIndexes[a]=R,(1==V&&""!==w.val||2==V&&""!==w.val&&" "!==w.val||3==V&&(w.n||" "==w.val||e==r-1)||4==V&&(w.n||e==r-1))&&(1===F.s.rn&&O.push(R),R+=1);p.a[a].s.totalChars=R;var z,B=-1;if(1===F.s.rn)for(e=0;e<r;e+=1)B!=(w=l[e]).anIndexes[a]&&(B=w.anIndexes[a],z=O.splice(Math.floor(Math.random()*O.length),1)[0]),w.anIndexes[a]=z}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=P.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,p=this.data.sh;if(2===p)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===p)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===p)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===p){if(h===o)n=0;else{var l=h-o,m=-l/2+(t=y(u(0,t+.5-o),h-o)),f=l/2;n=Math.sqrt(1-m*m/(f*f))}n=a(n)}else n=6===p?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}(),poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},pointPool=poolFactory(8,function(){return createTypedArray("float32",2)}),shapePool=(mD=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),mD.clone=function(t){var e,r=mD.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},mD),mD,shapeCollectionPool=(uD={newShapeCollection:function(){var t;t=vD?xD[vD-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,vD===wD&&(xD=pooling.double(xD),wD*=2);xD[vD]=t,vD+=1}},vD=0,wD=4,xD=createSizedArray(wD),uD),uD,vD,wD,xD,segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}),bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}),markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}();function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,p,l,m,f,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?p=null:((p=createNS("rect")).setAttribute("fill","#ffffff"),p.setAttribute("width",this.element.comp.data.w||0),p.setAttribute("height",this.element.comp.data.h||0),u.push(p)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var P;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",f=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),P=createElementID(),(l=createNS("filter")).setAttribute("id",P),(m=createNS("feMorphology")).setAttribute("operator","erode"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),l.appendChild(m),a.appendChild(l),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):f=m=null,this.storedData[i]={elem:s,x:f,expan:m,lastPath:"",lastOperator:"",filterId:P,lastRadius:0},"i"===c[i].mode){h=u.length;var b=createNS("g");for(o=0;o<h;o+=1)b.appendChild(u[o]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",y+"_"+d),x.appendChild(s),a.appendChild(x),b.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(b)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:p},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function BaseElement(){}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,r){this.initElement(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function CVBaseElement(){}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CVEffects(){}BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRenderer.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRenderer.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRenderer.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRenderer.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=r<i&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRenderer.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);(e[t]=r).initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var p=createNS("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(p),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(p),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var l=createNS("clipPath"),m=createNS("path");m.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var f=createElementID();if(l.setAttribute("id",f),l.appendChild(m),this.globalData.defs.appendChild(l),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+f+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+f+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+locationHref+"#"+r.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,p,l,m,f,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=r[f-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)f?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(f)for(p=e[o].it.length,h=0;h<p;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(f||(e[o]=this.createTransformElement(t[o],i)),l=e[o].transform,c.push(l)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(f||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(f?(m=e[o]).closed=!1:((m=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=m,this.shapeModifiers.push(m)),y.push(m)):"rp"===t[o].ty&&(f?(m=e[o]).closed=!0:(m=ShapeModifiers.getModifier(t[o].ty),(e[o]=m).init(this,t,o,e),this.shapeModifiers.push(m),n=!1),y.push(m));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,p,l,m=t.length-1,f=[],c=[],d=[].concat(s);for(a=m;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),f.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(l=this.createTransformElement(t[a]),e[a]=l),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(p=e[a]).closed=!1:((p=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=p,this.shapeModifiers.push(p)),c.push(p)):"rp"===t[a].ty&&(h?(p=e[a]).closed=!0:(p=ShapeModifiers.getModifier(t[a].ty),(e[a]=p).init(this,t,a,e),this.shapeModifiers.push(p),i=!1),c.push(p));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),m=c.length,a=0;a<m;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,p=this.stylesList.length,l=this.globalData.renderer,m=this.globalData.canvasContext;for(t=0;t<p;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(l.save(),a=h.elements,"st"===o||"gs"===o?(m.strokeStyle="st"===o?h.co:h.grd,m.lineWidth=h.wi,m.lineCap=h.lc,m.lineJoin=h.lj,m.miterLimit=h.ml||0):m.fillStyle="fl"===o?h.co:h.grd,l.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&m.beginPath(),l.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(m.beginPath(),h.da&&(m.setLineDash(h.da),m.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?m.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?m.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):m.closePath();"st"!==o&&"gs"!==o||(m.stroke(),h.da&&m.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&m.fill(h.r),l.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var p=n.shapes[s];if(p&&p.v){for(i=p._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(p.v[0][0],p.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(p.o[r-1],p.i[r],p.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(p.v[0][0],p.v[0][1],0)}),p.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(p.o[r-1],p.i[0],p.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var p=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),l=Math.atan2(h[1]-o[1],h[0]-o[0]),m=e.h.v;1<=m?m=.99:m<=-1&&(m=-.99);var f=p*m,c=Math.cos(l+e.a.v)*f+o[0],d=Math.sin(l+e.a.v)*f+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],p)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},CVEffects.prototype.renderFrame=function(){};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||m()),e+=1}function p(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return f(i,t),i.setData(t,e),i}function l(){n+=1,d()}function m(){n-=1}function f(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",l),t.addEventListener("_idle",m),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=p,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),p(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),p(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(gQ={},gQ.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},gQ),gQ;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=typeof t,i=typeof e;if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=typeof t,i=typeof e;if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var p=n-o;switch(r=.5<h?p/(2-n-o):p/(n+o),n){case i:e=(s-a)/p+(s<a?6:0);break;case s:e=(a-i)/p+2;break;case a:e=(i-s)/p+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,p=createTypedArray("float32",h);for(n=0;n<h;n+=1)p[n]=i[n]+(s[n]-i[n])*o;return p}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,p=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:p,h=r&&r[s]?r[s]:p,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),p=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)p[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return p}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,p=createTypedArray("float32",h);for(o=0;o<h;o+=1)p[o]=(a[o]-s[o])*n+s[o];return p}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,p=this.keyframes,l=p[p.length-1].t;if(h<=l)return this.pv;if(r?s=l-(i=e?Math.abs(l-this.elem.comp.globalData.frameRate*e):Math.max(0,l-this.elem.data.ip)):((!e||e>p.length-1)&&(e=p.length-1),i=l-(s=p[p.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(l/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=(f[a]-m[a])*d+c[a];return o}return(f-m)*d+c}if("continue"===t){var u=this.getValueAtTime(l/this.comp.globalData.frameRate,0),y=this.getValueAtTime((l-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-l)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-l)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,p=this.keyframes,l=p[0].t;if(l<=h)return this.pv;if(r?s=l+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-l)):((!e||e>p.length-1)&&(e=p.length-1),i=(s=p[e].t)-l),"pingpong"===t){if(Math.floor((l-h)/i)%2==0)return this.getValueAtTime(((l-h)%i+l)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(l/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(l-h)%i+l)/this.comp.globalData.frameRate,0),d=Math.floor((l-h)/i)+1;if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(f[a]-m[a])*d;return o}return c-(f-m)*d}if("continue"===t){var u=this.getValueAtTime(l/this.comp.globalData.frameRate,0),y=this.getValueAtTime((l+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(l-h)/.001;return o}return u+(u-y)*(l-h)/.001}}return this.getValueAtTime((i-((l-h)%i+l))/this.comp.globalData.frameRate,0)}function p(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),p=this.rx.getValueAtTime(t),l=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(p*this.rx.mult).rotateZ(-l[2]*this.or.mult).rotateY(l[1]*this.or.mult).rotateX(l[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var m=this.px.getValueAtTime(t),f=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(m*this.px.mult,f*this.py.mult,-c*this.pz.mult)}else e.translate(m*this.px.mult,f*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var l=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=l(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=p,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,p=0;o<h;){if(p+a[o].addedLength>n){var l=o,m=r.c&&o===h-1?0:o+1,f=(n-p)/a[o].addedLength;i=bez.getPointInSegment(r.v[l],r.v[m],r.o[l],r.i[m],f,a[o]);break}p+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null};var ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(m(t[i],e[i],r)):"tm"===t[i].ty?s.push(f(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(d(t[i],e[i],r)):"sr"===t[i].ty?s.push(u(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(p(t[i],e[i],r)):s.push(l(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(){return function(){return null}}function m(t,e,r){var i,s=propertyGroupFactory(p,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function p(t){return"Color"===t||"color"===t?p.color:"Opacity"===t||"opacity"===t?p.opacity:"Stroke Width"===t||"stroke width"===t?p.strokeWidth:null}return Object.defineProperties(p,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),p}function f(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function m(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function f(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=l,i.applyPoint=p,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=m,i.sampleImage=f,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),FootageInterface=(UZ=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"==typeof(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"==typeof(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=UZ(t),e}),UZ,CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function p(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(p(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(l(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function l(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(p(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TextExpressionSelectorPropFactory=function(){function r(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=r,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}TextSelectorProp.getTextSelectorProp=function(t,e,r){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,r):propertyGetTextProp(t,e,r)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}};var lottiejs={};function addElementToList(t,e){e.push(t),t._isDirty=!1,t._changedStyles.length=0,t._changedAttributes.length=0,t._changedElements.length=0,t.children.forEach(function(t){addElementToList(t,e)})}function addChangedAttributes(t){for(var e,r=t._changedAttributes,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.attributes[e]]);return i}function addChangedStyles(t){for(var e,r=t._changedStyles,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.style[e]]);return i}function addChangedElements(t,e){for(var r,i=t._changedElements,s=[],a=0;a<i.length;a+=1)r=i[a],s.push([r[0].serialize(),r[1],r[2]]),addElementToList(r[0],e);return s}function loadAnimation(a){var e,r,t=a.params,n=[];if("svg"===t.renderer)e=document.createElement("div"),t.container=e;else{var i=t.rendererSettings.canvas.getContext("2d");t.rendererSettings.context=i}(r=animationManager.loadAnimation(t)).addEventListener("error",function(t){console.log(t)}),r.onError=function(t){console.log("ERRORO",t)},"svg"===t.renderer&&(r.addEventListener("DOMLoaded",function(){var t=e.serialize();addElementToList(e,n),self.postMessage({type:"loaded",payload:{id:a.id,tree:t.children[0],totalFrames:r.totalFrames,frameRate:r.frameRate}})}),r.addEventListener("drawnFrame",function(t){for(var e,r=[],i=0;i<n.length;i+=1)if((e=n[i])._isDirty){var s={id:e.attributes.id,styles:addChangedStyles(e),attributes:addChangedAttributes(e),elements:addChangedElements(e,n)};r.push(s),e._isDirty=!1,e._changedAttributes.length=0,e._changedStyles.length=0,e._changedElements.length=0}self.postMessage({type:"updated",payload:{elements:r,id:a.id,currentTime:t.currentTime}})})),animations[a.id]=r}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":default:defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}function setIDPrefix(t){idPrefix=t}return lottiejs.play=animationManager.play,lottiejs.pause=animationManager.pause,lottiejs.togglePause=animationManager.togglePause,lottiejs.setSpeed=animationManager.setSpeed,lottiejs.setDirection=animationManager.setDirection,lottiejs.stop=animationManager.stop,lottiejs.registerAnimation=animationManager.registerAnimation,lottiejs.loadAnimation=loadAnimation,lottiejs.resize=animationManager.resize,lottiejs.goToAndStop=animationManager.goToAndStop,lottiejs.destroy=animationManager.destroy,lottiejs.setQuality=setQuality,lottiejs.freeze=animationManager.freeze,lottiejs.unfreeze=animationManager.unfreeze,lottiejs.setVolume=animationManager.setVolume,lottiejs.mute=animationManager.mute,lottiejs.unmute=animationManager.unmute,lottiejs.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottiejs.setIDPrefix=setIDPrefix,lottiejs.version="5.8.1",lottiejs}({});onmessage=function(t){var e=t.data,r=e.type,i=e.payload;"load"===r?lottieInternal.loadAnimation(i):"pause"===r?animations[i.id]&&animations[i.id].pause():"play"===r?animations[i.id]&&animations[i.id].play():"stop"===r?animations[i.id]&&animations[i.id].stop():"setSpeed"===r?animations[i.id]&&animations[i.id].setSpeed(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"goToAndPlay"===r?animations[i.id]&&animations[i.id].goToAndPlay(i.value,i.isFrame):"goToAndStop"===r?animations[i.id]&&animations[i.id].goToAndStop(i.value,i.isFrame):"setSubframe"===r?animations[i.id]&&animations[i.id].setSubframe(i.value):"addEventListener"===r?animations[i.id]&&animations[i.id].addEventListener(i.eventName,function(){self.postMessage({type:"event",payload:{id:i.id,callbackId:i.callbackId,argument:arguments[0]}})}):"destroy"===r?animations[i.id]&&(animations[i.id].destroy(),animations[i.id]=null):"resize"===r&&animations[i.id]&&animations[i.id].resize()}}function createWorker(t){var e=new Blob(["("+t.toString()+"())"],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}var lottie=function(){"use strict";var n=createWorker(workerContent),r=0,o=0,h={},p={rendererSettings:{}};function l(t,e,r,i){var s;for(var a in s="div"===t.type?document.createElement("div"):document.createElementNS(t.namespace,t.type),t.attributes)Object.prototype.hasOwnProperty.call(t.attributes,a)&&("href"===a?s.setAttributeNS("http://www.w3.org/1999/xlink",a,t.attributes[a]):s.setAttribute(a,t.attributes[a]),"id"===a&&(r[t.attributes[a]]=s));for(var n in t.style)Object.prototype.hasOwnProperty.call(t.style,n)&&(s.style[n]=t.style[n]);t.children.forEach(function(t){l(t,s,r)}),i?e.insertBefore(s,i):e.appendChild(s)}var e=function(t){var e=h[t.id];e._loaded=!0,e.pendingCallbacks.forEach(function(t){e.animInstance.addEventListener(t.eventName,t.callback),"DOMLoaded"===t.eventName&&t.callback()}),e.animInstance.totalFrames=t.totalFrames,e.animInstance.frameRate=t.frameRate;var r=e.container,i=e.elements;l(t.tree,r,i)};function m(t,e){for(var r,i=0;i<t.length;i+=1){var s,a=e[(r=t[i])[1]];if(a)r[2]&&(s=e[r[2]]),l(r[0],a,e,s),t.splice(i,1),i-=1}}function f(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.style[r[0]]=r[1]}function c(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.setAttribute(r[0],r[1])}return n.onmessage=function(t){"loaded"===t.data.type?e(t.data.payload):"updated"===t.data.type?function(t){var e=t.elements,r=h[t.id];if(r){for(var i,s=r.elements,a=0;a<e.length;a+=1){var n=s[(i=e[a]).id];m(i.elements,s),f(n,i.styles),c(n,i.attributes)}r.animInstance.currentFrame=t.currentTime}}(t.data.payload):"event"===t.data.type&&function(t){var e=h[t.id];if(e){var r=e.callbacks;r[t.callbackId]&&r[t.callbackId](t.argument)}}(t.data.payload)},{loadAnimation:function(t){var i,s="lottie_animationId_"+(r+=1),a={elements:{},callbacks:{},pendingCallbacks:[]},e={id:s,pause:function(){n.postMessage({type:"pause",payload:{id:s}})},play:function(){n.postMessage({type:"play",payload:{id:s}})},stop:function(){n.postMessage({type:"stop",payload:{id:s}})},setSpeed:function(t){n.postMessage({type:"setSpeed",payload:{id:s,value:t}})},setDirection:function(t){n.postMessage({type:"setDirection",payload:{id:s,value:t}})},goToAndStop:function(t,e){n.postMessage({type:"goToAndStop",payload:{id:s,value:t,isFrame:e}})},goToAndPlay:function(t,e){n.postMessage({type:"goToAndPlay",payload:{id:s,value:t,isFrame:e}})},setSubframe:function(t){n.postMessage({type:"setSubframe",payload:{id:s,value:t}})},addEventListener:function(t,e){if(a._loaded){var r="callback_"+(o+=1);a.callbacks[r]=e,n.postMessage({type:"addEventListener",payload:{id:s,callbackId:r,eventName:t}})}else a.pendingCallbacks.push({eventName:t,callback:e})},destroy:function(){h[s]=null,a.container&&(a.container.innerHTML=""),n.postMessage({type:"destroy",payload:{id:s}})},resize:function(){n.postMessage({type:"resize",payload:{id:s}})}};return a.animInstance=e,(i=t,new Promise(function(e,t){var r=Object.assign({},p,i);r.animType&&!r.renderer&&(r.renderer=r.animType),r.wrapper&&(r.container||(r.container=r.wrapper),delete r.wrapper),r.animationData?e(r):r.path?fetch(r.path).then(function(t){return t.json()}).then(function(t){r.animationData=t,delete r.path,e(r)}):t()})).then(function(t){var e=[];if(t.container&&(a.container=t.container,delete t.container),"canvas"===t.renderer&&!t.rendererSettings.canvas){var r=document.createElement("canvas");a.container.appendChild(r),r.width=t.animationData.w,r.height=t.animationData.h,r.style.width="100%",r.style.height="100%";var i=r.transferControlToOffscreen();e.push(i),t.rendererSettings.canvas=i}h[s]=a,n.postMessage({type:"load",payload:{params:t,id:s}},e)}),e}}}();
+	function workerContent(){var localIdCounter=0,animations={},styleProperties=["width","height","display","transform","opacity","contentVisibility"];function createElement(t,e){var r={serialize:function(){for(var t={},e=0;e<styleProperties.length;e+=1){var r=styleProperties[e],i="_"+r;i in this&&(t[r]=this[i])}return t}};styleProperties.forEach(function(e){Object.defineProperty(r,e,{set:function(t){i._isDirty||(i._isDirty=!0),i._changedStyles.push(e),this["_"+e]=t},get:function(){return this["_"+e]}})});var i={_state:"init",_isDirty:!1,_changedStyles:[],_changedAttributes:[],_changedElements:[],type:e,namespace:t,children:[],attributes:{id:"l_d_"+(localIdCounter+=1)},style:r,appendChild:function(t){(t.parentNode=this).children.push(t),this._isDirty=!0,this._changedElements.push([t,this.attributes.id])},insertBefore:function(t,e){for(var r=this.children,i=0;i<r.length;i+=1)if(r[i]===e)return r.splice(i,0,t),this._isDirty=!0,void this._changedElements.push([t,this.attributes.id,e.attributes.id]);r.push(e)},setAttribute:function(t,e){this.attributes[t]=e,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(t)},serialize:function(){return{type:this.type,namespace:this.namespace,style:this.style.serialize(),attributes:this.attributes,children:this.children.map(function(t){return t.serialize()})}},getContext:function(){return{fillRect:function(){}}},addEventListener:function(t,e){setTimeout(e,1)},setAttributeNS:function(t,e,r){this.attributes[e]=r,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(e)}};return i.style=r,i}var window=self,document={createElementNS:function(t,e){return createElement(t,e)},createElement:function(t){return createElement("",t)},getElementsByTagName:function(){return[]}},lottieInternal=function(){"use strict";var C,D;function addElementToList(t,e){e.push(t),t._isDirty=!1,t._changedStyles.length=0,t._changedAttributes.length=0,t._changedElements.length=0,t.children.forEach(function(t){addElementToList(t,e)})}function addChangedAttributes(t){for(var e,r=t._changedAttributes,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.attributes[e]]);return i}function addChangedStyles(t){for(var e,r=t._changedStyles,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.style[e]]);return i}function addChangedElements(t,e){for(var r,i=t._changedElements,s=[],a=0;a<i.length;a+=1)r=i[a],s.push([r[0].serialize(),r[1],r[2]]),addElementToList(r[0],e);return s}function loadAnimation(a){var e,r,t=a.params,n=[];if("svg"===t.renderer)e=document.createElement("div"),t.container=e;else{var i=t.rendererSettings.canvas.getContext("2d");t.rendererSettings.context=i}(r=lottie.loadAnimation(t)).addEventListener("error",function(t){console.log(t)}),r.onError=function(t){console.log("ERRORO",t)},"svg"===t.renderer&&(r.addEventListener("DOMLoaded",function(){var t=e.serialize();addElementToList(e,n),self.postMessage({type:"loaded",payload:{id:a.id,tree:t.children[0],totalFrames:r.totalFrames,frameRate:r.frameRate}})}),r.addEventListener("drawnFrame",function(t){for(var e,r=[],i=0;i<n.length;i+=1)if((e=n[i])._isDirty){var s={id:e.attributes.id,styles:addChangedStyles(e),attributes:addChangedAttributes(e),elements:addChangedElements(e,n)};r.push(s),e._isDirty=!1,e._changedAttributes.length=0,e._changedStyles.length=0,e._changedElements.length=0}self.postMessage({type:"updated",payload:{elements:r,id:a.id,currentTime:t.currentTime}})})),animations[a.id]=r}return"undefined"!=typeof navigator&&(C=this,D=function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var subframeEnabled=!0,expressionsPlugin=null,idPrefix="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(rb=0,function(){return idPrefix+"__lottie_element_"+(rb+=1)}),rb;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix=t},getIdPrefix=function(){return idPrefix};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function f(t,e){var r,i,s,a,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var p=r.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)d(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&d(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&d(p[s].pt.k[n].e[0])}0===r.ty?(r.layers=m(r.refId,e),f(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0===(h=r).t.a.length&&h.t.p)}}function m(t,e){var r=function(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r];r+=1}return null}(t,e);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&d(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&d(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function n(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var s,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(s=[4,7,99],function(t){if(t.chars&&!n(s,t.v)){var e,r=t.chars.length;for(e=0;e<r;e+=1){var i=t.chars[e];i.data&&i.data.shapes&&(c(i.data.shapes),i.data.ip=0,i.data.op=99999,i.data.st=0,i.data.sr=1,i.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(i.data.shapes.push({ty:"no"}),i.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),o=function(){var i=[4,4,18];function l(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={};return t.completeData=function(t){t.__complete||(a(t),e(t),r(t),i(t),o(t),f(t.layers,t.assets),function(t,e){if(t){var r=0,i=t.length;for(r=0;r<i;r+=1)1===t[r].t&&(t[r].data.layers=m(t[r].data.refId,e),f(t[r].data.layers,e))}}(t.chars,t.assets),t.__complete=!0)},t.checkColors=a,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=o,t.completeLayers=f,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return m(i,t),i.setData(t,e),i}function p(){n+=1,d()}function f(){n-=1}function m(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",p),t.addEventListener("_idle",f),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),l(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function f(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function m(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:f(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<l;++r)this._mSampleValues[r]=f(r*p,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&i[a]<=t;++a)s+=p;var o=s+(t-i[--a])/(i[a+1]-i[a])*p,h=m(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=m(e,r,i);if(0===a)return e;e-=(f(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=f(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,r)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0});function bezFunction(){var k=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var p=function(t,e,r,i){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=f}return d.addedLength=f,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[s]){var a,n,o,h,l,p,f,m=getDefaultCurveSegments(),c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(m=2);var u=new g(m);for(o=r.length,a=0;a<m;a+=1){for(f=createSizedArray(o),l=a/(m-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+r[n])+3*(1-l)*bmPow(l,2)*(e[n]+i[n])+bmPow(l,3)*e[n],f[n]=h,null!==d&&(p+=bmPow(f[n]-d[n],2));c+=p=bmSqrt(p),u.points[a]=new v(p,f),d=f}u.segmentLength=c,b[s]=u}return b[s]});function M(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var F=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),r.totalLength=l,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=M(s,n),l=M(a=1<a?1:a,n),p=t.length,f=1-h,m=1-l,c=f*f*f,d=h*f*f*3,u=h*h*f*3,y=h*h*h,g=f*f*m,v=h*f*m+f*h*m+f*f*l,b=h*h*m+f*h*l+h*f*l,E=h*h*l,P=f*m*m,S=h*m*m+f*l*m+f*m*l,x=h*l*m+f*l*l+h*m*l,C=h*l*l,A=m*m*m,_=l*m*m+m*l*m+m*m*l,T=l*l*m+m*l*l+l*m*l,D=l*l*l;for(o=0;o<p;o+=1)F[4*o]=k.round(1e3*(c*t[o]+d*r[o]+u*i[o]+y*e[o]))/1e3,F[4*o+1]=k.round(1e3*(g*t[o]+v*r[o]+b*i[o]+E*e[o]))/1e3,F[4*o+2]=k.round(1e3*(P*t[o]+S*r[o]+x*i[o]+C*e[o]))/1e3,F[4*o+3]=k.round(1e3*(A*t[o]+_*r[o]+T*i[o]+D*e[o]))/1e3;return F},getPointInSegment:function(t,e,r,i,s,a){var n=M(s,a),o=1-n;return[k.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,k.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var l,p=k.sqrt(k.pow(i-t,2)+k.pow(s-e,2)+k.pow(a-r,2)),f=k.sqrt(k.pow(n-t,2)+k.pow(o-e,2)+k.pow(h-r,2)),m=k.sqrt(k.pow(n-i,2)+k.pow(o-s,2)+k.pow(h-a,2));return-1e-4<(l=f<p?m<p?p-f-m:m-f-p:f<m?m-f-p:f-p-m)&&l<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var f=initialDefaultFrame,s=Math.abs;function m(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,b,E,P,S,x,C,A,_,T=a.t-i,D=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var k=n.bezierData;if(T<=t||t<D){var M=T<=t?k.points.length-1:0;for(h=k.points[M].point.length,o=0;o<h;o+=1)r[o]=k.points[M].point[o]}else{n.__fnct?m=n.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=m),l=m((t-D)/(T-D));var F,w=k.segmentLength*l,I=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,p=k.points.length;y;){if(I+=k.points[f].partialLength,0===w||0===l||f===k.points.length-1){for(h=k.points[f].point.length,o=0;o<h;o+=1)r[o]=k.points[f].point[o];break}if(I<=w&&w<I+k.points[f+1].partialLength){for(F=(w-I)/k.points[f+1].partialLength,h=k.points[f].point.length,o=0;o<h;o+=1)r[o]=k.points[f].point[o]+(k.points[f+1].point[o]-k.points[f].point[o])*F;break}f<p-1?f+=1:y=!1}e._lastPoint=f,e._lastAddedLength=I-k.points[f].partialLength,e._lastKeyframeIndex=d}}else{var V,B,R,L,G;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(T<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=D)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var z=O(s.s),N=O(g);v=r,b=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(z,N,(t-D)/(T-D)),E=b[0],P=b[1],S=b[2],x=b[3],C=Math.atan2(2*P*x-2*E*S,1-2*P*P-2*S*S),A=Math.asin(2*E*P+2*S*x),_=Math.atan2(2*E*x-2*P*S,1-2*E*E-2*S*S),v[0]=C/degToRads,v[1]=A/degToRads,v[2]=_/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(l=T<=t?1:t<D?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?m=n.__fnct[d]:(V=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],B=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],R=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],L=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],m=BezierFactory.getBezierEasing(V,B,R,L).get,n.__fnct[d]=m)):n.__fnct?m=n.__fnct:(V=s.o.x,B=s.o.y,R=s.i.x,L=s.i.y,m=BezierFactory.getBezierEasing(V,B,R,L).get,s.keyframeMetadata=m),m((t-D)/(T-D)))),g=a.s||s.e,G=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*l,"multidimensional"===this.propType?r[d]=G:r=G}return e.lastIndex=c,r}function O(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=f,this.pv[s]=f;this._caching={lastFrame:f,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new l(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var shapePool=(Fr=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),Fr.clone=function(t){var e,r=Fr.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},Fr),Fr;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(Pr={newShapeCollection:function(){var t;t=Qr?Sr[Qr-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,Qr===Rr&&(Sr=pooling.double(Sr),Rr*=2);Sr[Qr]=t,Qr+=1}},Qr=0,Rr=4,Sr=createSizedArray(Rr),Pr),Pr,Qr,Rr,Sr,ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var E;y.__fnct?E=y.__fnct:(E=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=E),p=E((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?l:p,i=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var f={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new p(t,e):6===r?i=new h(t,e):7===r&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return f}(),Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],E=y[3],P=y[4],S=y[5],x=y[6],C=y[7],A=y[8],_=y[9],T=y[10],D=y[11],k=y[12],M=y[13],F=y[14],w=y[15];return y[0]=g*t+v*s+b*h+E*m,y[1]=g*e+v*a+b*l+E*c,y[2]=g*r+v*n+b*p+E*d,y[3]=g*i+v*o+b*f+E*u,y[4]=P*t+S*s+x*h+C*m,y[5]=P*e+S*a+x*l+C*c,y[6]=P*r+S*n+x*p+C*d,y[7]=P*i+S*o+x*f+C*u,y[8]=A*t+_*s+T*h+D*m,y[9]=A*e+_*a+T*l+D*c,y[10]=A*r+_*n+T*p+D*d,y[11]=A*i+_*o+T*f+D*u,y[12]=k*t+M*s+F*h+w*m,y[13]=k*e+M*a+F*l+w*c,y[14]=k*r+M*n+F*p+w*d,y[15]=k*i+M*o+F*f+w*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function E(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function P(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function S(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function x(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function C(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function _(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=A(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function D(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function k(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function M(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function w(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=E,this.applyToX=P,this.applyToY=S,this.applyToZ=x,this.applyToPointArray=D,this.applyToTriplePoints=T,this.applyToPointStringified=k,this.toCSS=M,this.to2dCSS=w,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=_,this.inversePoint=A,this.getInverseMatrix=C,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&1<t&&setDefaultCurveSegments(t);50<=getDefaultCurveSegments()?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}if(lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.1",standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===("undefined"==typeof exports?"undefined":_typeof$3(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=(Ox={},Px={},Ox.registerModifier=function(t,e){Px[t]||(Px[t]=e)},Ox.getModifier=function(t,e,r){return new Px[t](e,r)},Ox),Ox,Px;function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<m;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,E=0;for(s=m-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<m?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,E,c),E+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var S=P.pop();this.addPaths(P,u),P=this.addShapes(d,y[1],S)}else this.addPaths(P,u),P=this.addShapes(d,y[1]);this.addPaths(P,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),u.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,a=m[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,f=t.i[a][1]+(i[1]-t.i[a][1])*-r,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=0<m?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,E=0;if(0<m){for(;E<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),E+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),E+=c)}else if(m<0){for(;d<E;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),E-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),E-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==E){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];E+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,f=u=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var a={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function m(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=m(i[r].fFamily,"monospace"),i[r].sansCase=m(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.setAttribute("f-family",i[r].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(l)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.type="text/css",p.rel="stylesheet",p.href=i[r].fPath,document.body.appendChild(p)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var f=createTag("link");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[r].fPath),e.appendChild(f)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function f(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function m(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=p,i.applyPoint=l,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=f,i.sampleImage=m,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},EffectsExpressionInterface=function(){function l(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(p(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function p(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(l(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(f(t[i],e[i],r)):"tm"===t[i].ty?s.push(m(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(d(t[i],e[i],r)):"sr"===t[i].ty?s.push(u(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(l(t[i],e[i],r)):s.push(p(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(){return function(){return null}}function f(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function m(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},getBlendMode=(QI={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return QI[t]||""}),QI;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function _typeof$2(t){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var FootageInterface=(_J=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"===_typeof$2(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"===_typeof$2(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=_J(t),e}),_J;function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):m=f=null,this.storedData[i]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var E=createNS("g");for(o=0;o<h;o+=1)E.appendChild(u[o]);var P=createNS("mask");P.setAttribute("mask-type","alpha"),P.setAttribute("id",y+"_"+d),P.appendChild(s),a.appendChild(P),E.setAttribute("mask","url("+getLocationHref()+"#"+y+"_"+d+")"),u.length=0,u.push(E)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=($L={},$L.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},$L.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},$L),$L,featureSupport=(fM={maskType:!0},(/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))&&(fM.maskType=!1),fM),fM;function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:l<=a?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=r).matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}};var registeredEffects={};function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1){r=null;var o=t.data.ef[e].ty;if(registeredEffects[o])r=new registeredEffects[o].effect(a,t.effectsManager.effectElements[e],t),registeredEffects[o].countsAsEffect&&(n+=1);20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r)}n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function r(){}function i(t,e,r){var i,s,a,n,o,h,l,p,f,m,c,d=e.styles.length,u=e.lvl;for(h=0;h<d;h+=1){if(n=e.sh._mdf||r,e.styles[h].lvl<u){for(p=g.reset(),m=u-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<m;)n=e.transformers[c].mProps._mdf||n,m-=1,c-=1;if(n)for(m=u-e.styles[h].lvl,c=e.transformers.length-1;0<m;)f=e.transformers[c].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m-=1,c-=1}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",i=0;i<s;i+=1)(o=l.shapes[i])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function s(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function a(t,e,r){n(t,e,r),o(t,e,r)}function n(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=o*v,E=Math.cos(g+e.a.v)*b+p[0],P=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",E),h.setAttribute("fy",P),l&&!e.g._collapsable&&(e.of.setAttribute("fx",E),e.of.setAttribute("fy",P))}}function o(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return s;case"gf":return n;case"gs":return a;case"st":return o;case"sh":case"el":case"rc":case"sr":return i;case"tr":return e;case"no":return r;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else"no"===t.ty&&(r=new SVGNoStyleData(this,t,i));return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,f,m,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),(e[o]=f).init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),E=0,P=getFontProperties(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var S,x=t.tr/1e3*t.finalSize;if(t.sz)for(var C,A,_=!0,T=t.sz[0],D=t.sz[1];_;){g=C=0,r=(A=this.buildFinalText(t.t)).length,x=t.tr/1e3*t.finalSize;var k=-1;for(e=0;e<r;e+=1)S=A[e].charCodeAt(0),i=!1," "===A[e]?k=e:13!==S&&3!==S||(i=!(g=0),C+=t.finalLineHeight||1.2*t.finalSize),T<g+(E=h.chars?(o=h.getCharData(A[e],b.fStyle,b.fFamily),i?0:o.w*t.finalSize/100):h.measureText(A[e],t.f,t.finalSize))&&" "!==A[e]?(-1===k?r+=1:e=k,C+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,k===e?1:0,"\r"),k=-1,g=0):(g+=E,g+=x);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&D<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,_=!1)}g=-x;var M,F=E=0;for(e=0;e<r;e+=1)if(i=!1,13===(S=(M=t.finalText[e]).charCodeAt(0))||3===S?(F=0,y.push(g),v=v<g?g:v,g=-2*x,i=!(s=""),u+=1):s=M,E=h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===M?F+=E+x:(g+=E+x+F,F=0),p.push({l:E,an:E,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=E,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=E);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=E,d+=1;f+=1,c=0}}else if(3==m){if(c+=E,""===s||e===r-1){for(""===s&&(c-=E);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=E,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,B,R=l.a;n=R.length;var L=[];for(a=0;a<n;a+=1){for((w=R[a]).a.sc&&(t.strokeColorAnim=!0),w.a.sw&&(t.strokeWidthAnim=!0),(w.a.fc||w.a.fh||w.a.fs||w.a.fb)&&(t.fillColorAnim=!0),B=0,V=w.s.b,e=0;e<r;e+=1)(I=p[e]).anIndexes[a]=B,(1==V&&""!==I.val||2==V&&""!==I.val&&" "!==I.val||3==V&&(I.n||" "==I.val||e==r-1)||4==V&&(I.n||e==r-1))&&(1===w.s.rn&&L.push(B),B+=1);l.a[a].s.totalChars=B;var G,z=-1;if(1===w.s.rn)for(e=0;e<r;e+=1)z!=(I=p[e]).anIndexes[a]&&(z=I.anIndexes[a],G=L.splice(Math.floor(Math.random()*L.length),1)[0]),I.anIndexes[a]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,f=-p/2+(t=y(u(0,t+.5-o),h-o)),m=p/2;n=Math.sqrt(1-f*f/(m*m))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,f,m,c,d,u,y,g,v,b,E,P=this._moreOptions.alignment.v,S=this._animatorsData,x=this._textData,C=this.mHelper,A=this._renderType,_=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(E=this._pathData.m,!this._pathData.n||this._pathData._mdf){var D,k=E.v;for(this._pathData.r.v&&(k=k.reverse()),n={tLength:0,segments:[]},a=k._length-1,s=g=0;s<a;s+=1)D=bez.buildBezierData(k.v[s],k.v[s+1],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[s+1][0]-k.v[s+1][0],k.i[s+1][1]-k.v[s+1][1]]),n.tLength+=D.segmentLength,n.segments.push(D),g+=D.segmentLength;s=a,E.v.c&&(D=bez.buildBezierData(k.v[s],k.v[0],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[0][0]-k.v[0][0],k.i[0][1]-k.v[0][1]]),n.tLength+=D.segmentLength,n.segments.push(D),g+=D.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=1,p=!(l=m=0),u=n.segments,o<0&&E.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}a=T.length,i=r=0;var M,F,w,I,V,B=1.2*t.finalSize*.714,R=!0;w=S.length;var L,G,z,N,O,H,j,q,W,$,Y,X,J=-1,K=o,Z=m,Q=f,U=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(F=0;F<w;F+=1)(M=S[F].a).t.propType&&(nt&&2===t.j&&(it+=M.t.v*st),(V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?rt+=M.t.v*V[0]*st:rt+=M.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(C.reset(),N=1,T[s].n)r=0,i+=t.yOffset,i+=R?1:0,o=K,R=!1,this._hasMaskedPath&&(f=Q,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),X=W=Y=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(U!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}U=T[s].line}J!==T[s].ind&&(T[J]&&(o+=T[J].extra),o+=T[s].an/2,J=T[s].ind),o+=P[0]*T[s].an*.005;var ot=0;for(F=0;F<w;F+=1)(M=S[F].a).p.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?ot+=M.p.v[0]*V[0]:ot+=M.p.v[0]*V),M.a.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?ot+=M.a.v[0]*V[0]:ot+=M.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*J/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,d=u[m+=1]?u[m].points:E.v.c?u[m=f=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,C.translate(-L,0,0)}else L=T[s].an/2-T[s].add,C.translate(-L,0,0),C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01,0);for(F=0;F<w;F+=1)(M=S[F].a).t.propType&&(V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=M.t.v*V[0]:o+=M.t.v*V:V.length?r+=M.t.v*V[0]:r+=M.t.v*V));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<w;F+=1)(M=S[F].a).a.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?C.translate(-M.a.v[0]*V[0],-M.a.v[1]*V[1],M.a.v[2]*V[2]):C.translate(-M.a.v[0]*V,-M.a.v[1]*V,M.a.v[2]*V));for(F=0;F<w;F+=1)(M=S[F].a).s.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?C.scale(1+(M.s.v[0]-1)*V[0],1+(M.s.v[1]-1)*V[1],1):C.scale(1+(M.s.v[0]-1)*V,1+(M.s.v[1]-1)*V,1));for(F=0;F<w;F+=1){if(M=S[F].a,V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),M.sk.propType&&(V.length?C.skewFromAxis(-M.sk.v*V[0],M.sa.v*V[1]):C.skewFromAxis(-M.sk.v*V,M.sa.v*V)),M.r.propType&&(V.length?C.rotateZ(-M.r.v*V[2]):C.rotateZ(-M.r.v*V)),M.ry.propType&&(V.length?C.rotateY(M.ry.v*V[1]):C.rotateY(M.ry.v*V)),M.rx.propType&&(V.length?C.rotateX(M.rx.v*V[0]):C.rotateX(M.rx.v*V)),M.o.propType&&(V.length?N+=(M.o.v*V[0]-N)*V[0]:N+=(M.o.v*V-N)*V),t.strokeWidthAnim&&M.sw.propType&&(V.length?H+=M.sw.v*V[0]:H+=M.sw.v*V),t.strokeColorAnim&&M.sc.propType)for(q=0;q<3;q+=1)V.length?O[q]+=(M.sc.v[q]-O[q])*V[0]:O[q]+=(M.sc.v[q]-O[q])*V;if(t.fillColorAnim&&t.fc){if(M.fc.propType)for(q=0;q<3;q+=1)V.length?j[q]+=(M.fc.v[q]-j[q])*V[0]:j[q]+=(M.fc.v[q]-j[q])*V;M.fh.propType&&(j=V.length?addHueToRGB(j,M.fh.v*V[0]):addHueToRGB(j,M.fh.v*V)),M.fs.propType&&(j=V.length?addSaturationToRGB(j,M.fs.v*V[0]):addSaturationToRGB(j,M.fs.v*V)),M.fb.propType&&(j=V.length?addBrightnessToRGB(j,M.fb.v*V[0]):addBrightnessToRGB(j,M.fb.v*V))}}for(F=0;F<w;F+=1)(M=S[F].a).p.propType&&(V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),this._hasMaskedPath?V.length?C.translate(0,M.p.v[1]*V[0],-M.p.v[2]*V[1]):C.translate(0,M.p.v[1]*V,-M.p.v[2]*V):V.length?C.translate(M.p.v[0]*V[0],M.p.v[1]*V[1],-M.p.v[2]*V[2]):C.translate(M.p.v[0]*V,M.p.v[1]*V,-M.p.v[2]*V));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&($="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(C.translate(0,-t.ls),C.translate(0,P[1]*B*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),C.rotate(-ht*Math.PI/180)}C.translate(G,z,0),o-=P[0]*T[s].an*.005,T[s+1]&&J!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(C.translate(r,i,0),t.ps&&C.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}C.translate(0,-t.ls),C.translate(L,0,0),C.translate(P[0]*T[s].an*.005,P[1]*B*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===A?tt=C.toCSS():"svg"===A?tt=C.to2dCSS():et=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],X=N}this.lettersChangedFlag=_<=s?(I=new LetterProps(X,W,$,Y,tt,et),this.renderedLetters.push(I),_+=1,!0):(I=this.renderedLetters[s]).update(X,W,$,Y,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)"sh"===e[r].ty&&(i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t));return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVEffects(){}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVBaseElement(){}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CanvasRendererBase(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,p=this.data.singleShape,f=0,m=0,c=!0,d=.001*r.tr*r.finalSize;if(!p||h||r.sz){var u,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!p||0===t){if(n=t<y?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(r.finalSize/100,r.finalSize/100),p&&(o[t].n&&(f=-d,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=u.data),v=new SVGShapeElement(b,this.globalData,this)}(this.textSpans[t].glyph=v)._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var E=this.textContainer,P="start";switch(r.j){case 1:P="end";break;case 2:P="middle";break;default:P="start"}E.setAttribute("text-anchor",P),E.setAttribute("letter-spacing",d);var S=this.buildTextContents(r.finalText);for(e=S.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||createNS("tspan")).textContent=S[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",E.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=r.finalLineHeight;this.layerElement.appendChild(E)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s,a=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(r=a[t],i=this.textSpans[t].span,(s=this.textSpans[t].glyph)&&s.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,l,p,f=t.length-1,m=[],c=[],d=[].concat(s);for(a=f;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),(e[a]=l).init(this,t,a,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),f=c.length,a=0;a<f;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;1<=f?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,s,a,n,o,h,l,p,f,m,c,d,u=this.globalData.fontManager.getFontByName(t.f),y=t.l,g=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,E=0,P=0,S=!0,x=0;for(i=0;i<s;i+=1){n=(a=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&a.data||{},g.reset(),v&&y[i].n&&(E=-b,P+=t.yOffset,P+=S?1:0,S=!1),f=(l=n.shapes?n.shapes[0].it:[]).length,g.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,g,y[i].line,E,P),c=createSizedArray(f-1);var C=0;for(p=0;p<f;p+=1)if("sh"===l[p].ty){for(h=l[p].ks.k.i.length,m=l[p].ks.k,d=[],o=1;o<h;o+=1)1===o&&d.push(g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[o][0],m.i[o][1],0),g.applyToY(m.i[o][0],m.i[o][1],0),g.applyToX(m.v[o][0],m.v[o][1],0),g.applyToY(m.v[o][0],m.v[o][1],0));d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[0][0],m.i[0][1],0),g.applyToY(m.i[0][0],m.i[0][1],0),g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),c[C]=d,C+=1}v&&(E+=y[i].l,E+=b),this.textSpans[x]?this.textSpans[x].elem=c:this.textSpans[x]={elem:c},x+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,s,a,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,f,m=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?m!==o.fc&&(m=o.fc,n.fillStyle=o.fc):m!==this.values.fill&&(m=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(f[s],f[s+1],f[s+2],f[s+3],f[s+4],f[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(f[s],f[s+1],f[s+2],f[s+3],f[s+4],f[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o<n&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(r=a)*o:r=(e=s)/o,i.drawImage(this.img,(s-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=r<i&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);(e[t]=r).initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(r=0;r<l-1;r+=1)i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[r+1]),n=this.getTransformedPoint(h,o.v[r+1]),this.checkBounds(i,s,a,n,e);o.c&&(i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(i,s,a,n,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,s){this.getBoundsOfCurve(t,e,r,i);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var s,a,n,o,h,l,p,f=[[t[0],i[0]],[t[1],i[1]]],m=0;m<2;++m)a=6*t[m]-12*e[m]+6*r[m],s=-3*t[m]+9*e[m]-9*r[m]+3*i[m],n=3*e[m]-3*t[m],a|=0,n|=0,0===(s|=0)&&0===a||(0===s?0<(o=-n/a)&&o<1&&f[m].push(this.calculateF(o,t,e,r,i,m)):0<=(h=a*a-4*n*s)&&(0<(l=(-a+bmSqrt(h))/(2*s))&&l<1&&f[m].push(this.calculateF(l,t,e,r,i,m)),0<(p=(-a-bmSqrt(h))/(2*s))&&p<1&&f[m].push(this.calculateF(p,t,e,r,i,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it&&this.calculateBoundingBox(t[r].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=s,i.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,s,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var n=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=n}var h,l,p,f=t.l;s=f.length;var m,c=this.mHelper,d="",u=0;for(i=0;i<s;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?h=this.textPaths[u]:((h=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[u]?this.textPaths[u]:createNS("text"):this.textSpans[u]?(l=this.textSpans[u],h=this.textPaths[u]):(styleDiv(l=createTag("span")),styleDiv(h=createTag("span")),l.appendChild(h)),this.globalData.fontManager.chars){var y,g=this.globalData.fontManager.getCharData(t.finalText[i],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(y=g?g.data:null,c.reset(),y&&y.shapes&&y.shapes.length&&(m=y.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),d=this.createPathShape(c,m),h.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(l),y&&y.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,E="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=E,b.webkitTransform=E,f[i].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(h.textContent=f[i].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(l);var P=h.style,S="translate3d(0,"+-t.finalSize/1.2+"px,0)";P.transform=S,P.webkitTransform=S}this.isMasked?this.textSpans[u]=h:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=h,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,s,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(i=l.length,r=0;r<i;r+=1)l[r].n?o+=1:(a=this.textSpans[r],n=this.textPaths[r],s=h[o],o+=1,s._mdf.m&&(this.isMasked?a.setAttribute("transform",s.m):(a.style.webkitTransform=s.m,a.style.transform=s.m)),a.style.opacity=s.o,s.sw&&s._mdf.sw&&n.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&n.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(n.setAttribute("fill",s.fc),n.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,s=this.comp.threeDElements.length;for(t=0;t<s;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){r=e.perspectiveElem.style,i=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,i.transformOrigin=n,i.mozTransformOrigin=n,i.webkitTransformOrigin=n,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;0<=t;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var d=this.mat.toCSS();(c=f.container.style).transform=d,c.webkitTransform=d}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,s):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?"3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")):"2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t);for(t=(r=this.threeDElements.length)-1;0<=t;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var s,a=this.threeDElements[r].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[r].container.insertBefore(t,s):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",styleDiv(this.resizerElem=e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,r,i,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight;i=s/a<this.globalData.compSize.w/this.globalData.compSize.h?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,r=0,(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,0);var n=this.resizerElem.style;n.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",n.transform=n.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",s.perspective=s.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],i,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var Expressions=(Y6={},Y6.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},Y6),Y6;function _typeof$1(t){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function seedRandom(o,h){var l,p=this,f=256,m=6,c="random",d=h.pow(f,m),u=h.pow(2,52),y=2*u,g=f-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<f;)a[i]=i++;for(i=0;i<f;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*f+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function E(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return P(e)}function P(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=E(function t(e,r){var i,s=[],a=_typeof$1(e);if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,P(o)]:null===t?function(){try{if(l)return P(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),P(t)}catch(t){var e=p.navigator,r=e&&e.plugins;return[+new Date,p,r,p.screen,P(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(m),e=d,r=0;t<u;)t=(t+r)*f,e*=f,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,E(P(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&b(i,a),t.state=function(){return b(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},E(h.random(),o)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var l=n-o;switch(r=.5<h?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*d+c[a];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}return registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),setExpressionsPlugin(Expressions),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie},"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):(C="undefined"!=typeof globalThis?globalThis:C||self).lottie=D()),{loadAnimation:loadAnimation}}({});onmessage=function(t){var e=t.data,r=e.type,i=e.payload;"load"===r?lottieInternal.loadAnimation(i):"pause"===r?animations[i.id]&&animations[i.id].pause():"play"===r?animations[i.id]&&animations[i.id].play():"stop"===r?animations[i.id]&&animations[i.id].stop():"setSpeed"===r?animations[i.id]&&animations[i.id].setSpeed(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"goToAndPlay"===r?animations[i.id]&&animations[i.id].goToAndPlay(i.value,i.isFrame):"goToAndStop"===r?animations[i.id]&&animations[i.id].goToAndStop(i.value,i.isFrame):"setSubframe"===r?animations[i.id]&&animations[i.id].setSubframe(i.value):"addEventListener"===r?animations[i.id]&&animations[i.id].addEventListener(i.eventName,function(){self.postMessage({type:"event",payload:{id:i.id,callbackId:i.callbackId,argument:arguments[0]}})}):"destroy"===r?animations[i.id]&&(animations[i.id].destroy(),animations[i.id]=null):"resize"===r&&animations[i.id]&&animations[i.id].resize()}}function createWorker(t){var e=new Blob(["("+t.toString()+"())"],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}var lottie=function(){"use strict";var n=createWorker(workerContent),r=0,o=0,h={},l={rendererSettings:{}};function p(t,e,r,i){var s;for(var a in s="div"===t.type?document.createElement("div"):document.createElementNS(t.namespace,t.type),t.attributes)Object.prototype.hasOwnProperty.call(t.attributes,a)&&("href"===a?s.setAttributeNS("http://www.w3.org/1999/xlink",a,t.attributes[a]):s.setAttribute(a,t.attributes[a]),"id"===a&&(r[t.attributes[a]]=s));for(var n in t.style)Object.prototype.hasOwnProperty.call(t.style,n)&&(s.style[n]=t.style[n]);t.children.forEach(function(t){p(t,s,r)}),i?e.insertBefore(s,i):e.appendChild(s)}var e=function(t){var e=h[t.id];e._loaded=!0,e.pendingCallbacks.forEach(function(t){e.animInstance.addEventListener(t.eventName,t.callback),"DOMLoaded"===t.eventName&&t.callback()}),e.animInstance.totalFrames=t.totalFrames,e.animInstance.frameRate=t.frameRate;var r=e.container,i=e.elements;p(t.tree,r,i)};function f(t,e){for(var r,i=0;i<t.length;i+=1){var s,a=e[(r=t[i])[1]];if(a)r[2]&&(s=e[r[2]]),p(r[0],a,e,s),t.splice(i,1),i-=1}}function m(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.style[r[0]]=r[1]}function c(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.setAttribute(r[0],r[1])}return n.onmessage=function(t){"loaded"===t.data.type?e(t.data.payload):"updated"===t.data.type?function(t){var e=t.elements,r=h[t.id];if(r){for(var i,s=r.elements,a=0;a<e.length;a+=1){var n=s[(i=e[a]).id];f(i.elements,s),m(n,i.styles),c(n,i.attributes)}r.animInstance.currentFrame=t.currentTime}}(t.data.payload):"event"===t.data.type&&function(t){var e=h[t.id];if(e){var r=e.callbacks;r[t.callbackId]&&r[t.callbackId](t.argument)}}(t.data.payload)},{loadAnimation:function(t){var i,s="lottie_animationId_"+(r+=1),a={elements:{},callbacks:{},pendingCallbacks:[]},e={id:s,pause:function(){n.postMessage({type:"pause",payload:{id:s}})},play:function(){n.postMessage({type:"play",payload:{id:s}})},stop:function(){n.postMessage({type:"stop",payload:{id:s}})},setSpeed:function(t){n.postMessage({type:"setSpeed",payload:{id:s,value:t}})},setDirection:function(t){n.postMessage({type:"setDirection",payload:{id:s,value:t}})},goToAndStop:function(t,e){n.postMessage({type:"goToAndStop",payload:{id:s,value:t,isFrame:e}})},goToAndPlay:function(t,e){n.postMessage({type:"goToAndPlay",payload:{id:s,value:t,isFrame:e}})},setSubframe:function(t){n.postMessage({type:"setSubframe",payload:{id:s,value:t}})},addEventListener:function(t,e){if(a._loaded){var r="callback_"+(o+=1);a.callbacks[r]=e,n.postMessage({type:"addEventListener",payload:{id:s,callbackId:r,eventName:t}})}else a.pendingCallbacks.push({eventName:t,callback:e})},destroy:function(){h[s]=null,a.container&&(a.container.innerHTML=""),n.postMessage({type:"destroy",payload:{id:s}})},resize:function(){n.postMessage({type:"resize",payload:{id:s}})}};return a.animInstance=e,(i=t,new Promise(function(e,t){var r=Object.assign({},l,i);r.animType&&!r.renderer&&(r.renderer=r.animType),r.wrapper&&(r.container||(r.container=r.wrapper),delete r.wrapper),r.animationData?e(r):r.path?fetch(r.path).then(function(t){return t.json()}).then(function(t){r.animationData=t,delete r.path,e(r)}):t()})).then(function(t){var e=[];if(t.container&&(a.container=t.container,delete t.container),"canvas"===t.renderer&&!t.rendererSettings.canvas){var r=document.createElement("canvas");a.container.appendChild(r),r.width=t.animationData.w,r.height=t.animationData.h,r.style.width="100%",r.style.height="100%";var i=r.transferControlToOffscreen();e.push(i),t.rendererSettings.canvas=i}h[s]=a,n.postMessage({type:"load",payload:{params:t,id:s}},e)}),e}}}();
 return lottie;
 }));
\ No newline at end of file
diff --git a/build/player/lottie_html.js b/build/player/lottie_html.js
index b3674cc..3257ace 100644
--- a/build/player/lottie_html.js
+++ b/build/player/lottie_html.js
@@ -1,1911 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* global svgNS */
-/* exported createNS */
-
-function createNS(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElementNS(svgNS, type);
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$6(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1913,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$5(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6774,6858 +1620,6062 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$4(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global extendPrototype, BaseRenderer, SVGRenderer, SVGShapeElement, HShapeElement, SVGTextLottieElement,
-HTextElement, HCameraElement, IImageElement, HImageElement, SVGCompElement, HCompElement, ISolidElement,
-HSolidElement, styleDiv, createTag, createNS */
-
-function HybridRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.renderConfig = {
-    className: (config && config.className) || '',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    hideOnTransparent: !(config && config.hideOnTransparent === false),
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '400%',
-      height: (config && config.filterSize && config.filterSize.height) || '400%',
-      x: (config && config.filterSize && config.filterSize.x) || '-100%',
-      y: (config && config.filterSize && config.filterSize.y) || '-100%',
-    },
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    renderConfig: this.renderConfig,
+
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
+
+    if (expressionsPlugin) {
+      expressionsPlugin.initExpressions(this);
+    }
+
+    this.loadNextSegment();
   };
-  this.pendingElements = [];
-  this.elements = [];
-  this.threeDElements = [];
-  this.destroyed = false;
-  this.camera = null;
-  this.supports3d = true;
-  this.rendererType = 'html';
-}
 
-extendPrototype([BaseRenderer], HybridRenderer);
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
 
-HybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;
-
-HybridRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-HybridRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newDOMElement = element.getBaseElement();
-  if (!newDOMElement) {
-    return;
-  }
-  var layer = this.layers[pos];
-  if (!layer.ddd || !this.supports3d) {
-    if (this.threeDElements) {
-      this.addTo3dContainer(newDOMElement, pos);
-    } else {
-      var i = 0;
-      var nextDOMElement;
-      var nextLayer;
-      var tmpDOMElement;
-      while (i < pos) {
-        if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
-          nextLayer = this.elements[i];
-          tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
-          nextDOMElement = tmpDOMElement || nextDOMElement;
-        }
-        i += 1;
-      }
-      if (nextDOMElement) {
-        if (!layer.ddd || !this.supports3d) {
-          this.layerElement.insertBefore(newDOMElement, nextDOMElement);
-        }
-      } else if (!layer.ddd || !this.supports3d) {
-        this.layerElement.appendChild(newDOMElement);
-      }
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-  } else {
-    this.addTo3dContainer(newDOMElement, pos);
-  }
-};
 
-HybridRenderer.prototype.createShape = function (data) {
-  if (!this.supports3d) {
-    return new SVGShapeElement(data, this.globalData, this);
-  }
-  return new HShapeElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createText = function (data) {
-  if (!this.supports3d) {
-    return new SVGTextLottieElement(data, this.globalData, this);
-  }
-  return new HTextElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createCamera = function (data) {
-  this.camera = new HCameraElement(data, this.globalData, this);
-  return this.camera;
-};
-
-HybridRenderer.prototype.createImage = function (data) {
-  if (!this.supports3d) {
-    return new IImageElement(data, this.globalData, this);
-  }
-  return new HImageElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createComp = function (data) {
-  if (!this.supports3d) {
-    return new SVGCompElement(data, this.globalData, this);
-  }
-  return new HCompElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createSolid = function (data) {
-  if (!this.supports3d) {
-    return new ISolidElement(data, this.globalData, this);
-  }
-  return new HSolidElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-HybridRenderer.prototype.getThreeDContainerByPos = function (pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
-      return this.threeDElements[i].perspectiveElem;
-    }
-    i += 1;
-  }
-  return null;
-};
-
-HybridRenderer.prototype.createThreeDContainer = function (pos, type) {
-  var perspectiveElem = createTag('div');
-  var style;
-  var containerStyle;
-  styleDiv(perspectiveElem);
-  var container = createTag('div');
-  styleDiv(container);
-  if (type === '3d') {
-    style = perspectiveElem.style;
-    style.width = this.globalData.compSize.w + 'px';
-    style.height = this.globalData.compSize.h + 'px';
-    var center = '50% 50%';
-    style.webkitTransformOrigin = center;
-    style.mozTransformOrigin = center;
-    style.transformOrigin = center;
-    containerStyle = container.style;
-    var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-    containerStyle.transform = matrix;
-    containerStyle.webkitTransform = matrix;
-  }
-
-  perspectiveElem.appendChild(container);
-  // this.resizerElem.appendChild(perspectiveElem);
-  var threeDContainerData = {
-    container: container,
-    perspectiveElem: perspectiveElem,
-    startPos: pos,
-    endPos: pos,
-    type: type,
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
   };
-  this.threeDElements.push(threeDContainerData);
-  return threeDContainerData;
-};
 
-HybridRenderer.prototype.build3dContainers = function () {
-  var i;
-  var len = this.layers.length;
-  var lastThreeDContainerData;
-  var currentContainer = '';
-  for (i = 0; i < len; i += 1) {
-    if (this.layers[i].ddd && this.layers[i].ty !== 3) {
-      if (currentContainer !== '3d') {
-        currentContainer = '3d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '3d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
-    } else {
-      if (currentContainer !== '2d') {
-        currentContainer = '2d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '2d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
-  }
-  len = this.threeDElements.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
-  }
-};
 
-HybridRenderer.prototype.addTo3dContainer = function (elem, pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (pos <= this.threeDElements[i].endPos) {
-      var j = this.threeDElements[i].startPos;
-      var nextElement;
-      while (j < pos) {
-        if (this.elements[j] && this.elements[j].getBaseElement) {
-          nextElement = this.elements[j].getBaseElement();
-        }
-        j += 1;
-      }
-      if (nextElement) {
-        this.threeDElements[i].container.insertBefore(elem, nextElement);
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
+
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
+
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
+    }
+
+    try {
+      this.animationData = animData;
+
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        this.threeDElements[i].container.appendChild(elem);
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
       }
-      break;
+
+      this.renderer.configAnimation(animData);
+
+      if (!animData.assets) {
+        animData.assets = [];
+      }
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
+      }
+    } catch (error) {
+      this.triggerConfigError(error);
     }
-    i += 1;
-  }
-};
+  };
 
-HybridRenderer.prototype.configAnimation = function (animData) {
-  var resizerElem = createTag('div');
-  var wrapper = this.animationItem.wrapper;
-  var style = resizerElem.style;
-  style.width = animData.w + 'px';
-  style.height = animData.h + 'px';
-  this.resizerElem = resizerElem;
-  styleDiv(resizerElem);
-  style.transformStyle = 'flat';
-  style.mozTransformStyle = 'flat';
-  style.webkitTransformStyle = 'flat';
-  if (this.renderConfig.className) {
-    resizerElem.setAttribute('class', this.renderConfig.className);
-  }
-  wrapper.appendChild(resizerElem);
-
-  style.overflow = 'hidden';
-  var svg = createNS('svg');
-  svg.setAttribute('width', '1');
-  svg.setAttribute('height', '1');
-  styleDiv(svg);
-  this.resizerElem.appendChild(svg);
-  var defs = createNS('defs');
-  svg.appendChild(defs);
-  this.data = animData;
-  // Mask animation
-  this.setupGlobalData(animData, svg);
-  this.globalData.defs = defs;
-  this.layers = animData.layers;
-  this.layerElement = this.resizerElem;
-  this.build3dContainers();
-  this.updateContainerSize();
-};
-
-HybridRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.animationItem.container = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    this.elements[i].destroy();
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
-
-HybridRenderer.prototype.updateContainerSize = function () {
-  var elementWidth = this.animationItem.wrapper.offsetWidth;
-  var elementHeight = this.animationItem.wrapper.offsetHeight;
-  var elementRel = elementWidth / elementHeight;
-  var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
-  var sx;
-  var sy;
-  var tx;
-  var ty;
-  if (animationRel > elementRel) {
-    sx = elementWidth / (this.globalData.compSize.w);
-    sy = elementWidth / (this.globalData.compSize.w);
-    tx = 0;
-    ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2);
-  } else {
-    sx = elementHeight / (this.globalData.compSize.h);
-    sy = elementHeight / (this.globalData.compSize.h);
-    tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
-    ty = 0;
-  }
-  var style = this.resizerElem.style;
-  style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
-  style.transform = style.webkitTransform;
-};
-
-HybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
-
-HybridRenderer.prototype.hide = function () {
-  this.resizerElem.style.display = 'none';
-};
-
-HybridRenderer.prototype.show = function () {
-  this.resizerElem.style.display = 'block';
-};
-
-HybridRenderer.prototype.initItems = function () {
-  this.buildAllItems();
-  if (this.camera) {
-    this.camera.setup();
-  } else {
-    var cWidth = this.globalData.compSize.w;
-    var cHeight = this.globalData.compSize.h;
-    var i;
-    var len = this.threeDElements.length;
-    for (i = 0; i < len; i += 1) {
-      var style = this.threeDElements[i].perspectiveElem.style;
-      style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
-      style.perspective = style.webkitPerspective;
-    }
-  }
-};
-
-HybridRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  var floatingContainer = createTag('div');
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
-    }
-  }
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
     }
 
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
     } else {
-      rect = null;
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
+      }
+    }
+  };
+
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
+
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
+
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
+
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
     }
 
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
+    }
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
+      }
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
     } else {
-      count += 1;
+      this.pause();
+    }
+  };
 
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
 
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      } else {
-        feMorph = null;
-        x = null;
-      }
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
 
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
 
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
-      }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
-      }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
       }
     }
-  }
 
-  this.maskElement = createNS(maskType);
+    return null;
+  };
 
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
-
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
     }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
-    }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
       }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
         } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
+      if (!this.checkSegments(nextValue % this.totalFrames)) {
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
           }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
+      }
+    } else {
+      this.setCurrentRawFrameValue(nextValue);
+    }
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$4(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
         }
       }
     }
-  }
-};
 
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
+    function freeze() {
+      _isFrozen = true;
+    }
 
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
 
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
+    function setVolume(val, animation) {
+      var i;
 
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
       }
-      viewData.elem.setAttribute('d', pathShapeValue);
     }
-    viewData.lastPath = pathString;
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
   }
-};
 
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
+  var bez = bezFunction();
 
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
 
-function HierarchyElement() {}
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
 
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-  },
-};
 
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
 
-function FrameElement() {}
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
 
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
           this._mdf = true;
         }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
+      } else {
+        var i = 0;
+        var len = this.v.length;
 
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
         while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
           }
+
           i += 1;
         }
       }
+    }
 
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
         return;
       }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
       }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
       this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-/* global createNS */
-
-function SVGStyleData(data, level) {
-  this.data = data;
-  this.type = data.ty;
-  this.d = '';
-  this.lvl = level;
-  this._mdf = false;
-  this.closed = data.hd === true;
-  this.pElem = createNS('path');
-  this.msElem = null;
-}
-
-SVGStyleData.prototype.reset = function () {
-  this.d = '';
-  this._mdf = false;
-};
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-}
 
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
 
-/* exported SVGTransformData */
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
 
-function SVGTransformData(mProps, op, container) {
-  this.transform = {
-    mProps: mProps,
-    op: op,
-    container: container,
-  };
-  this.elements = [];
-  this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
-}
-
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-  this._isAnimated = !!this._isAnimated;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
-
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
-
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
-
-function SVGGradientFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.initGradientData(elem, data, styleOb);
-}
-
-SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
-  this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);
-  this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);
-  this.g = new GradientProperty(elem, data.g, this);
-  this.style = styleOb;
-  this.stops = [];
-  this.setGradientData(styleOb.pElem, data);
-  this.setGradientOpacity(data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-};
-
-SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
-  var gradientId = createElementID();
-  var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-  gfill.setAttribute('id', gradientId);
-  gfill.setAttribute('spreadMethod', 'pad');
-  gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
-  var stops = [];
-  var stop;
-  var j;
-  var jLen;
-  jLen = data.g.p * 4;
-  for (j = 0; j < jLen; j += 4) {
-    stop = createNS('stop');
-    gfill.appendChild(stop);
-    stops.push(stop);
-  }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
-  this.gf = gfill;
-  this.cst = stops;
-};
-
-SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
-  if (this.g._hasOpacity && !this.g._collapsable) {
-    var stop;
-    var j;
-    var jLen;
-    var mask = createNS('mask');
-    var maskElement = createNS('path');
-    mask.appendChild(maskElement);
-    var opacityId = createElementID();
-    var maskId = createElementID();
-    mask.setAttribute('id', maskId);
-    var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-    opFill.setAttribute('id', opacityId);
-    opFill.setAttribute('spreadMethod', 'pad');
-    opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
-    jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
-    var stops = this.stops;
-    for (j = data.g.p * 4; j < jLen; j += 2) {
-      stop = createNS('stop');
-      stop.setAttribute('stop-color', 'rgb(255,255,255)');
-      opFill.appendChild(stop);
-      stops.push(stop);
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
-    if (data.ty === 'gs') {
-      maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-      maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-      if (data.lj === 1) {
-        maskElement.setAttribute('stroke-miterlimit', data.ml);
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
       }
     }
-    this.of = opFill;
-    this.ms = mask;
-    this.ost = stops;
-    this.maskId = maskId;
-    styleOb.msElem = maskElement;
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
   }
-};
 
-extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
 
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
 
-function SVGGradientStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.initGradientData(elem, data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-}
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
 
-extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
 
-/* global createNS */
-/* exported ShapeGroupData */
+    return animationManager.loadAnimation(params);
+  }
 
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
 
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
 
-var SVGElementsRenderer = (function () {
-  var _identityMatrix = new Matrix();
-  var _matrixHelper = new Matrix();
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
 
-  var ob = {
-    createRenderFunction: createRenderFunction,
-  };
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
 
-  function createRenderFunction(data) {
-    switch (data.ty) {
-      case 'fl':
-        return renderFill;
-      case 'gf':
-        return renderGradient;
-      case 'gs':
-        return renderGradientStroke;
-      case 'st':
-        return renderStroke;
-      case 'sh':
-      case 'el':
-      case 'rc':
-      case 'sr':
-        return renderPath;
-      case 'tr':
-        return renderContentTransform;
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
       default:
         return null;
     }
   }
 
-  function renderContentTransform(styleData, itemData, isFirstFrame) {
-    if (isFirstFrame || itemData.transform.op._mdf) {
-      itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
-    }
-    if (isFirstFrame || itemData.transform.mProps._mdf) {
-      itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
-    }
-  }
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
 
-  function renderPath(styleData, itemData, isFirstFrame) {
-    var j;
-    var jLen;
-    var pathStringTransformed;
-    var redraw;
-    var pathNodes;
-    var l;
-    var lLen = itemData.styles.length;
-    var lvl = itemData.lvl;
-    var paths;
-    var mat;
-    var props;
-    var iterations;
-    var k;
-    for (l = 0; l < lLen; l += 1) {
-      redraw = itemData.sh._mdf || isFirstFrame;
-      if (itemData.styles[l].lvl < lvl) {
-        mat = _matrixHelper.reset();
-        iterations = lvl - itemData.styles[l].lvl;
-        k = itemData.transformers.length - 1;
-        while (!redraw && iterations > 0) {
-          redraw = itemData.transformers[k].mProps._mdf || redraw;
-          iterations -= 1;
-          k -= 1;
-        }
-        if (redraw) {
-          iterations = lvl - itemData.styles[l].lvl;
-          k = itemData.transformers.length - 1;
-          while (iterations > 0) {
-            props = itemData.transformers[k].mProps.v.props;
-            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]);
-            iterations -= 1;
-            k -= 1;
-          }
-        }
-      } else {
-        mat = _identityMatrix;
-      }
-      paths = itemData.sh.paths;
-      jLen = paths._length;
-      if (redraw) {
-        pathStringTransformed = '';
-        for (j = 0; j < jLen; j += 1) {
-          pathNodes = paths.shapes[j];
-          if (pathNodes && pathNodes._length) {
-            pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
-          }
-        }
-        itemData.caches[l] = pathStringTransformed;
-      } else {
-        pathStringTransformed = itemData.caches[l];
-      }
-      itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
-      itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
-    }
-  }
-
-  function renderFill(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
 
-    if (itemData.c._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
     }
   }
 
-  function renderGradientStroke(styleData, itemData, isFirstFrame) {
-    renderGradient(styleData, itemData, isFirstFrame);
-    renderStroke(styleData, itemData, isFirstFrame);
-  }
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
 
-  function renderGradient(styleData, itemData, isFirstFrame) {
-    var gfill = itemData.gf;
-    var hasOpacity = itemData.g._hasOpacity;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
 
-    if (itemData.o._mdf || isFirstFrame) {
-      var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
-      itemData.style.pElem.setAttribute(attr, itemData.o.v);
-    }
-    if (itemData.s._mdf || isFirstFrame) {
-      var attr1 = styleData.t === 1 ? 'x1' : 'cx';
-      var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
-      gfill.setAttribute(attr1, pt1[0]);
-      gfill.setAttribute(attr2, pt1[1]);
-      if (hasOpacity && !itemData.g._collapsable) {
-        itemData.of.setAttribute(attr1, pt1[0]);
-        itemData.of.setAttribute(attr2, pt1[1]);
-      }
-    }
-    var stops;
-    var i;
-    var len;
-    var stop;
-    if (itemData.g._cmdf || isFirstFrame) {
-      stops = itemData.cst;
-      var cValues = itemData.g.c;
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        stop.setAttribute('offset', cValues[i * 4] + '%');
-        stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
-      }
-    }
-    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
-      var oValues = itemData.g.o;
-      if (itemData.g._collapsable) {
-        stops = itemData.cst;
-      } else {
-        stops = itemData.ost;
-      }
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        if (!itemData.g._collapsable) {
-          stop.setAttribute('offset', oValues[i * 2] + '%');
-        }
-        stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
-      }
-    }
-    if (styleData.t === 1) {
-      if (itemData.e._mdf || isFirstFrame) {
-        gfill.setAttribute('x2', pt2[0]);
-        gfill.setAttribute('y2', pt2[1]);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('x2', pt2[0]);
-          itemData.of.setAttribute('y2', pt2[1]);
-        }
-      }
-    } else {
-      var rad;
-      if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
-        rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        gfill.setAttribute('r', rad);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('r', rad);
-        }
-      }
-      if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
-        if (!rad) {
-          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        }
-        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-        var percent = itemData.h.v;
-        if (percent >= 1) {
-          percent = 0.99;
-        } else if (percent <= -1) {
-          percent = -0.99;
-        }
-        var dist = rad * percent;
-        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-        gfill.setAttribute('fx', x);
-        gfill.setAttribute('fy', y);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('fx', x);
-          itemData.of.setAttribute('fy', y);
-        }
-      }
-      // gfill.setAttribute('fy','200');
-    }
-  }
-
-  function renderStroke(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
-    var d = itemData.d;
-    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
-      styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
-      styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
-    }
-    if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
-      styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
-    }
-    if (itemData.w._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
-      if (styleElem.msElem) {
-        styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
-      }
-    }
-  }
-
-  return ob;
-}());
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
-
-function FootageElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.footageData = globalData.imageLoader.getAsset(this.assetData);
-  this.initBaseData(data, globalData, comp);
-}
-
-FootageElement.prototype.prepareFrame = function () {
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
-
-FootageElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-FootageElement.prototype.renderFrame = function () {
-};
-
-FootageElement.prototype.destroy = function () {
-};
-
-FootageElement.prototype.initExpressions = function () {
-  this.layerInterface = FootageInterface(this);
-};
-
-FootageElement.prototype.getFootageData = function () {
-  return this.footageData;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
-
-function SVGCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = true;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
-
-function SVGTextLottieElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.renderType = 'svg';
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
-
-SVGTextLottieElement.prototype.createContent = function () {
-  if (this.data.singleShape && !this.globalData.fontManager.chars) {
-    this.textContainer = createNS('text');
-  }
-};
-
-SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
-  var i = 0;
-  var len = textArray.length;
-  var textContents = [];
-  var currentTextContent = '';
-  while (i < len) {
-    if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
-      textContents.push(currentTextContent);
-      currentTextContent = '';
-    } else {
-      currentTextContent += textArray[i];
-    }
-    i += 1;
-  }
-  textContents.push(currentTextContent);
-  return textContents;
-};
-
-SVGTextLottieElement.prototype.buildNewText = function () {
-  var i;
-  var len;
-
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
-  if (documentData.fc) {
-    this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
-  } else {
-    this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
-  }
-  if (documentData.sc) {
-    this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
-    this.layerElement.setAttribute('stroke-width', documentData.sw);
-  }
-  this.layerElement.setAttribute('font-size', documentData.finalSize);
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (fontData.fClass) {
-    this.layerElement.setAttribute('class', fontData.fClass);
-  } else {
-    this.layerElement.setAttribute('font-family', fontData.fFamily);
-    var fWeight = documentData.fWeight;
-    var fStyle = documentData.fStyle;
-    this.layerElement.setAttribute('font-style', fStyle);
-    this.layerElement.setAttribute('font-weight', fWeight);
-  }
-  this.layerElement.setAttribute('aria-label', documentData.t);
-
-  var letters = documentData.l || [];
-  var usesGlyphs = !!this.globalData.fontManager.chars;
-  len = letters.length;
-
-  var tSpan;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var singleShape = this.data.singleShape;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  if (singleShape && !usesGlyphs && !documentData.sz) {
-    var tElement = this.textContainer;
-    var justify = 'start';
-    switch (documentData.j) {
-      case 1:
-        justify = 'end';
-        break;
-      case 2:
-        justify = 'middle';
-        break;
-      default:
-        justify = 'start';
-        break;
-    }
-    tElement.setAttribute('text-anchor', justify);
-    tElement.setAttribute('letter-spacing', trackingOffset);
-    var textContent = this.buildTextContents(documentData.finalText);
-    len = textContent.length;
-    yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
-    for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
-      tSpan.textContent = textContent[i];
-      tSpan.setAttribute('x', 0);
-      tSpan.setAttribute('y', yPos);
-      tSpan.style.display = 'inherit';
-      tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
-      yPos += documentData.finalLineHeight;
-    }
-
-    this.layerElement.appendChild(tElement);
-  } else {
-    var cachedSpansLength = this.textSpans.length;
-    var shapeData;
-    var charData;
-    for (i = 0; i < len; i += 1) {
-      if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
-        if (cachedSpansLength <= i) {
-          tSpan.setAttribute('stroke-linecap', 'butt');
-          tSpan.setAttribute('stroke-linejoin', 'round');
-          tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
-          this.layerElement.appendChild(tSpan);
-        }
-        tSpan.style.display = 'inherit';
-      }
-
-      matrixHelper.reset();
-      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-      if (singleShape) {
-        if (letters[i].n) {
-          xPos = -trackingOffset;
-          yPos += documentData.yOffset;
-          yPos += firstLine ? 1 : 0;
-          firstLine = false;
-        }
-        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-        xPos += letters[i].l || 0;
-        // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-        xPos += trackingOffset;
-      }
-      if (usesGlyphs) {
-        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
-        } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
-        }
-      } else {
-        if (singleShape) {
-          tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
-        }
-        tSpan.textContent = letters[i].val;
-        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      }
-      //
-    }
-    if (singleShape && tSpan) {
-      tSpan.setAttribute('d', shapeStr);
-    }
-  }
-  while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
-    i += 1;
-  }
-
-  this._sizeChanged = true;
-};
-
-SVGTextLottieElement.prototype.sourceRectAtTime = function () {
-  this.prepareFrame(this.comp.renderedFrame - this.data.st);
-  this.renderInnerContent();
-  if (this._sizeChanged) {
-    this._sizeChanged = false;
-    var textBox = this.layerElement.getBBox();
-    this.bbox = {
-      top: textBox.y,
-      left: textBox.x,
-      width: textBox.width,
-      height: textBox.height,
-    };
-  }
-  return this.bbox;
-};
-
-SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-    if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
-      this._sizeChanged = true;
-      var i;
-      var len;
-      var renderedLetters = this.textAnimator.renderedLetters;
-
-      var letters = this.textProperty.currentData.l;
-
-      len = letters.length;
-      var renderedLetter;
-      var textSpan;
-      for (i = 0; i < len; i += 1) {
-        if (!letters[i].n) {
-          renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
-          if (renderedLetter._mdf.m) {
-            textSpan.setAttribute('transform', renderedLetter.m);
-          }
-          if (renderedLetter._mdf.o) {
-            textSpan.setAttribute('opacity', renderedLetter.o);
-          }
-          if (renderedLetter._mdf.sw) {
-            textSpan.setAttribute('stroke-width', renderedLetter.sw);
-          }
-          if (renderedLetter._mdf.sc) {
-            textSpan.setAttribute('stroke', renderedLetter.sc);
-          }
-          if (renderedLetter._mdf.fc) {
-            textSpan.setAttribute('fill', renderedLetter.fc);
-          }
-        }
-      }
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global createNS */
-
-function SVGTintFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  feColorMatrix.setAttribute('result', 'f2');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-  if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
-    var feMerge = createNS('feMerge');
-    filter.appendChild(feMerge);
-    var feMergeNode;
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'SourceGraphic');
-    feMerge.appendChild(feMergeNode);
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'f2');
-    feMerge.appendChild(feMergeNode);
-  }
-}
-
-SVGTintFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var colorBlack = this.filterManager.effectElements[0].p.v;
-    var colorWhite = this.filterManager.effectElements[1].p.v;
-    var opacity = this.filterManager.effectElements[2].p.v / 100;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGFillFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-}
-SVGFillFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color = this.filterManager.effectElements[2].p.v;
-    var opacity = this.filterManager.effectElements[6].p.v;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGGaussianBlurEffect(filter, filterManager) {
-  // Outset the filter region by 100% on all sides to accommodate blur expansion.
-  filter.setAttribute('x', '-100%');
-  filter.setAttribute('y', '-100%');
-  filter.setAttribute('width', '300%');
-  filter.setAttribute('height', '300%');
-
-  this.filterManager = filterManager;
-  var feGaussianBlur = createNS('feGaussianBlur');
-  filter.appendChild(feGaussianBlur);
-  this.feGaussianBlur = feGaussianBlur;
-}
-
-SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    // Empirical value, matching AE's blur appearance.
-    var kBlurrinessToSigma = 0.3;
-    var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
-
-    // Dimensions mapping:
-    //
-    //   1 -> horizontal & vertical
-    //   2 -> horizontal only
-    //   3 -> vertical only
-    //
-    var dimensions = this.filterManager.effectElements[1].p.v;
-    var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq
-    var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq
-
-    this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);
-
-    // Repeat edges mapping:
-    //
-    //   0 -> off -> duplicate
-    //   1 -> on  -> wrap
-    var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
-    this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
-  }
-};
-
-/* global createNS, createElementID, locationHref, bmFloor */
-
-function SVGStrokeEffect(elem, filterManager) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.elem = elem;
-  this.paths = [];
-}
-
-SVGStrokeEffect.prototype.initialize = function () {
-  var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-  var path;
-  var groupPath;
-  var i;
-  var len;
-  if (this.filterManager.effectElements[1].p.v === 1) {
-    len = this.elem.maskManager.masksProperties.length;
-    i = 0;
-  } else {
-    i = this.filterManager.effectElements[0].p.v - 1;
-    len = i + 1;
-  }
-  groupPath = createNS('g');
-  groupPath.setAttribute('fill', 'none');
-  groupPath.setAttribute('stroke-linecap', 'round');
-  groupPath.setAttribute('stroke-dashoffset', 1);
-  for (i; i < len; i += 1) {
-    path = createNS('path');
-    groupPath.appendChild(path);
-    this.paths.push({ p: path, m: i });
-  }
-  if (this.filterManager.effectElements[10].p.v === 3) {
-    var mask = createNS('mask');
-    var id = createElementID();
-    mask.setAttribute('id', id);
-    mask.setAttribute('mask-type', 'alpha');
-    mask.appendChild(groupPath);
-    this.elem.globalData.defs.appendChild(mask);
-    var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-    while (elemChildren[0]) {
-      g.appendChild(elemChildren[0]);
-    }
-    this.elem.layerElement.appendChild(g);
-    this.masker = mask;
-    groupPath.setAttribute('stroke', '#fff');
-  } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (this.filterManager.effectElements[10].p.v === 2) {
-      elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-      while (elemChildren.length) {
-        this.elem.layerElement.removeChild(elemChildren[0]);
-      }
-    }
-    this.elem.layerElement.appendChild(groupPath);
-    this.elem.layerElement.removeAttribute('mask');
-    groupPath.setAttribute('stroke', '#fff');
-  }
-  this.initialized = true;
-  this.pathMasker = groupPath;
-};
-
-SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
-  if (!this.initialized) {
-    this.initialize();
-  }
-  var i;
-  var len = this.paths.length;
-  var mask;
-  var path;
-  for (i = 0; i < len; i += 1) {
-    if (this.paths[i].m !== -1) {
-      mask = this.elem.maskManager.viewData[this.paths[i].m];
-      path = this.paths[i].p;
-      if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
-        path.setAttribute('d', mask.lastPath);
-      }
-      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) {
-        var dasharrayValue;
-        if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
-          var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var l = path.getTotalLength();
-          dasharrayValue = '0 0 0 ' + l * s + ' ';
-          var lineLength = l * (e - s);
-          var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-          var units = Math.floor(lineLength / segment);
-          var j;
-          for (j = 0; j < units; j += 1) {
-            dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
-          }
-          dasharrayValue += '0 ' + l * 10 + ' 0 0';
-        } else {
-          dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-        }
-        path.setAttribute('stroke-dasharray', dasharrayValue);
-      }
-    }
-  }
-  if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-    this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
-  }
-
-  if (forceRender || this.filterManager.effectElements[6].p._mdf) {
-    this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
-  }
-  if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (forceRender || this.filterManager.effectElements[3].p._mdf) {
-      var color = this.filterManager.effectElements[3].p.v;
-      this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
-    }
-  }
-};
-
-/* global createNS */
-
-function SVGTritoneFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  var feComponentTransfer = createNS('feComponentTransfer');
-  feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-  filter.appendChild(feComponentTransfer);
-  this.matrixFilter = feComponentTransfer;
-  var feFuncR = createNS('feFuncR');
-  feFuncR.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncR);
-  this.feFuncR = feFuncR;
-  var feFuncG = createNS('feFuncG');
-  feFuncG.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncG);
-  this.feFuncG = feFuncG;
-  var feFuncB = createNS('feFuncB');
-  feFuncB.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncB);
-  this.feFuncB = feFuncB;
-}
-
-SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color1 = this.filterManager.effectElements[0].p.v;
-    var color2 = this.filterManager.effectElements[1].p.v;
-    var color3 = this.filterManager.effectElements[2].p.v;
-    var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
-    var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
-    var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
-    this.feFuncR.setAttribute('tableValues', tableR);
-    this.feFuncG.setAttribute('tableValues', tableG);
-    this.feFuncB.setAttribute('tableValues', tableB);
-    // var opacity = this.filterManager.effectElements[2].p.v/100;
-    // 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');
-  }
-};
-
-/* global createNS */
-
-function SVGProLevelsFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var effectElements = this.filterManager.effectElements;
-  var feComponentTransfer = createNS('feComponentTransfer');
-
-  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) {
-    this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
-  }
-  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) {
-    this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
-  }
-  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) {
-    this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-  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) {
-    this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
-  }
-
-  if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    feComponentTransfer = createNS('feComponentTransfer');
-  }
-
-  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) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
-    this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
-    this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-}
-
-SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
-  var feFunc = createNS(type);
-  feFunc.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFunc);
-  return feFunc;
-};
-
-SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
-  var cnt = 0;
-  var segments = 256;
-  var perc;
-  var min = Math.min(inputBlack, inputWhite);
-  var max = Math.max(inputBlack, inputWhite);
-  var table = Array.call(null, { length: segments });
-  var colorValue;
-  var pos = 0;
-  var outputDelta = outputWhite - outputBlack;
-  var inputDelta = inputWhite - inputBlack;
-  while (cnt <= 256) {
-    perc = cnt / 256;
-    if (perc <= min) {
-      colorValue = inputDelta < 0 ? outputWhite : outputBlack;
-    } else if (perc >= max) {
-      colorValue = inputDelta < 0 ? outputBlack : outputWhite;
-    } else {
-      colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
-    }
-    table[pos] = colorValue;
-    pos += 1;
-    cnt += 256 / (segments - 1);
-  }
-  return table.join(' ');
-};
-
-SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var val;
-    var effectElements = this.filterManager.effectElements;
-    if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
-      val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
-      this.feFuncRComposed.setAttribute('tableValues', val);
-      this.feFuncGComposed.setAttribute('tableValues', val);
-      this.feFuncBComposed.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
-      val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
-      this.feFuncR.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
-      val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
-      this.feFuncG.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
-      val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
-      this.feFuncB.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
-      val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
-      this.feFuncA.setAttribute('tableValues', val);
-    }
-  }
-};
-
-/* global createNS, rgbToHex, degToRads */
-
-function SVGDropShadowEffect(filter, filterManager) {
-  var filterSize = filterManager.container.globalData.renderConfig.filterSize;
-  filter.setAttribute('x', filterSize.x);
-  filter.setAttribute('y', filterSize.y);
-  filter.setAttribute('width', filterSize.width);
-  filter.setAttribute('height', filterSize.height);
-  this.filterManager = filterManager;
-
-  var feGaussianBlur = createNS('feGaussianBlur');
-  feGaussianBlur.setAttribute('in', 'SourceAlpha');
-  feGaussianBlur.setAttribute('result', 'drop_shadow_1');
-  feGaussianBlur.setAttribute('stdDeviation', '0');
-  this.feGaussianBlur = feGaussianBlur;
-  filter.appendChild(feGaussianBlur);
-
-  var feOffset = createNS('feOffset');
-  feOffset.setAttribute('dx', '25');
-  feOffset.setAttribute('dy', '0');
-  feOffset.setAttribute('in', 'drop_shadow_1');
-  feOffset.setAttribute('result', 'drop_shadow_2');
-  this.feOffset = feOffset;
-  filter.appendChild(feOffset);
-  var feFlood = createNS('feFlood');
-  feFlood.setAttribute('flood-color', '#00ff00');
-  feFlood.setAttribute('flood-opacity', '1');
-  feFlood.setAttribute('result', 'drop_shadow_3');
-  this.feFlood = feFlood;
-  filter.appendChild(feFlood);
-
-  var feComposite = createNS('feComposite');
-  feComposite.setAttribute('in', 'drop_shadow_3');
-  feComposite.setAttribute('in2', 'drop_shadow_2');
-  feComposite.setAttribute('operator', 'in');
-  feComposite.setAttribute('result', 'drop_shadow_4');
-  filter.appendChild(feComposite);
-
-  var feMerge = createNS('feMerge');
-  filter.appendChild(feMerge);
-  var feMergeNode;
-  feMergeNode = createNS('feMergeNode');
-  feMerge.appendChild(feMergeNode);
-  feMergeNode = createNS('feMergeNode');
-  feMergeNode.setAttribute('in', 'SourceGraphic');
-  this.feMergeNode = feMergeNode;
-  this.feMerge = feMerge;
-  this.originalNodeAdded = false;
-  feMerge.appendChild(feMergeNode);
-}
-
-SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-      this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
-    }
-    if (forceRender || this.filterManager.effectElements[0].p._mdf) {
-      var col = this.filterManager.effectElements[0].p.v;
-      this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
-    }
-    if (forceRender || this.filterManager.effectElements[1].p._mdf) {
-      this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
-    }
-    if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
-      var distance = this.filterManager.effectElements[3].p.v;
-      var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
-      var x = distance * Math.cos(angle);
-      var y = distance * Math.sin(angle);
-      this.feOffset.setAttribute('dx', x);
-      this.feOffset.setAttribute('dy', y);
-    }
-    /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
-            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
-                this.feMerge.removeChild(this.feMergeNode);
-                this.originalNodeAdded = false;
-            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
-                this.feMerge.appendChild(this.feMergeNode);
-                this.originalNodeAdded = true;
-            }
-        } */
-  }
-};
-
-/* global createElementID, createNS */
-
-var _svgMatteSymbols = [];
-
-function SVGMatte3Effect(filterElem, filterManager, elem) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.filterElem = filterElem;
-  this.elem = elem;
-  elem.matteElement = createNS('g');
-  elem.matteElement.appendChild(elem.layerElement);
-  elem.matteElement.appendChild(elem.transformedElement);
-  elem.baseElement = elem.matteElement;
-}
-
-SVGMatte3Effect.prototype.findSymbol = function (mask) {
-  var i = 0;
-  var len = _svgMatteSymbols.length;
-  while (i < len) {
-    if (_svgMatteSymbols[i] === mask) {
-      return _svgMatteSymbols[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
-  var parentNode = mask.layerElement.parentNode;
-  if (!parentNode) {
-    return;
-  }
-  var children = parentNode.children;
-  var i = 0;
-  var len = children.length;
-  while (i < len) {
-    if (children[i] === mask.layerElement) {
-      break;
-    }
-    i += 1;
-  }
-  var nextChild;
-  if (i <= len - 2) {
-    nextChild = children[i + 1];
-  }
-  var useElem = createNS('use');
-  useElem.setAttribute('href', '#' + symbolId);
-  if (nextChild) {
-    parentNode.insertBefore(useElem, nextChild);
-  } else {
-    parentNode.appendChild(useElem);
-  }
-};
-
-SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
-  if (!this.findSymbol(mask)) {
-    var symbolId = createElementID();
-    var masker = createNS('mask');
-    masker.setAttribute('id', mask.layerId);
-    masker.setAttribute('mask-type', 'alpha');
-    _svgMatteSymbols.push(mask);
-    var defs = elem.globalData.defs;
-    defs.appendChild(masker);
-    var symbol = createNS('symbol');
-    symbol.setAttribute('id', symbolId);
-    this.replaceInParent(mask, symbolId);
-    symbol.appendChild(mask.layerElement);
-    defs.appendChild(symbol);
-    var useElem = createNS('use');
-    useElem.setAttribute('href', '#' + symbolId);
-    masker.appendChild(useElem);
-    mask.data.hd = false;
-    mask.show();
-  }
-  elem.setMatte(mask.layerId);
-};
-
-SVGMatte3Effect.prototype.initialize = function () {
-  var ind = this.filterManager.effectElements[0].p.v;
-  var elements = this.elem.comp.elements;
-  var i = 0;
-  var len = elements.length;
-  while (i < len) {
-    if (elements[i] && elements[i].data.ind === ind) {
-      this.setElementAsMask(this.elem, elements[i]);
-    }
-    i += 1;
-  }
-  this.initialized = true;
-};
-
-SVGMatte3Effect.prototype.renderFrame = function () {
-  if (!this.initialized) {
-    this.initialize();
-  }
-};
-
-/* global createElementID, filtersFactory, SVGTintFilter, SVGFillFilter, SVGStrokeEffect, SVGTritoneFilter,
-SVGProLevelsFilter, SVGDropShadowEffect, SVGMatte3Effect, SVGGaussianBlurEffect, locationHref */
-
-function SVGEffects(elem) {
-  var i;
-  var len = elem.data.ef ? elem.data.ef.length : 0;
-  var filId = createElementID();
-  var fil = filtersFactory.createFilter(filId, true);
-  var count = 0;
-  this.filters = [];
-  var filterManager;
-  for (i = 0; i < len; i += 1) {
-    filterManager = null;
-    if (elem.data.ef[i].ty === 20) {
-      count += 1;
-      filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 21) {
-      count += 1;
-      filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 22) {
-      filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 23) {
-      count += 1;
-      filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 24) {
-      count += 1;
-      filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 25) {
-      count += 1;
-      filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 28) {
-      // count += 1;
-      filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
-    } else if (elem.data.ef[i].ty === 29) {
-      count += 1;
-      filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
-    }
-    if (filterManager) {
-      this.filters.push(filterManager);
-    }
-  }
-  if (count) {
-    elem.globalData.defs.appendChild(fil);
-    elem.layerElement.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-  }
-  if (this.filters.length) {
-    elem.addRenderableComponent(this);
-  }
-}
-
-SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
-  var i;
-  var len = this.filters.length;
-  for (i = 0; i < len; i += 1) {
-    this.filters[i].renderFrame(_isFirstFrame);
-  }
-};
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, createNS, styleDiv, CVEffects, MaskElement, SVGBaseElement, HybridRenderer */
-
-function HBaseElement() {}
-HBaseElement.prototype = {
-  checkBlendMode: function () {},
-  initRendererElement: function () {
-    this.baseElement = createTag(this.data.tg || 'div');
-    if (this.data.hasMask) {
-      this.svgElement = createNS('svg');
-      this.layerElement = createNS('g');
-      this.maskedElement = this.layerElement;
-      this.svgElement.appendChild(this.layerElement);
-      this.baseElement.appendChild(this.svgElement);
-    } else {
-      this.layerElement = this.baseElement;
-    }
-    styleDiv(this.baseElement);
-  },
-  createContainerElements: function () {
-    this.renderableEffectsManager = new CVEffects(this);
-    this.transformedElement = this.baseElement;
-    this.maskedElement = this.layerElement;
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
-    if (this.finalTransform._matMdf) {
-      var matrixValue = this.finalTransform.mat.toCSS();
-      transformedElementStyle.transform = matrixValue;
-      transformedElementStyle.webkitTransform = matrixValue;
-    }
-    if (this.finalTransform._opMdf) {
-      transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
-    }
-  },
-  renderFrame: function () {
-    // If it is exported as hidden (data.hd === true) no need to render
-    // If it is not visible no need to render
-    if (this.data.hd || this.hidden) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.renderElement();
-    this.renderInnerContent();
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.layerElement = null;
-    this.transformedElement = null;
-    if (this.matteElement) {
-      this.matteElement = null;
-    }
-    if (this.maskManager) {
-      this.maskManager.destroy();
-      this.maskManager = null;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-  },
-  addEffects: function () {
-  },
-  setMatte: function () {},
-};
-HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
-HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
-HBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, createNS, createTag */
-
-function HSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
-
-HSolidElement.prototype.createContent = function () {
-  var rect;
-  if (this.data.hasMask) {
-    rect = createNS('rect');
-    rect.setAttribute('width', this.data.sw);
-    rect.setAttribute('height', this.data.sh);
-    rect.setAttribute('fill', this.data.sc);
-    this.svgElement.setAttribute('width', this.data.sw);
-    this.svgElement.setAttribute('height', this.data.sh);
-  } else {
-    rect = createTag('div');
-    rect.style.width = this.data.sw + 'px';
-    rect.style.height = this.data.sh + 'px';
-    rect.style.backgroundColor = this.data.sc;
-  }
-  this.layerElement.appendChild(rect);
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, HybridRenderer, ICompElement, HBaseElement */
-
-function HCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = !data.hasMask;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);
-HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
-
-HCompElement.prototype.createContainerElements = function () {
-  this._createBaseContainerElements();
-  // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
-  if (this.data.hasMask) {
-    this.svgElement.setAttribute('width', this.data.w);
-    this.svgElement.setAttribute('height', this.data.h);
-    this.transformedElement = this.baseElement;
-  } else {
-    this.transformedElement = this.layerElement;
-  }
-};
-
-HCompElement.prototype.addTo3dContainer = function (elem, pos) {
-  var j = 0;
-  var nextElement;
-  while (j < pos) {
-    if (this.elements[j] && this.elements[j].getBaseElement) {
-      nextElement = this.elements[j].getBaseElement();
-    }
-    j += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(elem, nextElement);
-  } else {
-    this.layerElement.appendChild(elem);
-  }
-};
-
-/* global createNS, extendPrototype, BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement,
-HierarchyElement, FrameElement, RenderableElement, createNS, bmMin, bmSqrt, bmMin, bmMax, bmPow */
-
-function HShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.shapesContainer = createNS('g');
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  this.currentBBox = {
-    x: 999999,
-    y: -999999,
-    h: 0,
-    w: 0,
-  };
-}
-extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
-HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
-
-HShapeElement.prototype.createContent = function () {
-  var cont;
-  this.baseElement.style.fontSize = 0;
-  if (this.data.hasMask) {
-    this.layerElement.appendChild(this.shapesContainer);
-    cont = this.svgElement;
-  } else {
-    cont = createNS('svg');
-    var size = this.comp.data ? this.comp.data : this.globalData.compSize;
-    cont.setAttribute('width', size.w);
-    cont.setAttribute('height', size.h);
-    cont.appendChild(this.shapesContainer);
-    this.layerElement.appendChild(cont);
-  }
-
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
-  this.filterUniqueShapes();
-  this.shapeCont = cont;
-};
-
-HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
-  var i;
-  var len = transformers.length;
-  for (i = 0; i < len; i += 1) {
-    point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
-  }
-  return point;
-};
-
-HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
-  var shape = item.sh.v;
-  var transformers = item.transformers;
-  var i;
-  var len = shape._length;
-  var vPoint;
-  var oPoint;
-  var nextIPoint;
-  var nextVPoint;
-  if (len <= 1) {
-    return;
-  }
-  for (i = 0; i < len - 1; i += 1) {
-    vPoint = this.getTransformedPoint(transformers, shape.v[i]);
-    oPoint = this.getTransformedPoint(transformers, shape.o[i]);
-    nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
-    nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
-    this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
-  }
-  if (shape.c) {
-    vPoint = this.getTransformedPoint(transformers, shape.v[i]);
-    oPoint = this.getTransformedPoint(transformers, shape.o[i]);
-    nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
-    nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
-    this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
-  }
-};
-
-HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
-  this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
-  var bounds = this.shapeBoundingBox;
-  boundingBox.x = bmMin(bounds.left, boundingBox.x);
-  boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
-  boundingBox.y = bmMin(bounds.top, boundingBox.y);
-  boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
-};
-
-HShapeElement.prototype.shapeBoundingBox = {
-  left: 0,
-  right: 0,
-  top: 0,
-  bottom: 0,
-};
-
-HShapeElement.prototype.tempBoundingBox = {
-  x: 0,
-  xMax: 0,
-  y: 0,
-  yMax: 0,
-  width: 0,
-  height: 0,
-};
-
-HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
-  var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
-
-  for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) { // eslint-disable-line no-plusplus
-    b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
-    a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
-    c = 3 * p1[i] - 3 * p0[i];
-
-    b |= 0; // eslint-disable-line no-bitwise
-    a |= 0; // eslint-disable-line no-bitwise
-    c |= 0; // eslint-disable-line no-bitwise
-
-    if (a === 0 && b === 0) {
-      //
-    } else if (a === 0) {
-      t = -c / b;
-
-      if (t > 0 && t < 1) {
-        bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
-      }
-    } else {
-      b2ac = b * b - 4 * c * a;
-
-      if (b2ac >= 0) {
-        t1 = (-b + bmSqrt(b2ac)) / (2 * a);
-        if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
-        t2 = (-b - bmSqrt(b2ac)) / (2 * a);
-        if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
-      }
-    }
-  }
-
-  this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
-  this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
-  this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
-  this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
-};
-
-HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
-  return bmPow(1 - t, 3) * p0[i]
-        + 3 * bmPow(1 - t, 2) * t * p1[i]
-        + 3 * (1 - t) * bmPow(t, 2) * p2[i]
-        + bmPow(t, 3) * p3[i];
-};
-
-HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
-  var i;
-  var len = itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    if (itemsData[i] && itemsData[i].sh) {
-      this.calculateShapeBoundingBox(itemsData[i], boundingBox);
-    } else if (itemsData[i] && itemsData[i].it) {
-      this.calculateBoundingBox(itemsData[i].it, boundingBox);
-    }
-  }
-};
-
-HShapeElement.prototype.currentBoxContains = function (box) {
-  return this.currentBBox.x <= box.x
-    && this.currentBBox.y <= box.y
-    && this.currentBBox.width + this.currentBBox.x >= box.x + box.width
-    && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
-};
-
-HShapeElement.prototype.renderInnerContent = function () {
-  this._renderShapeFrame();
-
-  if (!this.hidden && (this._isFirstFrame || this._mdf)) {
-    var tempBoundingBox = this.tempBoundingBox;
-    var max = 999999;
-    tempBoundingBox.x = max;
-    tempBoundingBox.xMax = -max;
-    tempBoundingBox.y = max;
-    tempBoundingBox.yMax = -max;
-    this.calculateBoundingBox(this.itemsData, tempBoundingBox);
-    tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
-    tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y;
-    // var tempBoundingBox = this.shapeCont.getBBox();
-    if (this.currentBoxContains(tempBoundingBox)) {
-      return;
-    }
-    var changed = false;
-    if (this.currentBBox.w !== tempBoundingBox.width) {
-      this.currentBBox.w = tempBoundingBox.width;
-      this.shapeCont.setAttribute('width', tempBoundingBox.width);
-      changed = true;
-    }
-    if (this.currentBBox.h !== tempBoundingBox.height) {
-      this.currentBBox.h = tempBoundingBox.height;
-      this.shapeCont.setAttribute('height', tempBoundingBox.height);
-      changed = true;
-    }
-    if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
-      this.currentBBox.w = tempBoundingBox.width;
-      this.currentBBox.h = tempBoundingBox.height;
-      this.currentBBox.x = tempBoundingBox.x;
-      this.currentBBox.y = tempBoundingBox.y;
-
-      this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
-      var shapeStyle = this.shapeCont.style;
-      var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
-      shapeStyle.transform = shapeTransform;
-      shapeStyle.webkitTransform = shapeTransform;
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createTag, styleDiv, createNS, lineJoinEnum, lineCapEnum */
-
-function HTextElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.textPaths = [];
-  this.currentBBox = {
-    x: 999999,
-    y: -999999,
-    h: 0,
-    w: 0,
-  };
-  this.renderType = 'svg';
-  this.isMasked = false;
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
-
-HTextElement.prototype.createContent = function () {
-  this.isMasked = this.checkMasks();
-  if (this.isMasked) {
-    this.renderType = 'svg';
-    this.compW = this.comp.data.w;
-    this.compH = this.comp.data.h;
-    this.svgElement.setAttribute('width', this.compW);
-    this.svgElement.setAttribute('height', this.compH);
-    var g = createNS('g');
-    this.maskedElement.appendChild(g);
-    this.innerElem = g;
-  } else {
-    this.renderType = 'html';
-    this.innerElem = this.layerElement;
-  }
-
-  this.checkParenting();
-};
-
-HTextElement.prototype.buildNewText = function () {
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
-  var innerElemStyle = this.innerElem.style;
-  var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
-  innerElemStyle.fill = textColor;
-  innerElemStyle.color = textColor;
-  if (documentData.sc) {
-    innerElemStyle.stroke = this.buildColor(documentData.sc);
-    innerElemStyle.strokeWidth = documentData.sw + 'px';
-  }
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (!this.globalData.fontManager.chars) {
-    innerElemStyle.fontSize = documentData.finalSize + 'px';
-    innerElemStyle.lineHeight = documentData.finalSize + 'px';
-    if (fontData.fClass) {
-      this.innerElem.className = fontData.fClass;
-    } else {
-      innerElemStyle.fontFamily = fontData.fFamily;
-      var fWeight = documentData.fWeight;
-      var fStyle = documentData.fStyle;
-      innerElemStyle.fontStyle = fStyle;
-      innerElemStyle.fontWeight = fWeight;
-    }
-  }
-  var i;
-  var len;
-
-  var letters = documentData.l;
-  len = letters.length;
-  var tSpan;
-  var tParent;
-  var tCont;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var cnt = 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.globalData.fontManager.chars) {
-      if (!this.textPaths[cnt]) {
-        tSpan = createNS('path');
-        tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
-        tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
-        tSpan.setAttribute('stroke-miterlimit', '4');
-      } else {
-        tSpan = this.textPaths[cnt];
-      }
-      if (!this.isMasked) {
-        if (this.textSpans[cnt]) {
-          tParent = this.textSpans[cnt];
-          tCont = tParent.children[0];
-        } else {
-          tParent = createTag('div');
-          tParent.style.lineHeight = 0;
-          tCont = createNS('svg');
-          tCont.appendChild(tSpan);
-          styleDiv(tParent);
-        }
-      }
-    } else if (!this.isMasked) {
-      if (this.textSpans[cnt]) {
-        tParent = this.textSpans[cnt];
-        tSpan = this.textPaths[cnt];
-      } else {
-        tParent = createTag('span');
-        styleDiv(tParent);
-        tSpan = createTag('span');
-        styleDiv(tSpan);
-        tParent.appendChild(tSpan);
-      }
-    } else {
-      tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
-    }
-    // tSpan.setAttribute('visibility', 'hidden');
-    if (this.globalData.fontManager.chars) {
-      var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-      var shapeData;
-      if (charData) {
-        shapeData = charData.data;
-      } else {
-        shapeData = null;
-      }
-      matrixHelper.reset();
-      if (shapeData && shapeData.shapes) {
-        shapes = shapeData.shapes[0].it;
-        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-        shapeStr = this.createPathShape(matrixHelper, shapes);
-        tSpan.setAttribute('d', shapeStr);
-      }
-      if (!this.isMasked) {
-        this.innerElem.appendChild(tParent);
-        if (shapeData && shapeData.shapes) {
-          // document.body.appendChild is needed to get exact measure of shape
-          document.body.appendChild(tCont);
-          var boundingBox = tCont.getBBox();
-          tCont.setAttribute('width', boundingBox.width + 2);
-          tCont.setAttribute('height', boundingBox.height + 2);
-          tCont.setAttribute('viewBox', (boundingBox.x - 1) + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
-          var tContStyle = tCont.style;
-          var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
-          tContStyle.transform = tContTranslation;
-          tContStyle.webkitTransform = tContTranslation;
-
-          letters[i].yOffset = boundingBox.y - 1;
-        } else {
-          tCont.setAttribute('width', 1);
-          tCont.setAttribute('height', 1);
-        }
-        tParent.appendChild(tCont);
-      } else {
-        this.innerElem.appendChild(tSpan);
-      }
-    } else {
-      tSpan.textContent = letters[i].val;
-      tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      if (!this.isMasked) {
-        this.innerElem.appendChild(tParent);
-        //
-        var tStyle = tSpan.style;
-        var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
-        tStyle.transform = tSpanTranslation;
-        tStyle.webkitTransform = tSpanTranslation;
-      } else {
-        this.innerElem.appendChild(tSpan);
-      }
-    }
-    //
-    if (!this.isMasked) {
-      this.textSpans[cnt] = tParent;
-    } else {
-      this.textSpans[cnt] = tSpan;
-    }
-    this.textSpans[cnt].style.display = 'block';
-    this.textPaths[cnt] = tSpan;
-    cnt += 1;
-  }
-  while (cnt < this.textSpans.length) {
-    this.textSpans[cnt].style.display = 'none';
-    cnt += 1;
-  }
-};
-
-HTextElement.prototype.renderInnerContent = function () {
-  var svgStyle;
-  if (this.data.singleShape) {
-    if (!this._isFirstFrame && !this.lettersChangedFlag) {
-      return;
-    } if (this.isMasked && this.finalTransform._matMdf) {
-      // Todo Benchmark if using this is better than getBBox
-      this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
-      svgStyle = this.svgElement.style;
-      var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
-      svgStyle.transform = translation;
-      svgStyle.webkitTransform = translation;
-    }
-  }
-
-  this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-  if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
-    return;
-  }
-  var i;
-  var len;
-  var count = 0;
-  var renderedLetters = this.textAnimator.renderedLetters;
-
-  var letters = this.textProperty.currentData.l;
-
-  len = letters.length;
-  var renderedLetter;
-  var textSpan;
-  var textPath;
-  for (i = 0; i < len; i += 1) {
-    if (letters[i].n) {
-      count += 1;
-    } else {
-      textSpan = this.textSpans[i];
-      textPath = this.textPaths[i];
-      renderedLetter = renderedLetters[count];
-      count += 1;
-      if (renderedLetter._mdf.m) {
-        if (!this.isMasked) {
-          textSpan.style.webkitTransform = renderedLetter.m;
-          textSpan.style.transform = renderedLetter.m;
-        } else {
-          textSpan.setAttribute('transform', renderedLetter.m);
-        }
-      }
-      /// /textSpan.setAttribute('opacity',renderedLetter.o);
-      textSpan.style.opacity = renderedLetter.o;
-      if (renderedLetter.sw && renderedLetter._mdf.sw) {
-        textPath.setAttribute('stroke-width', renderedLetter.sw);
-      }
-      if (renderedLetter.sc && renderedLetter._mdf.sc) {
-        textPath.setAttribute('stroke', renderedLetter.sc);
-      }
-      if (renderedLetter.fc && renderedLetter._mdf.fc) {
-        textPath.setAttribute('fill', renderedLetter.fc);
-        textPath.style.color = renderedLetter.fc;
-      }
-    }
-  }
-
-  if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
-    var boundingBox = this.innerElem.getBBox();
-
-    if (this.currentBBox.w !== boundingBox.width) {
-      this.currentBBox.w = boundingBox.width;
-      this.svgElement.setAttribute('width', boundingBox.width);
-    }
-    if (this.currentBBox.h !== boundingBox.height) {
-      this.currentBBox.h = boundingBox.height;
-      this.svgElement.setAttribute('height', boundingBox.height);
-    }
-
-    var margin = 1;
-    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)) {
-      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;
-
-      this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
-      svgStyle = this.svgElement.style;
-      var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
-      svgStyle.transform = svgTransform;
-      svgStyle.webkitTransform = svgTransform;
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement,
-FrameElement, RenderableElement, createNS */
-
-function HImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
-
-HImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  var img = new Image();
-
-  if (this.data.hasMask) {
-    this.imageElem = createNS('image');
-    this.imageElem.setAttribute('width', this.assetData.w + 'px');
-    this.imageElem.setAttribute('height', this.assetData.h + 'px');
-    this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-    this.layerElement.appendChild(this.imageElem);
-    this.baseElement.setAttribute('width', this.assetData.w);
-    this.baseElement.setAttribute('height', this.assetData.h);
-  } else {
-    this.layerElement.appendChild(img);
-  }
-  img.crossOrigin = 'anonymous';
-  img.src = assetPath;
-  if (this.data.ln) {
-    this.baseElement.setAttribute('id', this.data.ln);
-  }
-};
-
-/* global PropertyFactory, degToRads, Matrix, extendPrototype, BaseElement, FrameElement, HierarchyElement */
-
-function HCameraElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initHierarchy();
-  var getProp = PropertyFactory.getProp;
-  this.pe = getProp(this, data.pe, 0, 0, this);
-  if (data.ks.p.s) {
-    this.px = getProp(this, data.ks.p.x, 1, 0, this);
-    this.py = getProp(this, data.ks.p.y, 1, 0, this);
-    this.pz = getProp(this, data.ks.p.z, 1, 0, this);
-  } else {
-    this.p = getProp(this, data.ks.p, 1, 0, this);
-  }
-  if (data.ks.a) {
-    this.a = getProp(this, data.ks.a, 1, 0, this);
-  }
-  if (data.ks.or.k.length && data.ks.or.k[0].to) {
-    var i;
-    var len = data.ks.or.k.length;
-    for (i = 0; i < len; i += 1) {
-      data.ks.or.k[i].to = null;
-      data.ks.or.k[i].ti = null;
-    }
-  }
-  this.or = getProp(this, data.ks.or, 1, degToRads, this);
-  this.or.sh = true;
-  this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
-  this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
-  this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
-  this.mat = new Matrix();
-  this._prevMat = new Matrix();
-  this._isFirstFrame = true;
-
-  // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
-  this.finalTransform = {
-    mProp: this,
-  };
-}
-extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
-
-HCameraElement.prototype.setup = function () {
-  var i;
-  var len = this.comp.threeDElements.length;
-  var comp;
-  var perspectiveStyle;
-  var containerStyle;
-  for (i = 0; i < len; i += 1) {
-    // [perspectiveElem,container]
-    comp = this.comp.threeDElements[i];
-    if (comp.type === '3d') {
-      perspectiveStyle = comp.perspectiveElem.style;
-      containerStyle = comp.container.style;
-      var perspective = this.pe.v + 'px';
-      var origin = '0px 0px 0px';
-      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-      perspectiveStyle.perspective = perspective;
-      perspectiveStyle.webkitPerspective = perspective;
-      containerStyle.transformOrigin = origin;
-      containerStyle.mozTransformOrigin = origin;
-      containerStyle.webkitTransformOrigin = origin;
-      perspectiveStyle.transform = matrix;
-      perspectiveStyle.webkitTransform = matrix;
-    }
-  }
-};
-
-HCameraElement.prototype.createElements = function () {
-};
-
-HCameraElement.prototype.hide = function () {
-};
-
-HCameraElement.prototype.renderFrame = function () {
-  var _mdf = this._isFirstFrame;
-  var i;
-  var len;
-  if (this.hierarchy) {
-    len = this.hierarchy.length;
-    for (i = 0; i < len; i += 1) {
-      _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
-    }
-  }
-  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)) {
-    this.mat.reset();
-
-    if (this.hierarchy) {
-      len = this.hierarchy.length - 1;
-      for (i = len; i >= 0; i -= 1) {
-        var mTransf = this.hierarchy[i].finalTransform.mProp;
-        this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
-        this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
-        this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
-        this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
-        this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
-      }
-    }
-    if (this.p) {
-      this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
-    } else {
-      this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
-    }
-    if (this.a) {
-      var diffVector;
-      if (this.p) {
-        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]];
-      } else {
-        diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
-      }
-      var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2));
-      // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
-      var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
-      var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
-      var mRotationX = (Math.atan2(lookDir[1], lookLengthOnXZ));
-      var mRotationY = (Math.atan2(lookDir[0], -lookDir[2]));
-      this.mat.rotateY(mRotationY).rotateX(-mRotationX);
-    }
-    this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
-    this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
-    this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
-    this.mat.translate(0, 0, this.pe.v);
-
-    var hasMatrixChanged = !this._prevMat.equals(this.mat);
-    if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
-      len = this.comp.threeDElements.length;
-      var comp;
-      var perspectiveStyle;
-      var containerStyle;
-      for (i = 0; i < len; i += 1) {
-        comp = this.comp.threeDElements[i];
-        if (comp.type === '3d') {
-          if (hasMatrixChanged) {
-            var matValue = this.mat.toCSS();
-            containerStyle = comp.container.style;
-            containerStyle.transform = matValue;
-            containerStyle.webkitTransform = matValue;
-          }
-          if (this.pe._mdf) {
-            perspectiveStyle = comp.perspectiveElem.style;
-            perspectiveStyle.perspective = this.pe.v + 'px';
-            perspectiveStyle.webkitPerspective = this.pe.v + 'px';
-          }
-        }
-      }
-      this.mat.clone(this._prevMat);
-    }
-  }
-  this._isFirstFrame = false;
-};
-
-HCameraElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-HCameraElement.prototype.destroy = function () {
-};
-HCameraElement.prototype.getBaseElement = function () { return null; };
-
-function HEffects() {
-}
-HEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
-
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
-    if (expressionsPlugin) {
-      expressionsPlugin.initExpressions(this);
-    }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
-    }
-  }
-};
-
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
-
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
-
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
-    }
-  }
-};
-
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
-
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
-
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
-
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
-    }
-  }
-  return null;
-};
-
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
-
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
-      } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
-      }
-    }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
-
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
-      }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
-      if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
-      }
-    } else {
-      this.setCurrentRawFrameValue(nextValue);
-    }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
-        } else {
-          this.trigger('loopComplete');
-        }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
-      }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
-
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
-      }
-    }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
-      }
-    }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
-    }
-  }
-
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
-
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
-
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
-
-var Expressions = (function () {
-  var ob = {};
-  ob.initExpressions = initExpressions;
-
-  function initExpressions(animation) {
-    var stackCount = 0;
-    var registers = [];
-
-    function pushExpression() {
-      stackCount += 1;
-    }
-
-    function popExpression() {
-      stackCount -= 1;
-      if (stackCount === 0) {
-        releaseInstances();
-      }
-    }
-
-    function registerExpressionProperty(expression) {
-      if (registers.indexOf(expression) === -1) {
-        registers.push(expression);
-      }
-    }
-
-    function releaseInstances() {
-      var i;
-      var len = registers.length;
-      for (i = 0; i < len; i += 1) {
-        registers[i].release();
-      }
-      registers.length = 0;
-    }
-
-    animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-    animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
-    animation.renderer.globalData.pushExpression = pushExpression;
-    animation.renderer.globalData.popExpression = popExpression;
-    animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
-  }
-  return ob;
-}());
-
-expressionsPlugin = Expressions;
-
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
-
-var ExpressionManager = (function () {
-  'use strict';
-
-  var ob = {};
-  var Math = BMMath;
-  var window = null;
-  var document = null;
-  var XMLHttpRequest = null;
-  var fetch = null;
-  var frames = null;
-
-  function $bm_isInstanceOfArray(arr) {
-    return arr.constructor === Array || arr.constructor === Float32Array;
-  }
-
-  function isNumerable(tOfV, v) {
-    return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
-  }
-
-  function $bm_neg(a) {
-    var tOfA = typeof a;
-    if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
-      return -a;
-    }
-    if ($bm_isInstanceOfArray(a)) {
-      var i;
-      var lenA = a.length;
-      var retArr = [];
-      for (i = 0; i < lenA; i += 1) {
-        retArr[i] = -a[i];
-      }
-      return retArr;
-    }
-    if (a.propType) {
-      return a.v;
-    }
-    return -a;
-  }
-
-  var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
-  var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
-  var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
-
-  function sum(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (tOfA === 'string' || tOfB === 'string') {
-      return a + b;
-    }
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a + b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] += b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a + b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] + b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-  var add = sum;
-
-  function sub(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      if (tOfA === 'string') {
-        a = parseInt(a, 10);
-      }
-      if (tOfB === 'string') {
-        b = parseInt(b, 10);
-      }
-      return a - b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] -= b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a - b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] - b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-
-  function mul(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a * b;
-    }
-
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] * b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a * b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-
-  function div(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a / b;
-    }
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] / b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a / b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-  function mod(a, b) {
-    if (typeof a === 'string') {
-      a = parseInt(a, 10);
-    }
-    if (typeof b === 'string') {
-      b = parseInt(b, 10);
-    }
-    return a % b;
-  }
-  var $bm_sum = sum;
-  var $bm_sub = sub;
-  var $bm_mul = mul;
-  var $bm_div = div;
-  var $bm_mod = mod;
-
-  function clamp(num, min, max) {
-    if (min > max) {
-      var mm = max;
-      max = min;
-      min = mm;
-    }
-    return Math.min(Math.max(num, min), max);
-  }
-
-  function radiansToDegrees(val) {
-    return val / degToRads;
-  }
-  var radians_to_degrees = radiansToDegrees;
-
-  function degreesToRadians(val) {
-    return val * degToRads;
-  }
-  var degrees_to_radians = radiansToDegrees;
-
-  var helperLengthArray = [0, 0, 0, 0, 0, 0];
-
-  function length(arr1, arr2) {
-    if (typeof arr1 === 'number' || arr1 instanceof Number) {
-      arr2 = arr2 || 0;
-      return Math.abs(arr1 - arr2);
-    }
-    if (!arr2) {
-      arr2 = helperLengthArray;
-    }
-    var i;
-    var len = Math.min(arr1.length, arr2.length);
-    var addedLength = 0;
-    for (i = 0; i < len; i += 1) {
-      addedLength += Math.pow(arr2[i] - arr1[i], 2);
-    }
-    return Math.sqrt(addedLength);
-  }
-
-  function normalize(vec) {
-    return div(vec, length(vec));
-  }
-
-  function rgbToHsl(val) {
-    var r = val[0]; var g = val[1]; var b = val[2];
-    var max = Math.max(r, g, b);
-    var min = Math.min(r, g, b);
-    var h;
-    var s;
-    var l = (max + min) / 2;
-
-    if (max === min) {
-      h = 0; // achromatic
-      s = 0; // achromatic
-    } else {
-      var d = max - min;
-      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
-      switch (max) {
-        case r: h = (g - b) / d + (g < b ? 6 : 0); break;
-        case g: h = (b - r) / d + 2; break;
-        case b: h = (r - g) / d + 4; break;
-        default: break;
-      }
-      h /= 6;
-    }
-
-    return [h, s, l, val[3]];
-  }
-
-  function hue2rgb(p, q, t) {
-    if (t < 0) t += 1;
-    if (t > 1) t -= 1;
-    if (t < 1 / 6) return p + (q - p) * 6 * t;
-    if (t < 1 / 2) return q;
-    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
-    return p;
-  }
-
-  function hslToRgb(val) {
-    var h = val[0];
-    var s = val[1];
-    var l = val[2];
-
-    var r;
-    var g;
-    var b;
-
-    if (s === 0) {
-      r = l; // achromatic
-      b = l; // achromatic
-      g = l; // achromatic
-    } else {
-      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-      var p = 2 * l - q;
-      r = hue2rgb(p, q, h + 1 / 3);
-      g = hue2rgb(p, q, h);
-      b = hue2rgb(p, q, h - 1 / 3);
-    }
-
-    return [r, g, b, val[3]];
-  }
-
-  function linear(t, tMin, tMax, value1, value2) {
-    if (value1 === undefined || value2 === undefined) {
-      value1 = tMin;
-      value2 = tMax;
-      tMin = 0;
-      tMax = 1;
-    }
-    if (tMax < tMin) {
-      var _tMin = tMax;
-      tMax = tMin;
-      tMin = _tMin;
-    }
-    if (t <= tMin) {
-      return value1;
-    } if (t >= tMax) {
-      return value2;
-    }
-    var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
-    if (!value1.length) {
-      return value1 + (value2 - value1) * perc;
-    }
-    var i;
-    var len = value1.length;
-    var arr = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
-    }
-    return arr;
-  }
-  function random(min, max) {
-    if (max === undefined) {
-      if (min === undefined) {
-        min = 0;
-        max = 1;
-      } else {
-        max = min;
-        min = undefined;
-      }
-    }
-    if (max.length) {
-      var i;
-      var len = max.length;
-      if (!min) {
-        min = createTypedArray('float32', len);
-      }
-      var arr = createTypedArray('float32', len);
-      var rnd = BMMath.random();
-      for (i = 0; i < len; i += 1) {
-        arr[i] = min[i] + rnd * (max[i] - min[i]);
-      }
-      return arr;
-    }
-    if (min === undefined) {
-      min = 0;
-    }
-    var rndm = BMMath.random();
-    return min + rndm * (max - min);
-  }
-
-  function createPath(points, inTangents, outTangents, closed) {
-    var i;
-    var len = points.length;
-    var path = shapePool.newElement();
-    path.setPathData(!!closed, len);
-    var arrPlaceholder = [0, 0];
-    var inVertexPoint;
-    var outVertexPoint;
-    for (i = 0; i < len; i += 1) {
-      inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
-      outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
-      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);
-    }
-    return path;
-  }
-
-  function initiateExpression(elem, data, property) {
-    var val = data.x;
-    var needsVelocity = /velocity(?![\w\d])/.test(val);
-    var _needsRandom = val.indexOf('random') !== -1;
-    var elemType = elem.data.ty;
-    var transform;
-    var $bm_transform;
-    var content;
-    var effect;
-    var thisProperty = property;
-    thisProperty.valueAtTime = thisProperty.getValueAtTime;
-    Object.defineProperty(thisProperty, 'value', {
-      get: function () {
-        return thisProperty.v;
-      },
-    });
-    elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
-    elem.comp.displayStartTime = 0;
-    var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    var outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    var width = elem.data.sw ? elem.data.sw : 0;
-    var height = elem.data.sh ? elem.data.sh : 0;
-    var name = elem.data.nm;
-    var loopIn;
-    var loop_in;
-    var loopOut;
-    var loop_out;
-    var smooth;
-    var toWorld;
-    var fromWorld;
-    var fromComp;
-    var toComp;
-    var fromCompToSurface;
-    var position;
-    var rotation;
-    var anchorPoint;
-    var scale;
-    var thisLayer;
-    var thisComp;
-    var mask;
-    var valueAtTime;
-    var velocityAtTime;
-
-    var scoped_bm_rt;
-    // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
-    var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
-    var numKeys = property.kf ? data.k.length : 0;
-
-    var active = !this.data || this.data.hd !== true;
-
-    var wiggle = function wiggle(freq, amp) {
-      var iWiggle;
-      var j;
-      var lenWiggle = this.pv.length ? this.pv.length : 1;
-      var addedAmps = createTypedArray('float32', lenWiggle);
-      freq = 5;
-      var iterations = Math.floor(time * freq);
-      iWiggle = 0;
-      j = 0;
-      while (iWiggle < iterations) {
-        // var rnd = BMMath.random();
-        for (j = 0; j < lenWiggle; j += 1) {
-          addedAmps[j] += -amp + amp * 2 * BMMath.random();
-          // addedAmps[j] += -amp + amp*2*rnd;
-        }
-        iWiggle += 1;
-      }
-      // var rnd2 = BMMath.random();
-      var periods = time * freq;
-      var perc = periods - Math.floor(periods);
-      var arr = createTypedArray('float32', lenWiggle);
-      if (lenWiggle > 1) {
-        for (j = 0; j < lenWiggle; j += 1) {
-          arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;
-          // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
-          // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
-        }
-        return arr;
-      }
-      return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
-    }.bind(this);
-
-    if (thisProperty.loopIn) {
-      loopIn = thisProperty.loopIn.bind(thisProperty);
-      loop_in = loopIn;
-    }
-
-    if (thisProperty.loopOut) {
-      loopOut = thisProperty.loopOut.bind(thisProperty);
-      loop_out = loopOut;
-    }
-
-    if (thisProperty.smooth) {
-      smooth = thisProperty.smooth.bind(thisProperty);
-    }
-
-    function loopInDuration(type, duration) {
-      return loopIn(type, duration, true);
-    }
-
-    function loopOutDuration(type, duration) {
-      return loopOut(type, duration, true);
-    }
-
-    if (this.getValueAtTime) {
-      valueAtTime = this.getValueAtTime.bind(this);
-    }
-
-    if (this.getVelocityAtTime) {
-      velocityAtTime = this.getVelocityAtTime.bind(this);
-    }
-
-    var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
-
-    function lookAt(elem1, elem2) {
-      var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
-      var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
-      var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
-      return [yaw, pitch, 0];
-    }
-
-    function easeOut(t, tMin, tMax, val1, val2) {
-      return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function easeIn(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInBez, t, tMin, tMax, val1, val2);
-    }
-
-    function ease(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function applyEase(fn, t, tMin, tMax, val1, val2) {
-      if (val1 === undefined) {
-        val1 = tMin;
-        val2 = tMax;
-      } else {
-        t = (t - tMin) / (tMax - tMin);
-      }
-      if (t > 1) {
-        t = 1;
-      } else if (t < 0) {
-        t = 0;
-      }
-      var mult = fn(t);
-      if ($bm_isInstanceOfArray(val1)) {
-        var iKey;
-        var lenKey = val1.length;
-        var arr = createTypedArray('float32', lenKey);
-        for (iKey = 0; iKey < lenKey; iKey += 1) {
-          arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
-        }
-        return arr;
-      }
-      return (val2 - val1) * mult + val1;
-    }
-
-    function nearestKey(time) {
-      var iKey;
-      var lenKey = data.k.length;
-      var index;
-      var keyTime;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        index = 0;
-        keyTime = 0;
-      } else {
-        index = -1;
-        time *= elem.comp.globalData.frameRate;
-        if (time < data.k[0].t) {
-          index = 1;
-          keyTime = data.k[0].t;
-        } else {
-          for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
-            if (time === data.k[iKey].t) {
-              index = iKey + 1;
-              keyTime = data.k[iKey].t;
-              break;
-            } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
-              if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
-                index = iKey + 2;
-                keyTime = data.k[iKey + 1].t;
-              } else {
-                index = iKey + 1;
-                keyTime = data.k[iKey].t;
-              }
-              break;
-            }
-          }
-          if (index === -1) {
-            index = iKey + 1;
-            keyTime = data.k[iKey].t;
-          }
-        }
-      }
-      var obKey = {};
-      obKey.index = index;
-      obKey.time = keyTime / elem.comp.globalData.frameRate;
-      return obKey;
-    }
-
-    function key(ind) {
-      var obKey;
-      var iKey;
-      var lenKey;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        throw new Error('The property has no keyframe at index ' + ind);
-      }
-      ind -= 1;
-      obKey = {
-        time: data.k[ind].t / elem.comp.globalData.frameRate,
-        value: [],
-      };
-      var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
-
-      lenKey = arr.length;
-      for (iKey = 0; iKey < lenKey; iKey += 1) {
-        obKey[iKey] = arr[iKey];
-        obKey.value[iKey] = arr[iKey];
-      }
-      return obKey;
-    }
-
-    function framesToTime(fr, fps) {
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return fr / fps;
-    }
-
-    function timeToFrames(t, fps) {
-      if (!t && t !== 0) {
-        t = time;
-      }
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return t * fps;
-    }
-
-    function seedRandom(seed) {
-      BMMath.seedrandom(randSeed + seed);
-    }
-
-    function sourceRectAtTime() {
-      return elem.sourceRectAtTime();
-    }
-
-    function substring(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substring(init);
-        }
-        return value.substring(init, end);
-      }
-      return '';
-    }
-
-    function substr(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substr(init);
-        }
-        return value.substr(init, end);
-      }
-      return '';
-    }
-
-    function posterizeTime(framesPerSecond) {
-      time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
-      value = valueAtTime(time);
-    }
-
-    var time;
-    var velocity;
-    var value;
-    var text;
-    var textIndex;
-    var textTotal;
-    var selectorValue;
-    var index = elem.data.ind;
-    var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-    var parent;
-    var randSeed = Math.floor(Math.random() * 1000000);
-    var globalData = elem.globalData;
-    function executeExpression(_value) {
-      // globalData.pushExpression();
-      value = _value;
-      if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
-        return value;
-      }
-      if (this.propType === 'textSelector') {
-        textIndex = this.textIndex;
-        textTotal = this.textTotal;
-        selectorValue = this.selectorValue;
-      }
-      if (!thisLayer) {
-        text = elem.layerInterface.text;
-        thisLayer = elem.layerInterface;
-        thisComp = elem.comp.compInterface;
-        toWorld = thisLayer.toWorld.bind(thisLayer);
-        fromWorld = thisLayer.fromWorld.bind(thisLayer);
-        fromComp = thisLayer.fromComp.bind(thisLayer);
-        toComp = thisLayer.toComp.bind(thisLayer);
-        mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
-        fromCompToSurface = fromComp;
-      }
-      if (!transform) {
-        transform = elem.layerInterface('ADBE Transform Group');
-        $bm_transform = transform;
-        if (transform) {
-          anchorPoint = transform.anchorPoint;
-          /* position = transform.position;
-                    rotation = transform.rotation;
-                    scale = transform.scale; */
-        }
-      }
-
-      if (elemType === 4 && !content) {
-        content = thisLayer('ADBE Root Vectors Group');
-      }
-      if (!effect) {
-        effect = thisLayer(4);
-      }
-      hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-      if (hasParent && !parent) {
-        parent = elem.hierarchy[0].layerInterface;
-      }
-      time = this.comp.renderedFrame / this.comp.globalData.frameRate;
-      if (_needsRandom) {
-        seedRandom(randSeed + time);
-      }
-      if (needsVelocity) {
-        velocity = velocityAtTime(time);
-      }
-      expression_function();
-      this.frameExpressionId = elem.globalData.frameId;
-
-      // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
-      return scoped_bm_rt;
-    }
-    return executeExpression;
-  }
-
-  ob.initiateExpression = initiateExpression;
-  return ob;
-}());
-
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
-
-var expressionHelpers = (function () {
-  function searchExpressions(elem, data, prop) {
-    if (data.x) {
-      prop.k = true;
-      prop.x = true;
-      prop.initiateExpression = ExpressionManager.initiateExpression;
-      prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
-    }
-  }
-
-  function getValueAtTime(frameNum) {
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastFrame) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
-      this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
-      this._cachingAtTime.lastFrame = frameNum;
-    }
-    return this._cachingAtTime.value;
-  }
-
-  function getSpeedAtTime(frameNum) {
-    var delta = -0.01;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var speed = 0;
-    if (v1.length) {
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        speed += Math.pow(v2[i] - v1[i], 2);
-      }
-      speed = Math.sqrt(speed) * 100;
-    } else {
-      speed = 0;
-    }
-    return speed;
-  }
-
-  function getVelocityAtTime(frameNum) {
-    if (this.vel !== undefined) {
-      return this.vel;
-    }
-    var delta = -0.001;
-    // frameNum += this.elem.data.st;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var velocity;
-    if (v1.length) {
-      velocity = createTypedArray('float32', v1.length);
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        // removing frameRate
-        // if needed, don't add it here
-        // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
-        velocity[i] = (v2[i] - v1[i]) / delta;
-      }
-    } else {
-      velocity = (v2 - v1) / delta;
-    }
-    return velocity;
-  }
-
-  function getStaticValueAtTime() {
-    return this.pv;
-  }
-
-  function setGroupProperty(propertyGroup) {
-    this.propertyGroup = propertyGroup;
-  }
-
-  return {
-    searchExpressions: searchExpressions,
-    getSpeedAtTime: getSpeedAtTime,
-    getVelocityAtTime: getVelocityAtTime,
-    getValueAtTime: getValueAtTime,
-    getStaticValueAtTime: getStaticValueAtTime,
-    setGroupProperty: setGroupProperty,
-  };
-}());
-
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
-
-(function addPropertyDecorator() {
-  function loopOut(type, duration, durationFlag) {
-    if (!this.k || !this.keyframes) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var lastKeyFrame = keyframes[keyframes.length - 1].t;
-    if (currentFrame <= lastKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var firstKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
-      } else {
-        cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
-      }
-      firstKeyFrame = lastKeyFrame - cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (iterations % 2 !== 0) {
-          return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = (endV[i] - initV[i]) * repeats + current[i];
-        }
-        return ret;
-      }
-      return (endV - initV) * repeats + current;
-    } else if (type === 'continue') {
-      var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(lastValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
-        }
-        return ret;
-      }
-      return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);
-    }
-      return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function loopIn(type, duration, durationFlag) {
-    if (!this.k) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var firstKeyFrame = keyframes[0].t;
-    if (currentFrame >= firstKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var lastKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      lastKeyFrame = keyframes[duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
-      } else {
-        cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
-      }
-      lastKeyFrame = firstKeyFrame + cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
-      if (iterations % 2 === 0) {
-          return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);
-      var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
-        }
-        return ret;
-      }
-      return current - (endV - initV) * repeats;
-    } else if (type === 'continue') {
-      var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(firstValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;
-        }
-        return ret;
-      }
-      return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;
-    }
-      return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function smooth(width, samples) {
-    if (!this.k) {
-      return this.pv;
-    }
-    width = (width || 0.4) * 0.5;
-    samples = Math.floor(samples || 5);
-    if (samples <= 1) {
-      return this.pv;
-    }
-    var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
-    var initFrame = currentTime - width;
-    var endFrame = currentTime + width;
-    var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
-    var i = 0;
-    var j = 0;
-    var value;
-    if (this.pv.length) {
-      value = createTypedArray('float32', this.pv.length);
-    } else {
-      value = 0;
-    }
-    var sampleValue;
-    while (i < samples) {
-      sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
-      if (this.pv.length) {
-        for (j = 0; j < this.pv.length; j += 1) {
-          value[j] += sampleValue[j];
-        }
-      } else {
-        value += sampleValue;
-      }
-      i += 1;
-    }
-    if (this.pv.length) {
-      for (j = 0; j < this.pv.length; j += 1) {
-        value[j] /= samples;
-      }
-    } else {
-      value /= samples;
-    }
-    return value;
-  }
-
-  function getTransformValueAtTime(time) {
-    if (!this._transformCachingAtTime) {
-      this._transformCachingAtTime = {
-        v: new Matrix(),
-      };
-    }
-    /// /
-    var matrix = this._transformCachingAtTime.v;
-    matrix.cloneFromProps(this.pre.props);
-    if (this.appliedTransformations < 1) {
-      var anchor = this.a.getValueAtTime(time);
-      matrix.translate(
-        -anchor[0] * this.a.mult,
-        -anchor[1] * this.a.mult,
-        anchor[2] * this.a.mult
-      );
-    }
-    if (this.appliedTransformations < 2) {
-      var scale = this.s.getValueAtTime(time);
-      matrix.scale(
-        scale[0] * this.s.mult,
-        scale[1] * this.s.mult,
-        scale[2] * this.s.mult
-      );
-    }
-    if (this.sk && this.appliedTransformations < 3) {
-      var skew = this.sk.getValueAtTime(time);
-      var skewAxis = this.sa.getValueAtTime(time);
-      matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
-    }
-    if (this.r && this.appliedTransformations < 4) {
-      var rotation = this.r.getValueAtTime(time);
-      matrix.rotate(-rotation * this.r.mult);
-    } else if (!this.r && this.appliedTransformations < 4) {
-      var rotationZ = this.rz.getValueAtTime(time);
-      var rotationY = this.ry.getValueAtTime(time);
-      var rotationX = this.rx.getValueAtTime(time);
-      var orientation = this.or.getValueAtTime(time);
-      matrix.rotateZ(-rotationZ * this.rz.mult)
-        .rotateY(rotationY * this.ry.mult)
-        .rotateX(rotationX * this.rx.mult)
-        .rotateZ(-orientation[2] * this.or.mult)
-        .rotateY(orientation[1] * this.or.mult)
-        .rotateX(orientation[0] * this.or.mult);
-    }
-    if (this.data.p && this.data.p.s) {
-      var positionX = this.px.getValueAtTime(time);
-      var positionY = this.py.getValueAtTime(time);
-      if (this.data.p.z) {
-        var positionZ = this.pz.getValueAtTime(time);
-        matrix.translate(
-          positionX * this.px.mult,
-          positionY * this.py.mult,
-          -positionZ * this.pz.mult
-        );
-      } else {
-        matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
-      }
-    } else {
-      var position = this.p.getValueAtTime(time);
-      matrix.translate(
-        position[0] * this.p.mult,
-        position[1] * this.p.mult,
-        -position[2] * this.p.mult
-      );
-    }
-    return matrix;
-    /// /
-  }
-
-  function getTransformStaticValueAtTime() {
-    return this.v.clone(new Matrix());
-  }
-
-  var getTransformProperty = TransformPropertyFactory.getTransformProperty;
-  TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
-    var prop = getTransformProperty(elem, data, container);
-    if (prop.dynamicProperties.length) {
-      prop.getValueAtTime = getTransformValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    return prop;
-  };
-
-  var propertyGetProp = PropertyFactory.getProp;
-  PropertyFactory.getProp = function (elem, data, type, mult, container) {
-    var prop = propertyGetProp(elem, data, type, mult, container);
-    // prop.getVelocityAtTime = getVelocityAtTime;
-    // prop.loopOut = loopOut;
-    // prop.loopIn = loopIn;
-    if (prop.kf) {
-      prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    prop.loopOut = loopOut;
-    prop.loopIn = loopIn;
-    prop.smooth = smooth;
-    prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
-    prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
-    prop.numKeys = data.a === 1 ? data.k.length : 0;
-    prop.propertyIndex = data.ix;
-    var value = 0;
-    if (type !== 0) {
-      value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
-    }
-    prop._cachingAtTime = {
-      lastFrame: initialDefaultFrame,
-      lastIndex: 0,
-      value: value,
-    };
-    expressionHelpers.searchExpressions(elem, data, prop);
-    if (prop.k) {
-      container.addDynamicProperty(prop);
-    }
-
-    return prop;
-  };
-
-  function getShapeValueAtTime(frameNum) {
-    // For now this caching object is created only when needed instead of creating it when the shape is initialized.
-    if (!this._cachingAtTime) {
-      this._cachingAtTime = {
-        shapeValue: shapePool.clone(this.pv),
-        lastIndex: 0,
-        lastTime: initialDefaultFrame,
-      };
-    }
-
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastTime) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
-      this._cachingAtTime.lastTime = frameNum;
-      this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
-    }
-    return this._cachingAtTime.shapeValue;
-  }
-
-  var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
-  var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
-
-  function ShapeExpressions() {}
-  ShapeExpressions.prototype = {
-    vertices: function (prop, time) {
-      if (this.k) {
-        this.getValue();
-      }
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      var i;
-      var len = shapePath._length;
-      var vertices = shapePath[prop];
-      var points = shapePath.v;
-      var arr = createSizedArray(len);
-      for (i = 0; i < len; i += 1) {
-        if (prop === 'i' || prop === 'o') {
-          arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
-        } else {
-          arr[i] = [vertices[i][0], vertices[i][1]];
-        }
-      }
-      return arr;
-    },
-    points: function (time) {
-      return this.vertices('v', time);
-    },
-    inTangents: function (time) {
-      return this.vertices('i', time);
-    },
-    outTangents: function (time) {
-      return this.vertices('o', time);
-    },
-    isClosed: function () {
-      return this.v.c;
-    },
-    pointOnPath: function (perc, time) {
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      if (!this._segmentsLength) {
-        this._segmentsLength = bez.getSegmentsLength(shapePath);
-      }
-
-      var segmentsLength = this._segmentsLength;
-      var lengths = segmentsLength.lengths;
-      var lengthPos = segmentsLength.totalLength * perc;
-      var i = 0;
-      var len = lengths.length;
-      var accumulatedLength = 0;
-      var pt;
-      while (i < len) {
-        if (accumulatedLength + lengths[i].addedLength > lengthPos) {
-          var initIndex = i;
-          var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
-          var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
-          pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
-          break;
-        } else {
-          accumulatedLength += lengths[i].addedLength;
-        }
-        i += 1;
-      }
-      if (!pt) {
-        pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
-      }
-      return pt;
-    },
-    vectorOnPath: function (perc, time, vectorType) {
-      // perc doesn't use triple equality because it can be a Number object as well as a primitive.
-      if (perc == 1) { // eslint-disable-line eqeqeq
-        perc = this.v.c;
-      } else if (perc == 0) { // eslint-disable-line eqeqeq
-        perc = 0.999;
-      }
-      var pt1 = this.pointOnPath(perc, time);
-      var pt2 = this.pointOnPath(perc + 0.001, time);
-      var xLength = pt2[0] - pt1[0];
-      var yLength = pt2[1] - pt1[1];
-      var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
-      if (magnitude === 0) {
-        return [0, 0];
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
       }
-      var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
-      return unitVector;
-    },
-    tangentOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'tangent');
-    },
-    normalOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'normal');
-    },
-    setGroupProperty: expressionHelpers.setGroupProperty,
-    getValueAtTime: expressionHelpers.getStaticValueAtTime,
-  };
-  extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
-  extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-  KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
-  KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
-
-  var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
-  ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
-    var prop = propertyGetShapeProp(elem, data, type, arr, trims);
-    prop.propertyIndex = data.ix;
-    prop.lock = false;
-    if (type === 3) {
-      expressionHelpers.searchExpressions(elem, data.pt, prop);
-    } else if (type === 4) {
-      expressionHelpers.searchExpressions(elem, data.ks, prop);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
     }
-    return prop;
-  };
-}());
 
-/* global ExpressionManager, TextProperty */
-
-(function addDecorator() {
-  function searchExpressions() {
-    if (this.data.d.x) {
-      this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
-      this.addEffect(this.getExpressionValue.bind(this));
-      return true;
-    }
     return null;
   }
 
-  TextProperty.prototype.getExpressionValue = function (currentValue, text) {
-    var newValue = this.calculateExpression(text);
-    if (currentValue.t !== newValue) {
-      var newData = {};
-      this.copyData(newData, currentValue);
-      newData.t = newValue.toString();
-      newData.__complete = false;
-      return newData;
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
     }
-    return currentValue;
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
   };
 
-  TextProperty.prototype.searchProperty = function () {
-    var isKeyframed = this.searchKeyframes();
-    var hasExpressions = this.searchExpressions();
-    this.kf = isKeyframed || hasExpressions;
-    return this.kf;
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
   };
 
-  TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
 
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-var ShapePathInterface = (
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-  function () {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
       var prop = view.sh;
 
@@ -13633,1602 +7683,9278 @@
         if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
           return interfaceFunction.path;
         }
+
         return null;
       }
 
       var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
       prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
       Object.defineProperties(interfaceFunction, {
         path: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
         shape: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
-        _name: { value: shape.nm },
-        ix: { value: shape.ix },
-        propertyIndex: { value: shape.ix },
-        mn: { value: shape.mn },
-        propertyGroup: { value: propertyGroup },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
       });
       return interfaceFunction;
     };
-  }()
-);
+  }();
 
-/* exported propertyGroupFactory */
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
 
-var propertyGroupFactory = (function () {
-  return function (interfaceFunction, parentPropertyGroup) {
-    return function (val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return parentPropertyGroup(val - 1);
-    };
-  };
-}());
-
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
-  return function (propertyName, propertyGroup) {
-    var interfaceFunction = {
-      _name: propertyName,
-    };
-
-    function _propertyGroup(val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return propertyGroup(val - 1);
-    }
-
-    return _propertyGroup;
-  };
-}());
-
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
-
-var ShapeExpressionInterface = (function () {
-  function iterateElements(shapes, view, propertyGroup) {
-    var arr = [];
-    var i;
-    var len = shapes ? shapes.length : 0;
-    for (i = 0; i < len; i += 1) {
-      if (shapes[i].ty === 'gr') {
-        arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'fl') {
-        arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'st') {
-        arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tm') {
-        arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tr') {
-        // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
-      } else if (shapes[i].ty === 'el') {
-        arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sr') {
-        arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sh') {
-        arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rc') {
-        arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rd') {
-        arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rp') {
-        arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'gf') {
-        arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else {
-        arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
-      }
-    }
-    return arr;
-  }
-
-  function contentsInterfaceFactory(shape, view, propertyGroup) {
-    var interfaces;
-    var interfaceFunction = function _interfaceFunction(value) {
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
-          return interfaces[i];
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
         }
-        i += 1;
       }
-      if (typeof value === 'number') {
-        return interfaces[value - 1];
-      }
-      return null;
-    };
 
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
-    interfaceFunction.numProperties = interfaces.length;
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.transform = transformInterface;
-    interfaceFunction.propertyIndex = shape.cix;
-    interfaceFunction._name = shape.nm;
+      return arr;
+    }
 
-    return interfaceFunction;
-  }
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
 
-  function groupInterfaceFactory(shape, view, propertyGroup) {
-    var interfaceFunction = function _interfaceFunction(value) {
-      switch (value) {
-        case 'ADBE Vectors Group':
-        case 'Contents':
-        case 2:
-          return interfaceFunction.content;
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
           // Not necessary for now. Keeping them here in case a new case appears
           // case 'ADBE Vector Transform Group':
           // case 3:
-        default:
-          return interfaceFunction.transform;
-      }
-    };
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.content = content;
-    interfaceFunction.transform = transformInterface;
-    Object.defineProperty(interfaceFunction, '_name', {
-      get: function () {
-        return shape.nm;
-      },
-    });
-    // interfaceFunction.content = interfaceFunction;
-    interfaceFunction.numProperties = shape.np;
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.nm = shape.nm;
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
 
-  function fillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
     }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
 
-    view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
 
-  function gradientFillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Start Point' || val === 'start point') {
-        return interfaceFunction.startPoint;
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      if (val === 'End Point' || val === 'end point') {
-        return interfaceFunction.endPoint;
-      }
-      if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      startPoint: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      endPoint: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      type: {
-        get: function () {
-          return 'a';
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
-  function defaultInterfaceFactory() {
-    function interfaceFunction() {
-      return null;
-    }
-    return interfaceFunction;
-  }
-
-  function strokeInterfaceFactory(shape, view, propertyGroup) {
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
-    function addPropertyToDashOb(i) {
-      Object.defineProperty(dashOb, shape.d[i].nm, {
-        get: ExpressionPropertyInterface(view.d.dataProps[i].p),
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
       });
-    }
-    var i;
-    var len = shape.d ? shape.d.length : 0;
-    var dashOb = {};
-    for (i = 0; i < len; i += 1) {
-      addPropertyToDashOb(i);
-      view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      } if (val === 'Stroke Width' || val === 'stroke width') {
-        return interfaceFunction.strokeWidth;
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      strokeWidth: {
-        get: ExpressionPropertyInterface(view.w),
-      },
-      dash: {
-        get: function () {
-          return dashOb;
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
-    return interfaceFunction;
-  }
-
-  function trimInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === shape.e.ix || val === 'End' || val === 'end') {
-        return interfaceFunction.end;
-      }
-      if (val === shape.s.ix) {
-        return interfaceFunction.start;
-      }
-      if (val === shape.o.ix) {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-
-    view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.propertyGroup = propertyGroup;
-
-    Object.defineProperties(interfaceFunction, {
-      start: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      end: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function transformInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.a.ix === value || value === 'Anchor Point') {
-        return interfaceFunction.anchorPoint;
-      }
-      if (shape.o.ix === value || value === 'Opacity') {
-        return interfaceFunction.opacity;
-      }
-      if (shape.p.ix === value || value === 'Position') {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
-        return interfaceFunction.rotation;
-      }
-      if (shape.s.ix === value || value === 'Scale') {
-        return interfaceFunction.scale;
-      }
-      if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {
-        return interfaceFunction.skew;
-      }
-      if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {
-        return interfaceFunction.skewAxis;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
-    view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
-    view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (view.transform.mProps.sk) {
-      view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
-      view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
-    }
-    view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      opacity: {
-        get: ExpressionPropertyInterface(view.transform.mProps.o),
-      },
-      position: {
-        get: ExpressionPropertyInterface(view.transform.mProps.p),
-      },
-      anchorPoint: {
-        get: ExpressionPropertyInterface(view.transform.mProps.a),
-      },
-      scale: {
-        get: ExpressionPropertyInterface(view.transform.mProps.s),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(view.transform.mProps.r),
-      },
-      skew: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sk),
-      },
-      skewAxis: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sa),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.ty = 'tr';
-    interfaceFunction.mn = shape.mn;
-    interfaceFunction.propertyGroup = propertyGroup;
-    return interfaceFunction;
-  }
-
-  function ellipseInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.s.ix === value) {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function starInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.rotation;
-      }
-      if (shape.pt.ix === value) {
-        return interfaceFunction.points;
-      }
-      if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
-        return interfaceFunction.outerRadius;
-      }
-      if (shape.os.ix === value) {
-        return interfaceFunction.outerRoundness;
-      }
-      if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
-        return interfaceFunction.innerRadius;
-      }
-      if (shape.is && shape.is.ix === value) {
-        return interfaceFunction.innerRoundness;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
-    prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
-    prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (shape.ir) {
-      prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
-      prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
-    }
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      points: {
-        get: ExpressionPropertyInterface(prop.pt),
-      },
-      outerRadius: {
-        get: ExpressionPropertyInterface(prop.or),
-      },
-      outerRoundness: {
-        get: ExpressionPropertyInterface(prop.os),
-      },
-      innerRadius: {
-        get: ExpressionPropertyInterface(prop.ir),
-      },
-      innerRoundness: {
-        get: ExpressionPropertyInterface(prop.is),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function rectInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.roundness;
-      }
-      if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      roundness: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function roundedInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.r.ix === value || value === 'Round Corners 1') {
-        return interfaceFunction.radius;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      radius: {
-        get: ExpressionPropertyInterface(prop.rd),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function repeaterInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.c.ix === value || value === 'Copies') {
-        return interfaceFunction.copies;
-      } if (shape.o.ix === value || value === 'Offset') {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
-    prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      copies: {
-        get: ExpressionPropertyInterface(prop.c),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(prop.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  return function (shapes, view, propertyGroup) {
-    var interfaces;
-    function _interfaceFunction(value) {
-      if (typeof value === 'number') {
-        value = value === undefined ? 1 : value;
-        if (value === 0) {
-          return propertyGroup;
-        }
-        return interfaces[value - 1];
-      }
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value) {
-          return interfaces[i];
-        }
-        i += 1;
-      }
-      return null;
-    }
-    function parentGroupWrapper() {
-      return propertyGroup;
-    }
-    _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
-    interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
-    _interfaceFunction.numProperties = interfaces.length;
-    _interfaceFunction._name = 'Contents';
-    return _interfaceFunction;
-  };
-}());
-
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
-  return function (elem) {
-    var _prevValue;
-    var _sourceText;
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Text Document':
-          return _thisLayerFunction.sourceText;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisLayerFunction, 'sourceText', {
-      get: function () {
-        elem.textProperty.getValue();
-        var stringValue = elem.textProperty.currentData.t;
-        if (stringValue !== _prevValue) {
-          elem.textProperty.currentData.t = _prevValue;
-          _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
-          // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
-          _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
-        }
-        return _sourceText;
-      },
-    });
-    return _thisLayerFunction;
-  };
-}());
-
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
-
-var LayerExpressionInterface = (function () {
-  function getMatrix(time) {
-    var toWorldMat = new Matrix();
-    if (time !== undefined) {
-      var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
-      propMatrix.clone(toWorldMat);
-    } else {
-      var transformMat = this._elem.finalTransform.mProp;
-      transformMat.applyToMatrix(toWorldMat);
-    }
-    return toWorldMat;
-  }
-
-  function toWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function toWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function fromWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function fromWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function applyPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
-  }
-
-  function invertPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.inversePoint(arr);
-  }
-
-  function fromComp(arr) {
-    var toWorldMat = new Matrix();
-    toWorldMat.reset();
-    this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
-      }
-      return toWorldMat.inversePoint(arr);
-    }
-    return toWorldMat.inversePoint(arr);
-  }
-
-  function sampleImage() {
-    return [1, 1, 1, 1];
-  }
-
-  return function (elem) {
-    var transformInterface;
-
-    function _registerMaskInterface(maskManager) {
-      _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
-    }
-    function _registerEffectsInterface(effects) {
-      _thisLayerFunction.effect = effects;
-    }
-
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Root Vectors Group':
-        case 'Contents':
-        case 2:
-          return _thisLayerFunction.shapeInterface;
-        case 1:
-        case 6:
-        case 'Transform':
-        case 'transform':
-        case 'ADBE Transform Group':
-          return transformInterface;
-        case 4:
-        case 'ADBE Effect Parade':
-        case 'effects':
-        case 'Effects':
-          return _thisLayerFunction.effect;
-        case 'ADBE Text Properties':
-          return _thisLayerFunction.textInterface;
-        default:
-          return null;
-      }
-    }
-    _thisLayerFunction.getMatrix = getMatrix;
-    _thisLayerFunction.invertPoint = invertPoint;
-    _thisLayerFunction.applyPoint = applyPoint;
-    _thisLayerFunction.toWorld = toWorld;
-    _thisLayerFunction.toWorldVec = toWorldVec;
-    _thisLayerFunction.fromWorld = fromWorld;
-    _thisLayerFunction.fromWorldVec = fromWorldVec;
-    _thisLayerFunction.toComp = toWorld;
-    _thisLayerFunction.fromComp = fromComp;
-    _thisLayerFunction.sampleImage = sampleImage;
-    _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-    _thisLayerFunction._elem = elem;
-    transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
-    var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-    Object.defineProperties(_thisLayerFunction, {
-      hasParent: {
-        get: function () {
-          return elem.hierarchy.length;
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
         },
-      },
-      parent: {
-        get: function () {
-          return elem.hierarchy[0].layerInterface;
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
         },
-      },
-      rotation: getDescriptor(transformInterface, 'rotation'),
-      scale: getDescriptor(transformInterface, 'scale'),
-      position: getDescriptor(transformInterface, 'position'),
-      opacity: getDescriptor(transformInterface, 'opacity'),
-      anchorPoint: anchorPointDescriptor,
-      anchor_point: anchorPointDescriptor,
-      transform: {
-        get: function () {
-          return transformInterface;
-        },
-      },
-      active: {
-        get: function () {
-          return elem.isInRange;
-        },
-      },
-    });
-
-    _thisLayerFunction.startTime = elem.data.st;
-    _thisLayerFunction.index = elem.data.ind;
-    _thisLayerFunction.source = elem.data.refId;
-    _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
-    _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
-    _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    _thisLayerFunction._name = elem.data.nm;
-
-    _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
-    _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
-  var outlineInterfaceFactory = (function (elem) {
-    var currentPropertyName = '';
-    var currentProperty = elem.getFootageData();
-    function init() {
-      currentPropertyName = '';
-      currentProperty = elem.getFootageData();
-      return searchProperty;
-    }
-    function searchProperty(value) {
-      if (currentProperty[value]) {
-        currentPropertyName = value;
-        currentProperty = currentProperty[value];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      var propertyNameIndex = value.indexOf(currentPropertyName);
-      if (propertyNameIndex !== -1) {
-        var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
-        currentProperty = currentProperty[index];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      return '';
-    }
-    return init;
-  });
-
-  var dataInterfaceFactory = function (elem) {
-    function interfaceFunction(value) {
-      if (value === 'Outline') {
-        return interfaceFunction.outlineInterface();
-      }
-      return null;
-    }
-
-    interfaceFunction._name = 'Outline';
-    interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
-    return interfaceFunction;
-  };
-
-  return function (elem) {
-    function _interfaceFunction(value) {
-      if (value === 'Data') {
-        return _interfaceFunction.dataInterface;
-      }
-      return null;
-    }
-
-    _interfaceFunction._name = 'Data';
-    _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
-    return _interfaceFunction;
-  };
-}());
-
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
-  return function (comp) {
-    function _thisLayerFunction(name) {
-      var i = 0;
-      var len = comp.layers.length;
-      while (i < len) {
-        if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
-          return comp.elements[i].layerInterface;
-        }
-        i += 1;
-      }
-      return null;
-      // return {active:false};
-    }
-    Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });
-    _thisLayerFunction.layer = _thisLayerFunction;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
-    _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
-    _thisLayerFunction.displayStartTime = 0;
-    _thisLayerFunction.numLayers = comp.layers.length;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
-
-var TransformExpressionInterface = (function () {
-  return function (transform) {
-    function _thisFunction(name) {
-      switch (name) {
-        case 'scale':
-        case 'Scale':
-        case 'ADBE Scale':
-        case 6:
-          return _thisFunction.scale;
-        case 'rotation':
-        case 'Rotation':
-        case 'ADBE Rotation':
-        case 'ADBE Rotate Z':
-        case 10:
-          return _thisFunction.rotation;
-        case 'ADBE Rotate X':
-          return _thisFunction.xRotation;
-        case 'ADBE Rotate Y':
-          return _thisFunction.yRotation;
-        case 'position':
-        case 'Position':
-        case 'ADBE Position':
-        case 2:
-          return _thisFunction.position;
-        case 'ADBE Position_0':
-          return _thisFunction.xPosition;
-        case 'ADBE Position_1':
-          return _thisFunction.yPosition;
-        case 'ADBE Position_2':
-          return _thisFunction.zPosition;
-        case 'anchorPoint':
-        case 'AnchorPoint':
-        case 'Anchor Point':
-        case 'ADBE AnchorPoint':
-        case 1:
-          return _thisFunction.anchorPoint;
-        case 'opacity':
-        case 'Opacity':
-        case 11:
-          return _thisFunction.opacity;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisFunction, 'rotation', {
-      get: ExpressionPropertyInterface(transform.r || transform.rz),
-    });
-
-    Object.defineProperty(_thisFunction, 'zRotation', {
-      get: ExpressionPropertyInterface(transform.rz || transform.r),
-    });
-
-    Object.defineProperty(_thisFunction, 'xRotation', {
-      get: ExpressionPropertyInterface(transform.rx),
-    });
-
-    Object.defineProperty(_thisFunction, 'yRotation', {
-      get: ExpressionPropertyInterface(transform.ry),
-    });
-    Object.defineProperty(_thisFunction, 'scale', {
-      get: ExpressionPropertyInterface(transform.s),
-    });
-    var _px;
-    var _py;
-    var _pz;
-    var _transformFactory;
-    if (transform.p) {
-      _transformFactory = ExpressionPropertyInterface(transform.p);
-    } else {
-      _px = ExpressionPropertyInterface(transform.px);
-      _py = ExpressionPropertyInterface(transform.py);
-      if (transform.pz) {
-        _pz = ExpressionPropertyInterface(transform.pz);
-      }
-    }
-    Object.defineProperty(_thisFunction, 'position', {
-      get: function () {
-        if (transform.p) {
-          return _transformFactory();
-        }
-        return [
-          _px(),
-          _py(),
-          _pz ? _pz() : 0];
-      },
-    });
-
-    Object.defineProperty(_thisFunction, 'xPosition', {
-      get: ExpressionPropertyInterface(transform.px),
-    });
-
-    Object.defineProperty(_thisFunction, 'yPosition', {
-      get: ExpressionPropertyInterface(transform.py),
-    });
-
-    Object.defineProperty(_thisFunction, 'zPosition', {
-      get: ExpressionPropertyInterface(transform.pz),
-    });
-
-    Object.defineProperty(_thisFunction, 'anchorPoint', {
-      get: ExpressionPropertyInterface(transform.a),
-    });
-
-    Object.defineProperty(_thisFunction, 'opacity', {
-      get: ExpressionPropertyInterface(transform.o),
-    });
-
-    Object.defineProperty(_thisFunction, 'skew', {
-      get: ExpressionPropertyInterface(transform.sk),
-    });
-
-    Object.defineProperty(_thisFunction, 'skewAxis', {
-      get: ExpressionPropertyInterface(transform.sa),
-    });
-
-    Object.defineProperty(_thisFunction, 'orientation', {
-      get: ExpressionPropertyInterface(transform.or),
-    });
-
-    return _thisFunction;
-  };
-}());
-
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
-  function registerComposition(comp) {
-    this.compositions.push(comp);
-  }
-
-  return function () {
-    function _thisProjectFunction(name) {
-      var i = 0;
-      var len = this.compositions.length;
-      while (i < len) {
-        if (this.compositions[i].data && this.compositions[i].data.nm === name) {
-          if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
-            this.compositions[i].prepareFrame(this.currentFrame);
+        type: {
+          get: function get() {
+            return 'a';
           }
-          return this.compositions[i].compInterface;
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
         }
-        i += 1;
-      }
-      return null;
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    _thisProjectFunction.compositions = [];
-    _thisProjectFunction.currentFrame = 0;
-
-    _thisProjectFunction.registerComposition = registerComposition;
-
-    return _thisProjectFunction;
-  };
-}());
-
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
-
-var EffectsExpressionInterface = (function () {
-  var ob = {
-    createEffectsInterface: createEffectsInterface,
-  };
-
-  function createEffectsInterface(elem, propertyGroup) {
-    if (elem.effectsManager) {
-      var effectElements = [];
-      var effectsData = elem.data.ef;
-      var i;
-      var len = elem.effectsManager.effectElements.length;
-      for (i = 0; i < len; i += 1) {
-        effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
       }
 
-      var effects = elem.data.ef || [];
-      var groupInterface = function (name) {
-        i = 0;
-        len = effects.length;
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
         while (i < len) {
-          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-            return effectElements[i];
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
           }
+
           i += 1;
         }
+
         return null;
-      };
-      Object.defineProperty(groupInterface, 'numProperties', {
-        get: function () {
-          return effects.length;
-        },
-      });
-      return groupInterface;
-    }
-    return null;
-  }
+      }
 
-  function createGroupInterface(data, elements, propertyGroup, elem) {
-    function groupInterface(name) {
-      var effects = data.ef;
-      var i = 0;
-      var len = effects.length;
-      while (i < len) {
-        if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-          if (effects[i].ty === 5) {
-            return effectElements[i];
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
           }
-          return effectElements[i]();
+
+          return _sourceText;
         }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
         i += 1;
       }
-      throw new Error();
-    }
-    var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
 
-    var effectElements = [];
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
     var i;
-    var len = data.ef.length;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
     for (i = 0; i < len; i += 1) {
-      if (data.ef[i].ty === 5) {
-        effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
     }
 
-    if (data.mn === 'ADBE Color Control') {
-      Object.defineProperty(groupInterface, 'color', {
-        get: function () {
-          return effectElements[0]();
-        },
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
       });
     }
-    Object.defineProperties(groupInterface, {
-      numProperties: {
-        get: function () {
-          return data.np;
-        },
-      },
-      _name: { value: data.nm },
-      propertyGroup: { value: _propertyGroup },
-    });
-    groupInterface.enabled = data.en !== 0;
-    groupInterface.active = groupInterface.enabled;
-    return groupInterface;
-  }
 
-  function createValueInterface(element, type, elem, propertyGroup) {
-    var expressionProperty = ExpressionPropertyInterface(element.p);
-    function interfaceFunction() {
-      if (type === 10) {
-        return elem.comp.compInterface(element.p.v);
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
       }
-      return expressionProperty();
-    }
 
-    if (element.p.setGroupProperty) {
-      element.p.setGroupProperty(PropertyInterface('', propertyGroup));
-    }
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
 
-    return interfaceFunction;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray */
-/* exported MaskManagerInterface */
-
-var MaskManagerInterface = (function () {
-  function MaskInterface(mask, data) {
-    this._mask = mask;
-    this._data = data;
-  }
-  Object.defineProperty(MaskInterface.prototype, 'maskPath', {
-    get: function () {
-      if (this._mask.prop.k) {
-        this._mask.prop.getValue();
-      }
-      return this._mask.prop;
-    },
-  });
-  Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
-    get: function () {
-      if (this._mask.op.k) {
-        this._mask.op.getValue();
-      }
-      return this._mask.op.v * 100;
-    },
-  });
-
-  var MaskManager = function (maskManager) {
-    var _masksInterfaces = createSizedArray(maskManager.viewData.length);
-    var i;
-    var len = maskManager.viewData.length;
-    for (i = 0; i < len; i += 1) {
-      _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
-    }
-
-    var maskFunction = function (name) {
-      i = 0;
-      while (i < len) {
-        if (maskManager.masksProperties[i].nm === name) {
-          return _masksInterfaces[i];
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
         }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
         i += 1;
       }
-      return null;
-    };
-    return maskFunction;
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
   };
-  return MaskManager;
-}());
 
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
-
-var ExpressionPropertyInterface = (function () {
-  var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
-  var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
-
-  function completeProperty(expressionValue, property, type) {
-    Object.defineProperty(expressionValue, 'velocity', {
-      get: function () {
-        return property.getVelocityAtTime(property.comp.currentFrame);
-      },
-    });
-    expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
-    expressionValue.key = function (pos) {
-      if (!expressionValue.numKeys) {
-        return 0;
-      }
-      var value = '';
-      if ('s' in property.keyframes[pos - 1]) {
-        value = property.keyframes[pos - 1].s;
-      } else if ('e' in property.keyframes[pos - 2]) {
-        value = property.keyframes[pos - 2].e;
-      } else {
-        value = property.keyframes[pos - 2].s;
-      }
-      var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
-      valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
-      valueProp.value = type === 'unidimensional' ? value[0] : value;
-      return valueProp;
-    };
-    expressionValue.valueAtTime = property.getValueAtTime;
-    expressionValue.speedAtTime = property.getSpeedAtTime;
-    expressionValue.velocityAtTime = property.getVelocityAtTime;
-    expressionValue.propertyGroup = property.propertyGroup;
-  }
-
-  function UnidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultUnidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var val = property.pv * mult;
-    var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-    expressionValue.value = val;
-    completeProperty(expressionValue, property, 'unidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      val = property.v * mult;
-      if (expressionValue.value !== val) {
-        expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-        expressionValue.value = val;
-        completeProperty(expressionValue, property, 'unidimensional');
-      }
-      return expressionValue;
-    };
-  }
-
-  function MultidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultMultidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var len = (property.data && property.data.l) || property.pv.length;
-    var expressionValue = createTypedArray('float32', len);
-    var arrValue = createTypedArray('float32', len);
-    expressionValue.value = arrValue;
-    completeProperty(expressionValue, property, 'multidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      for (var i = 0; i < len; i += 1) {
-        arrValue[i] = property.v[i] * mult;
-        expressionValue[i] = arrValue[i];
-      }
-      return expressionValue;
-    };
-  }
-
-  // TODO: try to avoid using this getter
-  function defaultGetter() {
-    return defaultUnidimensionalValue;
-  }
-
-  return function (property) {
-    if (!property) {
-      return defaultGetter;
-    } if (property.propType === 'unidimensional') {
-      return UnidimensionalPropertyInterface(property);
-    }
-    return MultidimensionalPropertyInterface(property);
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
   };
-}());
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
 
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
-  function getValueProxy(index, total) {
-    this.textIndex = index + 1;
-    this.textTotal = total;
-    this.v = this.getValue() * this.mult;
-    return this.v;
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
   }
 
-  return function (elem, data) {
-    this.pv = 1;
-    this.comp = elem.comp;
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
     this.elem = elem;
-    this.mult = 0.01;
-    this.propType = 'textSelector';
-    this.textTotal = data.totalChars;
-    this.selectorValue = 100;
-    this.lastValue = [1, 1, 1];
-    this.k = true;
-    this.x = true;
-    this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);
-    this.getMult = getValueProxy;
-    this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
     if (this.kf) {
-      this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
     } else {
-      this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
     }
-    this.setGroupProperty = expressionHelpers.setGroupProperty;
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
   };
-}());
 
-var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
-TextSelectorProp.getTextSelectorProp = function (elem, data, arr) {
-  if (data.t === 1) {
-    return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
   }
-  return propertyGetTextProp(elem, data, arr);
-};
 
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
-
-function SliderEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function AngleEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function ColorEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function PointEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function LayerIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function MaskIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function CheckboxEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function NoValueEffect() {
-  this.p = {};
-}
-
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
-
-function EffectsManager(data, element) {
-  var effects = data.ef || [];
-  this.effectElements = [];
-  var i;
-  var len = effects.length;
-  var effectItem;
-  for (i = 0; i < len; i += 1) {
-    effectItem = new GroupEffect(effects[i], element);
-    this.effectElements.push(effectItem);
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
   }
-}
 
-function GroupEffect(data, element) {
-  this.init(data, element);
-}
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
 
-extendPrototype([DynamicPropertyContainer], GroupEffect);
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
 
-GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
 
-GroupEffect.prototype.init = function (data, element) {
-  this.data = data;
-  this.effectElements = [];
-  this.initDynamicPropertyContainer(element);
-  var i;
-  var len = this.data.ef.length;
-  var eff;
-  var effects = this.data.ef;
-  for (i = 0; i < len; i += 1) {
-    eff = null;
-    switch (effects[i].ty) {
-      case 0:
-        eff = new SliderEffect(effects[i], element, this);
-        break;
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
       case 1:
-        eff = new AngleEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
         break;
+
       case 2:
-        eff = new ColorEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
         break;
-      case 3:
-        eff = new PointEffect(effects[i], element, this);
-        break;
-      case 4:
-      case 7:
-        eff = new CheckboxEffect(effects[i], element, this);
-        break;
-      case 10:
-        eff = new LayerIndexEffect(effects[i], element, this);
-        break;
-      case 11:
-        eff = new MaskIndexEffect(effects[i], element, this);
-        break;
-      case 5:
-        eff = new EffectsManager(effects[i], element, this);
-        break;
-        // case 6:
+
       default:
-        eff = new NoValueEffect(effects[i], element, this);
         break;
     }
-    if (eff) {
-      this.effectElements.push(eff);
-    }
-  }
-};
 
-
-var lottie = {};
-
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
-    }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
-
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
-
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
-
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
-
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
-
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
-
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
-    }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+    matrixHelper.translate(xPos, yPos, 0);
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
 
-return lottie;
-}));
\ No newline at end of file
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function HBaseElement() {}
+
+  HBaseElement.prototype = {
+    checkBlendMode: function checkBlendMode() {},
+    initRendererElement: function initRendererElement() {
+      this.baseElement = createTag(this.data.tg || 'div');
+
+      if (this.data.hasMask) {
+        this.svgElement = createNS('svg');
+        this.layerElement = createNS('g');
+        this.maskedElement = this.layerElement;
+        this.svgElement.appendChild(this.layerElement);
+        this.baseElement.appendChild(this.svgElement);
+      } else {
+        this.layerElement = this.baseElement;
+      }
+
+      styleDiv(this.baseElement);
+    },
+    createContainerElements: function createContainerElements() {
+      this.renderableEffectsManager = new CVEffects(this);
+      this.transformedElement = this.baseElement;
+      this.maskedElement = this.layerElement;
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
+
+      if (this.finalTransform._matMdf) {
+        var matrixValue = this.finalTransform.mat.toCSS();
+        transformedElementStyle.transform = matrixValue;
+        transformedElementStyle.webkitTransform = matrixValue;
+      }
+
+      if (this.finalTransform._opMdf) {
+        transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
+      }
+    },
+    renderFrame: function renderFrame() {
+      // If it is exported as hidden (data.hd === true) no need to render
+      // If it is not visible no need to render
+      if (this.data.hd || this.hidden) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.renderElement();
+      this.renderInnerContent();
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.layerElement = null;
+      this.transformedElement = null;
+
+      if (this.matteElement) {
+        this.matteElement = null;
+      }
+
+      if (this.maskManager) {
+        this.maskManager.destroy();
+        this.maskManager = null;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+    },
+    addEffects: function addEffects() {},
+    setMatte: function setMatte() {}
+  };
+  HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
+  HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
+  HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;
+
+  function HSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
+
+  HSolidElement.prototype.createContent = function () {
+    var rect;
+
+    if (this.data.hasMask) {
+      rect = createNS('rect');
+      rect.setAttribute('width', this.data.sw);
+      rect.setAttribute('height', this.data.sh);
+      rect.setAttribute('fill', this.data.sc);
+      this.svgElement.setAttribute('width', this.data.sw);
+      this.svgElement.setAttribute('height', this.data.sh);
+    } else {
+      rect = createTag('div');
+      rect.style.width = this.data.sw + 'px';
+      rect.style.height = this.data.sh + 'px';
+      rect.style.backgroundColor = this.data.sc;
+    }
+
+    this.layerElement.appendChild(rect);
+  };
+
+  function HShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.shapesContainer = createNS('g');
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
+  HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
+
+  HShapeElement.prototype.createContent = function () {
+    var cont;
+    this.baseElement.style.fontSize = 0;
+
+    if (this.data.hasMask) {
+      this.layerElement.appendChild(this.shapesContainer);
+      cont = this.svgElement;
+    } else {
+      cont = createNS('svg');
+      var size = this.comp.data ? this.comp.data : this.globalData.compSize;
+      cont.setAttribute('width', size.w);
+      cont.setAttribute('height', size.h);
+      cont.appendChild(this.shapesContainer);
+      this.layerElement.appendChild(cont);
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
+    this.filterUniqueShapes();
+    this.shapeCont = cont;
+  };
+
+  HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
+    var i;
+    var len = transformers.length;
+
+    for (i = 0; i < len; i += 1) {
+      point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
+    }
+
+    return point;
+  };
+
+  HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
+    var shape = item.sh.v;
+    var transformers = item.transformers;
+    var i;
+    var len = shape._length;
+    var vPoint;
+    var oPoint;
+    var nextIPoint;
+    var nextVPoint;
+
+    if (len <= 1) {
+      return;
+    }
+
+    for (i = 0; i < len - 1; i += 1) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+
+    if (shape.c) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+  };
+
+  HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
+    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
+    var bounds = this.shapeBoundingBox;
+    boundingBox.x = bmMin(bounds.left, boundingBox.x);
+    boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
+    boundingBox.y = bmMin(bounds.top, boundingBox.y);
+    boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
+  };
+
+  HShapeElement.prototype.shapeBoundingBox = {
+    left: 0,
+    right: 0,
+    top: 0,
+    bottom: 0
+  };
+  HShapeElement.prototype.tempBoundingBox = {
+    x: 0,
+    xMax: 0,
+    y: 0,
+    yMax: 0,
+    width: 0,
+    height: 0
+  };
+
+  HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
+    var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
+
+    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {
+      // eslint-disable-line no-plusplus
+      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
+      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
+      c = 3 * p1[i] - 3 * p0[i];
+      b |= 0; // eslint-disable-line no-bitwise
+
+      a |= 0; // eslint-disable-line no-bitwise
+
+      c |= 0; // eslint-disable-line no-bitwise
+
+      if (a === 0 && b === 0) {//
+      } else if (a === 0) {
+        t = -c / b;
+
+        if (t > 0 && t < 1) {
+          bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
+        }
+      } else {
+        b2ac = b * b - 4 * c * a;
+
+        if (b2ac >= 0) {
+          t1 = (-b + bmSqrt(b2ac)) / (2 * a);
+          if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
+          t2 = (-b - bmSqrt(b2ac)) / (2 * a);
+          if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
+        }
+      }
+    }
+
+    this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
+    this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
+    this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
+    this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
+  };
+
+  HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
+    return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];
+  };
+
+  HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
+    var i;
+    var len = itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (itemsData[i] && itemsData[i].sh) {
+        this.calculateShapeBoundingBox(itemsData[i], boundingBox);
+      } else if (itemsData[i] && itemsData[i].it) {
+        this.calculateBoundingBox(itemsData[i].it, boundingBox);
+      }
+    }
+  };
+
+  HShapeElement.prototype.currentBoxContains = function (box) {
+    return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
+  };
+
+  HShapeElement.prototype.renderInnerContent = function () {
+    this._renderShapeFrame();
+
+    if (!this.hidden && (this._isFirstFrame || this._mdf)) {
+      var tempBoundingBox = this.tempBoundingBox;
+      var max = 999999;
+      tempBoundingBox.x = max;
+      tempBoundingBox.xMax = -max;
+      tempBoundingBox.y = max;
+      tempBoundingBox.yMax = -max;
+      this.calculateBoundingBox(this.itemsData, tempBoundingBox);
+      tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
+      tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();
+
+      if (this.currentBoxContains(tempBoundingBox)) {
+        return;
+      }
+
+      var changed = false;
+
+      if (this.currentBBox.w !== tempBoundingBox.width) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.shapeCont.setAttribute('width', tempBoundingBox.width);
+        changed = true;
+      }
+
+      if (this.currentBBox.h !== tempBoundingBox.height) {
+        this.currentBBox.h = tempBoundingBox.height;
+        this.shapeCont.setAttribute('height', tempBoundingBox.height);
+        changed = true;
+      }
+
+      if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.currentBBox.h = tempBoundingBox.height;
+        this.currentBBox.x = tempBoundingBox.x;
+        this.currentBBox.y = tempBoundingBox.y;
+        this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        var shapeStyle = this.shapeCont.style;
+        var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        shapeStyle.transform = shapeTransform;
+        shapeStyle.webkitTransform = shapeTransform;
+      }
+    }
+  };
+
+  function HTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.textPaths = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+    this.renderType = 'svg';
+    this.isMasked = false;
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
+
+  HTextElement.prototype.createContent = function () {
+    this.isMasked = this.checkMasks();
+
+    if (this.isMasked) {
+      this.renderType = 'svg';
+      this.compW = this.comp.data.w;
+      this.compH = this.comp.data.h;
+      this.svgElement.setAttribute('width', this.compW);
+      this.svgElement.setAttribute('height', this.compH);
+      var g = createNS('g');
+      this.maskedElement.appendChild(g);
+      this.innerElem = g;
+    } else {
+      this.renderType = 'html';
+      this.innerElem = this.layerElement;
+    }
+
+    this.checkParenting();
+  };
+
+  HTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var innerElemStyle = this.innerElem.style;
+    var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
+    innerElemStyle.fill = textColor;
+    innerElemStyle.color = textColor;
+
+    if (documentData.sc) {
+      innerElemStyle.stroke = this.buildColor(documentData.sc);
+      innerElemStyle.strokeWidth = documentData.sw + 'px';
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (!this.globalData.fontManager.chars) {
+      innerElemStyle.fontSize = documentData.finalSize + 'px';
+      innerElemStyle.lineHeight = documentData.finalSize + 'px';
+
+      if (fontData.fClass) {
+        this.innerElem.className = fontData.fClass;
+      } else {
+        innerElemStyle.fontFamily = fontData.fFamily;
+        var fWeight = documentData.fWeight;
+        var fStyle = documentData.fStyle;
+        innerElemStyle.fontStyle = fStyle;
+        innerElemStyle.fontWeight = fWeight;
+      }
+    }
+
+    var i;
+    var len;
+    var letters = documentData.l;
+    len = letters.length;
+    var tSpan;
+    var tParent;
+    var tCont;
+    var matrixHelper = this.mHelper;
+    var shapes;
+    var shapeStr = '';
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.globalData.fontManager.chars) {
+        if (!this.textPaths[cnt]) {
+          tSpan = createNS('path');
+          tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
+          tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
+          tSpan.setAttribute('stroke-miterlimit', '4');
+        } else {
+          tSpan = this.textPaths[cnt];
+        }
+
+        if (!this.isMasked) {
+          if (this.textSpans[cnt]) {
+            tParent = this.textSpans[cnt];
+            tCont = tParent.children[0];
+          } else {
+            tParent = createTag('div');
+            tParent.style.lineHeight = 0;
+            tCont = createNS('svg');
+            tCont.appendChild(tSpan);
+            styleDiv(tParent);
+          }
+        }
+      } else if (!this.isMasked) {
+        if (this.textSpans[cnt]) {
+          tParent = this.textSpans[cnt];
+          tSpan = this.textPaths[cnt];
+        } else {
+          tParent = createTag('span');
+          styleDiv(tParent);
+          tSpan = createTag('span');
+          styleDiv(tSpan);
+          tParent.appendChild(tSpan);
+        }
+      } else {
+        tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
+      } // tSpan.setAttribute('visibility', 'hidden');
+
+
+      if (this.globalData.fontManager.chars) {
+        var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+        var shapeData;
+
+        if (charData) {
+          shapeData = charData.data;
+        } else {
+          shapeData = null;
+        }
+
+        matrixHelper.reset();
+
+        if (shapeData && shapeData.shapes && shapeData.shapes.length) {
+          shapes = shapeData.shapes[0].it;
+          matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+          shapeStr = this.createPathShape(matrixHelper, shapes);
+          tSpan.setAttribute('d', shapeStr);
+        }
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent);
+
+          if (shapeData && shapeData.shapes) {
+            // document.body.appendChild is needed to get exact measure of shape
+            document.body.appendChild(tCont);
+            var boundingBox = tCont.getBBox();
+            tCont.setAttribute('width', boundingBox.width + 2);
+            tCont.setAttribute('height', boundingBox.height + 2);
+            tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
+            var tContStyle = tCont.style;
+            var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
+            tContStyle.transform = tContTranslation;
+            tContStyle.webkitTransform = tContTranslation;
+            letters[i].yOffset = boundingBox.y - 1;
+          } else {
+            tCont.setAttribute('width', 1);
+            tCont.setAttribute('height', 1);
+          }
+
+          tParent.appendChild(tCont);
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } else {
+        tSpan.textContent = letters[i].val;
+        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent); //
+
+          var tStyle = tSpan.style;
+          var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
+          tStyle.transform = tSpanTranslation;
+          tStyle.webkitTransform = tSpanTranslation;
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } //
+
+
+      if (!this.isMasked) {
+        this.textSpans[cnt] = tParent;
+      } else {
+        this.textSpans[cnt] = tSpan;
+      }
+
+      this.textSpans[cnt].style.display = 'block';
+      this.textPaths[cnt] = tSpan;
+      cnt += 1;
+    }
+
+    while (cnt < this.textSpans.length) {
+      this.textSpans[cnt].style.display = 'none';
+      cnt += 1;
+    }
+  };
+
+  HTextElement.prototype.renderInnerContent = function () {
+    var svgStyle;
+
+    if (this.data.singleShape) {
+      if (!this._isFirstFrame && !this.lettersChangedFlag) {
+        return;
+      }
+
+      if (this.isMasked && this.finalTransform._matMdf) {
+        // Todo Benchmark if using this is better than getBBox
+        this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
+        svgStyle = this.svgElement.style;
+        var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
+        svgStyle.transform = translation;
+        svgStyle.webkitTransform = translation;
+      }
+    }
+
+    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+    if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
+      return;
+    }
+
+    var i;
+    var len;
+    var count = 0;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var textSpan;
+    var textPath;
+
+    for (i = 0; i < len; i += 1) {
+      if (letters[i].n) {
+        count += 1;
+      } else {
+        textSpan = this.textSpans[i];
+        textPath = this.textPaths[i];
+        renderedLetter = renderedLetters[count];
+        count += 1;
+
+        if (renderedLetter._mdf.m) {
+          if (!this.isMasked) {
+            textSpan.style.webkitTransform = renderedLetter.m;
+            textSpan.style.transform = renderedLetter.m;
+          } else {
+            textSpan.setAttribute('transform', renderedLetter.m);
+          }
+        } /// /textSpan.setAttribute('opacity',renderedLetter.o);
+
+
+        textSpan.style.opacity = renderedLetter.o;
+
+        if (renderedLetter.sw && renderedLetter._mdf.sw) {
+          textPath.setAttribute('stroke-width', renderedLetter.sw);
+        }
+
+        if (renderedLetter.sc && renderedLetter._mdf.sc) {
+          textPath.setAttribute('stroke', renderedLetter.sc);
+        }
+
+        if (renderedLetter.fc && renderedLetter._mdf.fc) {
+          textPath.setAttribute('fill', renderedLetter.fc);
+          textPath.style.color = renderedLetter.fc;
+        }
+      }
+    }
+
+    if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
+      var boundingBox = this.innerElem.getBBox();
+
+      if (this.currentBBox.w !== boundingBox.width) {
+        this.currentBBox.w = boundingBox.width;
+        this.svgElement.setAttribute('width', boundingBox.width);
+      }
+
+      if (this.currentBBox.h !== boundingBox.height) {
+        this.currentBBox.h = boundingBox.height;
+        this.svgElement.setAttribute('height', boundingBox.height);
+      }
+
+      var margin = 1;
+
+      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) {
+        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;
+        this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        svgStyle = this.svgElement.style;
+        var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        svgStyle.transform = svgTransform;
+        svgStyle.webkitTransform = svgTransform;
+      }
+    }
+  };
+
+  function HCameraElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initHierarchy();
+    var getProp = PropertyFactory.getProp;
+    this.pe = getProp(this, data.pe, 0, 0, this);
+
+    if (data.ks.p.s) {
+      this.px = getProp(this, data.ks.p.x, 1, 0, this);
+      this.py = getProp(this, data.ks.p.y, 1, 0, this);
+      this.pz = getProp(this, data.ks.p.z, 1, 0, this);
+    } else {
+      this.p = getProp(this, data.ks.p, 1, 0, this);
+    }
+
+    if (data.ks.a) {
+      this.a = getProp(this, data.ks.a, 1, 0, this);
+    }
+
+    if (data.ks.or.k.length && data.ks.or.k[0].to) {
+      var i;
+      var len = data.ks.or.k.length;
+
+      for (i = 0; i < len; i += 1) {
+        data.ks.or.k[i].to = null;
+        data.ks.or.k[i].ti = null;
+      }
+    }
+
+    this.or = getProp(this, data.ks.or, 1, degToRads, this);
+    this.or.sh = true;
+    this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
+    this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
+    this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
+    this.mat = new Matrix();
+    this._prevMat = new Matrix();
+    this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
+
+    this.finalTransform = {
+      mProp: this
+    };
+  }
+
+  extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
+
+  HCameraElement.prototype.setup = function () {
+    var i;
+    var len = this.comp.threeDElements.length;
+    var comp;
+    var perspectiveStyle;
+    var containerStyle;
+
+    for (i = 0; i < len; i += 1) {
+      // [perspectiveElem,container]
+      comp = this.comp.threeDElements[i];
+
+      if (comp.type === '3d') {
+        perspectiveStyle = comp.perspectiveElem.style;
+        containerStyle = comp.container.style;
+        var perspective = this.pe.v + 'px';
+        var origin = '0px 0px 0px';
+        var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+        perspectiveStyle.perspective = perspective;
+        perspectiveStyle.webkitPerspective = perspective;
+        containerStyle.transformOrigin = origin;
+        containerStyle.mozTransformOrigin = origin;
+        containerStyle.webkitTransformOrigin = origin;
+        perspectiveStyle.transform = matrix;
+        perspectiveStyle.webkitTransform = matrix;
+      }
+    }
+  };
+
+  HCameraElement.prototype.createElements = function () {};
+
+  HCameraElement.prototype.hide = function () {};
+
+  HCameraElement.prototype.renderFrame = function () {
+    var _mdf = this._isFirstFrame;
+    var i;
+    var len;
+
+    if (this.hierarchy) {
+      len = this.hierarchy.length;
+
+      for (i = 0; i < len; i += 1) {
+        _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
+      }
+    }
+
+    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) {
+      this.mat.reset();
+
+      if (this.hierarchy) {
+        len = this.hierarchy.length - 1;
+
+        for (i = len; i >= 0; i -= 1) {
+          var mTransf = this.hierarchy[i].finalTransform.mProp;
+          this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
+          this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
+          this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
+          this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
+          this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
+        }
+      }
+
+      if (this.p) {
+        this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
+      } else {
+        this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
+      }
+
+      if (this.a) {
+        var diffVector;
+
+        if (this.p) {
+          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]];
+        } else {
+          diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
+        }
+
+        var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
+
+        var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
+        var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
+        var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);
+        var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);
+        this.mat.rotateY(mRotationY).rotateX(-mRotationX);
+      }
+
+      this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
+      this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
+      this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
+      this.mat.translate(0, 0, this.pe.v);
+      var hasMatrixChanged = !this._prevMat.equals(this.mat);
+
+      if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
+        len = this.comp.threeDElements.length;
+        var comp;
+        var perspectiveStyle;
+        var containerStyle;
+
+        for (i = 0; i < len; i += 1) {
+          comp = this.comp.threeDElements[i];
+
+          if (comp.type === '3d') {
+            if (hasMatrixChanged) {
+              var matValue = this.mat.toCSS();
+              containerStyle = comp.container.style;
+              containerStyle.transform = matValue;
+              containerStyle.webkitTransform = matValue;
+            }
+
+            if (this.pe._mdf) {
+              perspectiveStyle = comp.perspectiveElem.style;
+              perspectiveStyle.perspective = this.pe.v + 'px';
+              perspectiveStyle.webkitPerspective = this.pe.v + 'px';
+            }
+          }
+        }
+
+        this.mat.clone(this._prevMat);
+      }
+    }
+
+    this._isFirstFrame = false;
+  };
+
+  HCameraElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  HCameraElement.prototype.destroy = function () {};
+
+  HCameraElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  function HImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
+
+  HImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    var img = new Image();
+
+    if (this.data.hasMask) {
+      this.imageElem = createNS('image');
+      this.imageElem.setAttribute('width', this.assetData.w + 'px');
+      this.imageElem.setAttribute('height', this.assetData.h + 'px');
+      this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+      this.layerElement.appendChild(this.imageElem);
+      this.baseElement.setAttribute('width', this.assetData.w);
+      this.baseElement.setAttribute('height', this.assetData.h);
+    } else {
+      this.layerElement.appendChild(img);
+    }
+
+    img.crossOrigin = 'anonymous';
+    img.src = assetPath;
+
+    if (this.data.ln) {
+      this.baseElement.setAttribute('id', this.data.ln);
+    }
+  };
+
+  function HybridRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([BaseRenderer], HybridRendererBase);
+  HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;
+
+  HybridRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  HybridRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newDOMElement = element.getBaseElement();
+
+    if (!newDOMElement) {
+      return;
+    }
+
+    var layer = this.layers[pos];
+
+    if (!layer.ddd || !this.supports3d) {
+      if (this.threeDElements) {
+        this.addTo3dContainer(newDOMElement, pos);
+      } else {
+        var i = 0;
+        var nextDOMElement;
+        var nextLayer;
+        var tmpDOMElement;
+
+        while (i < pos) {
+          if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
+            nextLayer = this.elements[i];
+            tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+            nextDOMElement = tmpDOMElement || nextDOMElement;
+          }
+
+          i += 1;
+        }
+
+        if (nextDOMElement) {
+          if (!layer.ddd || !this.supports3d) {
+            this.layerElement.insertBefore(newDOMElement, nextDOMElement);
+          }
+        } else if (!layer.ddd || !this.supports3d) {
+          this.layerElement.appendChild(newDOMElement);
+        }
+      }
+    } else {
+      this.addTo3dContainer(newDOMElement, pos);
+    }
+  };
+
+  HybridRendererBase.prototype.createShape = function (data) {
+    if (!this.supports3d) {
+      return new SVGShapeElement(data, this.globalData, this);
+    }
+
+    return new HShapeElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createText = function (data) {
+    if (!this.supports3d) {
+      return new SVGTextLottieElement(data, this.globalData, this);
+    }
+
+    return new HTextElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createCamera = function (data) {
+    this.camera = new HCameraElement(data, this.globalData, this);
+    return this.camera;
+  };
+
+  HybridRendererBase.prototype.createImage = function (data) {
+    if (!this.supports3d) {
+      return new IImageElement(data, this.globalData, this);
+    }
+
+    return new HImageElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createSolid = function (data) {
+    if (!this.supports3d) {
+      return new ISolidElement(data, this.globalData, this);
+    }
+
+    return new HSolidElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
+        return this.threeDElements[i].perspectiveElem;
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {
+    var perspectiveElem = createTag('div');
+    var style;
+    var containerStyle;
+    styleDiv(perspectiveElem);
+    var container = createTag('div');
+    styleDiv(container);
+
+    if (type === '3d') {
+      style = perspectiveElem.style;
+      style.width = this.globalData.compSize.w + 'px';
+      style.height = this.globalData.compSize.h + 'px';
+      var center = '50% 50%';
+      style.webkitTransformOrigin = center;
+      style.mozTransformOrigin = center;
+      style.transformOrigin = center;
+      containerStyle = container.style;
+      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+      containerStyle.transform = matrix;
+      containerStyle.webkitTransform = matrix;
+    }
+
+    perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);
+
+    var threeDContainerData = {
+      container: container,
+      perspectiveElem: perspectiveElem,
+      startPos: pos,
+      endPos: pos,
+      type: type
+    };
+    this.threeDElements.push(threeDContainerData);
+    return threeDContainerData;
+  };
+
+  HybridRendererBase.prototype.build3dContainers = function () {
+    var i;
+    var len = this.layers.length;
+    var lastThreeDContainerData;
+    var currentContainer = '';
+
+    for (i = 0; i < len; i += 1) {
+      if (this.layers[i].ddd && this.layers[i].ty !== 3) {
+        if (currentContainer !== '3d') {
+          currentContainer = '3d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '3d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      } else {
+        if (currentContainer !== '2d') {
+          currentContainer = '2d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '2d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      }
+    }
+
+    len = this.threeDElements.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
+    }
+  };
+
+  HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (pos <= this.threeDElements[i].endPos) {
+        var j = this.threeDElements[i].startPos;
+        var nextElement;
+
+        while (j < pos) {
+          if (this.elements[j] && this.elements[j].getBaseElement) {
+            nextElement = this.elements[j].getBaseElement();
+          }
+
+          j += 1;
+        }
+
+        if (nextElement) {
+          this.threeDElements[i].container.insertBefore(elem, nextElement);
+        } else {
+          this.threeDElements[i].container.appendChild(elem);
+        }
+
+        break;
+      }
+
+      i += 1;
+    }
+  };
+
+  HybridRendererBase.prototype.configAnimation = function (animData) {
+    var resizerElem = createTag('div');
+    var wrapper = this.animationItem.wrapper;
+    var style = resizerElem.style;
+    style.width = animData.w + 'px';
+    style.height = animData.h + 'px';
+    this.resizerElem = resizerElem;
+    styleDiv(resizerElem);
+    style.transformStyle = 'flat';
+    style.mozTransformStyle = 'flat';
+    style.webkitTransformStyle = 'flat';
+
+    if (this.renderConfig.className) {
+      resizerElem.setAttribute('class', this.renderConfig.className);
+    }
+
+    wrapper.appendChild(resizerElem);
+    style.overflow = 'hidden';
+    var svg = createNS('svg');
+    svg.setAttribute('width', '1');
+    svg.setAttribute('height', '1');
+    styleDiv(svg);
+    this.resizerElem.appendChild(svg);
+    var defs = createNS('defs');
+    svg.appendChild(defs);
+    this.data = animData; // Mask animation
+
+    this.setupGlobalData(animData, svg);
+    this.globalData.defs = defs;
+    this.layers = animData.layers;
+    this.layerElement = this.resizerElem;
+    this.build3dContainers();
+    this.updateContainerSize();
+  };
+
+  HybridRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.animationItem.container = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      this.elements[i].destroy();
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  HybridRendererBase.prototype.updateContainerSize = function () {
+    var elementWidth = this.animationItem.wrapper.offsetWidth;
+    var elementHeight = this.animationItem.wrapper.offsetHeight;
+    var elementRel = elementWidth / elementHeight;
+    var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
+    var sx;
+    var sy;
+    var tx;
+    var ty;
+
+    if (animationRel > elementRel) {
+      sx = elementWidth / this.globalData.compSize.w;
+      sy = elementWidth / this.globalData.compSize.w;
+      tx = 0;
+      ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;
+    } else {
+      sx = elementHeight / this.globalData.compSize.h;
+      sy = elementHeight / this.globalData.compSize.h;
+      tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
+      ty = 0;
+    }
+
+    var style = this.resizerElem.style;
+    style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
+    style.transform = style.webkitTransform;
+  };
+
+  HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
+
+  HybridRendererBase.prototype.hide = function () {
+    this.resizerElem.style.display = 'none';
+  };
+
+  HybridRendererBase.prototype.show = function () {
+    this.resizerElem.style.display = 'block';
+  };
+
+  HybridRendererBase.prototype.initItems = function () {
+    this.buildAllItems();
+
+    if (this.camera) {
+      this.camera.setup();
+    } else {
+      var cWidth = this.globalData.compSize.w;
+      var cHeight = this.globalData.compSize.h;
+      var i;
+      var len = this.threeDElements.length;
+
+      for (i = 0; i < len; i += 1) {
+        var style = this.threeDElements[i].perspectiveElem.style;
+        style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
+        style.perspective = style.webkitPerspective;
+      }
+    }
+  };
+
+  HybridRendererBase.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+    var floatingContainer = createTag('div');
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  function HCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = !data.hasMask;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);
+  HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
+
+  HCompElement.prototype.createContainerElements = function () {
+    this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
+
+
+    if (this.data.hasMask) {
+      this.svgElement.setAttribute('width', this.data.w);
+      this.svgElement.setAttribute('height', this.data.h);
+      this.transformedElement = this.baseElement;
+    } else {
+      this.transformedElement = this.layerElement;
+    }
+  };
+
+  HCompElement.prototype.addTo3dContainer = function (elem, pos) {
+    var j = 0;
+    var nextElement;
+
+    while (j < pos) {
+      if (this.elements[j] && this.elements[j].getBaseElement) {
+        nextElement = this.elements[j].getBaseElement();
+      }
+
+      j += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(elem, nextElement);
+    } else {
+      this.layerElement.appendChild(elem);
+    }
+  };
+
+  HCompElement.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  function HybridRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([HybridRendererBase], HybridRenderer);
+
+  HybridRenderer.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  registerRenderer('html', HybridRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+  var Expressions = function () {
+    var ob = {};
+    ob.initExpressions = initExpressions;
+
+    function initExpressions(animation) {
+      var stackCount = 0;
+      var registers = [];
+
+      function pushExpression() {
+        stackCount += 1;
+      }
+
+      function popExpression() {
+        stackCount -= 1;
+
+        if (stackCount === 0) {
+          releaseInstances();
+        }
+      }
+
+      function registerExpressionProperty(expression) {
+        if (registers.indexOf(expression) === -1) {
+          registers.push(expression);
+        }
+      }
+
+      function releaseInstances() {
+        var i;
+        var len = registers.length;
+
+        for (i = 0; i < len; i += 1) {
+          registers[i].release();
+        }
+
+        registers.length = 0;
+      }
+
+      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
+      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
+      animation.renderer.globalData.pushExpression = pushExpression;
+      animation.renderer.globalData.popExpression = popExpression;
+      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
+    }
+
+    return ob;
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+  /* eslint-disable */
+
+  /*
+   Copyright 2014 David Bau.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+   */
+  function seedRandom(pool, math) {
+    //
+    // The following constants are related to IEEE 754 limits.
+    //
+    var global = this,
+        width = 256,
+        // each RC4 output is 0 <= x < 256
+    chunks = 6,
+        // at least six RC4 outputs for each double
+    digits = 52,
+        // there are 52 significant digits in a double
+    rngname = 'random',
+        // rngname: name for Math.random and Math.seedrandom
+    startdenom = math.pow(width, chunks),
+        significance = math.pow(2, digits),
+        overflow = significance * 2,
+        mask = width - 1,
+        nodecrypto; // node.js crypto module, initialized at the bottom.
+    //
+    // seedrandom()
+    // This is the seedrandom function described above.
+    //
+
+    function seedrandom(seed, options, callback) {
+      var key = [];
+      options = options === true ? {
+        entropy: true
+      } : options || {}; // Flatten the seed string or build one from local entropy if needed.
+
+      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.
+
+      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains
+      // randomness in every bit of the mantissa of the IEEE 754 value.
+
+      var prng = function prng() {
+        var n = arc4.g(chunks),
+            // Start with a numerator n < 2 ^ 48
+        d = startdenom,
+            //   and denominator d = 2 ^ 48.
+        x = 0; //   and no 'extra last byte'.
+
+        while (n < significance) {
+          // Fill up all significant digits by
+          n = (n + x) * width; //   shifting numerator and
+
+          d *= width; //   denominator and generating a
+
+          x = arc4.g(1); //   new least-significant-byte.
+        }
+
+        while (n >= overflow) {
+          // To avoid rounding up, before adding
+          n /= 2; //   last byte, shift everything
+
+          d /= 2; //   right using integer math until
+
+          x >>>= 1; //   we have exactly the desired bits.
+        }
+
+        return (n + x) / d; // Form the number within [0, 1).
+      };
+
+      prng.int32 = function () {
+        return arc4.g(4) | 0;
+      };
+
+      prng.quick = function () {
+        return arc4.g(4) / 0x100000000;
+      };
+
+      prng["double"] = prng; // Mix the randomness into accumulated entropy.
+
+      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.
+
+      return (options.pass || callback || function (prng, seed, is_math_call, state) {
+        if (state) {
+          // Load the arc4 state from the given state if it has an S array.
+          if (state.S) {
+            copy(state, arc4);
+          } // Only provide the .state method if requested via options.state.
+
+
+          prng.state = function () {
+            return copy(arc4, {});
+          };
+        } // If called as a method of Math (Math.seedrandom()), mutate
+        // Math.random because that is how seedrandom.js has worked since v1.0.
+
+
+        if (is_math_call) {
+          math[rngname] = prng;
+          return seed;
+        } // Otherwise, it is a newer calling convention, so return the
+        // prng directly.
+        else return prng;
+      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);
+    }
+
+    math['seed' + rngname] = seedrandom; //
+    // ARC4
+    //
+    // An ARC4 implementation.  The constructor takes a key in the form of
+    // an array of at most (width) integers that should be 0 <= x < (width).
+    //
+    // The g(count) method returns a pseudorandom integer that concatenates
+    // the next (count) outputs from ARC4.  Its return value is a number x
+    // that is in the range 0 <= x < (width ^ count).
+    //
+
+    function ARC4(key) {
+      var t,
+          keylen = key.length,
+          me = this,
+          i = 0,
+          j = me.i = me.j = 0,
+          s = me.S = []; // The empty key [] is treated as [0].
+
+      if (!keylen) {
+        key = [keylen++];
+      } // Set up S using the standard key scheduling algorithm.
+
+
+      while (i < width) {
+        s[i] = i++;
+      }
+
+      for (i = 0; i < width; i++) {
+        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
+        s[j] = t;
+      } // The "g" method returns the next (count) outputs as one number.
+
+
+      me.g = function (count) {
+        // Using instance members instead of closure state nearly doubles speed.
+        var t,
+            r = 0,
+            i = me.i,
+            j = me.j,
+            s = me.S;
+
+        while (count--) {
+          t = s[i = mask & i + 1];
+          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];
+        }
+
+        me.i = i;
+        me.j = j;
+        return r; // For robust unpredictability, the function call below automatically
+        // discards an initial batch of values.  This is called RC4-drop[256].
+        // See http://google.com/search?q=rsa+fluhrer+response&btnI
+      };
+    } //
+    // copy()
+    // Copies internal state of ARC4 to or from a plain object.
+    //
+
+
+    function copy(f, t) {
+      t.i = f.i;
+      t.j = f.j;
+      t.S = f.S.slice();
+      return t;
+    } //
+    // flatten()
+    // Converts an object tree to nested arrays of strings.
+    //
+
+
+    function flatten(obj, depth) {
+      var result = [],
+          typ = _typeof$1(obj),
+          prop;
+
+      if (depth && typ == 'object') {
+        for (prop in obj) {
+          try {
+            result.push(flatten(obj[prop], depth - 1));
+          } catch (e) {}
+        }
+      }
+
+      return result.length ? result : typ == 'string' ? obj : obj + '\0';
+    } //
+    // mixkey()
+    // Mixes a string seed into a key that is an array of integers, and
+    // returns a shortened string seed that is equivalent to the result key.
+    //
+
+
+    function mixkey(seed, key) {
+      var stringseed = seed + '',
+          smear,
+          j = 0;
+
+      while (j < stringseed.length) {
+        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
+      }
+
+      return tostring(key);
+    } //
+    // autoseed()
+    // Returns an object for autoseeding, using window.crypto and Node crypto
+    // module if available.
+    //
+
+
+    function autoseed() {
+      try {
+        if (nodecrypto) {
+          return tostring(nodecrypto.randomBytes(width));
+        }
+
+        var out = new Uint8Array(width);
+        (global.crypto || global.msCrypto).getRandomValues(out);
+        return tostring(out);
+      } catch (e) {
+        var browser = global.navigator,
+            plugins = browser && browser.plugins;
+        return [+new Date(), global, plugins, global.screen, tostring(pool)];
+      }
+    } //
+    // tostring()
+    // Converts an array of charcodes to a string
+    //
+
+
+    function tostring(a) {
+      return String.fromCharCode.apply(0, a);
+    } //
+    // When seedrandom.js is loaded, we immediately mix a few bits
+    // from the built-in RNG into the entropy pool.  Because we do
+    // not want to interfere with deterministic PRNG state later,
+    // seedrandom will not call math.random on its own again after
+    // initialization.
+    //
+
+
+    mixkey(math.random(), pool); //
+    // Nodejs and AMD support: export the implementation as a module using
+    // either convention.
+    //
+    // End anonymous scope, and pass initial values.
+  }
+
+  ;
+
+  function initialize$2(BMMath) {
+    seedRandom([], BMMath);
+  }
+
+  var propTypes = {
+    SHAPE: 'shape'
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var ExpressionManager = function () {
+    'use strict';
+
+    var ob = {};
+    var Math = BMMath;
+    var window = null;
+    var document = null;
+    var XMLHttpRequest = null;
+    var fetch = null;
+    var frames = null;
+    initialize$2(BMMath);
+
+    function $bm_isInstanceOfArray(arr) {
+      return arr.constructor === Array || arr.constructor === Float32Array;
+    }
+
+    function isNumerable(tOfV, v) {
+      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
+    }
+
+    function $bm_neg(a) {
+      var tOfA = _typeof(a);
+
+      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
+        return -a;
+      }
+
+      if ($bm_isInstanceOfArray(a)) {
+        var i;
+        var lenA = a.length;
+        var retArr = [];
+
+        for (i = 0; i < lenA; i += 1) {
+          retArr[i] = -a[i];
+        }
+
+        return retArr;
+      }
+
+      if (a.propType) {
+        return a.v;
+      }
+
+      return -a;
+    }
+
+    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
+    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
+    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
+
+    function sum(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (tOfA === 'string' || tOfB === 'string') {
+        return a + b;
+      }
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a + b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] += b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a + b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] + b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    var add = sum;
+
+    function sub(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        if (tOfA === 'string') {
+          a = parseInt(a, 10);
+        }
+
+        if (tOfB === 'string') {
+          b = parseInt(b, 10);
+        }
+
+        return a - b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] -= b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a - b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] - b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    function mul(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a * b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] * b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a * b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function div(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a / b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] / b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a / b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function mod(a, b) {
+      if (typeof a === 'string') {
+        a = parseInt(a, 10);
+      }
+
+      if (typeof b === 'string') {
+        b = parseInt(b, 10);
+      }
+
+      return a % b;
+    }
+
+    var $bm_sum = sum;
+    var $bm_sub = sub;
+    var $bm_mul = mul;
+    var $bm_div = div;
+    var $bm_mod = mod;
+
+    function clamp(num, min, max) {
+      if (min > max) {
+        var mm = max;
+        max = min;
+        min = mm;
+      }
+
+      return Math.min(Math.max(num, min), max);
+    }
+
+    function radiansToDegrees(val) {
+      return val / degToRads;
+    }
+
+    var radians_to_degrees = radiansToDegrees;
+
+    function degreesToRadians(val) {
+      return val * degToRads;
+    }
+
+    var degrees_to_radians = radiansToDegrees;
+    var helperLengthArray = [0, 0, 0, 0, 0, 0];
+
+    function length(arr1, arr2) {
+      if (typeof arr1 === 'number' || arr1 instanceof Number) {
+        arr2 = arr2 || 0;
+        return Math.abs(arr1 - arr2);
+      }
+
+      if (!arr2) {
+        arr2 = helperLengthArray;
+      }
+
+      var i;
+      var len = Math.min(arr1.length, arr2.length);
+      var addedLength = 0;
+
+      for (i = 0; i < len; i += 1) {
+        addedLength += Math.pow(arr2[i] - arr1[i], 2);
+      }
+
+      return Math.sqrt(addedLength);
+    }
+
+    function normalize(vec) {
+      return div(vec, length(vec));
+    }
+
+    function rgbToHsl(val) {
+      var r = val[0];
+      var g = val[1];
+      var b = val[2];
+      var max = Math.max(r, g, b);
+      var min = Math.min(r, g, b);
+      var h;
+      var s;
+      var l = (max + min) / 2;
+
+      if (max === min) {
+        h = 0; // achromatic
+
+        s = 0; // achromatic
+      } else {
+        var d = max - min;
+        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+
+        switch (max) {
+          case r:
+            h = (g - b) / d + (g < b ? 6 : 0);
+            break;
+
+          case g:
+            h = (b - r) / d + 2;
+            break;
+
+          case b:
+            h = (r - g) / d + 4;
+            break;
+
+          default:
+            break;
+        }
+
+        h /= 6;
+      }
+
+      return [h, s, l, val[3]];
+    }
+
+    function hue2rgb(p, q, t) {
+      if (t < 0) t += 1;
+      if (t > 1) t -= 1;
+      if (t < 1 / 6) return p + (q - p) * 6 * t;
+      if (t < 1 / 2) return q;
+      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+      return p;
+    }
+
+    function hslToRgb(val) {
+      var h = val[0];
+      var s = val[1];
+      var l = val[2];
+      var r;
+      var g;
+      var b;
+
+      if (s === 0) {
+        r = l; // achromatic
+
+        b = l; // achromatic
+
+        g = l; // achromatic
+      } else {
+        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+        var p = 2 * l - q;
+        r = hue2rgb(p, q, h + 1 / 3);
+        g = hue2rgb(p, q, h);
+        b = hue2rgb(p, q, h - 1 / 3);
+      }
+
+      return [r, g, b, val[3]];
+    }
+
+    function linear(t, tMin, tMax, value1, value2) {
+      if (value1 === undefined || value2 === undefined) {
+        value1 = tMin;
+        value2 = tMax;
+        tMin = 0;
+        tMax = 1;
+      }
+
+      if (tMax < tMin) {
+        var _tMin = tMax;
+        tMax = tMin;
+        tMin = _tMin;
+      }
+
+      if (t <= tMin) {
+        return value1;
+      }
+
+      if (t >= tMax) {
+        return value2;
+      }
+
+      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
+
+      if (!value1.length) {
+        return value1 + (value2 - value1) * perc;
+      }
+
+      var i;
+      var len = value1.length;
+      var arr = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
+      }
+
+      return arr;
+    }
+
+    function random(min, max) {
+      if (max === undefined) {
+        if (min === undefined) {
+          min = 0;
+          max = 1;
+        } else {
+          max = min;
+          min = undefined;
+        }
+      }
+
+      if (max.length) {
+        var i;
+        var len = max.length;
+
+        if (!min) {
+          min = createTypedArray('float32', len);
+        }
+
+        var arr = createTypedArray('float32', len);
+        var rnd = BMMath.random();
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = min[i] + rnd * (max[i] - min[i]);
+        }
+
+        return arr;
+      }
+
+      if (min === undefined) {
+        min = 0;
+      }
+
+      var rndm = BMMath.random();
+      return min + rndm * (max - min);
+    }
+
+    function createPath(points, inTangents, outTangents, closed) {
+      var i;
+      var len = points.length;
+      var path = shapePool.newElement();
+      path.setPathData(!!closed, len);
+      var arrPlaceholder = [0, 0];
+      var inVertexPoint;
+      var outVertexPoint;
+
+      for (i = 0; i < len; i += 1) {
+        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
+        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
+        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);
+      }
+
+      return path;
+    }
+
+    function initiateExpression(elem, data, property) {
+      var val = data.x;
+      var needsVelocity = /velocity(?![\w\d])/.test(val);
+
+      var _needsRandom = val.indexOf('random') !== -1;
+
+      var elemType = elem.data.ty;
+      var transform;
+      var $bm_transform;
+      var content;
+      var effect;
+      var thisProperty = property;
+      thisProperty.valueAtTime = thisProperty.getValueAtTime;
+      Object.defineProperty(thisProperty, 'value', {
+        get: function get() {
+          return thisProperty.v;
+        }
+      });
+      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
+      elem.comp.displayStartTime = 0;
+      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      var outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      var width = elem.data.sw ? elem.data.sw : 0;
+      var height = elem.data.sh ? elem.data.sh : 0;
+      var name = elem.data.nm;
+      var loopIn;
+      var loop_in;
+      var loopOut;
+      var loop_out;
+      var smooth;
+      var toWorld;
+      var fromWorld;
+      var fromComp;
+      var toComp;
+      var fromCompToSurface;
+      var position;
+      var rotation;
+      var anchorPoint;
+      var scale;
+      var thisLayer;
+      var thisComp;
+      var mask;
+      var valueAtTime;
+      var velocityAtTime;
+      var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
+
+      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
+
+      var numKeys = property.kf ? data.k.length : 0;
+      var active = !this.data || this.data.hd !== true;
+
+      var wiggle = function wiggle(freq, amp) {
+        var iWiggle;
+        var j;
+        var lenWiggle = this.pv.length ? this.pv.length : 1;
+        var addedAmps = createTypedArray('float32', lenWiggle);
+        freq = 5;
+        var iterations = Math.floor(time * freq);
+        iWiggle = 0;
+        j = 0;
+
+        while (iWiggle < iterations) {
+          // var rnd = BMMath.random();
+          for (j = 0; j < lenWiggle; j += 1) {
+            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;
+          }
+
+          iWiggle += 1;
+        } // var rnd2 = BMMath.random();
+
+
+        var periods = time * freq;
+        var perc = periods - Math.floor(periods);
+        var arr = createTypedArray('float32', lenWiggle);
+
+        if (lenWiggle > 1) {
+          for (j = 0; j < lenWiggle; j += 1) {
+            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
+            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
+          }
+
+          return arr;
+        }
+
+        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
+      }.bind(this);
+
+      if (thisProperty.loopIn) {
+        loopIn = thisProperty.loopIn.bind(thisProperty);
+        loop_in = loopIn;
+      }
+
+      if (thisProperty.loopOut) {
+        loopOut = thisProperty.loopOut.bind(thisProperty);
+        loop_out = loopOut;
+      }
+
+      if (thisProperty.smooth) {
+        smooth = thisProperty.smooth.bind(thisProperty);
+      }
+
+      function loopInDuration(type, duration) {
+        return loopIn(type, duration, true);
+      }
+
+      function loopOutDuration(type, duration) {
+        return loopOut(type, duration, true);
+      }
+
+      if (this.getValueAtTime) {
+        valueAtTime = this.getValueAtTime.bind(this);
+      }
+
+      if (this.getVelocityAtTime) {
+        velocityAtTime = this.getVelocityAtTime.bind(this);
+      }
+
+      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
+
+      function lookAt(elem1, elem2) {
+        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
+        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
+        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
+        return [yaw, pitch, 0];
+      }
+
+      function easeOut(t, tMin, tMax, val1, val2) {
+        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function easeIn(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInBez, t, tMin, tMax, val1, val2);
+      }
+
+      function ease(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function applyEase(fn, t, tMin, tMax, val1, val2) {
+        if (val1 === undefined) {
+          val1 = tMin;
+          val2 = tMax;
+        } else {
+          t = (t - tMin) / (tMax - tMin);
+        }
+
+        if (t > 1) {
+          t = 1;
+        } else if (t < 0) {
+          t = 0;
+        }
+
+        var mult = fn(t);
+
+        if ($bm_isInstanceOfArray(val1)) {
+          var iKey;
+          var lenKey = val1.length;
+          var arr = createTypedArray('float32', lenKey);
+
+          for (iKey = 0; iKey < lenKey; iKey += 1) {
+            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
+          }
+
+          return arr;
+        }
+
+        return (val2 - val1) * mult + val1;
+      }
+
+      function nearestKey(time) {
+        var iKey;
+        var lenKey = data.k.length;
+        var index;
+        var keyTime;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          index = 0;
+          keyTime = 0;
+        } else {
+          index = -1;
+          time *= elem.comp.globalData.frameRate;
+
+          if (time < data.k[0].t) {
+            index = 1;
+            keyTime = data.k[0].t;
+          } else {
+            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
+              if (time === data.k[iKey].t) {
+                index = iKey + 1;
+                keyTime = data.k[iKey].t;
+                break;
+              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
+                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
+                  index = iKey + 2;
+                  keyTime = data.k[iKey + 1].t;
+                } else {
+                  index = iKey + 1;
+                  keyTime = data.k[iKey].t;
+                }
+
+                break;
+              }
+            }
+
+            if (index === -1) {
+              index = iKey + 1;
+              keyTime = data.k[iKey].t;
+            }
+          }
+        }
+
+        var obKey = {};
+        obKey.index = index;
+        obKey.time = keyTime / elem.comp.globalData.frameRate;
+        return obKey;
+      }
+
+      function key(ind) {
+        var obKey;
+        var iKey;
+        var lenKey;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          throw new Error('The property has no keyframe at index ' + ind);
+        }
+
+        ind -= 1;
+        obKey = {
+          time: data.k[ind].t / elem.comp.globalData.frameRate,
+          value: []
+        };
+        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
+        lenKey = arr.length;
+
+        for (iKey = 0; iKey < lenKey; iKey += 1) {
+          obKey[iKey] = arr[iKey];
+          obKey.value[iKey] = arr[iKey];
+        }
+
+        return obKey;
+      }
+
+      function framesToTime(fr, fps) {
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return fr / fps;
+      }
+
+      function timeToFrames(t, fps) {
+        if (!t && t !== 0) {
+          t = time;
+        }
+
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return t * fps;
+      }
+
+      function seedRandom(seed) {
+        BMMath.seedrandom(randSeed + seed);
+      }
+
+      function sourceRectAtTime() {
+        return elem.sourceRectAtTime();
+      }
+
+      function substring(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substring(init);
+          }
+
+          return value.substring(init, end);
+        }
+
+        return '';
+      }
+
+      function substr(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substr(init);
+          }
+
+          return value.substr(init, end);
+        }
+
+        return '';
+      }
+
+      function posterizeTime(framesPerSecond) {
+        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
+        value = valueAtTime(time);
+      }
+
+      var time;
+      var velocity;
+      var value;
+      var text;
+      var textIndex;
+      var textTotal;
+      var selectorValue;
+      var index = elem.data.ind;
+      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+      var parent;
+      var randSeed = Math.floor(Math.random() * 1000000);
+      var globalData = elem.globalData;
+
+      function executeExpression(_value) {
+        // globalData.pushExpression();
+        value = _value;
+
+        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
+          return value;
+        }
+
+        if (this.propType === 'textSelector') {
+          textIndex = this.textIndex;
+          textTotal = this.textTotal;
+          selectorValue = this.selectorValue;
+        }
+
+        if (!thisLayer) {
+          text = elem.layerInterface.text;
+          thisLayer = elem.layerInterface;
+          thisComp = elem.comp.compInterface;
+          toWorld = thisLayer.toWorld.bind(thisLayer);
+          fromWorld = thisLayer.fromWorld.bind(thisLayer);
+          fromComp = thisLayer.fromComp.bind(thisLayer);
+          toComp = thisLayer.toComp.bind(thisLayer);
+          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
+          fromCompToSurface = fromComp;
+        }
+
+        if (!transform) {
+          transform = elem.layerInterface('ADBE Transform Group');
+          $bm_transform = transform;
+
+          if (transform) {
+            anchorPoint = transform.anchorPoint;
+            /* position = transform.position;
+                      rotation = transform.rotation;
+                      scale = transform.scale; */
+          }
+        }
+
+        if (elemType === 4 && !content) {
+          content = thisLayer('ADBE Root Vectors Group');
+        }
+
+        if (!effect) {
+          effect = thisLayer(4);
+        }
+
+        hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+
+        if (hasParent && !parent) {
+          parent = elem.hierarchy[0].layerInterface;
+        }
+
+        time = this.comp.renderedFrame / this.comp.globalData.frameRate;
+
+        if (_needsRandom) {
+          seedRandom(randSeed + time);
+        }
+
+        if (needsVelocity) {
+          velocity = velocityAtTime(time);
+        }
+
+        expression_function();
+        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value
+        // Changed this to a ternary operation because Rollup failed compiling it correctly
+
+        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;
+        return scoped_bm_rt;
+      } // Bundlers will see these as dead code and unless we reference them
+
+
+      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
+      return executeExpression;
+    }
+
+    ob.initiateExpression = initiateExpression;
+    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
+    return ob;
+  }();
+
+  var expressionHelpers = function () {
+    function searchExpressions(elem, data, prop) {
+      if (data.x) {
+        prop.k = true;
+        prop.x = true;
+        prop.initiateExpression = ExpressionManager.initiateExpression;
+        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
+      }
+    }
+
+    function getValueAtTime(frameNum) {
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastFrame) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
+        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
+        this._cachingAtTime.lastFrame = frameNum;
+      }
+
+      return this._cachingAtTime.value;
+    }
+
+    function getSpeedAtTime(frameNum) {
+      var delta = -0.01;
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var speed = 0;
+
+      if (v1.length) {
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          speed += Math.pow(v2[i] - v1[i], 2);
+        }
+
+        speed = Math.sqrt(speed) * 100;
+      } else {
+        speed = 0;
+      }
+
+      return speed;
+    }
+
+    function getVelocityAtTime(frameNum) {
+      if (this.vel !== undefined) {
+        return this.vel;
+      }
+
+      var delta = -0.001; // frameNum += this.elem.data.st;
+
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var velocity;
+
+      if (v1.length) {
+        velocity = createTypedArray('float32', v1.length);
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          // removing frameRate
+          // if needed, don't add it here
+          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
+          velocity[i] = (v2[i] - v1[i]) / delta;
+        }
+      } else {
+        velocity = (v2 - v1) / delta;
+      }
+
+      return velocity;
+    }
+
+    function getStaticValueAtTime() {
+      return this.pv;
+    }
+
+    function setGroupProperty(propertyGroup) {
+      this.propertyGroup = propertyGroup;
+    }
+
+    return {
+      searchExpressions: searchExpressions,
+      getSpeedAtTime: getSpeedAtTime,
+      getVelocityAtTime: getVelocityAtTime,
+      getValueAtTime: getValueAtTime,
+      getStaticValueAtTime: getStaticValueAtTime,
+      setGroupProperty: setGroupProperty
+    };
+  }();
+
+  function addPropertyDecorator() {
+    function loopOut(type, duration, durationFlag) {
+      if (!this.k || !this.keyframes) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var lastKeyFrame = keyframes[keyframes.length - 1].t;
+
+      if (currentFrame <= lastKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var firstKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
+        } else {
+          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
+        }
+
+        firstKeyFrame = lastKeyFrame - cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (iterations % 2 !== 0) {
+          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+
+        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = (endV[i] - initV[i]) * repeats + current[i];
+          }
+
+          return ret;
+        }
+
+        return (endV - initV) * repeats + current;
+      } else if (type === 'continue') {
+        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(lastValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
+          }
+
+          return ret;
+        }
+
+        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);
+      }
+
+      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function loopIn(type, duration, durationFlag) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var firstKeyFrame = keyframes[0].t;
+
+      if (currentFrame >= firstKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var lastKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        lastKeyFrame = keyframes[duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
+        } else {
+          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
+        }
+
+        lastKeyFrame = firstKeyFrame + cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
+
+        if (iterations % 2 === 0) {
+          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);
+        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
+          }
+
+          return ret;
+        }
+
+        return current - (endV - initV) * repeats;
+      } else if (type === 'continue') {
+        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(firstValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;
+          }
+
+          return ret;
+        }
+
+        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;
+      }
+
+      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function smooth(width, samples) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      width = (width || 0.4) * 0.5;
+      samples = Math.floor(samples || 5);
+
+      if (samples <= 1) {
+        return this.pv;
+      }
+
+      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
+      var initFrame = currentTime - width;
+      var endFrame = currentTime + width;
+      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
+      var i = 0;
+      var j = 0;
+      var value;
+
+      if (this.pv.length) {
+        value = createTypedArray('float32', this.pv.length);
+      } else {
+        value = 0;
+      }
+
+      var sampleValue;
+
+      while (i < samples) {
+        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
+
+        if (this.pv.length) {
+          for (j = 0; j < this.pv.length; j += 1) {
+            value[j] += sampleValue[j];
+          }
+        } else {
+          value += sampleValue;
+        }
+
+        i += 1;
+      }
+
+      if (this.pv.length) {
+        for (j = 0; j < this.pv.length; j += 1) {
+          value[j] /= samples;
+        }
+      } else {
+        value /= samples;
+      }
+
+      return value;
+    }
+
+    function getTransformValueAtTime(time) {
+      if (!this._transformCachingAtTime) {
+        this._transformCachingAtTime = {
+          v: new Matrix()
+        };
+      } /// /
+
+
+      var matrix = this._transformCachingAtTime.v;
+      matrix.cloneFromProps(this.pre.props);
+
+      if (this.appliedTransformations < 1) {
+        var anchor = this.a.getValueAtTime(time);
+        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);
+      }
+
+      if (this.appliedTransformations < 2) {
+        var scale = this.s.getValueAtTime(time);
+        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);
+      }
+
+      if (this.sk && this.appliedTransformations < 3) {
+        var skew = this.sk.getValueAtTime(time);
+        var skewAxis = this.sa.getValueAtTime(time);
+        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
+      }
+
+      if (this.r && this.appliedTransformations < 4) {
+        var rotation = this.r.getValueAtTime(time);
+        matrix.rotate(-rotation * this.r.mult);
+      } else if (!this.r && this.appliedTransformations < 4) {
+        var rotationZ = this.rz.getValueAtTime(time);
+        var rotationY = this.ry.getValueAtTime(time);
+        var rotationX = this.rx.getValueAtTime(time);
+        var orientation = this.or.getValueAtTime(time);
+        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);
+      }
+
+      if (this.data.p && this.data.p.s) {
+        var positionX = this.px.getValueAtTime(time);
+        var positionY = this.py.getValueAtTime(time);
+
+        if (this.data.p.z) {
+          var positionZ = this.pz.getValueAtTime(time);
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);
+        } else {
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
+        }
+      } else {
+        var position = this.p.getValueAtTime(time);
+        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);
+      }
+
+      return matrix; /// /
+    }
+
+    function getTransformStaticValueAtTime() {
+      return this.v.clone(new Matrix());
+    }
+
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+
+    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
+      var prop = getTransformProperty(elem, data, container);
+
+      if (prop.dynamicProperties.length) {
+        prop.getValueAtTime = getTransformValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      return prop;
+    };
+
+    var propertyGetProp = PropertyFactory.getProp;
+
+    PropertyFactory.getProp = function (elem, data, type, mult, container) {
+      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;
+      // prop.loopOut = loopOut;
+      // prop.loopIn = loopIn;
+
+      if (prop.kf) {
+        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      prop.loopOut = loopOut;
+      prop.loopIn = loopIn;
+      prop.smooth = smooth;
+      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
+      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
+      prop.numKeys = data.a === 1 ? data.k.length : 0;
+      prop.propertyIndex = data.ix;
+      var value = 0;
+
+      if (type !== 0) {
+        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
+      }
+
+      prop._cachingAtTime = {
+        lastFrame: initialDefaultFrame,
+        lastIndex: 0,
+        value: value
+      };
+      expressionHelpers.searchExpressions(elem, data, prop);
+
+      if (prop.k) {
+        container.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+
+    function getShapeValueAtTime(frameNum) {
+      // For now this caching object is created only when needed instead of creating it when the shape is initialized.
+      if (!this._cachingAtTime) {
+        this._cachingAtTime = {
+          shapeValue: shapePool.clone(this.pv),
+          lastIndex: 0,
+          lastTime: initialDefaultFrame
+        };
+      }
+
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastTime) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
+        this._cachingAtTime.lastTime = frameNum;
+        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
+      }
+
+      return this._cachingAtTime.shapeValue;
+    }
+
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
+
+    function ShapeExpressions() {}
+
+    ShapeExpressions.prototype = {
+      vertices: function vertices(prop, time) {
+        if (this.k) {
+          this.getValue();
+        }
+
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        var i;
+        var len = shapePath._length;
+        var vertices = shapePath[prop];
+        var points = shapePath.v;
+        var arr = createSizedArray(len);
+
+        for (i = 0; i < len; i += 1) {
+          if (prop === 'i' || prop === 'o') {
+            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
+          } else {
+            arr[i] = [vertices[i][0], vertices[i][1]];
+          }
+        }
+
+        return arr;
+      },
+      points: function points(time) {
+        return this.vertices('v', time);
+      },
+      inTangents: function inTangents(time) {
+        return this.vertices('i', time);
+      },
+      outTangents: function outTangents(time) {
+        return this.vertices('o', time);
+      },
+      isClosed: function isClosed() {
+        return this.v.c;
+      },
+      pointOnPath: function pointOnPath(perc, time) {
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        if (!this._segmentsLength) {
+          this._segmentsLength = bez.getSegmentsLength(shapePath);
+        }
+
+        var segmentsLength = this._segmentsLength;
+        var lengths = segmentsLength.lengths;
+        var lengthPos = segmentsLength.totalLength * perc;
+        var i = 0;
+        var len = lengths.length;
+        var accumulatedLength = 0;
+        var pt;
+
+        while (i < len) {
+          if (accumulatedLength + lengths[i].addedLength > lengthPos) {
+            var initIndex = i;
+            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;
+            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
+            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
+            break;
+          } else {
+            accumulatedLength += lengths[i].addedLength;
+          }
+
+          i += 1;
+        }
+
+        if (!pt) {
+          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
+        }
+
+        return pt;
+      },
+      vectorOnPath: function vectorOnPath(perc, time, vectorType) {
+        // perc doesn't use triple equality because it can be a Number object as well as a primitive.
+        if (perc == 1) {
+          // eslint-disable-line eqeqeq
+          perc = this.v.c;
+        } else if (perc == 0) {
+          // eslint-disable-line eqeqeq
+          perc = 0.999;
+        }
+
+        var pt1 = this.pointOnPath(perc, time);
+        var pt2 = this.pointOnPath(perc + 0.001, time);
+        var xLength = pt2[0] - pt1[0];
+        var yLength = pt2[1] - pt1[1];
+        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
+
+        if (magnitude === 0) {
+          return [0, 0];
+        }
+
+        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
+        return unitVector;
+      },
+      tangentOnPath: function tangentOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'tangent');
+      },
+      normalOnPath: function normalOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'normal');
+      },
+      setGroupProperty: expressionHelpers.setGroupProperty,
+      getValueAtTime: expressionHelpers.getStaticValueAtTime
+    };
+    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
+    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+
+    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
+      var prop = propertyGetShapeProp(elem, data, type, arr, trims);
+      prop.propertyIndex = data.ix;
+      prop.lock = false;
+
+      if (type === 3) {
+        expressionHelpers.searchExpressions(elem, data.pt, prop);
+      } else if (type === 4) {
+        expressionHelpers.searchExpressions(elem, data.ks, prop);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+  }
+
+  function initialize$1() {
+    addPropertyDecorator();
+  }
+
+  function addDecorator() {
+    function searchExpressions() {
+      if (this.data.d.x) {
+        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
+        this.addEffect(this.getExpressionValue.bind(this));
+        return true;
+      }
+
+      return null;
+    }
+
+    TextProperty.prototype.getExpressionValue = function (currentValue, text) {
+      var newValue = this.calculateExpression(text);
+
+      if (currentValue.t !== newValue) {
+        var newData = {};
+        this.copyData(newData, currentValue);
+        newData.t = newValue.toString();
+        newData.__complete = false;
+        return newData;
+      }
+
+      return currentValue;
+    };
+
+    TextProperty.prototype.searchProperty = function () {
+      var isKeyframed = this.searchKeyframes();
+      var hasExpressions = this.searchExpressions();
+      this.kf = isKeyframed || hasExpressions;
+      return this.kf;
+    };
+
+    TextProperty.prototype.searchExpressions = searchExpressions;
+  }
+
+  function initialize() {
+    addDecorator();
+  }
+
+  setExpressionsPlugin(Expressions);
+  initialize$1();
+  initialize();
+  registerEffect(20, SVGTintFilter, true);
+  registerEffect(21, SVGFillFilter, true);
+  registerEffect(22, SVGStrokeEffect, false);
+  registerEffect(23, SVGTritoneFilter, true);
+  registerEffect(24, SVGProLevelsFilter, true);
+  registerEffect(25, SVGDropShadowEffect, true);
+  registerEffect(28, SVGMatte3Effect, false);
+  registerEffect(29, SVGGaussianBlurEffect, true);
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie_html.min.js b/build/player/lottie_html.min.js
index 5a3d044..133f12a 100644
--- a/build/player/lottie_html.min.js
+++ b/build/player/lottie_html.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,_useWebWorker=!1,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["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"],i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,i=createSizedArray(t.length),r=t.length;for(e=0;e<r;e+=1)i[e]=Math.abs(t[e]);return i}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bmRnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,i,r){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=r<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,i,r){this.type=t,this.currentLoop=i,this.totalLoops=e,this.direction=r<0?-1:1}function BMSegmentStartEvent(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}roundValues(!1);var createElementID=(F=0,function(){return idPrefix+"__lottie_element_"+(F+=1)}),F;function HSVtoRGB(t,e,i){var r,s,a,n,o,h,l,p;switch(h=i*(1-e),l=i*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=i*(1-(1-o)*e),n%6){case 0:r=i,s=p,a=h;break;case 1:r=l,s=i,a=h;break;case 2:r=h,s=i,a=p;break;case 3:r=h,s=l,a=i;break;case 4:r=p,s=h,a=i;break;case 5:r=i,s=h,a=l}return[r,s,a]}function RGBtoHSV(t,e,i){var r,s=Math.max(t,e,i),a=Math.min(t,e,i),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:r=0;break;case t:r=e-i+n*(e<i?6:0),r/=6*n;break;case e:r=i-t+2*n,r/=6*n;break;case i:r=t-e+4*n,r/=6*n}return[r,o,h]}function addSaturationToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[1]+=e,1<i[1]?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,1<i[2]?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,1<i[0]?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var i=this._cbs[t],r=0;r<i.length;r+=1)i[r](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var i=0,r=this._cbs[t].length;i<r;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,r-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function i(t,e){var i,r=0,s=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(r=0;r<e;r+=1)s.push(i);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):i(t,e)}:i}();function createSizedArray(t){return Array.apply(null,{length:t})}function createNS(t){return document.createElementNS(svgNS,t)}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var getBlendMode=(Oa={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Oa[t]||""}),Oa,lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"},Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,r=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function i(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var i=s(e),r=a(e);return this._t(i,r,0,0,-r,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function m(t,e,i){return i||0===i||(i=1),1===t&&1===e&&1===i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function c(t,e,i,r,s,a,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=r,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function u(t,e,i,r,s,a,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===i&&0===r&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],E=y[4],x=y[5],S=y[6],A=y[7],_=y[8],k=y[9],T=y[10],M=y[11],C=y[12],D=y[13],F=y[14],I=y[15];return y[0]=g*t+v*s+b*h+P*m,y[1]=g*e+v*a+b*l+P*c,y[2]=g*i+v*n+b*p+P*d,y[3]=g*r+v*o+b*f+P*u,y[4]=E*t+x*s+S*h+A*m,y[5]=E*e+x*a+S*l+A*c,y[6]=E*i+x*n+S*p+A*d,y[7]=E*r+x*o+S*f+A*u,y[8]=_*t+k*s+T*h+M*m,y[9]=_*e+k*a+T*l+M*c,y[10]=_*i+k*n+T*p+M*d,y[11]=_*r+k*o+T*f+M*u,y[12]=C*t+D*s+F*h+I*m,y[13]=C*e+D*a+F*l+I*c,y[14]=C*i+D*n+F*p+I*d,y[15]=C*r+D*o+F*f+I*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function E(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function x(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function S(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function A(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,i=-this.props[1]/t,r=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=i,o.props[4]=r,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function _(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function k(t){var e,i=t.length,r=[];for(e=0;e<i;e+=1)r[e]=_(t[e]);return r}function T(t,e,i){var r=createTypedArray("float32",6);if(this.isIdentity())r[0]=t[0],r[1]=t[1],r[2]=e[0],r[3]=e[1],r[4]=i[0],r[5]=i[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];r[0]=t[0]*s+t[1]*n+h,r[1]=t[0]*a+t[1]*o+l,r[2]=e[0]*s+e[1]*n+h,r[3]=e[0]*a+e[1]*o+l,r[4]=i[0]*s+i[1]*n+h,r[5]=i[0]*a+i[1]*o+l}return r}function M(t,e,i){return this.isIdentity()?[t,e,i]:[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function C(t,e){if(this.isIdentity())return t+","+e;var i=this.props;return Math.round(100*(t*i[0]+e*i[4]+i[12]))/100+","+Math.round(100*(t*i[1]+e*i[5]+i[13]))/100}function D(){for(var t=0,e=this.props,i="matrix3d(";t<16;)i+=r(1e4*e[t])/1e4,i+=15===t?")":",",t+=1;return i}function F(t){return t<1e-6&&0<t||-1e-6<t&&t<0?r(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=i,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=E,this.applyToY=x,this.applyToZ=S,this.applyToPointArray=M,this.applyToTriplePoints=T,this.applyToPointStringified=C,this.toCSS=D,this.to2dCSS=I,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=k,this.inversePoint=_,this.getInverseMatrix=A,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var l,p=this,f=256,m=6,c="random",d=h.pow(f,m),u=h.pow(2,52),y=2*u,g=f-1;function v(t){var e,i=t.length,n=this,r=0,s=n.i=n.j=0,a=n.S=[];for(i||(t=[i++]);r<f;)a[r]=r++;for(r=0;r<f;r++)a[r]=a[s=g&s+t[r%i]+(e=a[r])],a[s]=e;n.g=function(t){for(var e,i=0,r=n.i,s=n.j,a=n.S;t--;)e=a[r=g&r+1],i=i*f+a[g&(a[r]=a[s=g&s+e])+(a[s]=e)];return n.i=r,n.j=s,i}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function P(t,e){for(var i,r=t+"",s=0;s<r.length;)e[g&s]=g&(i^=19*e[g&s])+r.charCodeAt(s++);return E(e)}function E(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,i){var r=[],s=P(function t(e,i){var r,s=[],a=typeof e;if(i&&"object"==a)for(r in e)try{s.push(t(e[r],i-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,E(o)]:null===t?function(){try{if(l)return E(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),E(t)}catch(t){var e=p.navigator,i=e&&e.plugins;return[+new Date,p,i,p.screen,E(o)]}}():t,3),r),a=new v(r),n=function(){for(var t=a.g(m),e=d,i=0;t<u;)t=(t+i)*f,e*=f,i=a.g(1);for(;y<=t;)t/=2,e/=2,i>>>=1;return(t+i)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,P(E(a.S),o),(e.pass||i||function(t,e,i,r){return r&&(r.S&&b(r,a),t.state=function(){return b(a,{})}),i?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},P(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,i,r,s){var a=s||("bez_"+t+"_"+e+"_"+i+"_"+r).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,i,r]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function r(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function f(t,e,i){return((r(e,i)*t+s(e,i))*t+a(e))*t}function m(t,e,i){return 3*r(e,i)*t*t+2*s(e,i)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],i=this._p[1],r=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===i&&r===s?t:0===t?0:1===t?1:f(this._getTForX(t),i,s)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],r=this._p[3];this._precomputed=!0,t===e&&i===r||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<l;++i)this._mSampleValues[i]=f(i*p,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],r=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&r[a]<=t;++a)s+=p;var o=s+(t-r[--a])/(r[a+1]-r[a])*p,h=m(o,e,i);return.001<=h?function(t,e,i,r){for(var s=0;s<4;++s){var a=m(e,i,r);if(0===a)return e;e-=(f(e,i,r)-t)/a}return e}(t,o,e,i):0===h?o:function(t,e,i,r,s){for(var a,n,o=0;0<(a=f(n=e+(i-e)/2,r,s)-t)?i=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,i)}},t}();function extendPrototype(t,e){var i,r,s=t.length;for(i=0;i<s;i+=1)for(var a in r=t[i].prototype)Object.prototype.hasOwnProperty.call(r,a)&&(e.prototype[a]=r[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){var C=Math;function y(t,e,i,r,s,a){var n=t*r+e*s+i*a-s*r-a*t-i*e;return-.001<n&&n<.001}var p=function(t,e,i,r){var s,a,n,o,h,l,p=defaultCurveSegments,f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=i.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*i[a]+3*(1-h)*bmPow(h,2)*r[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=f}return d.addedLength=f,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,i,r){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+i[0]+"_"+i[1]+"_"+r[0]+"_"+r[1]).replace(/\./g,"p");if(!b[s]){var a,n,o,h,l,p,f,m=defaultCurveSegments,c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+i[0],t[1]+i[1])&&y(t[0],t[1],e[0],e[1],e[0]+r[0],e[1]+r[1])&&(m=2);var u=new g(m);for(o=i.length,a=0;a<m;a+=1){for(f=createSizedArray(o),l=a/(m-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+i[n])+3*(1-l)*bmPow(l,2)*(e[n]+r[n])+bmPow(l,3)*e[n],f[n]=h,null!==d&&(p+=bmPow(f[n]-d[n],2));c+=p=bmSqrt(p),u.points[a]=new v(p,f),d=f}u.segmentLength=c,b[s]=u}return b[s]});function D(t,e){var i=e.percents,r=e.lengths,s=i.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===r[a])return i[a];for(var h=r[a]>n?-1:1,l=!0;l;)if(r[a]<=n&&r[a+1]>n?(o=(n-r[a])/(r[a+1]-r[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var F=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),r=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=i.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return r&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),i.totalLength=l,i},getNewSegment:function(t,e,i,r,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=D(s,n),l=D(a=1<a?1:a,n),p=t.length,f=1-h,m=1-l,c=f*f*f,d=h*f*f*3,u=h*h*f*3,y=h*h*h,g=f*f*m,v=h*f*m+f*h*m+f*f*l,b=h*h*m+f*h*l+h*f*l,P=h*h*l,E=f*m*m,x=h*m*m+f*l*m+f*m*l,S=h*l*m+f*l*l+h*m*l,A=h*l*l,_=m*m*m,k=l*m*m+m*l*m+m*m*l,T=l*l*m+m*l*l+l*m*l,M=l*l*l;for(o=0;o<p;o+=1)F[4*o]=C.round(1e3*(c*t[o]+d*i[o]+u*r[o]+y*e[o]))/1e3,F[4*o+1]=C.round(1e3*(g*t[o]+v*i[o]+b*r[o]+P*e[o]))/1e3,F[4*o+2]=C.round(1e3*(E*t[o]+x*i[o]+S*r[o]+A*e[o]))/1e3,F[4*o+3]=C.round(1e3*(_*t[o]+k*i[o]+T*r[o]+M*e[o]))/1e3;return F},getPointInSegment:function(t,e,i,r,s,a){var n=D(s,a),o=1-n;return[C.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*i[0]+(n*n*o+o*n*n+n*o*n)*r[0]+n*n*n*e[0]))/1e3,C.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*i[1]+(n*n*o+o*n*n+n*o*n)*r[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,i,r,s,a,n,o,h){if(0===i&&0===a&&0===h)return y(t,e,r,s,n,o);var l,p=C.sqrt(C.pow(r-t,2)+C.pow(s-e,2)+C.pow(a-i,2)),f=C.sqrt(C.pow(n-t,2)+C.pow(o-e,2)+C.pow(h-i,2)),m=C.sqrt(C.pow(n-r,2)+C.pow(o-s,2)+C.pow(h-a,2));return-1e-4<(l=f<p?m<p?p-f-m:m-f-p:f<m?m-f-p:f-p-m)&&l<1e-4}}}!function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-s)),r=setTimeout(function(){t(e+i)},i);return s=e+i,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=function(){var r,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){r({data:t})}},i={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&_useWebWorker){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),i=URL.createObjectURL(e);return new Worker(i)}return r=t,o}(function(e){if(i.dataManager||(i.dataManager=function(){function f(t,e){var i,r,s,a,n,o,h,l=t.length;for(r=0;r<l;r+=1)if("ks"in(i=t[r])&&!i.completed){if(i.completed=!0,i.tt&&(t[r-1].td=i.tt),i.hasMask){var p=i.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)d(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&d(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&d(p[s].pt.k[n].e[0])}0===i.ty?(i.layers=m(i.refId,e),f(i.layers,e)):4===i.ty?c(i.shapes):5===i.ty&&(0!==(h=i).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function m(t,e){for(var i=0,r=e.length;i<r;){if(e[i].id===t)return e[i].layers.__used?JSON.parse(JSON.stringify(e[i].layers)):(e[i].layers.__used=!0,e[i].layers);i+=1}return null}function c(t){var e,i,r;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(r=t[e].ks.k.length,i=0;i<r;i+=1)t[e].ks.k[i].s&&d(t[e].ks.k[i].s[0]),t[e].ks.k[i].e&&d(t[e].ks.k[i].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,i=t.i.length;for(e=0;e<i;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var h,e=function(){var r=[4,4,14];function s(t){var e,i,r,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=t[e],r=i.t.d,i.t.d={k:[{s:r,t:0}]})}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),i=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,i,r,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(r=(a=t.chars[e].data.shapes[0].it).length,i=0;i<r;i+=1)(s=a[i].ks.k).__converted||(d(a[i].ks.k),s.__converted=!0)}}),r=function(){var r=[5,7,15];function s(t){var e,i,r,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=t[e],r=void 0,"number"==typeof(r=i.t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),s=function(){var r=[4,1,9];function a(t){var e,i,r,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(r=t[e].c.k.length,i=0;i<r;i+=1)t[e].c.k[i].s&&(t[e].c.k[i].s[0]/=255,t[e].c.k[i].s[1]/=255,t[e].c.k[i].s[2]/=255,t[e].c.k[i].s[3]/=255),t[e].c.k[i].e&&(t[e].c.k[i].e[0]/=255,t[e].c.k[i].e[1]/=255,t[e].c.k[i].e[2]/=255,t[e].c.k[i].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,i=t.length;for(e=0;e<i;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var r=[4,4,18];function l(t){var e,i,r;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(r=t[e].ks.k.length,i=0;i<r;i+=1)t[e].ks.k[i].s&&(t[e].ks.k[i].s[0].c=t[e].closed),t[e].ks.k[i].e&&(t[e].ks.k[i].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,i,r,s,a,n,o=t.length;for(i=0;i<o;i+=1){if((e=t[i]).hasMask){var h=e.masksProperties;for(s=h.length,r=0;r<s;r+=1)if(h[r].pt.k.i)h[r].pt.k.c=h[r].cl;else for(n=h[r].pt.k.length,a=0;a<n;a+=1)h[r].pt.k[a].s&&(h[r].pt.k[a].s[0].c=h[r].cl),h[r].pt.k[a].e&&(h[r].pt.k[a].e[0].c=h[r].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(s(t),e(t),i(t),r(t),a(t),f(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=s,t.checkChars=i,t.checkPathProperties=r,t.checkShapes=a,t.completeLayers=f,t}()),i.assetLoader||(i.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,i,t,r){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){r&&r(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",i+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)i.assetLoader.load(e.data.path,e.data.fullPath,function(t){i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})},function(){i.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&i.assetLoader.load(e.data.path,e.data.fullPath,function(t){i.postMessage({id:e.data.id,payload:t,status:"success"})},function(){i.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,i=e.id,r=n[i];n[i]=null,"success"===e.status?r.onComplete(e.payload):r.onError&&r.onError()})}function l(t,e){var i="processId_"+(a+=1);return n[i]={onComplete:t,onError:e},i}return{loadAnimation:function(t,e,i){h();var r=l(e,i);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},loadData:function(t,e,i){h();var r=l(e,i);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},completeAnimation:function(t,e,i){h();var r=l(e,i);s.postMessage({type:"complete",animation:t,id:r})}}}();function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",r="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":r="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200"}return{style:r,weight:t.fWeight||i}}var FontManager=function(){var a={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function m(t,e){var i=createTag("span");i.setAttribute("aria-hidden",!0),i.style.fontFamily=e;var r=createTag("span");r.innerText="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(r),document.body.appendChild(i);var s=r.offsetWidth;return r.style.fontFamily=function(t){var e,i=t.split(","),r=i.length,s=[];for(e=0;e<r;e+=1)"sans-serif"!==i[e]&&"monospace"!==i[e]&&s.push(i[e]);return s.join(",")}(t)+", "+e,{node:r,w:s,parent:i}}function c(t,e){var i=createNS("text");i.style.fontSize="100px";var r=getFontProperties(e);return i.setAttribute("font-family",e.fFamily),i.setAttribute("font-style",r.style),i.setAttribute("font-weight",r.weight),i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.setAttribute("class",e.fClass)):i.style.fontFamily=e.fFamily,t.appendChild(i),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,i}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},t.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,r,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(i=0,r=!1;i<a;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(r=!0),i+=1;r||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var i,r=t.list,s=r.length,a=s;for(i=0;i<s;i+=1){var n,o,h=!0;if(r[i].loaded=!1,r[i].monoCase=m(r[i].fFamily,"monospace"),r[i].sansCase=m(r[i].fFamily,"sans-serif"),r[i].fPath){if("p"===r[i].fOrigin||3===r[i].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+r[i].fFamily+'"], style[f-origin="3"][f-family="'+r[i].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",r[i].fOrigin),l.setAttribute("f-origin",r[i].origin),l.setAttribute("f-family",r[i].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+r[i].fFamily+"; font-style: normal; src: url('"+r[i].fPath+"');}",e.appendChild(l)}}else if("g"===r[i].fOrigin||1===r[i].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(r[i].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",r[i].fOrigin),p.setAttribute("f-origin",r[i].origin),p.type="text/css",p.rel="stylesheet",p.href=r[i].fPath,document.body.appendChild(p)}}else if("t"===r[i].fOrigin||2===r[i].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)r[i].fPath===n[o].src&&(h=!1);if(h){var f=createTag("link");f.setAttribute("f-forigin",r[i].fOrigin),f.setAttribute("f-origin",r[i].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",r[i].fPath),e.appendChild(f)}}}else r[i].loaded=!0,a-=1;r[i].helper=c(e,r[i]),r[i].cache={},this.fonts.push(r[i])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,i){for(var r=0,s=this.chars.length;r<s;){if(this.chars[r].ch===t&&this.chars[r].style===e&&this.chars[r].fFamily===i)return this.chars[r];r+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,i)),a},getFontByName:function(t){for(var e=0,i=this.fonts.length;e<i;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,i){var r=this.getFontByName(e),s=t.charCodeAt(0);if(!r.cache[s+1]){var a=r.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();r.cache[s+1]=(n-o)/100}else a.textContent=t,r.cache[s+1]=a.getComputedTextLength()/100}return r.cache[s+1]*i},checkLoadedFonts:function(){var t,e,i,r=this.fonts.length,s=r;for(t=0;t<r;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,e.offsetWidth!==i?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,e.offsetWidth!==i&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),PropertyFactory=function(){var f=initialDefaultFrame,s=Math.abs;function m(t,e){var i,r=this.offsetTime;"multidimensional"===this.propType&&(i=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-r){s.h&&(s=a),c=0;break}if(a.t-r>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,b,P,E,x,S,A,_,k,T=a.t-r,M=s.t-r;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var C=n.bezierData;if(T<=t||t<M){var D=T<=t?C.points.length-1:0;for(h=C.points[D].point.length,o=0;o<h;o+=1)i[o]=C.points[D].point[o]}else{n.__fnct?m=n.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=m),l=m((t-M)/(T-M));var F,I=C.segmentLength*l,w=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,p=C.points.length;y;){if(w+=C.points[f].partialLength,0===I||0===l||f===C.points.length-1){for(h=C.points[f].point.length,o=0;o<h;o+=1)i[o]=C.points[f].point[o];break}if(w<=I&&I<w+C.points[f+1].partialLength){for(F=(I-w)/C.points[f+1].partialLength,h=C.points[f].point.length,o=0;o<h;o+=1)i[o]=C.points[f].point[o]+(C.points[f+1].point[o]-C.points[f].point[o])*F;break}f<p-1?f+=1:y=!1}e._lastPoint=f,e._lastAddedLength=w-C.points[f].partialLength,e._lastKeyframeIndex=d}}else{var B,V,R,L,G;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(T<=t)i[0]=g[0],i[1]=g[1],i[2]=g[2];else if(t<=M)i[0]=s.s[0],i[1]=s.s[1],i[2]=s.s[2];else{var z=O(s.s),N=O(g);v=i,b=function(t,e,i){var r,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(r=Math.acos(s),a=Math.sin(r),n=Math.sin((1-i)*r)/a,Math.sin(i*r)/a):(n=1-i,i);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(z,N,(t-M)/(T-M)),P=b[0],E=b[1],x=b[2],S=b[3],A=Math.atan2(2*E*S-2*P*x,1-2*E*E-2*x*x),_=Math.asin(2*P*E+2*x*S),k=Math.atan2(2*P*S-2*E*x,1-2*P*P-2*x*x),v[0]=A/degToRads,v[1]=_/degToRads,v[2]=k/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(l=T<=t?1:t<M?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?m=n.__fnct[d]:(B=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],V=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],R=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],L=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],m=BezierFactory.getBezierEasing(B,V,R,L).get,n.__fnct[d]=m)):n.__fnct?m=n.__fnct:(B=s.o.x,V=s.o.y,R=s.i.x,L=s.i.y,m=BezierFactory.getBezierEasing(B,V,R,L).get,s.keyframeMetadata=m),m((t-M)/(T-M)))),g=a.s||s.e,G=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*l,"multidimensional"===this.propType?i[d]=G:i=G}return e.lastIndex=c,i}function O(t){var e=t[0]*degToRads,i=t[1]*degToRads,r=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(r/2),o=Math.sin(e/2),h=Math.sin(i/2),l=Math.sin(r/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=i&&i<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(t,this._caching);this.pv=r}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var i=0,r=this.v.length;i<r;)e=t[i]*this.mult,1e-5<s(this.v[i]-e)&&(this.v[i]=e,this._mdf=!0),i+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)i=this.effectsSequence[t](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,i,r){this.propType="unidimensional",this.mult=i||1,this.data=e,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=r,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,i,r){var s;this.propType="multidimensional",this.mult=i||1,this.data=e,this._mdf=!1,this.elem=t,this.container=r,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,i,r){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=i||1,this.elem=t,this.container=r,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,i,r){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=t,this.container=r,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=f,this.pv[s]=f;this._caching={lastFrame:f,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,i,r,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,r,s);else switch(i){case 0:a=new h(t,e,r,s);break;case 1:a=new l(t,e,r,s)}else a=new n(t,e,r,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function r(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var r,s=e.or.k.length;for(r=0;r<s;r+=1)e.or.k[r].to=null,e.or.k[r].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return r.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var i,r;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)r=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(i=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],r=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(i[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),r[0]=s.getValueAtTime(s.keyframes[0].t/e,0),r[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(i[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),i[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),r[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(i=[s.pv,a.pv],r[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),r[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else i=r=n;this.v.rotate(-Math.atan2(i[1]-r[1],i[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],r),r.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},r.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,i){return new r(t,e,i)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var i=0;i<e;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,i,r,s){var a;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[r]||a[r]&&!s)&&(a[r]=pointPool.newElement()),a[r][0]=t,a[r][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,r,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,r,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,i=this.o,r=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],r[0][0],r[0][1],i[0][0],i[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],r[n][0],r[n][1],i[n][0],i[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,i){var r,s,a,n,o,h,l,p,f,m=i.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)r=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)r=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=P),p=P((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}r=d.s[0]}for(h=e._length,l=r.i[0].length,i.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?r.i[n][o]:r.i[n][o]+(s.i[n][o]-r.i[n][o])*p,e.i[n][o]=f,f=a?r.o[n][o]:r.o[n][o]+(s.o[n][o]-r.o[n][o])*p,e.o[n][o]=f,f=a?r.v[n][o]:r.v[n][o]+(s.v[n][o]-r.v[n][o])*p,e.v[n][o]=f}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,r=t._length;for(i=0;i<r;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function i(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var i=this.effectsSequence.length;for(e=0;e<i;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,i){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===i?e.pt.k:e.ks.k;this.v=shapePool.clone(r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function r(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,i){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===i?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var r=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==s&&(r<e&&t<e||i<r&&i<t)||(this._caching.lastIndex=r<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=i,n.prototype.setVValue=e,n.prototype.addEffect=r,o.prototype.getValue=i,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=r;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-r,a.v[1][0]=s?t+i:t-i,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+r,a.v[3][0]=s?t-i:t+i,a.v[3][1]=e,a.i[0][0]=s?t-i*n:t+i*n,a.i[0][1]=e-r,a.i[1][0]=s?t+i:t-i,a.i[1][1]=e-r*n,a.i[2][0]=s?t+i*n:t-i*n,a.i[2][1]=e+r,a.i[3][0]=s?t-i:t+i,a.i[3][1]=e+r*n,a.o[0][0]=s?t+i*n:t-i*n,a.o[0][1]=e-r,a.o[1][0]=s?t+i:t-i,a.o[1][1]=e+r*n,a.o[2][0]=s?t-i*n:t+i*n,a.o[2][1]=e+r,a.o[3][0]=s?t-i:t+i,a.o[3][1]=e-r*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,i,r,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){i=n?l:p,r=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*r*i*d,y-v*r*i*d,u+g*r*i*d,y+v*r*i*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,r=this.or.v,s=this.os.v,a=2*Math.PI*r/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=r*Math.cos(n),l=r*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=i*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,s=bmMin(i,r,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-r+s,t+i,e-r+s,t+i,e-r+a,0,!0),this.v.setTripleAt(t+i,e+r-s,t+i,e+r-a,t+i,e+r-s,1,!0),0!==s?(this.v.setTripleAt(t+i-s,e+r,t+i-s,e+r,t+i-a,e+r,2,!0),this.v.setTripleAt(t-i+s,e+r,t-i+a,e+r,t-i+s,e+r,3,!0),this.v.setTripleAt(t-i,e+r-s,t-i,e+r-s,t-i,e+r-a,4,!0),this.v.setTripleAt(t-i,e-r+s,t-i,e-r+a,t-i,e-r+s,5,!0),this.v.setTripleAt(t-i+s,e-r,t-i+s,e-r,t-i+a,e-r,6,!0),this.v.setTripleAt(t+i-s,e-r,t+i-a,e-r,t+i-s,e-r,7,!0)):(this.v.setTripleAt(t-i,e+r,t-i+a,e+r,t-i,e+r,2),this.v.setTripleAt(t-i,e-r,t-i,e-r+a,t-i,e-r,3))):(this.v.setTripleAt(t+i,e-r+s,t+i,e-r+a,t+i,e-r+s,0,!0),0!==s?(this.v.setTripleAt(t+i-s,e-r,t+i-s,e-r,t+i-a,e-r,1,!0),this.v.setTripleAt(t-i+s,e-r,t-i+a,e-r,t-i+s,e-r,2,!0),this.v.setTripleAt(t-i,e-r+s,t-i,e-r+s,t-i,e-r+a,3,!0),this.v.setTripleAt(t-i,e+r-s,t-i,e+r-a,t-i,e+r-s,4,!0),this.v.setTripleAt(t-i+s,e+r,t-i+s,e+r,t-i+a,e+r,5,!0),this.v.setTripleAt(t+i-s,e+r,t+i-a,e+r,t+i-s,e+r,6,!0),this.v.setTripleAt(t+i,e+r-s,t+i,e+r-s,t+i,e+r-a,7,!0)):(this.v.setTripleAt(t-i,e-r,t-i+a,e-r,t-i,e-r,1,!0),this.v.setTripleAt(t-i,e+r,t-i,e+r-a,t-i,e+r,2,!0),this.v.setTripleAt(t+i,e+r,t+i-a,e+r,t+i,e+r,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var f={getShapeProp:function(t,e,i){var r;return 3===i||4===i?r=(3===i?e.pt:e.ks).k.length?new o(t,e,i):new n(t,e,i):5===i?r=new p(t,e):6===i?r=new h(t,e):7===i&&(r=new l(t,e)),r.k&&t.addDynamicProperty(r),r},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return f}(),ShapeModifiers=(tt={},ut={},tt.registerModifier=function(t,e){ut[t]||(ut[t]=e)},tt.getModifier=function(t,e,i){return new ut[t](e,i)},tt),tt,ut;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,i,r){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(r);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,i){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var r=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,i,r,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<r||o.s*s>r+i))p=o.s*s<=r?0:(o.s*s-r)/i,f=o.e*s>=r+i?1:(o.e*s-r)/i,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e<i;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,i,r,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(i=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(i===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<m;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(r=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(r.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=i,P=0;for(s=m-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<m?(g=this.calculateShapeEdges(e,i,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var E=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var x=E.pop();this.addPaths(E,u),E=this.addShapes(d,y[1],x)}else this.addPaths(E,u),E=this.addShapes(d,y[1]);this.addPaths(E,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)e.addShape(t[i])},TrimModifier.prototype.addSegment=function(t,e,i,r,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(i[0],i[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(r[0],r[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,i,r){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),r&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},TrimModifier.prototype.addShapes=function(t,e,i){var r,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=i?(o=i._length,i._length):(i=shapePool.newElement(),o=0),u.push(i),r=0;r<c;r+=1){for(h=f[r].lengths,i.c=m[r].c,a=m[r].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,i.c=!1;else{if(d>e.e){i.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[r].v[s-1],m[r].o[s-1],m[r].i[s],m[r].v[s],i,o,y),y=!1):(l=bez.getNewSegment(m[r].v[s-1],m[r].v[s],m[r].o[s-1],m[r].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1),d+=n.addedLength,o+=1}if(m[r].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[r].v[s-1],m[r].o[s-1],m[r].i[0],m[r].v[0],i,o,y),y=!1):(l=bez.getNewSegment(m[r].v[s-1],m[r].v[0],m[r].o[s-1],m[r].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1)}else i.c=!1;d+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),d>e.e)break;r<c-1&&(i=shapePool.newElement(),y=!0,u.push(i),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var i,r=shapePool.newElement();r.c=t.c;var s,a,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(i=0;i<y;i+=1)s=t.v[i],n=t.o[i],a=t.i[i],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==i&&i!==y-1||t.c?(o=0===i?t.v[y-1]:t.v[i-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,f=u=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,r.setTripleAt(p,f,m,c,d,u,g),g+=1,o=i===y-1?t.v[0]:t.v[i+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=f-(f-s[1])*roundCorner,r.setTripleAt(p,f,m,c,d,u,g)):r.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):r.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],g),g+=1;return r},RoundCornersModifier.prototype.processShapes=function(t){var e,i,r,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(i=0;i<o;i+=1){if(n=(a=this.shapes[i]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,r=0;r<s;r+=1)n.addShape(this.processPath(e[r],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var i=e/100,r=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)r[0]+=t.v[a][0],r[1]+=t.v[a][1];r[0]/=s,r[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(r[0]-t.v[a][0])*i,o=t.v[a][1]+(r[1]-t.v[a][1])*i,h=t.o[a][0]+(r[0]-t.o[a][0])*-i,l=t.o[a][1]+(r[1]-t.o[a][1])*-i,p=t.i[a][0]+(r[0]-t.i[a][0])*-i,f=t.i[a][1]+(r[1]-t.i[a][1])*-i,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,i,r,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(i=0;i<o;i+=1){if(n=(a=this.shapes[i]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,r=0;r<s;r+=1)n.addShape(this.processPath(e[r],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,i,r,s,a){var n=a?-1:1,o=r.s.v[0]+(1-r.s.v[0])*(1-s),h=r.s.v[1]+(1-r.s.v[1])*(1-s);t.translate(r.p.v[0]*n*s,r.p.v[1]*n*s,r.p.v[2]),e.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),e.rotate(-r.r.v*n*s),e.translate(r.a.v[0],r.a.v[1],r.a.v[2]),i.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),i.scale(a?1/o:o,a?1/h:h),i.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(t,e,i,r){for(this.elem=t,this.arr=e,this.pos=i,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[i]);0<i;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,i,r,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(r=a=0;r<=this._groups.length-1;r+=1){if(o=a<h,this._groups[r]._render=o,this.changeGroupRender(this._groups[r].it,o),!o){var p=this.elemsData[r].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=0<m?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(0<m){for(;P<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(m<0){for(;d<P;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(r=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(i=(e=this.elemsData[r].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),0!==P){for((0!==r&&1===s||r!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)i[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)i[v]=this.matrix.props[v];P+=1,a-=1,r+=s}}else for(a=this._currentCopies,r=0,s=1;a;)i=(e=this.elemsData[r].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,r+=s;return n},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,i=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<i;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var i=0,r=this.o.length/2;i<r;){if(.01<Math.abs(t[4*i]-t[4*e+2*i]))return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,r,s=4*this.data.p;for(e=0;e<s;e+=1)i=e%4==0?100:255,r=Math.round(this.prop.v[e]*i),this.c[e]!==r&&(this.c[e]=r,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)i=e%2==0?100:1,r=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==r&&(this.o[e-4*this.data.p]=r,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,i,r){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+r.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+r.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+r.applyToPointStringified(n[s][0],n[s][1])+" "+r.applyToPointStringified(o[s][0],o[s][1]);return i&&e&&(h+=" C"+r.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+r.applyToPointStringified(n[0][0],n[0][1])+" "+r.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,i=this.audios.length;for(e=0;e<i;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,i){var r="";if(t.e)r=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),r=e+s}else r=i,r+=t.u?t.u:"",r+=t.p;return r}function i(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,i=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},i=a(t,this.assetsPath,this.path);return dataManager.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return i.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var r=t.length;for(i=0;i<r;i+=1)t[i].layers||(t[i].t&&"seq"!==t[i].t?3===t[i].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[i]))):(this.totalImages+=1,this.images.push(this._createImageData(t[i]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,i=this.images.length;e<i;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),i=createTag("img");i.crossOrigin="anonymous",i.addEventListener("load",this._imageLoaded,!1),i.addEventListener("error",function(){r.img=s,this._imageLoaded()}.bind(this),!1),i.src=e;var r={img:i,assetData:t};return r},createImageData:function(t){var e=a(t,this.assetsPath,this.path),i=createNS("image");isSafari?this.testImageLoaded(i):i.addEventListener("load",this._imageLoaded,!1),i.addEventListener("error",function(){r.img=s,this._imageLoaded()}.bind(this),!1),i.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(i):this._elementHelper.appendChild(i);var r={img:i,assetData:t};return r},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},i}(),featureSupport=(My={maskType:!0},(/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))&&(My.maskType=!1),My),My,filtersFactory=(Ny={},Ny.createFilter=function(t,e){var i=createNS("filter");return i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i},Ny.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},Ny),Ny;function TextAnimatorProperty(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function TextAnimatorDataProperty(t,e,i){var r={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,i):r,rx:a.rx?s(t,a.rx,0,degToRads,i):r,ry:a.ry?s(t,a.ry,0,degToRads,i):r,sk:a.sk?s(t,a.sk,0,degToRads,i):r,sa:a.sa?s(t,a.sa,0,degToRads,i):r,s:a.s?s(t,a.s,1,.01,i):r,a:a.a?s(t,a.a,1,0,i):r,o:a.o?s(t,a.o,0,.01,i):r,p:a.p?s(t,a.p,1,0,i):r,sw:a.sw?s(t,a.sw,0,0,i):r,sc:a.sc?s(t,a.sc,1,0,i):r,fc:a.fc?s(t,a.fc,1,0,i):r,fh:a.fh?s(t,a.fh,0,0,i):r,fs:a.fs?s(t,a.fs,0,.01,i):r,fb:a.fb?s(t,a.fb,0,.01,i):r,t:a.t?s(t,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function LetterProps(t,e,i,r,s,a){this.o=t,this.sw=e,this.sc=i,this.fc=r,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!r,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,r=PropertyFactory.getProp;for(t=0;t<i;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:r(this._elem,this._textData.p.a,0,0,this),f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:r(this._elem,this._textData.p.r,0,0,this),p:r(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,r,s,a,n,o,h,l,p,f,m,c,d,u,y,g,v,b,P,E=this._moreOptions.alignment.v,x=this._animatorsData,S=this._textData,A=this.mHelper,_=this._renderType,k=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var M,C=P.v;for(this._pathData.r.v&&(C=C.reverse()),n={tLength:0,segments:[]},a=C._length-1,s=g=0;s<a;s+=1)M=bez.buildBezierData(C.v[s],C.v[s+1],[C.o[s][0]-C.v[s][0],C.o[s][1]-C.v[s][1]],[C.i[s+1][0]-C.v[s+1][0],C.i[s+1][1]-C.v[s+1][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength;s=a,P.v.c&&(M=bez.buildBezierData(C.v[s],C.v[0],[C.o[s][0]-C.v[s][0],C.o[s][1]-C.v[s][1]],[C.i[0][0]-C.v[0][0],C.i[0][1]-C.v[0][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=1,p=!(l=m=0),u=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}a=T.length,r=i=0;var D,F,I,w,B,V=1.2*t.finalSize*.714,R=!0;I=x.length;var L,G,z,N,O,H,j,q,W,X,Y,$,K=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var it=0,rt=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(it&&(it+=rt);at<s;)T[at].animatorJustifyOffset=it,at+=1;nt=!(it=0)}else{for(F=0;F<I;F+=1)(D=x[F].a).t.propType&&(nt&&2===t.j&&(rt+=D.t.v*st),(B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?it+=D.t.v*B[0]*st:it+=D.t.v*B*st);nt=!1}for(it&&(it+=rt);at<s;)T[at].animatorJustifyOffset=it,at+=1}for(s=0;s<a;s+=1){if(A.reset(),N=1,T[s].n)i=0,r+=t.yOffset,r+=R?1:0,o=J,R=!1,this._hasMaskedPath&&(f=U,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),$=W=Y=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}K!==T[s].ind&&(T[K]&&(o+=T[K].extra),o+=T[s].an/2,K=T[s].ind),o+=E[0]*T[s].an*.005;var ot=0;for(F=0;F<I;F+=1)(D=x[F].a).p.propType&&((B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=D.p.v[0]*B[0]:ot+=D.p.v[0]*B),D.a.propType&&((B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=D.a.v[0]*B[0]:ot+=D.a.v[0]*B);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,A.translate(-E[0]*T[s].an*.005,-E[1]*V*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,d=u[m+=1]?u[m].points:P.v.c?u[m=f=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,A.translate(-L,0,0)}else L=T[s].an/2-T[s].add,A.translate(-L,0,0),A.translate(-E[0]*T[s].an*.005,-E[1]*V*.01,0);for(F=0;F<I;F+=1)(D=x[F].a).t.propType&&(B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),0===i&&0===t.j||(this._hasMaskedPath?B.length?o+=D.t.v*B[0]:o+=D.t.v*B:B.length?i+=D.t.v*B[0]:i+=D.t.v*B));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<I;F+=1)(D=x[F].a).a.propType&&((B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?A.translate(-D.a.v[0]*B[0],-D.a.v[1]*B[1],D.a.v[2]*B[2]):A.translate(-D.a.v[0]*B,-D.a.v[1]*B,D.a.v[2]*B));for(F=0;F<I;F+=1)(D=x[F].a).s.propType&&((B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?A.scale(1+(D.s.v[0]-1)*B[0],1+(D.s.v[1]-1)*B[1],1):A.scale(1+(D.s.v[0]-1)*B,1+(D.s.v[1]-1)*B,1));for(F=0;F<I;F+=1){if(D=x[F].a,B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),D.sk.propType&&(B.length?A.skewFromAxis(-D.sk.v*B[0],D.sa.v*B[1]):A.skewFromAxis(-D.sk.v*B,D.sa.v*B)),D.r.propType&&(B.length?A.rotateZ(-D.r.v*B[2]):A.rotateZ(-D.r.v*B)),D.ry.propType&&(B.length?A.rotateY(D.ry.v*B[1]):A.rotateY(D.ry.v*B)),D.rx.propType&&(B.length?A.rotateX(D.rx.v*B[0]):A.rotateX(D.rx.v*B)),D.o.propType&&(B.length?N+=(D.o.v*B[0]-N)*B[0]:N+=(D.o.v*B-N)*B),t.strokeWidthAnim&&D.sw.propType&&(B.length?H+=D.sw.v*B[0]:H+=D.sw.v*B),t.strokeColorAnim&&D.sc.propType)for(q=0;q<3;q+=1)B.length?O[q]+=(D.sc.v[q]-O[q])*B[0]:O[q]+=(D.sc.v[q]-O[q])*B;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(q=0;q<3;q+=1)B.length?j[q]+=(D.fc.v[q]-j[q])*B[0]:j[q]+=(D.fc.v[q]-j[q])*B;D.fh.propType&&(j=B.length?addHueToRGB(j,D.fh.v*B[0]):addHueToRGB(j,D.fh.v*B)),D.fs.propType&&(j=B.length?addSaturationToRGB(j,D.fs.v*B[0]):addSaturationToRGB(j,D.fs.v*B)),D.fb.propType&&(j=B.length?addBrightnessToRGB(j,D.fb.v*B[0]):addBrightnessToRGB(j,D.fb.v*B))}}for(F=0;F<I;F+=1)(D=x[F].a).p.propType&&(B=x[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?B.length?A.translate(0,D.p.v[1]*B[0],-D.p.v[2]*B[1]):A.translate(0,D.p.v[1]*B,-D.p.v[2]*B):B.length?A.translate(D.p.v[0]*B[0],D.p.v[1]*B[1],-D.p.v[2]*B[2]):A.translate(D.p.v[0]*B,D.p.v[1]*B,-D.p.v[2]*B));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&(X="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(A.translate(0,-t.ls),A.translate(0,E[1]*V*.01+r,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),A.rotate(-ht*Math.PI/180)}A.translate(G,z,0),o-=E[0]*T[s].an*.005,T[s+1]&&K!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(A.translate(i,r,0),t.ps&&A.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:A.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:A.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}A.translate(0,-t.ls),A.translate(L,0,0),A.translate(E[0]*T[s].an*.005,E[1]*V*.01,0),i+=T[s].l+.001*t.tr*t.finalSize}"html"===_?tt=A.toCSS():"svg"===_?tt=A.to2dCSS():et=[A.props[0],A.props[1],A.props[2],A.props[3],A.props[4],A.props[5],A.props[6],A.props[7],A.props[8],A.props[9],A.props[10],A.props[11],A.props[12],A.props[13],A.props[14],A.props[15]],$=N}this.lettersChangedFlag=k<=s?(w=new LetterProps($,W,X,Y,tt,et),this.renderedLetters.push(w),k+=1,!0):(w=this.renderedLetters[s]).update($,W,X,Y,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,i,r,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==i&&(this.sc=i,n=this._mdf.sc=!0),this.fc!==r&&(this.fc=r,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var r;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(r=0;r<s;r+=1)a=i!==this.keysIndex?this.effectsSequence[r](a,a.t):this.effectsSequence[r](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,i=0,r=t.length;i<=r-1&&!(i===r-1||t[i+1].t>e);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,i,r=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?r[r.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(i=t.charCodeAt(s+1))&&i<=57343?(n||FontManager.isModifier(e,i)?(r[r.length-1]+=t.substr(s,2),n=!1):r.push(t.substr(s,2)),s+=1):r.push(t.charAt(s)):56319<e?(i=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,i)?(n=!0,r[r.length-1]+=t.substr(s,2),s+=1):r.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(r[r.length-1]+=t.charAt(s),n=!0):r.push(t.charAt(s)),s+=1;return r},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,r,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,E=getFontProperties(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var x,S=t.tr/1e3*t.finalSize;if(t.sz)for(var A,_,k=!0,T=t.sz[0],M=t.sz[1];k;){g=A=0,i=(_=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var C=-1;for(e=0;e<i;e+=1)x=_[e].charCodeAt(0),r=!1," "===_[e]?C=e:13!==x&&3!==x||(r=!(g=0),A+=t.finalLineHeight||1.2*t.finalSize),T<g+(P=h.chars?(o=h.getCharData(_[e],b.fStyle,b.fFamily),r?0:o.w*t.finalSize/100):h.measureText(_[e],t.f,t.finalSize))&&" "!==_[e]?(-1===C?i+=1:e=C,A+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,C===e?1:0,"\r"),C=-1,g=0):(g+=P,g+=S);A+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&M<A?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=_,i=t.finalText.length,k=!1)}g=-S;var D,F=P=0;for(e=0;e<i;e+=1)if(r=!1,13===(x=(D=t.finalText[e]).charCodeAt(0))||3===x?(F=0,y.push(g),v=v<g?g:v,g=-2*S,r=!(s=""),u+=1):s=D,P=h.chars?(o=h.getCharData(D,b.fStyle,h.getFontByName(t.f).fFamily),r?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===D?F+=P+S:(g+=P+S+F,F=0),p.push({l:P,an:P,add:c,n:r,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=P,""===s||" "===s||e===i-1){for(""!==s&&" "!==s||(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===s||e===i-1){for(""===s&&(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var I,w,B,V,R=l.a;n=R.length;var L=[];for(a=0;a<n;a+=1){for((I=R[a]).a.sc&&(t.strokeColorAnim=!0),I.a.sw&&(t.strokeWidthAnim=!0),(I.a.fc||I.a.fh||I.a.fs||I.a.fb)&&(t.fillColorAnim=!0),V=0,B=I.s.b,e=0;e<i;e+=1)(w=p[e]).anIndexes[a]=V,(1==B&&""!==w.val||2==B&&""!==w.val&&" "!==w.val||3==B&&(w.n||" "==w.val||e==i-1)||4==B&&(w.n||e==i-1))&&(1===I.s.rn&&L.push(V),V+=1);l.a[a].s.totalChars=V;var G,z=-1;if(1===I.s.rn)for(e=0;e<i;e+=1)z!=(w=p[e]).anIndexes[a]&&(z=w.anIndexes[a],G=L.splice(Math.floor(Math.random()*L.length),1)[0]),w.anIndexes[a]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.copyData({},this.data.d.k[e].s);i=this.copyData(i,t),this.data.d.k[e].s=i,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function r(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return r.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,i=0,r=1,s=1;0<this.ne.v?e=this.ne.v/100:i=-this.ne.v/100,0<this.xe.v?r=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,i,r,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,f=-p/2+(t=y(u(0,t+.5-o),h-o)),m=p/2;n=Math.sqrt(1-f*f/(m*m))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,r=this.s.v/e+i,s=this.e.v/e+i;if(s<r){var a=r;r=s,s=a}this.finalS=r,this.finalE=s}},extendPrototype([DynamicPropertyContainer],r),{getTextSelectorProp:function(t,e,i){return new r(t,e,i)}}}(),poolFactory=function(t,e,i){var r=0,s=t,a=createSizedArray(s);return{newElement:function(){return r?a[r-=1]:e()},release:function(t){r===s&&(a=pooling.double(a),s*=2),i&&i(t),a[r]=t,r+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},pointPool=poolFactory(8,function(){return createTypedArray("float32",2)}),shapePool=(NC=poolFactory(4,function(){return new ShapePath},function(t){var e,i=t._length;for(e=0;e<i;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),NC.clone=function(t){var e,i=NC.newElement(),r=void 0===t._length?t.v.length:t._length;for(i.setLength(r),i.c=t.c,e=0;e<r;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i},NC),NC,shapeCollectionPool=(VC={newShapeCollection:function(){var t;t=WC?YC[WC-=1]:new ShapeCollection;return t},release:function(t){var e,i=t._length;for(e=0;e<i;e+=1)shapePool.release(t.shapes[e]);t._length=0,WC===XC&&(YC=pooling.double(YC),XC*=2);YC[WC]=t,WC+=1}},WC=0,XC=4,YC=createSizedArray(XC),VC),VC,WC,XC,YC,segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,i=t.lengths.length;for(e=0;e<i;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}),bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}),markerParser=function(){function a(t){for(var e,i=t.split("\r\n"),r={},s=0,a=0;a<i.length;a+=1)2===(e=i[a].split(":")).length&&(r[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return r}return function(e){for(var t=[],i=0;i<e.length;i+=1){var r=e[i],s={time:r.tm,duration:r.dr};try{s.payload=JSON.parse(e[i].cm)}catch(t){try{s.payload=a(e[i].cm)}catch(t){s.payload={name:e[i]}}}t.push(s)}return t}}();function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(e&&e.title){var r=createNS("title"),s=createElementID();r.setAttribute("id",s),r.textContent=e.title,this.svgElement.appendChild(r),i+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),i+=" "+n}i&&this.svgElement.setAttribute("aria-labelledby",i);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function MaskElement(t,e,i){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(r=0;r<n;r+=1)if(("a"!==c[r].mode&&"n"!==c[r].mode||c[r].inv||100!==c[r].o.k||c[r].o.x)&&(v=g="mask"),"s"!==c[r].mode&&"i"!==c[r].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[r].mode)this.viewData[r]={op:PropertyFactory.getProp(this.element,c[r].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[r],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[r].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[r].x.k?(v=g="mask",m=PropertyFactory.getProp(this.element,c[r].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[r].mode?"#000000":"#ffffff")):m=f=null,this.storedData[r]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[r].mode){h=u.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(u[o]);var E=createNS("mask");E.setAttribute("mask-type","alpha"),E.setAttribute("id",y+"_"+d),E.appendChild(s),a.appendChild(E),P.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(P)}else u.push(s);c[r].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[r]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[r].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[r],3),invRect:l},this.viewData[r].prop.k||this.drawPath(c[r],this.viewData[r].prop.v,this.viewData[r])}for(this.maskElement=createNS(g),n=u.length,r=0;r<n;r+=1)this.maskElement.appendChild(u[r]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function SVGShapeData(t,e,i){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=i,this.lvl=e,this._isAnimated=!!i.k;for(var r=0,s=t.length;r<s;){if(t[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}function SVGTransformData(t,e,i){this.transform={mProps:t,op:e,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function SVGStrokeStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=i}function SVGGradientFillStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,i)}function SVGGradientStrokeStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,i),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}BaseRenderer.prototype.checkLayers=function(t){var e,i,r=this.layers.length;for(this.completeLayers=!0,e=r-1;0<=e;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var i,r=t.length,s=this.layers.length;for(e=0;e<r;e+=1)for(i=0;i<s;){if(this.layers[i].id===t[e].id){this.layers[i]=t[e];break}i+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,i){for(var r=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(r[a]&&!0!==r[a]?(i.push(r[a]),r[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,i):t.setHierarchy(i)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;e<i;e+=1)if(t[e].xt){var r=this.createComp(t[e]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=createNS("clipPath"),r=createNS("rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var s=createElementID();i.setAttribute("id",s),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(i),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);e[t]=i,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?i.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;e<i;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<i;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var r,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(r=this.elements[s].getBaseElement()),s+=1;r?this.layerElement.insertBefore(i,r):this.layerElement.appendChild(i)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){var r=this.layers[e];if(r.ddd&&this.supports3d)this.addTo3dContainer(i,e);else if(this.threeDElements)this.addTo3dContainer(i,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?r.ddd&&this.supports3d||this.layerElement.insertBefore(i,s):r.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},HybridRenderer.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRenderer.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRenderer.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRenderer.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},HybridRenderer.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRenderer.prototype.createNull=SVGRenderer.prototype.createNull,HybridRenderer.prototype.getThreeDContainerByPos=function(t){for(var e=0,i=this.threeDElements.length;e<i;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRenderer.prototype.createThreeDContainer=function(t,e){var i,r,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(i=s.style).width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(r=a.style).transform=o,r.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRenderer.prototype.build3dContainers=function(){var t,e,i=this.layers.length,r="";for(t=0;t<i;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?"3d"!==r&&(r="3d",e=this.createThreeDContainer(t,"3d")):"2d"!==r&&(r="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t);for(t=(i=this.threeDElements.length)-1;0<=t;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRenderer.prototype.addTo3dContainer=function(t,e){for(var i=0,r=this.threeDElements.length;i<r;){if(e<=this.threeDElements[i].endPos){for(var s,a=this.threeDElements[i].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[i].container.insertBefore(t,s):this.threeDElements[i].container.appendChild(t);break}i+=1}},HybridRenderer.prototype.configAnimation=function(t){var e=createTag("div"),i=this.animationItem.wrapper,r=e.style;r.width=t.w+"px",r.height=t.h+"px",styleDiv(this.resizerElem=e),r.transformStyle="flat",r.mozTransformStyle="flat",r.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),i.appendChild(e),r.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRenderer.prototype.updateContainerSize=function(){var t,e,i,r,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight;r=s/a<this.globalData.compSize.w/this.globalData.compSize.h?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,i=0,(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,0);var n=this.resizerElem.style;n.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+r+",0,1)",n.transform=n.webkitTransform},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.resizerElem.style.display="block"},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,r=this.threeDElements.length;for(t=0;t<r;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(i,2))+"px",s.perspective=s.webkitPerspective}}},HybridRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length,r=createTag("div");for(e=0;e<i;e+=1)if(t[e].xt){var s=this.createComp(t[e],r,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,r=this.masksProperties.length;for(e=0;e<r;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,i){var r,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,r=1;r<s;r+=1)a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[r][0]+","+e.i[r][1]+" "+e.v[r][0]+","+e.v[r][1];if(e.c&&1<s&&(a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var i,r=this.dynamicProperties.length;for(i=0;i<r;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<r;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;i<r;i+=1)t=this.hierarchy[i].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i,r=!0,s=this.comp;r;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):r=!1;var a,n=e.length;for(i=0;i<n;i+=1)a=e[i].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,i){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var i=createElementID(),r=createNS(1===e.t?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),r.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+locationHref+"#"+i+")"),this.gf=r,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(r=4*t.g.p;r<s;r+=2)(i=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(i),p.push(i);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+locationHref+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,i){(i||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(i||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(t,e,i){var r,s,a,n,o,h,l,p,f,m,c,d=e.styles.length,u=e.lvl;for(h=0;h<d;h+=1){if(n=e.sh._mdf||i,e.styles[h].lvl<u){for(p=g.reset(),m=u-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<m;)n=e.transformers[c].mProps._mdf||n,m-=1,c-=1;if(n)for(m=u-e.styles[h].lvl,c=e.transformers.length-1;0<m;)f=e.transformers[c].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m-=1,c-=1}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",r=0;r<s;r+=1)(o=l.shapes[r])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function r(t,e,i){var r=e.style;(e.c._mdf||i)&&r.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&r.pElem.setAttribute("fill-opacity",e.o.v)}function s(t,e,i){a(t,e,i),n(t,e,i)}function a(t,e,i){var r,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||i){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||i){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||i){r=e.cst;var u=e.g.c;for(a=r.length,s=0;s<a;s+=1)(n=r[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||i)){var y=e.g.o;for(a=(r=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=r[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||i)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||i)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||i){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],E=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",E))}}function n(t,e,i){var r=e.style,s=e.d;s&&(s._mdf||i)&&s.dashStr&&(r.pElem.setAttribute("stroke-dasharray",s.dashStr),r.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||i)&&r.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(r.pElem.setAttribute("stroke-width",e.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return r;case"gf":return a;case"gs":return s;case"st":return n;case"sh":case"el":case"rc":case"sr":return i;case"tr":return e;default:return null}}}}();function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function BaseElement(){}function NullElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initFrame(),this.initTransform(t,e,i),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,i){this.initElement(t,e,i)}function AudioElement(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,i),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function FootageElement(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,i)}function SVGCompElement(t,e,i){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGTextLottieElement(t,e,i){this.textSpans=[],this.renderType="svg",this.initElement(t,e,i)}function SVGShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");if(i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i),(i=createNS("feColorMatrix")).setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result","f2"),t.appendChild(i),this.matrixFilter=i,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var r,s=createNS("feMerge");t.appendChild(s),(r=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(r),(r=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(r)}}function SVGFillFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(i),this.matrixFilter=i}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var i=createNS("feGaussianBlur");t.appendChild(i),this.feGaussianBlur=i}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i);var r=createNS("feComponentTransfer");r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),this.matrixFilter=r;var s=createNS("feFuncR");s.setAttribute("type","table"),r.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),r.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),r.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var i=this.filterManager.effectElements,r=createNS("feComponentTransfer");(i[10].p.k||0!==i[10].p.v||i[11].p.k||1!==i[11].p.v||i[12].p.k||1!==i[12].p.v||i[13].p.k||0!==i[13].p.v||i[14].p.k||1!==i[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",r)),(i[17].p.k||0!==i[17].p.v||i[18].p.k||1!==i[18].p.v||i[19].p.k||1!==i[19].p.v||i[20].p.k||0!==i[20].p.v||i[21].p.k||1!==i[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",r)),(i[24].p.k||0!==i[24].p.v||i[25].p.k||1!==i[25].p.v||i[26].p.k||1!==i[26].p.v||i[27].p.k||0!==i[27].p.v||i[28].p.k||1!==i[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",r)),(i[31].p.k||0!==i[31].p.v||i[32].p.k||1!==i[32].p.v||i[33].p.k||1!==i[33].p.v||i[34].p.k||0!==i[34].p.v||i[35].p.k||1!==i[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",r)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),r=createNS("feComponentTransfer")),(i[3].p.k||0!==i[3].p.v||i[4].p.k||1!==i[4].p.v||i[5].p.k||1!==i[5].p.v||i[6].p.k||0!==i[6].p.v||i[7].p.k||1!==i[7].p.v)&&(r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),this.feFuncRComposed=this.createFeFunc("feFuncR",r),this.feFuncGComposed=this.createFeFunc("feFuncG",r),this.feFuncBComposed=this.createFeFunc("feFuncB",r))}function SVGDropShadowEffect(t,e){var i=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",i.x),t.setAttribute("y",i.y),t.setAttribute("width",i.width),t.setAttribute("height",i.height),this.filterManager=e;var r=createNS("feGaussianBlur");r.setAttribute("in","SourceAlpha"),r.setAttribute("result","drop_shadow_1"),r.setAttribute("stdDeviation","0"),this.feGaussianBlur=r,t.appendChild(r);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}ShapeTransformManager.prototype={addTransformSequence:function(t){var e,i=t.length,r="_";for(e=0;e<i;e+=1)r+=t[e].transform.key+"_";var s=this.sequences[r];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[r]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var i,r=0,s=t.transforms.length,a=e;r<s&&!e;){if(t.transforms[r].transform.mProps._mdf){a=!0;break}r+=1}if(a)for(t.finalTransform.reset(),r=s-1;0<=r;r-=1)i=t.transforms[r].transform.mProps.v.props,t.finalTransform.transform(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]);t._mdf=a},processSequences:function(t){var e,i=this.sequenceList.length;for(e=0;e<i;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,r=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),r=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(i=createNS("g")).appendChild(this.layerElement),r=i,s.appendChild(i),i.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),r=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),n.appendChild(l),i.appendChild(this.layerElement),r=i,n.appendChild(i)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;e<i;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,r=e.length;i<r;){if(e[i].elem===t)return e[i].pos;i+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements,r=i.length;r;)if(i[r-=1].elem===t)return void(i[r].pos=e);i.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var i,r,s=e.length,a="";for(i=0;i<s;i+=1)r=e[i].ks.k,a+=buildShapeString(r,r.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,i,r,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(r,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,r=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=r-1;0<=i;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,i=t.length,r=[],s="";e<i;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(r.push(s),s=""):s+=t[e],e+=1;return r.push(s),r},SVGTextLottieElement.prototype.buildNewText=function(){var t,e,i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var r=this.globalData.fontManager.getFontByName(i.f);if(r.fClass)this.layerElement.setAttribute("class",r.fClass);else{this.layerElement.setAttribute("font-family",r.fFamily);var s=i.fWeight,a=i.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",i.t);var n,o=i.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l,p=this.mHelper,f="",m=this.data.singleShape,c=0,d=0,u=!0,y=.001*i.tr*i.finalSize;if(!m||h||i.sz){var g,v,b=this.textSpans.length;for(t=0;t<e;t+=1)h&&m&&0!==t||(n=t<b?this.textSpans[t]:createNS(h?"path":"text"),b<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(i.finalSize/100,i.finalSize/100),m&&(o[t].n&&(c=-y,d+=i.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(i,p,o[t].line,c,d),c+=o[t].l||0,c+=y),h?(l=(g=(v=this.globalData.fontManager.getCharData(i.finalText[t],r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily))&&v.data||{}).shapes?g.shapes[0].it:[],m?f+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(m&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));m&&n&&n.setAttribute("d",f)}else{var P=this.textContainer,E="start";switch(i.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}P.setAttribute("text-anchor",E),P.setAttribute("letter-spacing",y);var x=this.buildTextContents(i.finalText);for(e=x.length,d=i.ps?i.ps[1]+i.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||createNS("tspan")).textContent=x[t],n.setAttribute("x",0),n.setAttribute("y",d),n.style.display="inherit",P.appendChild(n),this.textSpans[t]=n,d+=i.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var i,r,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(i=s[t],r=this.textSpans[t],i._mdf.m&&r.setAttribute("transform",i.m),i._mdf.o&&r.setAttribute("opacity",i.o),i._mdf.sw&&r.setAttribute("stroke-width",i.sw),i._mdf.sc&&r.setAttribute("stroke",i.sc),i._mdf.fc&&r.setAttribute("fill",i.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,i,r,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i<a;i+=1){for(r=this.stylesList[i],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(r)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var i,r=new SVGStyleData(t,e),s=r.pElem;if("st"===t.ty)i=new SVGStrokeStyleData(this,t,r);else if("fl"===t.ty)i=new SVGFillStyleData(this,t,r);else if("gf"===t.ty||"gs"===t.ty){i=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,r),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),s.setAttribute("mask","url("+locationHref+"#"+i.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(r),this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var i=TransformPropertyFactory.getTransformProperty(this,t,this),r=new SVGTransformData(i,i.o,e);return this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createShapeElement=function(t,e,i){var r=4;"rc"===t.ty?r=5:"el"===t.ty?r=6:"sr"===t.ty&&(r=7);var s=new SVGShapeData(e,i,ShapePropertyFactory.getShapeProp(this,t,r,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var i=0,r=this.animatedContents.length;i<r;){if(this.animatedContents[i].element===e)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,i=t.styles,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,i,r,s,a,n){var o,h,l,p,f,m,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=i[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==r&&r.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==r&&r.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],r)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),(e[o]=f).init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,i=this.animatedContents.length;for(t=0;t<i;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=3==i?0:e,s=2==i?0:e;this.feGaussianBlur.setAttribute("stdDeviation",r+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}},SVGStrokeEffect.prototype.initialize=function(){var t,e,i,r,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(r=this.elem.maskManager.masksProperties.length,i=0):r=(i=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);i<r;i+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+locationHref+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var i,r,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(i=this.elem.maskManager.viewData[this.paths[e].m],r=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&r.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=r.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;r.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,s=r[0]+" "+i[0]+" "+e[0],a=r[1]+" "+i[1]+" "+e[1],n=r[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var i=createNS(t);return i.setAttribute("type","table"),e.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(t,e,i,r,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-r,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:r:l<=a?c<0?r:s:r+m*Math.pow((a-t)/c,1/i),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=i).matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGEffects(t){var e,i,r=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<r;e+=1)i=null,20===t.data.ef[e].ty?(n+=1,i=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,i=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?i=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,i=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,i=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,i=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?i=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,i=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),i&&this.filters.push(i);n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+locationHref+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function CVEffects(){}function HBaseElement(){}function HSolidElement(t,e,i){this.initElement(t,e,i)}function HCompElement(t,e,i){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,i)}function HImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i)}function HCameraElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initHierarchy();var r=PropertyFactory.getProp;if(this.pe=r(this,t.pe,0,0,this),t.ks.p.s?(this.px=r(this,t.ks.p.x,1,0,this),this.py=r(this,t.ks.p.y,1,0,this),this.pz=r(this,t.ks.p.z,1,0,this)):this.p=r(this,t.ks.p,1,0,this),t.ks.a&&(this.a=r(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=r(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,t.ks.rx,0,degToRads,this),this.ry=r(this,t.ks.ry,0,degToRads,this),this.rz=r(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HEffects(){}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;e<i;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var r,s=i.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(r=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),r?i.insertBefore(o,r):i.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i=createElementID(),r=createNS("mask");r.setAttribute("id",e.layerId),r.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(r);var a=createNS("symbol");a.setAttribute("id",i),this.replaceInParent(e,i),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+i),r.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,i=0,r=e.length;i<r;)e[i]&&e[i].data.ind===t&&this.setElementAsMask(this.elem,e[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)},CVEffects.prototype.renderFrame=function(){},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([HybridRenderer,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var i,r=0;r<e;)this.elements[r]&&this.elements[r].getBaseElement&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(t,i):this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)e=t[i].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var i,r,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(i=0;i<l-1;i+=1)r=this.getTransformedPoint(h,o.v[i]),s=this.getTransformedPoint(h,o.o[i]),a=this.getTransformedPoint(h,o.i[i+1]),n=this.getTransformedPoint(h,o.v[i+1]),this.checkBounds(r,s,a,n,e);o.c&&(r=this.getTransformedPoint(h,o.v[i]),s=this.getTransformedPoint(h,o.o[i]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(r,s,a,n,e))}},HShapeElement.prototype.checkBounds=function(t,e,i,r,s){this.getBoundsOfCurve(t,e,i,r);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,i,r){for(var s,a,n,o,h,l,p,f=[[t[0],r[0]],[t[1],r[1]]],m=0;m<2;++m)a=6*t[m]-12*e[m]+6*i[m],s=-3*t[m]+9*e[m]-9*i[m]+3*r[m],n=3*e[m]-3*t[m],a|=0,n|=0,0===(s|=0)&&0===a||(0===s?0<(o=-n/a)&&o<1&&f[m].push(this.calculateF(o,t,e,i,r,m)):0<=(h=a*a-4*n*s)&&(0<(l=(-a+bmSqrt(h))/(2*s))&&l<1&&f[m].push(this.calculateF(l,t,e,i,r,m)),0<(p=(-a-bmSqrt(h))/(2*s))&&p<1&&f[m].push(this.calculateF(p,t,e,i,r,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,i,r,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*i[a]+3*(1-t)*bmPow(t,2)*r[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)t[i]&&t[i].sh?this.calculateShapeBoundingBox(t[i],e):t[i]&&t[i].it&&this.calculateBoundingBox(t[i].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var i=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),i=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),i=!0),i||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var r=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";r.transform=s,r.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,i=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=i,e.color=i,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var r,s,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var n=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=n}var h,l,p,f=t.l;s=f.length;var m,c=this.mHelper,d="",u=0;for(r=0;r<s;r+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?h=this.textPaths[u]:((h=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[u]?this.textPaths[u]:createNS("text"):this.textSpans[u]?(l=this.textSpans[u],h=this.textPaths[u]):(styleDiv(l=createTag("span")),styleDiv(h=createTag("span")),l.appendChild(h)),this.globalData.fontManager.chars){var y,g=this.globalData.fontManager.getCharData(t.finalText[r],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(y=g?g.data:null,c.reset(),y&&y.shapes&&(m=y.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),d=this.createPathShape(c,m),h.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(l),y&&y.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,P="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=P,b.webkitTransform=P,f[r].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(h.textContent=f[r].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(l);var E=h.style,x="translate3d(0,"+-t.finalSize/1.2+"px,0)";E.transform=x,E.webkitTransform=x}this.isMasked?this.textSpans[u]=h:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=h,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var i,r,s,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(r=l.length,i=0;i<r;i+=1)l[i].n?o+=1:(a=this.textSpans[i],n=this.textPaths[i],s=h[o],o+=1,s._mdf.m&&(this.isMasked?a.setAttribute("transform",s.m):(a.style.webkitTransform=s.m,a.style.transform=s.m)),a.style.opacity=s.o,s.sw&&s._mdf.sw&&n.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&n.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(n.setAttribute("fill",s.fc),n.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,i,r,s=this.comp.threeDElements.length;for(t=0;t<s;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){i=e.perspectiveElem.style,r=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";i.perspective=a,i.webkitPerspective=a,r.transformOrigin=n,r.mozTransformOrigin=n,r.webkitTransformOrigin=n,i.transform=o,i.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,i=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)i=this.hierarchy[t].finalTransform.mProp._mdf||i;if(i||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;0<=t;t-=1){var r=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var d=this.mat.toCSS();(c=f.container.style).transform=d,c.webkitTransform=d}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},HEffects.prototype.renderFrame=function(){};var animationManager=function(){var t={},s=[],r=0,a=0,n=0,o=!0,h=!1;function i(t){for(var e=0,i=t.target;e<a;)s[e].animation===i&&(s.splice(e,1),e-=1,a-=1,i.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var i=0;i<a;){if(s[i].elem===t&&null!==s[i].elem)return s[i].animation;i+=1}var r=new AnimationItem;return m(r,t),r.setData(t,e),r}function p(){n+=1,d()}function f(){n-=1}function m(t,e){t.addEventListener("destroy",i),t.addEventListener("_active",p),t.addEventListener("_idle",f),s.push({elem:e,animation:t}),a+=1}function c(t){var e,i=t-r;for(e=0;e<a;e+=1)s[e].animation.advanceTime(i);r=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){r=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var i;for(i=0;i<a;i+=1)s[i].animation.setSpeed(t,e)},t.setDirection=function(t,e){var i;for(i=0;i<a;i+=1)s[i].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,i){var r,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(r=0;r<a;r+=1)i&&s[r].setAttribute("data-bm-type",i),l(s[r],t);if(e&&0===a){i||(i="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",i),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,i){var r;for(r=0;r<a;r+=1)s[r].animation.goToAndStop(t,e,i)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var i;for(i=0;i<a;i+=1)s[i].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,i=[];for(t=0;t<e;t+=1)i.push(s[t].animation);return i},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var i={wrapper:t,animationData:e},r=t.attributes;i.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",i.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:"canvas";var s=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";"false"===s?i.loop=!1:"true"===s?i.loop=!0:""!==s&&(i.loop=parseInt(s,10));var a=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:!r.getNamedItem("bm-autoplay")||r.getNamedItem("bm-autoplay").value;i.autoplay="false"!==a,i.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"","false"===(r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"")&&(i.prerender=!1),this.setParams(i)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,r=this.animationData.layers,s=r.length,a=t.layers,n=a.length;for(i=0;i<n;i+=1)for(e=0;e<s;){if(r[e].id===a[i].id){r[e]=a[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,i=0;i<this.markers.length;i+=1)if((e=this.markers[i]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,i){if(!i||this.name===i){var r=Number(t);if(isNaN(r)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,i){if(!i||this.name===i){var r=Number(t);if(isNaN(r)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(r,e,i);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?i=t:this.currentRawFrame+this.firstFrame>e&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var i,r=t.length;for(i=0;i<r;i+=1)this.segments.push(t[i])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var i=t.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;e<i;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(qV={},qV.initExpressions=function(t){var e=0,i=[];function r(){var t,e=i.length;for(t=0;t<e;t+=1)i[t].release();i.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&r()},t.renderer.globalData.registerExpressionProperty=function(t){-1===i.indexOf(t)&&i.push(t)}},qV),qV;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var i,r=t.length,s=[];for(i=0;i<r;i+=1)s[i]=-t[i];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var i=typeof t,r=typeof e;if("string"===i||"string"===r)return t+e;if(isNumerable(i,t)&&isNumerable(r,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(r,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var i=typeof t,r=typeof e;if(isNumerable(i,t)&&isNumerable(r,e))return"string"===i&&(t=parseInt(t,10)),"string"===r&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(r,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var i,r,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t[r]*e;return i}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t*e[r];return i}return 0}function div(t,e){var i,r,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t[r]/e;return i}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t/e[r];return i}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,i){if(i<e){var r=i;i=e,e=r}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var i;e||(e=helperLengthArray);var r=Math.min(t.length,e.length),s=0;for(i=0;i<r;i+=1)s+=Math.pow(e[i]-t[i],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,i,r=t[0],s=t[1],a=t[2],n=Math.max(r,s,a),o=Math.min(r,s,a),h=(n+o)/2;if(n===o)i=e=0;else{var l=n-o;switch(i=.5<h?l/(2-n-o):l/(n+o),n){case r:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-r)/l+2;break;case a:e=(r-s)/l+4}e/=6}return[e,i,h,t[3]]}function hue2rgb(t,e,i){return i<0&&(i+=1),1<i&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,r,s=t[0],a=t[1],n=t[2];if(0===a)i=r=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),i=hue2rgb(h,o,s),r=hue2rgb(h,o,s-1/3)}return[e,i,r,t[3]]}function linear(t,e,i,r,s){if(void 0!==r&&void 0!==s||(r=e,s=i,e=0,i=1),i<e){var a=i;i=e,e=a}if(t<=e)return r;if(i<=t)return s;var n,o=i===e?0:(t-e)/(i-e);if(!r.length)return r+(s-r)*o;var h=r.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=r[n]+(s[n]-r[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var i,r=e.length;t||(t=createTypedArray("float32",r));var s=createTypedArray("float32",r),a=BMMath.random();for(i=0;i<r;i+=1)s[i]=t[i]+a*(e[i]-t[i]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,i,r){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!r,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=i&&i[s]?i[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var i,r,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(r=i=0;i<n;){for(r=0;r<s;r+=1)a[r]+=-e+2*e*BMMath.random();i+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(r=0;r<s;r+=1)l[r]=this.pv[r]+a[r]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var i=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],r=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads;return[-Math.atan2(i[1],i[2])/degToRads,r,0]}function easeOut(t,e,i,r,s){return applyEase(easeOutBez,t,e,i,r,s)}function easeIn(t,e,i,r,s){return applyEase(easeInBez,t,e,i,r,s)}function ease(t,e,i,r,s){return applyEase(easeInOutBez,t,e,i,r,s)}function applyEase(t,e,i,r,s,a){void 0===s?(s=i,a=r):e=(e-i)/(r-i),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,i,r,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(i=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)i=1,r=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){i=e+1,r=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){r=t-data.k[e].t>data.k[e+1].t-t?(i=e+2,data.k[e+1].t):(i=e+1,data.k[e].t);break}}-1===i&&(i=e+1,r=data.k[e].t)}else r=i=0;var a={};return a.index=i,a.time=r/elem.comp.globalData.frameRate,a}function key(t){var e,i,r;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(r=s.length,i=0;i<r;i+=1)e[i]=s[i],e.value[i]=s[i];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,i){e.x&&(i.k=!0,i.x=!0,i.initiateExpression=ExpressionManager.initiateExpression,i.effectsSequence.push(i.initiateExpression(t,e,i).bind(i)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),i=this.getValueAtTime(t+-.01),r=0;if(e.length){var s;for(s=0;s<e.length;s+=1)r+=Math.pow(i[s]-e[s],2);r=100*Math.sqrt(r)}else r=0;return r},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,i,r=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(r.length)for(e=createTypedArray("float32",r.length),i=0;i<r.length;i+=1)e[i]=(s[i]-r[i])/-.001;else e=(s-r)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,i){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var r,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(i?s=p-(r=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),r=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/r)%2!=0)return this.getValueAtTime((r-(h-s)%r+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%r+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/r);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*d+c[a];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%r+s)/this.comp.globalData.frameRate,0)}function h(t,e,i){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var r,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(i?s=p+(r=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),r=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/r)%2==0)return this.getValueAtTime(((p-h)%r+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((r-(p-h)%r+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/r)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((r-((p-h)%r+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var i,r,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(i=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(r=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)i[h]+=r[h];else i+=r;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)i[h]/=e;else i/=e;return i}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,i){var r=s(t,e,i);return r.dynamicProperties.length?r.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var i=this.a.getValueAtTime(t);e.translate(-i[0]*this.a.mult,-i[1]*this.a.mult,i[2]*this.a.mult)}if(this.appliedTransformations<2){var r=this.s.getValueAtTime(t);e.scale(r[0]*this.s.mult,r[1]*this.s.mult,r[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(r):r.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(r),r.setGroupProperty=expressionHelpers.setGroupProperty,r};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,i,r,s){var a=p(t,e,i,r,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==i&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function i(){}i.prototype={vertices:function(t,e){this.k&&this.getValue();var i,r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0));var s=r._length,a=r[t],n=r.v,o=createSizedArray(s);for(i=0;i<s;i+=1)o[i]="i"===t||"o"===t?[a[i][0]-n[i][0],a[i][1]-n[i][1]]:[a[i][0],a[i][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(i));for(var r,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=i.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;r=bez.getPointInSegment(i.v[p],i.v[f],i.o[p],i.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return r||(r=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),r},vectorOnPath:function(t,e,i){1==t?t=this.v.c:0==t&&(t=.999);var r=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-r[0],n=s[1]-r[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===i?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([i],t),extendPrototype([i],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,i,r,s){var a=n(t,e,i,r,s);return a.propertyIndex=e.ix,a.lock=!1,3===i?expressionHelpers.searchExpressions(t,e.pt,a):4===i&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var i=this.calculateExpression(e);if(t.t===i)return t;var r={};return this.copyData(r,t),r.t=i.toString(),r.__complete=!1,r},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null};var ShapePathInterface=function(t,e,i){var r=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,i);return r.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return r.k&&r.getValue(),r}},shape:{get:function(){return r.k&&r.getValue(),r}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:i}}),s},propertyGroupFactory=function(e,i){return function(t){return(t=void 0===t?1:t)<=0?e:i(t-1)}},PropertyInterface=function(t,e){var i={_name:t};return function(t){return(t=void 0===t?1:t)<=0?i:e(t-1)}},ShapeExpressionInterface=function(){function n(t,e,i){var r,s=[],a=t?t.length:0;for(r=0;r<a;r+=1)"gr"===t[r].ty?s.push(o(t[r],e[r],i)):"fl"===t[r].ty?s.push(h(t[r],e[r],i)):"st"===t[r].ty?s.push(f(t[r],e[r],i)):"tm"===t[r].ty?s.push(m(t[r],e[r],i)):"tr"===t[r].ty||("el"===t[r].ty?s.push(d(t[r],e[r],i)):"sr"===t[r].ty?s.push(u(t[r],e[r],i)):"sh"===t[r].ty?s.push(ShapePathInterface(t[r],e[r],i)):"rc"===t[r].ty?s.push(y(t[r],e[r],i)):"rd"===t[r].ty?s.push(g(t[r],e[r],i)):"rp"===t[r].ty?s.push(v(t[r],e[r],i)):"gf"===t[r].ty?s.push(l(t[r],e[r],i)):s.push(p(t[r],e[r])));return s}function o(t,e,i){var r=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=propertyGroupFactory(r,i);var s=function(t,e,i){var r,s=function(t){for(var e=0,i=r.length;e<i;){if(r[e]._name===t||r[e].mn===t||r[e].propertyIndex===t||r[e].ix===t||r[e].ind===t)return r[e];e+=1}return"number"==typeof t?r[t-1]:null};s.propertyGroup=propertyGroupFactory(s,i),r=n(t.it,e.it,s.propertyGroup),s.numProperties=r.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,r.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],r.propertyGroup);return r.content=s,r.transform=a,Object.defineProperty(r,"_name",{get:function(){return t.nm}}),r.numProperties=t.np,r.propertyIndex=t.ix,r.nm=t.nm,r.mn=t.mn,r}function h(t,e,i){function r(t){return"Color"===t||"color"===t?r.color:"Opacity"===t||"opacity"===t?r.opacity:null}return Object.defineProperties(r,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),r}function l(t,e,i){function r(t){return"Start Point"===t||"start point"===t?r.startPoint:"End Point"===t||"end point"===t?r.endPoint:"Opacity"===t||"opacity"===t?r.opacity:null}return Object.defineProperties(r,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",i)),e.e.setGroupProperty(PropertyInterface("End Point",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),r}function p(){return function(){return null}}function f(t,e,i){var r,s=propertyGroupFactory(l,i),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(r=0;r<o;r+=1)n=r,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[r].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function m(e,t,i){function r(t){return t===e.e.ix||"End"===t||"end"===t?r.end:t===e.s.ix?r.start:t===e.o.ix?r.offset:null}var s=propertyGroupFactory(r,i);return r.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),r.propertyIndex=e.ix,r.propertyGroup=i,Object.defineProperties(r,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),r.mn=e.mn,r}function c(e,t,i){function r(t){return e.a.ix===t||"Anchor Point"===t?r.anchorPoint:e.o.ix===t||"Opacity"===t?r.opacity:e.p.ix===t||"Position"===t?r.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?r.rotation:e.s.ix===t||"Scale"===t?r.scale:e.sk&&e.sk.ix===t||"Skew"===t?r.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?r.skewAxis:null}var s=propertyGroupFactory(r,i);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(r,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),r.ty="tr",r.mn=e.mn,r.propertyGroup=i,r}function d(e,t,i){function r(t){return e.p.ix===t?r.position:e.s.ix===t?r.size:null}var s=propertyGroupFactory(r,i);r.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(r,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),r.mn=e.mn,r}function u(e,t,i){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.rotation:e.pt.ix===t?r.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?r.outerRadius:e.os.ix===t?r.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?r.innerRoundness:null:r.innerRadius}var s=propertyGroupFactory(r,i),a="tm"===t.sh.ty?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),r.mn=e.mn,r}function y(e,t,i){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?r.size:null}var s=propertyGroupFactory(r,i),a="tm"===t.sh.ty?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),r.mn=e.mn,r}function g(e,t,i){function r(t){return e.r.ix===t||"Round Corners 1"===t?r.radius:null}var s=propertyGroupFactory(r,i),a=t;return r.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(r,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),r.mn=e.mn,r}function v(e,t,i){function r(t){return e.c.ix===t||"Copies"===t?r.copies:e.o.ix===t||"Offset"===t?r.offset:null}var s=propertyGroupFactory(r,i),a=t;return r.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(r,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),r.mn=e.mn,r}return function(t,e,r){var s;function i(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?r:s[t-1];for(var e=0,i=s.length;e<i;){if(s[e]._name===t)return s[e];e+=1}return null}return i.propertyGroup=propertyGroupFactory(i,function(){return r}),s=n(t,e,i.propertyGroup),i.numProperties=s.length,i._name="Contents",i}}(),TextExpressionInterface=function(e){var i;function r(t){switch(t){case"ADBE Text Document":return r.sourceText;default:return null}}return Object.defineProperty(r,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(i=new String(t)).value=t||new String(t)),i}}),r},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.applyPoint(i,t)}function n(t,e){var i=this.getMatrix(e);return this.applyPoint(i,t)}function o(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.invertPoint(i,t)}function h(t,e){var i=this.getMatrix(e);return this.invertPoint(i,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function f(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function m(){return[1,1,1,1]}return function(e){var i;function r(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return r.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return i;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return r.effect;case"ADBE Text Properties":return r.textInterface;default:return null}}r.getMatrix=s,r.invertPoint=p,r.applyPoint=l,r.toWorld=n,r.toWorldVec=a,r.fromWorld=h,r.fromWorldVec=o,r.toComp=n,r.fromComp=f,r.sampleImage=m,r.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(i=TransformExpressionInterface((r._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(r,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(i,"rotation"),scale:getDescriptor(i,"scale"),position:getDescriptor(i,"position"),opacity:getDescriptor(i,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return i}},active:{get:function(){return e.isInRange}}}),r.startTime=e.data.st,r.index=e.data.ind,r.source=e.data.refId,r.height=0===e.data.ty?e.data.h:100,r.width=0===e.data.ty?e.data.w:100,r.inPoint=e.data.ip/e.comp.globalData.frameRate,r.outPoint=e.data.op/e.comp.globalData.frameRate,r._name=e.data.nm,r.registerMaskInterface=function(t){r.mask=new MaskManagerInterface(t,e)},r.registerEffectsInterface=function(t){r.effect=t},r}}(),FootageInterface=(c3=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var r="",s=t.getFootageData();function a(t){if(s[t])return"object"==typeof(s=s[r=t])?a:s;var e=t.indexOf(r);if(-1===e)return"";var i=parseInt(t.substr(e+r.length),10);return"object"==typeof(s=s[i])?a:s}return function(){return r="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=c3(t),e}),c3,CompExpressionInterface=function(r){function t(t){for(var e=0,i=r.layers.length;e<i;){if(r.layers[e].nm===t||r.layers[e].ind===t)return r.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:r.data.nm}),(t.layer=t).pixelAspect=1,t.height=r.data.h||r.globalData.compSize.h,t.width=r.data.w||r.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/r.globalData.frameRate,t.displayStartTime=0,t.numLayers=r.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var i,r,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(i=ExpressionPropertyInterface(t.px),r=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[i(),r(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,i=this.compositions.length;e<i;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function l(s,t,e,i){function r(t){for(var e=s.ef,i=0,r=e.length;i<r;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?o[i]:o[i]();i+=1}throw new Error}var a,n=propertyGroupFactory(r,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,i)):o.push(p(t.effectElements[a],s.ef[a].ty,i,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(r,"color",{get:function(){return o[0]()}}),Object.defineProperties(r,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),r.enabled=0!==s.en,r.active=r.enabled,r}function p(t,e,i,r){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",r)),function(){return 10===e?i.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var i,r=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(i=0;i<a;i+=1)r.push(l(s[i],t.effectsManager.effectElements[i],e,t));var n=t.data.ef||[],o=function(t){for(i=0,a=n.length;i<a;){if(t===n[i].nm||t===n[i].mn||t===n[i].ix)return r[i];i+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var i,r=createSizedArray(e.viewData.length),s=e.viewData.length;for(i=0;i<s;i+=1)r[i]=new t(e.viewData[i],e.masksProperties[i]);return function(t){for(i=0;i<s;){if(e.masksProperties[i].nm===t)return r[i];i+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(r,s,a){Object.defineProperty(r,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),r.numKeys=s.keyframes?s.keyframes.length:0,r.key=function(t){if(!r.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var i="unidimensional"===a?new Number(e):Object.assign({},e);return i.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,i.value="unidimensional"===a?e[0]:e,i},r.valueAtTime=s.getValueAtTime,r.speedAtTime=s.getSpeedAtTime,r.velocityAtTime=s.getVelocityAtTime,r.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,i=t.pv*e,r=new Number(i);return r.value=i,o(r,t,"unidimensional"),function(){return t.k&&t.getValue(),i=t.v*e,r.value!==i&&((r=new Number(i)).value=i,o(r,t,"unidimensional")),r}}(t):function(e){e&&"pv"in e||(e=n);var i=1/e.mult,r=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",r),a=createTypedArray("float32",r);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<r;t+=1)a[t]=e.v[t]*i,s[t]=a[t];return s}}(t):e}}(),TextExpressionSelectorPropFactory=function(){function i(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=i,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;function SliderEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function AngleEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function ColorEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function PointEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function LayerIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function MaskIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function CheckboxEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var i,r=t.ef||[];this.effectElements=[];var s,a=r.length;for(i=0;i<a;i+=1)s=new GroupEffect(r[i],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}TextSelectorProp.getTextSelectorProp=function(t,e,i){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,i):propertyGetTextProp(t,e,i)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var i;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var r,s=this.data.ef.length,a=this.data.ef;for(i=0;i<s;i+=1){switch(r=null,a[i].ty){case 0:r=new SliderEffect(a[i],e,this);break;case 1:r=new AngleEffect(a[i],e,this);break;case 2:r=new ColorEffect(a[i],e,this);break;case 3:r=new PointEffect(a[i],e,this);break;case 4:case 7:r=new CheckboxEffect(a[i],e,this);break;case 10:r=new LayerIndexEffect(a[i],e,this);break;case 11:r=new MaskIndexEffect(a[i],e,this);break;case 5:r=new EffectsManager(a[i],e,this);break;default:r=new NoValueEffect(a[i],e,this)}r&&this.effectElements.push(r)}};var lottie={};function setLocationHref(t){locationHref=t}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){subframeEnabled=t}function setIDPrefix(t){idPrefix=t}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;default:case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),i=0;i<e.length;i+=1){var r=e[i].split("=");if(decodeURIComponent(r[0])==t)return decodeURIComponent(r[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocationHref,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=function(t){_useWebWorker=t},lottie.setIDPrefix=setIDPrefix,lottie.__getFactory=getFactory,lottie.version="5.8.1";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,r){return"float32"===e?new Float32Array(r):"int16"===e?new Int16Array(r):"uint8c"===e?new Uint8ClampedArray(r):t(e,r)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,idPrefix="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix=t},getIdPrefix=function(){return idPrefix};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,r=1,i=[],s={onmessage:function(){},postMessage:function(e){t({data:e})}},a={postMessage:function(t){s.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(r);return new Worker(i)}return t=e,s}((function(t){if(a.dataManager||(a.dataManager=function(){function t(s,a){var n,o,h,l,p,m,c=s.length;for(o=0;o<c;o+=1)if("ks"in(n=s[o])&&!n.completed){if(n.completed=!0,n.tt&&(s[o-1].td=n.tt),n.hasMask){var d=n.masksProperties;for(l=d.length,h=0;h<l;h+=1)if(d[h].pt.k.i)i(d[h].pt.k);else for(m=d[h].pt.k.length,p=0;p<m;p+=1)d[h].pt.k[p].s&&i(d[h].pt.k[p].s[0]),d[h].pt.k[p].e&&i(d[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,a),t(n.layers,a)):4===n.ty?r(n.shapes):5===n.ty&&f(n)}}function e(t,e){var r=function(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r];r+=1}return null}(t,e);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(t){var e,s,a;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(a=t[e].ks.k.length,s=0;s<a;s+=1)t[e].ks.k[s].s&&i(t[e].ks.k[s].s[0]),t[e].ks.k[s].e&&i(t[e].ks.k[s].e[0]);else"gr"===t[e].ty&&r(t[e].it)}function i(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function s(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=void 0,i=(r=t[e]).t.d,r.t.d={k:[{s:i,t:0}]})}return function(r){if(s(t,r.v)&&(e(r.layers),r.assets)){var i,a=r.assets.length;for(i=0;i<a;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),o=(a=[4,7,99],function(t){if(t.chars&&!s(a,t.v)){var e,i=t.chars.length;for(e=0;e<i;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(r(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,r,i=t.length;for(e=0;e<i;e+=1)5===t[e].ty&&(r=void 0,"number"==typeof(r=t[e].t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(r){if(s(t,r.v)&&(e(r.layers),r.assets)){var i,a=r.assets.length;for(i=0;i<a;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var r,i,s,a=t.length;for(r=0;r<a;r+=1)if("gr"===t[r].ty)e(t[r].it);else if("fl"===t[r].ty||"st"===t[r].ty)if(t[r].c.k&&t[r].c.k[0].i)for(s=t[r].c.k.length,i=0;i<s;i+=1)t[r].c.k[i].s&&(t[r].c.k[i].s[0]/=255,t[r].c.k[i].s[1]/=255,t[r].c.k[i].s[2]/=255,t[r].c.k[i].s[3]/=255),t[r].c.k[i].e&&(t[r].c.k[i].e[0]/=255,t[r].c.k[i].e[1]/=255,t[r].c.k[i].e[2]/=255,t[r].c.k[i].e[3]/=255);else t[r].c.k[0]/=255,t[r].c.k[1]/=255,t[r].c.k[2]/=255,t[r].c.k[3]/=255}function r(t){var r,i=t.length;for(r=0;r<i;r+=1)4===t[r].ty&&e(t[r].shapes)}return function(e){if(s(t,e.v)&&(r(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var r,i,s;for(r=t.length-1;r>=0;r-=1)if("sh"===t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(s=t[r].ks.k.length,i=0;i<s;i+=1)t[r].ks.k[i].s&&(t[r].ks.k[i].s[0].c=t[r].closed),t[r].ks.k[i].e&&(t[r].ks.k[i].e[0].c=t[r].closed);else"gr"===t[r].ty&&e(t[r].it)}function r(t){var r,i,s,a,n,o,h=t.length;for(i=0;i<h;i+=1){if((r=t[i]).hasMask){var l=r.masksProperties;for(a=l.length,s=0;s<a;s+=1)if(l[s].pt.k.i)l[s].pt.k.c=l[s].cl;else for(o=l[s].pt.k.length,n=0;n<o;n+=1)l[s].pt.k[n].s&&(l[s].pt.k[n].s[0].c=l[s].cl),l[s].pt.k[n].e&&(l[s].pt.k[n].e[0].c=l[s].cl)}4===r.ty&&e(r.shapes)}}return function(e){if(s(t,e.v)&&(r(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var m={completeData:function(r){r.__complete||(l(r),n(r),o(r),h(r),p(r),t(r.layers,r.assets),function(r,i){if(r){var s=0,a=r.length;for(s=0;s<a;s+=1)1===r[s].t&&(r[s].data.layers=e(r[s].data.refId,i),t(r[s].data.layers,i))}}(r.chars,r.assets),r.__complete=!0)}};return m.checkColors=l,m.checkChars=o,m.checkPathProperties=h,m.checkShapes=p,m.completeLayers=t,m}()),a.assetLoader||(a.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,i,s){var a,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)a=t(n),i(a);else try{a=t(n),i(a)}catch(t){s&&s(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",r+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)a.assetLoader.load(t.data.path,t.data.fullPath,(function(e){a.dataManager.completeData(e),a.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){a.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;a.dataManager.completeData(e),a.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&a.assetLoader.load(t.data.path,t.data.fullPath,(function(e){a.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){a.postMessage({id:t.data.id,status:"error"})}))})),e.onmessage=function(t){var e=t.data,r=e.id,s=i[r];i[r]=null,"success"===e.status?s.onComplete(e.payload):s.onError&&s.onError()})}function o(t,e){var s="processId_"+(r+=1);return i[s]={onComplete:t,onError:e},s}return{loadAnimation:function(t,r,i){n();var s=o(r,i);e.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:s})},loadData:function(t,r,i){n();var s=o(r,i);e.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:s})},completeAnimation:function(t,r,i){n();var s=o(r,i);e.postMessage({type:"complete",animation:t,id:s})}}}(),ImagePreloader=function(){var t=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function s(t){var e=0,r=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},r=i(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var r=i(e,this.assetsPath,this.path),s=createTag("img");s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),s.src=r;var a={img:s,assetData:e};return a},createImageData:function(e){var r=i(e,this.assetsPath,this.path),s=createNS("image");isSafari?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(s):this._elementHelper.appendChild(s);var a={img:s,assetData:e};return a},imageLoaded:e,footageLoaded:r,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},n}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var r=[],i=0;i<e.length;i+=1){var s=e[i],a={time:s.tm,duration:s.dr};try{a.payload=JSON.parse(e[i].cm)}catch(r){try{a.payload=t(e[i].cm)}catch(t){a.payload={name:e[i]}}}r.push(a)}return r}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,i=0,s=0,a=!0,n=!1;function o(t){for(var r=0,s=t.target;r<i;)e[r].animation===s&&(e.splice(r,1),r-=1,i-=1,s.isPaused||p()),r+=1}function h(t,r){if(!t)return null;for(var s=0;s<i;){if(e[s].elem===t&&null!==e[s].elem)return e[s].animation;s+=1}var a=new AnimationItem;return f(a,t),a.setData(t,r),a}function l(){s+=1,d()}function p(){s-=1}function f(t,r){t.addEventListener("destroy",o),t.addEventListener("_active",l),t.addEventListener("_idle",p),e.push({elem:r,animation:t}),i+=1}function m(t){var o,h=t-r;for(o=0;o<i;o+=1)e[o].animation.advanceTime(h);r=t,s&&!n?window.requestAnimationFrame(m):a=!0}function c(t){r=t,window.requestAnimationFrame(m)}function d(){!n&&s&&a&&(window.requestAnimationFrame(c),a=!1)}return t.registerAnimation=h,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,r){var s;for(s=0;s<i;s+=1)e[s].animation.setSpeed(t,r)},t.setDirection=function(t,r){var s;for(s=0;s<i;s+=1)e[s].animation.setDirection(t,r)},t.play=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.play(t)},t.pause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.pause(t)},t.stop=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.stop(t)},t.togglePause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),h(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),h(o,t)}},t.resize=function(){var t;for(t=0;t<i;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,r,s){var a;for(a=0;a<i;a+=1)e[a].animation.goToAndStop(t,r,s)},t.destroy=function(t){var r;for(r=i-1;r>=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,d()},t.setVolume=function(t,r){var s;for(s=0;s<i;s+=1)e[s].animation.setVolume(t,r)},t.mute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.mute(t)},t.unmute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,r=e.length,i=[];for(t=0;t<r;t+=1)i.push(e[t].animation);return i},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,r,i,s,a){var n=a||("bez_"+t+"_"+r+"_"+i+"_"+s).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,r,i,s]);return e[n]=o,o}},e={};var r=.1,i="function"==typeof Float32Array;function s(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,r){return((s(e,r)*t+a(e,r))*t+n(e))*t}function h(t,e,r){return 3*s(e,r)*t*t+2*a(e,r)*t+n(e)}function l(t){this._p=t,this._mSampleValues=i?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:o(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<11;++i)this._mSampleValues[i]=o(i*r,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],s=this._mSampleValues,a=0,n=1;10!==n&&s[n]<=t;++n)a+=r;var l=a+(t-s[--n])/(s[n+1]-s[n])*r,p=h(l,e,i);return p>=.001?function(t,e,r,i){for(var s=0;s<4;++s){var a=h(e,r,i);if(0===a)return e;e-=(o(e,r,i)-t)/a}return e}(t,l,e,i):0===p?l:function(t,e,r,i,s){var a,n,h=0;do{(a=o(n=e+(r-e)/2,i,s)-t)>0?r=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+r,e,i)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}));function bezFunction(){var t=Math;function e(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return n>-.001&&n<.001}var r=function(t,e,r,i){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),l=0,a=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=f}return d.addedLength=f,d};function i(t){this.segmentLength=0,this.points=new Array(t)}function s(t,e){this.partialLength=t,this.point=e}var a,n=(a={},function(t,r,n,o){var h=(t[0]+"_"+t[1]+"_"+r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!a[h]){var l,p,f,m,c,d,u,y=getDefaultCurveSegments(),g=0,v=null;2===t.length&&(t[0]!==r[0]||t[1]!==r[1])&&e(t[0],t[1],r[0],r[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(y=2);var b=new i(y);for(f=n.length,l=0;l<y;l+=1){for(u=createSizedArray(f),c=l/(y-1),d=0,p=0;p<f;p+=1)m=bmPow(1-c,3)*t[p]+3*bmPow(1-c,2)*c*(t[p]+n[p])+3*(1-c)*bmPow(c,2)*(r[p]+o[p])+bmPow(c,3)*r[p],u[p]=m,null!==v&&(d+=bmPow(u[p]-v[p],2));g+=d=bmSqrt(d),b.points[l]=new s(d,u),v=u}b.segmentLength=g,a[h]=b}return a[h]});function o(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||a>=s-1){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),s=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=r(a[e],a[e+1],n[e],o[e+1]),p+=l[e].addedLength;return s&&h&&(l[e]=r(a[e],a[0],n[e],o[0]),p+=l[e].addedLength),i.totalLength=p,i},getNewSegment:function(e,r,i,s,a,n,l){a<0?a=0:a>1&&(a=1);var p,f=o(a,l),m=o(n=n>1?1:n,l),c=e.length,d=1-f,u=1-m,y=d*d*d,g=f*d*d*3,v=f*f*d*3,b=f*f*f,P=d*d*u,E=f*d*u+d*f*u+d*d*m,S=f*f*u+d*f*m+f*d*m,x=f*f*m,A=d*u*u,_=f*u*u+d*m*u+d*u*m,k=f*m*u+d*m*m+f*u*m,T=f*m*m,M=u*u*u,D=m*u*u+u*m*u+u*u*m,C=m*m*u+u*m*m+m*u*m,F=m*m*m;for(p=0;p<c;p+=1)h[4*p]=t.round(1e3*(y*e[p]+g*i[p]+v*s[p]+b*r[p]))/1e3,h[4*p+1]=t.round(1e3*(P*e[p]+E*i[p]+S*s[p]+x*r[p]))/1e3,h[4*p+2]=t.round(1e3*(A*e[p]+_*i[p]+k*s[p]+T*r[p]))/1e3,h[4*p+3]=t.round(1e3*(M*e[p]+D*i[p]+C*s[p]+F*r[p]))/1e3;return h},getPointInSegment:function(e,r,i,s,a,n){var h=o(a,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*i[0]+(h*h*l+l*h*h+h*l*h)*s[0]+h*h*h*r[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*i[1]+(h*h*l+l*h*h+h*l*h)*s[1]+h*h*h*r[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(r,i,s,a,n,o,h,l,p){if(0===s&&0===o&&0===p)return e(r,i,a,n,h,l);var f,m=t.sqrt(t.pow(a-r,2)+t.pow(n-i,2)+t.pow(o-s,2)),c=t.sqrt(t.pow(h-r,2)+t.pow(l-i,2)+t.pow(p-s,2)),d=t.sqrt(t.pow(h-a,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=m>c?m>d?m-c-d:d-c-m:d>c?d-c-m:c-m-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(t,e){var r,s=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,n,o,h,l,p,f,m,c,d=e.lastIndex,u=d,y=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[u],n=this.keyframes[u+1],u===y-1&&t>=n.t-s){a.h&&(a=n),d=0;break}if(n.t-s>t){d=u;break}u<y-1?u+=1:(d=0,g=!1)}o=this.keyframesMetadata[u]||{};var v,b,P,E,S,x,A,_,k,T,M=n.t-s,D=a.t-s;if(a.to){o.bezierData||(o.bezierData=bez.buildBezierData(a.s,n.s||a.e,a.to,a.ti));var C=o.bezierData;if(t>=M||t<D){var F=t>=M?C.points.length-1:0;for(l=C.points[F].point.length,h=0;h<l;h+=1)r[h]=C.points[F].point[h]}else{o.__fnct?c=o.__fnct:(c=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,o.__fnct=c),p=c((t-D)/(M-D));var I,w=C.segmentLength*p,B=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastPoint:0,g=!0,f=C.points.length;g;){if(B+=C.points[m].partialLength,0===w||0===p||m===C.points.length-1){for(l=C.points[m].point.length,h=0;h<l;h+=1)r[h]=C.points[m].point[h];break}if(w>=B&&w<B+C.points[m+1].partialLength){for(I=(w-B)/C.points[m+1].partialLength,l=C.points[m].point.length,h=0;h<l;h+=1)r[h]=C.points[m].point[h]+(C.points[m+1].point[h]-C.points[m].point[h])*I;break}m<f-1?m+=1:g=!1}e._lastPoint=m,e._lastAddedLength=B-C.points[m].partialLength,e._lastKeyframeIndex=u}}else{var V,R,L,G,z;if(y=a.s.length,v=n.s||a.e,this.sh&&1!==a.h)if(t>=M)r[0]=v[0],r[1]=v[1],r[2]=v[2];else if(t<=D)r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2];else{var N=i(a.s),O=i(v);b=r,P=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];return(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y),1-s>1e-6?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,o=Math.sin(r*i)/a):(n=1-r,o=r),h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(N,O,(t-D)/(M-D)),E=P[0],S=P[1],x=P[2],A=P[3],_=Math.atan2(2*S*A-2*E*x,1-2*S*S-2*x*x),k=Math.asin(2*E*S+2*x*A),T=Math.atan2(2*E*A-2*S*x,1-2*E*E-2*x*x),b[0]=_/degToRads,b[1]=k/degToRads,b[2]=T/degToRads}else for(u=0;u<y;u+=1)1!==a.h&&(t>=M?p=1:t<D?p=0:(a.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[u]?c=o.__fnct[u]:(V=void 0===a.o.x[u]?a.o.x[0]:a.o.x[u],R=void 0===a.o.y[u]?a.o.y[0]:a.o.y[u],L=void 0===a.i.x[u]?a.i.x[0]:a.i.x[u],G=void 0===a.i.y[u]?a.i.y[0]:a.i.y[u],c=BezierFactory.getBezierEasing(V,R,L,G).get,o.__fnct[u]=c)):o.__fnct?c=o.__fnct:(V=a.o.x,R=a.o.y,L=a.i.x,G=a.i.y,c=BezierFactory.getBezierEasing(V,R,L,G).get,a.keyframeMetadata=c),p=c((t-D)/(M-D)))),v=n.s||a.e,z=1===a.h?a.s[u]:a.s[u]+(v[u]-a.s[u])*p,"multidimensional"===this.propType?r[u]=z:r=z}return e.lastIndex=d,r}function i(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function s(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<r&&e<r))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function a(t){var r;if("unidimensional"===this.propType)r=t*this.mult,e(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var i=0,s=this.v.length;i<s;)r=t[i]*this.mult,e(this.v[i]-r)>1e-5&&(this.v[i]=r,this._mdf=!0),i+=1}function n(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=n,this.setVValue=a,this.addEffect=o}function l(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var h=e.k.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),this.vel=createTypedArray("float32",h),s=0;s<h;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=n,this.setVValue=a,this.addEffect=o}function p(e,i,h,l){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=n,this.setVValue=a,this.interpolateValue=r,this.effectsSequence=[s.bind(this)],this.addEffect=o}function f(e,i,h,l){var p;this.propType="multidimensional";var f,m,c,d,u=i.k.length;for(p=0;p<u-1;p+=1)i.k[p].to&&i.k[p].s&&i.k[p+1]&&i.k[p+1].s&&(f=i.k[p].s,m=i.k[p+1].s,c=i.k[p].to,d=i.k[p].ti,(2===f.length&&(f[0]!==m[0]||f[1]!==m[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],f[0]+c[0],f[1]+c[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],m[0]+d[0],m[1]+d[1])||3===f.length&&(f[0]!==m[0]||f[1]!==m[1]||f[2]!==m[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],f[0]+c[0],f[1]+c[1],f[2]+c[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],m[0]+d[0],m[1]+d[1],m[2]+d[2]))&&(i.k[p].to=null,i.k[p].ti=null),f[0]===m[0]&&f[1]===m[1]&&0===c[0]&&0===c[1]&&0===d[0]&&0===d[1]&&(2===f.length||f[2]===m[2]&&0===c[2]&&0===d[2])&&(i.k[p].to=null,i.k[p].ti=null));this.effectsSequence=[s.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.getValue=n,this.setVValue=a,this.interpolateValue=r,this.frameId=-1;var y=i.k[0].s.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),p=0;p<y;p+=1)this.v[p]=t,this.pv[p]=t;this._caching={lastFrame:t,lastIndex:0,value:createTypedArray("float32",y)},this.addEffect=o}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new l(t,e,i,s);else switch(r){case 0:a=new p(t,e,i,s);break;case 1:a=new f(t,e,i,s)}else a=new h(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})),factory.clone=function(t){var e,r=factory.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var t=-999999;function e(t,e,r){var i,s,a,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=P),p=P((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function r(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,s=this._caching.lastFrame;return s!==t&&(s<r&&e<r||s>i&&e>i)||(this._caching.lastIndex=s<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function s(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function a(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var s=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(e,s,a){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===a?s.pt.k:s.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[r.bind(this)]}n.prototype.interpolateShape=e,n.prototype.getValue=a,n.prototype.setVValue=s,n.prototype.addEffect=o,h.prototype.getValue=a,h.prototype.interpolateShape=e,h.prototype.setVValue=s,h.prototype.addEffect=o;var l=function(){var t=roundCorner;function e(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],r=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,a=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=r-s,n.v[1][0]=a?e+i:e-i,n.v[1][1]=r,n.v[2][0]=e,n.v[2][1]=r+s,n.v[3][0]=a?e-i:e+i,n.v[3][1]=r,n.i[0][0]=a?e-i*t:e+i*t,n.i[0][1]=r-s,n.i[1][0]=a?e+i:e-i,n.i[1][1]=r-s*t,n.i[2][0]=a?e+i*t:e-i*t,n.i[2][1]=r+s,n.i[3][0]=a?e-i:e+i,n.i[3][1]=r+s*t,n.o[0][0]=a?e+i*t:e-i*t,n.o[0][1]=r-s,n.o[1][0]=a?e+i:e-i,n.o[1][1]=r+s*t,n.o[2][0]=a?e-i*t:e+i*t,n.o[2][1]=r+s,n.o[3][0]=a?e-i:e+i,n.o[3][1]=r-s*t}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<s;t+=1){r=n?l:p,i=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),f=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new h(t,e,r):new n(t,e,r):5===r?i=new f(t,e):6===r?i=new l(t,e):7===r&&(i=new p(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return h}};return m}(),Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,i=Math.round;function s(){return 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,this}function a(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function n(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(1,0,0,0,0,i,-s,0,0,s,i,0,0,0,0,1)}function o(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(i,0,s,0,0,1,0,0,-s,0,i,0,0,0,0,1)}function h(r){if(0===r)return this;var i=t(r),s=e(r);return this._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(r(t),r(e))}function f(i,s){var a=t(s),n=e(s);return this._t(a,n,0,0,-n,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(i),1,0,0,0,0,1,0,0,0,0,1)._t(a,-n,0,0,n,a,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],E=y[4],S=y[5],x=y[6],A=y[7],_=y[8],k=y[9],T=y[10],M=y[11],D=y[12],C=y[13],F=y[14],I=y[15];return y[0]=g*t+v*s+b*h+P*m,y[1]=g*e+v*a+b*l+P*c,y[2]=g*r+v*n+b*p+P*d,y[3]=g*i+v*o+b*f+P*u,y[4]=E*t+S*s+x*h+A*m,y[5]=E*e+S*a+x*l+A*c,y[6]=E*r+S*n+x*p+A*d,y[7]=E*i+S*o+x*f+A*u,y[8]=_*t+k*s+T*h+M*m,y[9]=_*e+k*a+T*l+M*c,y[10]=_*r+k*n+T*p+M*d,y[11]=_*i+k*o+T*f+M*u,y[12]=D*t+C*s+F*h+I*m,y[13]=D*e+C*a+F*l+I*c,y[14]=D*r+C*n+F*p+I*d,y[15]=D*i+C*o+F*f+I*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function E(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function S(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function x(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function A(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function _(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function k(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=_(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function M(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function C(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=E,this.applyToY=S,this.applyToZ=x,this.applyToPointArray=M,this.applyToTriplePoints=T,this.applyToPointStringified=D,this.toCSS=C,this.to2dCSS=I,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=k,this.inversePoint=_,this.getInverseMatrix=A,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}if(lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.1",standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===("undefined"==typeof exports?"undefined":_typeof$3(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(t,r){e[t]||(e[t]=r)},t.getModifier=function(t,r,i){return new e[t](r,i)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=this.s.v>1?1+a:this.s.v<0?0+a:this.s.v+a)>(r=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<m;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,P=0;for(s=m-1;s>=0;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):v>=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var E=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var S=E.pop();this.addPaths(E,u),E=this.addShapes(d,y[1],S)}else this.addPaths(E,u),E=this.addShapes(d,y[1]);this.addPaths(E,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(r?(o=r._length,p=r._length):(r=shapePool.newElement(),o=0,p=0),u.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,a=m[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,f=t.i[a][1]+(i[1]-t.i[a][1])*-r,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var r;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var i,s;if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],s=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(i[0]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),s[0]=a.getValueAtTime(a.keyframes[0].t/r,0),s[1]=n.getValueAtTime(n.keyframes[0].t/r,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(i[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0),s[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0)):(i=[a.pv,n.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime),s[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime))}else i=s=t;this.v.rotate(-Math.atan2(i[1]-s[1],i[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(a=0,i=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=m>0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(m>0){for(;P<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(m<0){for(;P>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];P+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,f=u=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1):(i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g),g+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function s(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function a(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var n=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};n.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},n.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},n.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var o={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,n=i.length,o=n;for(r=0;r<n;r+=1){var h,l,p=!0;if(i[r].loaded=!1,i[r].monoCase=s(i[r].fFamily,"monospace"),i[r].sansCase=s(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if((h=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length>0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("f-family",i[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(f)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;l<h.length;l+=1)-1!==h[l].href.indexOf(i[r].fPath)&&(p=!1);if(p){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.type="text/css",m.rel="stylesheet",m.href=i[r].fPath,document.body.appendChild(m)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(h=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),l=0;l<h.length;l+=1)i[r].fPath===h[l].src&&(p=!1);if(p){var c=createTag("link");c.setAttribute("f-forigin",i[r].fOrigin),c.setAttribute("f-origin",i[r].origin),c.setAttribute("rel","stylesheet"),c.setAttribute("href",i[r].fPath),e.appendChild(c)}}}else i[r].loaded=!0,o-=1;i[r].helper=a(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,r,i){for(var s=0,a=this.chars.length;s<a;){if(this.chars[s].ch===e&&this.chars[s].style===r&&this.chars[s].fFamily===i)return this.chars[s];s+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,r,i)),t},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return n.prototype=o,n}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(t,e,r){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(i){if(!t.numKeys)return 0;var s="";s="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s;var a="unidimensional"===r?new Number(s):Object.assign({},s);return a.time=e.keyframes[i-1].t/e.elem.comp.globalData.frameRate,a.value="unidimensional"===r?s[0]:s,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function i(){return t}return function(s){return s?"unidimensional"===s.propType?function(e){e&&"pv"in e||(e=t);var i=1/e.mult,s=e.pv*i,a=new Number(s);return a.value=s,r(a,e,"unidimensional"),function(){return e.k&&e.getValue(),s=e.v*i,a.value!==s&&((a=new Number(s)).value=s,r(a,e,"unidimensional")),a}}(s):function(t){t&&"pv"in t||(t=e);var i=1/t.mult,s=t.data&&t.data.l||t.pv.length,a=createTypedArray("float32",s),n=createTypedArray("float32",s);return a.value=n,r(a,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<s;e+=1)n[e]=t.v[e]*i,a[e]=n[e];return a}}(s):i}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function r(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function i(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function s(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function a(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function n(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function o(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function h(){return[1,1,1,1]}return function(l){var p;function f(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return f.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return f.effect;case"ADBE Text Properties":return f.textInterface;default:return null}}f.getMatrix=t,f.invertPoint=n,f.applyPoint=a,f.toWorld=r,f.toWorldVec=e,f.fromWorld=s,f.fromWorldVec=i,f.toComp=r,f.fromComp=o,f.sampleImage=h,f.sourceRectAtTime=l.sourceRectAtTime.bind(l),f._elem=l;var m=getDescriptor(p=TransformExpressionInterface(l.finalTransform.mProp),"anchorPoint");return Object.defineProperties(f,{hasParent:{get:function(){return l.hierarchy.length}},parent:{get:function(){return l.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return l.isInRange}}}),f.startTime=l.data.st,f.index=l.data.ind,f.source=l.data.refId,f.height=0===l.data.ty?l.data.h:100,f.width=0===l.data.ty?l.data.w:100,f.inPoint=l.data.ip/l.comp.globalData.frameRate,f.outPoint=l.data.op/l.comp.globalData.frameRate,f._name=l.data.nm,f.registerMaskInterface=function(t){f.mask=new MaskManagerInterface(t,l)},f.registerEffectsInterface=function(t){f.effect=t},f}}(),propertyGroupFactory=function(t,e){return function(r){return(r=void 0===r?1:r)<=0?t:e(r-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},EffectsExpressionInterface=function(){function t(r,i,s,a){function n(t){for(var e=r.ef,i=0,s=e.length;i<s;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?l[i]:l[i]();i+=1}throw new Error}var o,h=propertyGroupFactory(n,s),l=[],p=r.ef.length;for(o=0;o<p;o+=1)5===r.ef[o].ty?l.push(t(r.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,a)):l.push(e(i.effectElements[o],r.ef[o].ty,a,h));return"ADBE Color Control"===r.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:h}}),n.enabled=0!==r.en,n.active=n.enabled,n}function e(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(e,r){if(e.effectsManager){var i,s=[],a=e.data.ef,n=e.effectsManager.effectElements.length;for(i=0;i<n;i+=1)s.push(t(a[i],e.effectsManager.effectElements[i],r,e));var o=e.data.ef||[],h=function(t){for(i=0,n=o.length;i<n;){if(t===o[i].nm||t===o[i].mn||t===o[i].ix)return s[i];i+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),CompExpressionInterface=function(t){function e(e){for(var r=0,i=t.layers.length;r<i;){if(t.layers[r].nm===e||t.layers[r].ind===e)return t.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},ShapeExpressionInterface=function(){function t(t,o,c){var d,u=[],y=t?t.length:0;for(d=0;d<y;d+=1)"gr"===t[d].ty?u.push(e(t[d],o[d],c)):"fl"===t[d].ty?u.push(r(t[d],o[d],c)):"st"===t[d].ty?u.push(a(t[d],o[d],c)):"tm"===t[d].ty?u.push(n(t[d],o[d],c)):"tr"===t[d].ty||("el"===t[d].ty?u.push(h(t[d],o[d],c)):"sr"===t[d].ty?u.push(l(t[d],o[d],c)):"sh"===t[d].ty?u.push(ShapePathInterface(t[d],o[d],c)):"rc"===t[d].ty?u.push(p(t[d],o[d],c)):"rd"===t[d].ty?u.push(f(t[d],o[d],c)):"rp"===t[d].ty?u.push(m(t[d],o[d],c)):"gf"===t[d].ty?u.push(i(t[d],o[d],c)):u.push(s(t[d],o[d])));return u}function e(e,r,i){var s=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return s.content;default:return s.transform}};s.propertyGroup=propertyGroupFactory(s,i);var a=function(e,r,i){var s,a=function(t){for(var e=0,r=s.length;e<r;){if(s[e]._name===t||s[e].mn===t||s[e].propertyIndex===t||s[e].ix===t||s[e].ind===t)return s[e];e+=1}return"number"==typeof t?s[t-1]:null};a.propertyGroup=propertyGroupFactory(a,i),s=t(e.it,r.it,a.propertyGroup),a.numProperties=s.length;var n=o(e.it[e.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.transform=n,a.propertyIndex=e.cix,a._name=e.nm,a}(e,r,s.propertyGroup),n=o(e.it[e.it.length-1],r.it[r.it.length-1],s.propertyGroup);return s.content=a,s.transform=n,Object.defineProperty(s,"_name",{get:function(){return e.nm}}),s.numProperties=e.np,s.propertyIndex=e.ix,s.nm=e.nm,s.mn=e.mn,s}function r(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function i(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function s(){return function(){return null}}function a(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);function n(r){Object.defineProperty(h,t.d[r].nm,{get:ExpressionPropertyInterface(e.d.dataProps[r].p)})}var o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n(i),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function n(t,e,r){function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",s)),e.e.setGroupProperty(PropertyInterface("End",s)),e.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=t.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),i.mn=t.mn,i}function o(t,e,r){function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:null}var s=propertyGroupFactory(i,r);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i.propertyGroup=r,i}function h(t,e,r){function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),t.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:t.nm}}),i.mn=t.mn,i}function p(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:t.nm}}),i.mn=t.mn,i}function f(t,e,r){function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:null}var s=propertyGroupFactory(i,r),a=e;return i.propertyIndex=t.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:t.nm}}),i.mn=t.mn,i}function m(t,e,r){function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:null}var s=propertyGroupFactory(i,r),a=e;return i.propertyIndex=t.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:t.nm}}),i.mn=t.mn,i}return function(e,r,i){var s;function a(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return a.propertyGroup=propertyGroupFactory(a,(function(){return i})),s=t(e,r,a.propertyGroup),a.numProperties=s.length,a._name="Contents",a}}(),TextExpressionInterface=function(t){var e,r;function i(t){return"ADBE Text Document"===t?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==e&&(t.textProperty.currentData.t=e,(r=new String(i)).value=i||new String(i)),r}}),i},getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function _typeof$2(t){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var FootageInterface=(dataInterfaceFactory=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",r=t.getFootageData();function i(t){if(r[t])return e=t,"object"===_typeof$2(r=r[t])?i:r;var s=t.indexOf(e);if(-1!==s){var a=parseInt(t.substr(s+e.length),10);return"object"===_typeof$2(r=r[a])?i:r}return""}return function(){return e="",r=t.getFootageData(),i}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory;function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(g="mask",v="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(g="mask",v="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):(f=null,m=null),this.storedData[i]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(u[o]);var E=createNS("mask");E.setAttribute("mask-type","alpha"),E.setAttribute("id",y+"_"+d),E.appendChild(s),a.appendChild(E),P.setAttribute("mask","url("+getLocationHref()+"#"+y+"_"+d+")"),u.length=0,u.push(P)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);d>0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&s>1&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var r=createNS("filter");r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%"));return r},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:a>=l?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}};var registeredEffects={};function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1){r=null;var o=t.data.ef[e].ty;if(registeredEffects[o])r=new(0,registeredEffects[o].effect)(a,t.effectsManager.effectElements[e],t),registeredEffects[o].countsAsEffect&&(n+=1);20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r)}n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(Math.abs(t[4*r]-t[4*e+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function r(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(){}function s(r,i,s){var a,n,o,h,l,p,f,m,c,d,u,y=i.styles.length,g=i.lvl;for(p=0;p<y;p+=1){if(h=i.sh._mdf||s,i.styles[p].lvl<g){for(m=e.reset(),d=g-i.styles[p].lvl,u=i.transformers.length-1;!h&&d>0;)h=i.transformers[u].mProps._mdf||h,d-=1,u-=1;if(h)for(d=g-i.styles[p].lvl,u=i.transformers.length-1;d>0;)c=i.transformers[u].mProps.v.props,m.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),d-=1,u-=1}else m=t;if(n=(f=i.sh.paths)._length,h){for(o="",a=0;a<n;a+=1)(l=f.shapes[a])&&l._length&&(o+=buildShapeString(l,l._length,l.c,m));i.caches[p]=o}else o=i.caches[p];i.styles[p].d+=!0===r.hd?"":o,i.styles[p]._mdf=h||i.styles[p]._mdf}}function a(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,r){o(t,e,r),h(t,e,r)}function o(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],E=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",E))}}function h(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return s;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,n.length=0,t=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else"no"===t.ty&&(r=new SVGNoStyleData(this,t,i));return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,f,m,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;o>=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==s&&(this.m=s,this._mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,n=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):e>=55296&&e<=56319?(r=t.charCodeAt(s+1))>=56320&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):e>56319?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,E=getFontProperties(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var S,x=t.tr/1e3*t.finalSize;if(t.sz)for(var A,_,k=!0,T=t.sz[0],M=t.sz[1];k;){A=0,g=0,r=(_=this.buildFinalText(t.t)).length,x=t.tr/1e3*t.finalSize;var D=-1;for(e=0;e<r;e+=1)S=_[e].charCodeAt(0),i=!1," "===_[e]?D=e:13!==S&&3!==S||(g=0,i=!0,A+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(_[e],b.fStyle,b.fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(_[e],t.f,t.finalSize),g+P>T&&" "!==_[e]?(-1===D?r+=1:e=D,A+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,D===e?1:0,"\r"),D=-1,g=0):(g+=P,g+=x);A+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&M<A?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=_,r=t.finalText.length,k=!1)}g=-x,P=0;var C,F=0;for(e=0;e<r;e+=1)if(i=!1,13===(S=(C=t.finalText[e]).charCodeAt(0))||3===S?(F=0,y.push(g),v=g>v?g:v,g=-2*x,s="",i=!0,u+=1):s=C,h.chars?(o=h.getCharData(C,b.fStyle,h.getFontByName(t.f).fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(s,t.f,t.finalSize)," "===C?F+=P+x:(g+=P+x+F,F=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=P,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===s||e===r-1){for(""===s&&(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var I,w,B,V,R=l.a;n=R.length;var L=[];for(a=0;a<n;a+=1){for((I=R[a]).a.sc&&(t.strokeColorAnim=!0),I.a.sw&&(t.strokeWidthAnim=!0),(I.a.fc||I.a.fh||I.a.fs||I.a.fb)&&(t.fillColorAnim=!0),V=0,B=I.s.b,e=0;e<r;e+=1)(w=p[e]).anIndexes[a]=V,(1==B&&""!==w.val||2==B&&""!==w.val&&" "!==w.val||3==B&&(w.n||" "==w.val||e==r-1)||4==B&&(w.n||e==r-1))&&(1===I.s.rn&&L.push(V),V+=1);l.a[a].s.totalChars=V;var G,z=-1;if(1===I.s.rn)for(e=0;e<r;e+=1)z!=(w=p[e]).anIndexes[a]&&(z=w.anIndexes[a],G=L.splice(Math.floor(Math.random()*L.length),1)[0]),w.anIndexes[a]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var s=0,a=0,n=1,o=1;this.ne.v>0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===m)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,d=-c/2+(i=e(t(0,i+.5-p),f-p)),u=c/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===m?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=r(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l<g?l=0:(l=(l-g)/y)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(i>s){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,f,m,c,d,u,y,g,v,b,P,E=this._moreOptions.alignment.v,S=this._animatorsData,x=this._textData,A=this.mHelper,_=this._renderType,k=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var M,D=P.v;for(this._pathData.r.v&&(D=D.reverse()),n={tLength:0,segments:[]},a=D._length-1,g=0,s=0;s<a;s+=1)M=bez.buildBezierData(D.v[s],D.v[s+1],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[s+1][0]-D.v[s+1][0],D.i[s+1][1]-D.v[s+1][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength;s=a,P.v.c&&(M=bez.buildBezierData(D.v[s],D.v[0],[D.o[s][0]-D.v[s][0],D.o[s][1]-D.v[s][1]],[D.i[0][0]-D.v[0][0],D.i[0][1]-D.v[0][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=0,f=1,l=0,p=!0,u=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}a=T.length,r=0,i=0;var C,F,I,w,B,V=1.2*t.finalSize*.714,R=!0;I=S.length;var L,G,z,N,O,H,j,q,W,$,X,Y,K=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;rt=0,nt=!0}else{for(F=0;F<I;F+=1)(C=S[F].a).t.propType&&(nt&&2===t.j&&(it+=C.t.v*st),(B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?rt+=C.t.v*B[0]*st:rt+=C.t.v*B*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(A.reset(),N=1,T[s].n)r=0,i+=t.yOffset,i+=R?1:0,o=J,R=!1,this._hasMaskedPath&&(f=U,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),tt="",X="",W="",Y="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}K!==T[s].ind&&(T[K]&&(o+=T[K].extra),o+=T[s].an/2,K=T[s].ind),o+=E[0]*T[s].an*.005;var ot=0;for(F=0;F<I;F+=1)(C=S[F].a).p.propType&&((B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?ot+=C.p.v[0]*B[0]:ot+=C.p.v[0]*B),C.a.propType&&((B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?ot+=C.a.v[0]*B[0]:ot+=C.a.v[0]*B);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(a-1),o+=this._pathData.f.v);p;)l+y>=o+ot||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,A.translate(-E[0]*T[s].an*.005,-E[1]*V*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[m+=1]?d=u[m].points:P.v.c?(f=0,d=u[m=0].points):(l-=h.partialLength,d=null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,A.translate(-L,0,0)}else L=T[s].an/2-T[s].add,A.translate(-L,0,0),A.translate(-E[0]*T[s].an*.005,-E[1]*V*.01,0);for(F=0;F<I;F+=1)(C=S[F].a).t.propType&&(B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?B.length?o+=C.t.v*B[0]:o+=C.t.v*B:B.length?r+=C.t.v*B[0]:r+=C.t.v*B));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<I;F+=1)(C=S[F].a).a.propType&&((B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?A.translate(-C.a.v[0]*B[0],-C.a.v[1]*B[1],C.a.v[2]*B[2]):A.translate(-C.a.v[0]*B,-C.a.v[1]*B,C.a.v[2]*B));for(F=0;F<I;F+=1)(C=S[F].a).s.propType&&((B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?A.scale(1+(C.s.v[0]-1)*B[0],1+(C.s.v[1]-1)*B[1],1):A.scale(1+(C.s.v[0]-1)*B,1+(C.s.v[1]-1)*B,1));for(F=0;F<I;F+=1){if(C=S[F].a,B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),C.sk.propType&&(B.length?A.skewFromAxis(-C.sk.v*B[0],C.sa.v*B[1]):A.skewFromAxis(-C.sk.v*B,C.sa.v*B)),C.r.propType&&(B.length?A.rotateZ(-C.r.v*B[2]):A.rotateZ(-C.r.v*B)),C.ry.propType&&(B.length?A.rotateY(C.ry.v*B[1]):A.rotateY(C.ry.v*B)),C.rx.propType&&(B.length?A.rotateX(C.rx.v*B[0]):A.rotateX(C.rx.v*B)),C.o.propType&&(B.length?N+=(C.o.v*B[0]-N)*B[0]:N+=(C.o.v*B-N)*B),t.strokeWidthAnim&&C.sw.propType&&(B.length?H+=C.sw.v*B[0]:H+=C.sw.v*B),t.strokeColorAnim&&C.sc.propType)for(q=0;q<3;q+=1)B.length?O[q]+=(C.sc.v[q]-O[q])*B[0]:O[q]+=(C.sc.v[q]-O[q])*B;if(t.fillColorAnim&&t.fc){if(C.fc.propType)for(q=0;q<3;q+=1)B.length?j[q]+=(C.fc.v[q]-j[q])*B[0]:j[q]+=(C.fc.v[q]-j[q])*B;C.fh.propType&&(j=B.length?addHueToRGB(j,C.fh.v*B[0]):addHueToRGB(j,C.fh.v*B)),C.fs.propType&&(j=B.length?addSaturationToRGB(j,C.fs.v*B[0]):addSaturationToRGB(j,C.fs.v*B)),C.fb.propType&&(j=B.length?addBrightnessToRGB(j,C.fb.v*B[0]):addBrightnessToRGB(j,C.fb.v*B))}}for(F=0;F<I;F+=1)(C=S[F].a).p.propType&&(B=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),this._hasMaskedPath?B.length?A.translate(0,C.p.v[1]*B[0],-C.p.v[2]*B[1]):A.translate(0,C.p.v[1]*B,-C.p.v[2]*B):B.length?A.translate(C.p.v[0]*B[0],C.p.v[1]*B[1],-C.p.v[2]*B[2]):A.translate(C.p.v[0]*B,C.p.v[1]*B,-C.p.v[2]*B));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&($="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(A.translate(0,-t.ls),A.translate(0,E[1]*V*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),A.rotate(-ht*Math.PI/180)}A.translate(G,z,0),o-=E[0]*T[s].an*.005,T[s+1]&&K!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(A.translate(r,i,0),t.ps&&A.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:A.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:A.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}A.translate(0,-t.ls),A.translate(L,0,0),A.translate(E[0]*T[s].an*.005,E[1]*V*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===_?tt=A.toCSS():"svg"===_?tt=A.to2dCSS():et=[A.props[0],A.props[1],A.props[2],A.props[3],A.props[4],A.props[5],A.props[6],A.props[7],A.props[8],A.props[9],A.props[10],A.props[11],A.props[12],A.props[13],A.props[14],A.props[15]],Y=N}k<=s?(w=new LetterProps(Y,W,$,X,tt,et),this.renderedLetters.push(w),k+=1,this.lettersChangedFlag=!0):(w=this.renderedLetters[s],this.lettersChangedFlag=w.update(Y,W,$,X,tt,et)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)"sh"===e[r].ty&&(i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t));return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVEffects(){}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,p=this.data.singleShape,f=0,m=0,c=!0,d=.001*r.tr*r.finalSize;if(!p||h||r.sz){var u,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!p||0===t){if(n=y>t?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(r.finalSize/100,r.finalSize/100),p&&(o[t].n&&(f=-d,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=u.data),v=new SVGShapeElement(b,this.globalData,this)}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var P=this.textContainer,E="start";switch(r.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}P.setAttribute("text-anchor",E),P.setAttribute("letter-spacing",d);var S=this.buildTextContents(r.finalText);for(e=S.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||createNS("tspan")).textContent=S[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",P.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=r.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s,a=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(r=a[t],i=this.textSpans[t].span,(s=this.textSpans[t].glyph)&&s.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVEffects.prototype.renderFrame=function(){},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(r=0;r<l-1;r+=1)i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[r+1]),n=this.getTransformedPoint(h,o.v[r+1]),this.checkBounds(i,s,a,n,e);o.c&&(i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(i,s,a,n,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,s){this.getBoundsOfCurve(t,e,r,i);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var s,a,n,o,h,l,p,f=[[t[0],i[0]],[t[1],i[1]]],m=0;m<2;++m)a=6*t[m]-12*e[m]+6*r[m],s=-3*t[m]+9*e[m]-9*r[m]+3*i[m],n=3*e[m]-3*t[m],a|=0,n|=0,0===(s|=0)&&0===a||(0===s?(o=-n/a)>0&&o<1&&f[m].push(this.calculateF(o,t,e,r,i,m)):(h=a*a-4*n*s)>=0&&((l=(-a+bmSqrt(h))/(2*s))>0&&l<1&&f[m].push(this.calculateF(l,t,e,r,i,m)),(p=(-a-bmSqrt(h))/(2*s))>0&&p<1&&f[m].push(this.calculateF(p,t,e,r,i,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it&&this.calculateBoundingBox(t[r].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=s,i.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,s,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var n=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=n}var h,l,p,f=t.l;s=f.length;var m,c=this.mHelper,d="",u=0;for(i=0;i<s;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?h=this.textPaths[u]:((h=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[u]?this.textPaths[u]:createNS("text"):this.textSpans[u]?(l=this.textSpans[u],h=this.textPaths[u]):(styleDiv(l=createTag("span")),styleDiv(h=createTag("span")),l.appendChild(h)),this.globalData.fontManager.chars){var y,g=this.globalData.fontManager.getCharData(t.finalText[i],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(y=g?g.data:null,c.reset(),y&&y.shapes&&y.shapes.length&&(m=y.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),d=this.createPathShape(c,m),h.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(l),y&&y.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,P="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=P,b.webkitTransform=P,f[i].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(h.textContent=f[i].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(l);var E=h.style,S="translate3d(0,"+-t.finalSize/1.2+"px,0)";E.transform=S,E.webkitTransform=S}this.isMasked?this.textSpans[u]=h:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=h,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,s,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(i=l.length,r=0;r<i;r+=1)l[r].n?o+=1:(a=this.textSpans[r],n=this.textPaths[r],s=h[o],o+=1,s._mdf.m&&(this.isMasked?a.setAttribute("transform",s.m):(a.style.webkitTransform=s.m,a.style.transform=s.m)),a.style.opacity=s.o,s.sw&&s._mdf.sw&&n.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&n.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(n.setAttribute("fill",s.fc),n.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,s=this.comp.threeDElements.length;for(t=0;t<s;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){r=e.perspectiveElem.style,i=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,i.transformOrigin=n,i.mozTransformOrigin=n,i.webkitTransformOrigin=n,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var d=this.mat.toCSS();(c=f.container.style).transform=d,c.webkitTransform=d}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,s):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?("3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):("2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(r=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var s,a=this.threeDElements[r].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[r].container.insertBefore(t,s):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",this.resizerElem=e,styleDiv(e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,r,i,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,n=s/a;this.globalData.compSize.w/this.globalData.compSize.h>n?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,r=0,i=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,i=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",s.perspective=s.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],i,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},registerRenderer("html",HybridRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier);var Expressions=function(){var t={};return t.initExpressions=function(t){var e=0,r=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&function(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},t}();function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}function seedRandom(t,e){var r,i=this,s=256,a=e.pow(s,6),n=e.pow(2,52),o=2*n,h=255;function l(t){var e,r=t.length,i=this,a=0,n=i.i=i.j=0,o=i.S=[];for(r||(t=[r++]);a<s;)o[a]=a++;for(a=0;a<s;a++)o[a]=o[n=h&n+t[a%r]+(e=o[a])],o[n]=e;i.g=function(t){for(var e,r=0,a=i.i,n=i.j,o=i.S;t--;)e=o[a=h&a+1],r=r*s+o[h&(o[a]=o[n=h&n+e])+(o[n]=e)];return i.i=a,i.j=n,r}}function p(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function f(t,e){var r,i=[],s=_typeof$1(t);if(e&&"object"==s)for(r in t)try{i.push(f(t[r],e-1))}catch(t){}return i.length?i:"string"==s?t:t+"\0"}function m(t,e){for(var r,i=t+"",s=0;s<i.length;)e[h&s]=h&(r^=19*e[h&s])+i.charCodeAt(s++);return c(e)}function c(t){return String.fromCharCode.apply(0,t)}e.seedrandom=function(h,d,u){var y=[],g=m(f((d=!0===d?{entropy:!0}:d||{}).entropy?[h,c(t)]:null===h?function(){try{r;var e=new Uint8Array(s);return(i.crypto||i.msCrypto).getRandomValues(e),c(e)}catch(e){var a=i.navigator,n=a&&a.plugins;return[+new Date,i,n,i.screen,c(t)]}}():h,3),y),v=new l(y),b=function(){for(var t=v.g(6),e=a,r=0;t<n;)t=(t+r)*s,e*=s,r=v.g(1);for(;t>=o;)t/=2,e/=2,r>>>=1;return(t+r)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(d.pass||u||function(t,r,i,s){return s&&(s.S&&p(s,v),t.state=function(){return p(v,{})}),i?(e.random=t,r):t})(b,g,"global"in d?d.global:this==e,d.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)e=0,r=0;else{var l=n-o;switch(r=h>.5?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)e=n,i=n,r=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(t>=r)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(r=0,i=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(s>1){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),e>1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=-.001,s=this.getValueAtTime(t),a=this.getValueAtTime(t+i);if(s.length)for(e=createTypedArray("float32",s.length),r=0;r<s.length;r+=1)e[r]=(a[r]-s[r])/i;else e=(a-s)/i;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*d+c[a];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function e(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(h>=p)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function r(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=e>1?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}function i(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}function s(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var n=a(t,e,r);return n.dynamicProperties.length?n.getValueAtTime=i.bind(n):n.getValueAtTime=s.bind(n),n.setGroupProperty=expressionHelpers.setGroupProperty,n};var n=PropertyFactory.getProp;PropertyFactory.getProp=function(i,s,a,o,h){var l=n(i,s,a,o,h);l.kf?l.getValueAtTime=expressionHelpers.getValueAtTime.bind(l):l.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(l),l.setGroupProperty=expressionHelpers.setGroupProperty,l.loopOut=t,l.loopIn=e,l.smooth=r,l.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(l),l.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(l),l.numKeys=1===s.a?s.k.length:0,l.propertyIndex=s.ix;var p=0;return 0!==a&&(p=createTypedArray("float32",1===s.a?s.k[0].s.length:s.k.length)),l._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:p},expressionHelpers.searchExpressions(i,s,l),l.k&&h.addDynamicProperty(l),l};var o=ShapePropertyFactory.getConstructorFunction(),h=ShapePropertyFactory.getKeyframedConstructorFunction();function l(){}l.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},h.prototype.initiateExpression=ExpressionManager.initiateExpression;var p=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t!==r){var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}return setExpressionsPlugin(Expressions),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie}));
diff --git a/build/player/lottie_light.js b/build/player/lottie_light.js
index 1cd1500..4ca21e7 100644
--- a/build/player/lottie_light.js
+++ b/build/player/lottie_light.js
@@ -1,1911 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* global svgNS */
-/* exported createNS */
-
-function createNS(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElementNS(svgNS, type);
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$4(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1913,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$3(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6774,4410 +1620,12219 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$2(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
+  };
 
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
 
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
+    if (expressionsPlugin) {
+      expressionsPlugin.initExpressions(this);
     }
 
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
-    } else {
-      rect = null;
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
 
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
-    } else {
-      count += 1;
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
+  };
 
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
+    }
+
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
+
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
+
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
+    }
+
+    try {
+      this.animationData = animData;
+
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        feMorph = null;
-        x = null;
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
       }
 
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+      this.renderer.configAnimation(animData);
 
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
+      if (!animData.assets) {
+        animData.assets = [];
       }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
       }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+    } catch (error) {
+      this.triggerConfigError(error);
+    }
+  };
+
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
+    }
+
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
+    } else {
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
       }
     }
-  }
+  };
 
-  this.maskElement = createNS(maskType);
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
 
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
 
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
 
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
     }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
     }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
       }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
+    } else {
+      this.pause();
+    }
+  };
+
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
+
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
+
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
+      }
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
+      }
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
         } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
+      if (!this.checkSegments(nextValue % this.totalFrames)) {
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
           }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
+      }
+    } else {
+      this.setCurrentRawFrameValue(nextValue);
+    }
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$2(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
         }
       }
     }
-  }
-};
 
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
+    function freeze() {
+      _isFrozen = true;
+    }
 
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
 
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
+    function setVolume(val, animation) {
+      var i;
 
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
       }
-      viewData.elem.setAttribute('d', pathShapeValue);
     }
-    viewData.lastPath = pathString;
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
   }
-};
 
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
+  var bez = bezFunction();
 
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
 
-function HierarchyElement() {}
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
 
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-  },
-};
 
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
 
-function FrameElement() {}
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
 
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
           this._mdf = true;
         }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
+      } else {
+        var i = 0;
+        var len = this.v.length;
 
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
         while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
           }
+
           i += 1;
         }
       }
+    }
 
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
         return;
       }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
       }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
       this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-/* global createNS */
-
-function SVGStyleData(data, level) {
-  this.data = data;
-  this.type = data.ty;
-  this.d = '';
-  this.lvl = level;
-  this._mdf = false;
-  this.closed = data.hd === true;
-  this.pElem = createNS('path');
-  this.msElem = null;
-}
-
-SVGStyleData.prototype.reset = function () {
-  this.d = '';
-  this._mdf = false;
-};
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-}
 
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
 
-/* exported SVGTransformData */
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
 
-function SVGTransformData(mProps, op, container) {
-  this.transform = {
-    mProps: mProps,
-    op: op,
-    container: container,
-  };
-  this.elements = [];
-  this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
-}
-
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-  this._isAnimated = !!this._isAnimated;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
-
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
-
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
-
-function SVGGradientFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.initGradientData(elem, data, styleOb);
-}
-
-SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
-  this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);
-  this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);
-  this.g = new GradientProperty(elem, data.g, this);
-  this.style = styleOb;
-  this.stops = [];
-  this.setGradientData(styleOb.pElem, data);
-  this.setGradientOpacity(data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-};
-
-SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
-  var gradientId = createElementID();
-  var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-  gfill.setAttribute('id', gradientId);
-  gfill.setAttribute('spreadMethod', 'pad');
-  gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
-  var stops = [];
-  var stop;
-  var j;
-  var jLen;
-  jLen = data.g.p * 4;
-  for (j = 0; j < jLen; j += 4) {
-    stop = createNS('stop');
-    gfill.appendChild(stop);
-    stops.push(stop);
-  }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
-  this.gf = gfill;
-  this.cst = stops;
-};
-
-SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
-  if (this.g._hasOpacity && !this.g._collapsable) {
-    var stop;
-    var j;
-    var jLen;
-    var mask = createNS('mask');
-    var maskElement = createNS('path');
-    mask.appendChild(maskElement);
-    var opacityId = createElementID();
-    var maskId = createElementID();
-    mask.setAttribute('id', maskId);
-    var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-    opFill.setAttribute('id', opacityId);
-    opFill.setAttribute('spreadMethod', 'pad');
-    opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
-    jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
-    var stops = this.stops;
-    for (j = data.g.p * 4; j < jLen; j += 2) {
-      stop = createNS('stop');
-      stop.setAttribute('stop-color', 'rgb(255,255,255)');
-      opFill.appendChild(stop);
-      stops.push(stop);
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
-    if (data.ty === 'gs') {
-      maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-      maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-      if (data.lj === 1) {
-        maskElement.setAttribute('stroke-miterlimit', data.ml);
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
       }
     }
-    this.of = opFill;
-    this.ms = mask;
-    this.ost = stops;
-    this.maskId = maskId;
-    styleOb.msElem = maskElement;
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
   }
-};
 
-extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
 
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
 
-function SVGGradientStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.initGradientData(elem, data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-}
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
 
-extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
 
-/* global createNS */
-/* exported ShapeGroupData */
+    return animationManager.loadAnimation(params);
+  }
 
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
 
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
 
-var SVGElementsRenderer = (function () {
-  var _identityMatrix = new Matrix();
-  var _matrixHelper = new Matrix();
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
 
-  var ob = {
-    createRenderFunction: createRenderFunction,
-  };
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
 
-  function createRenderFunction(data) {
-    switch (data.ty) {
-      case 'fl':
-        return renderFill;
-      case 'gf':
-        return renderGradient;
-      case 'gs':
-        return renderGradientStroke;
-      case 'st':
-        return renderStroke;
-      case 'sh':
-      case 'el':
-      case 'rc':
-      case 'sr':
-        return renderPath;
-      case 'tr':
-        return renderContentTransform;
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
       default:
         return null;
     }
   }
 
-  function renderContentTransform(styleData, itemData, isFirstFrame) {
-    if (isFirstFrame || itemData.transform.op._mdf) {
-      itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
-    }
-    if (isFirstFrame || itemData.transform.mProps._mdf) {
-      itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
+
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
+
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
     }
   }
 
-  function renderPath(styleData, itemData, isFirstFrame) {
-    var j;
-    var jLen;
-    var pathStringTransformed;
-    var redraw;
-    var pathNodes;
-    var l;
-    var lLen = itemData.styles.length;
-    var lvl = itemData.lvl;
-    var paths;
-    var mat;
-    var props;
-    var iterations;
-    var k;
-    for (l = 0; l < lLen; l += 1) {
-      redraw = itemData.sh._mdf || isFirstFrame;
-      if (itemData.styles[l].lvl < lvl) {
-        mat = _matrixHelper.reset();
-        iterations = lvl - itemData.styles[l].lvl;
-        k = itemData.transformers.length - 1;
-        while (!redraw && iterations > 0) {
-          redraw = itemData.transformers[k].mProps._mdf || redraw;
-          iterations -= 1;
-          k -= 1;
-        }
-        if (redraw) {
-          iterations = lvl - itemData.styles[l].lvl;
-          k = itemData.transformers.length - 1;
-          while (iterations > 0) {
-            props = itemData.transformers[k].mProps.v.props;
-            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]);
-            iterations -= 1;
-            k -= 1;
-          }
-        }
-      } else {
-        mat = _identityMatrix;
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
+
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
+
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
       }
-      paths = itemData.sh.paths;
-      jLen = paths._length;
-      if (redraw) {
-        pathStringTransformed = '';
-        for (j = 0; j < jLen; j += 1) {
-          pathNodes = paths.shapes[j];
-          if (pathNodes && pathNodes._length) {
-            pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
-          }
-        }
-        itemData.caches[l] = pathStringTransformed;
-      } else {
-        pathStringTransformed = itemData.caches[l];
-      }
-      itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
-      itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
     }
+
+    return null;
   }
 
-  function renderFill(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
+  var queryString;
 
-    if (itemData.c._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
-    }
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
   }
 
-  function renderGradientStroke(styleData, itemData, isFirstFrame) {
-    renderGradient(styleData, itemData, isFirstFrame);
-    renderStroke(styleData, itemData, isFirstFrame);
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$1(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
+    }
+  } catch (err) {//
   }
 
-  function renderGradient(styleData, itemData, isFirstFrame) {
-    var gfill = itemData.gf;
-    var hasOpacity = itemData.g._hasOpacity;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
 
-    if (itemData.o._mdf || isFirstFrame) {
-      var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
-      itemData.style.pElem.setAttribute(attr, itemData.o.v);
-    }
-    if (itemData.s._mdf || isFirstFrame) {
-      var attr1 = styleData.t === 1 ? 'x1' : 'cx';
-      var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
-      gfill.setAttribute(attr1, pt1[0]);
-      gfill.setAttribute(attr2, pt1[1]);
-      if (hasOpacity && !itemData.g._collapsable) {
-        itemData.of.setAttribute(attr1, pt1[0]);
-        itemData.of.setAttribute(attr2, pt1[1]);
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
       }
     }
-    var stops;
-    var i;
-    var len;
-    var stop;
-    if (itemData.g._cmdf || isFirstFrame) {
-      stops = itemData.cst;
-      var cValues = itemData.g.c;
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        stop.setAttribute('offset', cValues[i * 4] + '%');
-        stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
-      }
-    }
-    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
-      var oValues = itemData.g.o;
-      if (itemData.g._collapsable) {
-        stops = itemData.cst;
-      } else {
-        stops = itemData.ost;
-      }
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        if (!itemData.g._collapsable) {
-          stop.setAttribute('offset', oValues[i * 2] + '%');
-        }
-        stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
-      }
-    }
-    if (styleData.t === 1) {
-      if (itemData.e._mdf || isFirstFrame) {
-        gfill.setAttribute('x2', pt2[0]);
-        gfill.setAttribute('y2', pt2[1]);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('x2', pt2[0]);
-          itemData.of.setAttribute('y2', pt2[1]);
-        }
-      }
-    } else {
-      var rad;
-      if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
-        rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        gfill.setAttribute('r', rad);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('r', rad);
-        }
-      }
-      if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
-        if (!rad) {
-          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        }
-        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
 
-        var percent = itemData.h.v;
-        if (percent >= 1) {
-          percent = 0.99;
-        } else if (percent <= -1) {
-          percent = -0.99;
-        }
-        var dist = rad * percent;
-        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-        gfill.setAttribute('fx', x);
-        gfill.setAttribute('fy', y);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('fx', x);
-          itemData.of.setAttribute('fy', y);
-        }
-      }
-      // gfill.setAttribute('fy','200');
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
     }
-  }
 
-  function renderStroke(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
-    var d = itemData.d;
-    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
-      styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
-      styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
-    }
-    if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
-      styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
-    }
-    if (itemData.w._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
-      if (styleElem.msElem) {
-        styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
-      }
-    }
-  }
+    return ob;
+  }();
 
-  return ob;
-}());
+  function ShapeModifier() {}
 
-/* global Matrix */
+  ShapeModifier.prototype.initModifierProperties = function () {};
 
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
+  ShapeModifier.prototype.addShapeToModifier = function () {};
 
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
       };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
       }
     }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
+  };
 
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
 
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
+    if (this.dynamicProperties.length) {
+      this.k = true;
     } else {
-      this.baseElement = this.layerElement;
+      this.getValue(true);
     }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
+  };
 
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
       return;
     }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
 
-/* global ProcessedElement */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-function IShapeElement() {
-}
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
     var i;
-    var len = this.shapeModifiers.length;
+    var len = segments.length;
+    var segmentOb;
+
     for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
       }
     }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
     }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
     var i;
     var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
     for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
     }
 
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
         break;
       }
-    }
-  },
 
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
       }
-      i += 1;
     }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
         return;
       }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
 
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
 
-function ITextElement() {
-}
+      this.iterateDynamicProperties();
 
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
 
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
 
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
 
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
 
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
 
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
 
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
             }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
         }
-    }
-}; */
 
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
-
-function SVGCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = true;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
-
-function SVGTextLottieElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.renderType = 'svg';
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
-
-SVGTextLottieElement.prototype.createContent = function () {
-  if (this.data.singleShape && !this.globalData.fontManager.chars) {
-    this.textContainer = createNS('text');
-  }
-};
-
-SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
-  var i = 0;
-  var len = textArray.length;
-  var textContents = [];
-  var currentTextContent = '';
-  while (i < len) {
-    if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
-      textContents.push(currentTextContent);
-      currentTextContent = '';
-    } else {
-      currentTextContent += textArray[i];
-    }
-    i += 1;
-  }
-  textContents.push(currentTextContent);
-  return textContents;
-};
-
-SVGTextLottieElement.prototype.buildNewText = function () {
-  var i;
-  var len;
-
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
-  if (documentData.fc) {
-    this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
-  } else {
-    this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
-  }
-  if (documentData.sc) {
-    this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
-    this.layerElement.setAttribute('stroke-width', documentData.sw);
-  }
-  this.layerElement.setAttribute('font-size', documentData.finalSize);
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (fontData.fClass) {
-    this.layerElement.setAttribute('class', fontData.fClass);
-  } else {
-    this.layerElement.setAttribute('font-family', fontData.fFamily);
-    var fWeight = documentData.fWeight;
-    var fStyle = documentData.fStyle;
-    this.layerElement.setAttribute('font-style', fStyle);
-    this.layerElement.setAttribute('font-weight', fWeight);
-  }
-  this.layerElement.setAttribute('aria-label', documentData.t);
-
-  var letters = documentData.l || [];
-  var usesGlyphs = !!this.globalData.fontManager.chars;
-  len = letters.length;
-
-  var tSpan;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var singleShape = this.data.singleShape;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  if (singleShape && !usesGlyphs && !documentData.sz) {
-    var tElement = this.textContainer;
-    var justify = 'start';
-    switch (documentData.j) {
-      case 1:
-        justify = 'end';
-        break;
-      case 2:
-        justify = 'middle';
-        break;
-      default:
-        justify = 'start';
-        break;
-    }
-    tElement.setAttribute('text-anchor', justify);
-    tElement.setAttribute('letter-spacing', trackingOffset);
-    var textContent = this.buildTextContents(documentData.finalText);
-    len = textContent.length;
-    yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
-    for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
-      tSpan.textContent = textContent[i];
-      tSpan.setAttribute('x', 0);
-      tSpan.setAttribute('y', yPos);
-      tSpan.style.display = 'inherit';
-      tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
-      yPos += documentData.finalLineHeight;
-    }
-
-    this.layerElement.appendChild(tElement);
-  } else {
-    var cachedSpansLength = this.textSpans.length;
-    var shapeData;
-    var charData;
-    for (i = 0; i < len; i += 1) {
-      if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
-        if (cachedSpansLength <= i) {
-          tSpan.setAttribute('stroke-linecap', 'butt');
-          tSpan.setAttribute('stroke-linejoin', 'round');
-          tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
-          this.layerElement.appendChild(tSpan);
-        }
-        tSpan.style.display = 'inherit';
-      }
-
-      matrixHelper.reset();
-      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-      if (singleShape) {
-        if (letters[i].n) {
-          xPos = -trackingOffset;
-          yPos += documentData.yOffset;
-          yPos += firstLine ? 1 : 0;
-          firstLine = false;
-        }
-        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-        xPos += letters[i].l || 0;
-        // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-        xPos += trackingOffset;
-      }
-      if (usesGlyphs) {
-        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
         } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
         }
       } else {
-        if (singleShape) {
-          tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
-        }
-        tSpan.textContent = letters[i].val;
-        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
       }
-      //
-    }
-    if (singleShape && tSpan) {
-      tSpan.setAttribute('d', shapeStr);
-    }
-  }
-  while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
-    i += 1;
-  }
 
-  this._sizeChanged = true;
-};
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
 
-SVGTextLottieElement.prototype.sourceRectAtTime = function () {
-  this.prepareFrame(this.comp.renderedFrame - this.data.st);
-  this.renderInnerContent();
-  if (this._sizeChanged) {
-    this._sizeChanged = false;
-    var textBox = this.layerElement.getBBox();
-    this.bbox = {
-      top: textBox.y,
-      left: textBox.x,
-      width: textBox.width,
-      height: textBox.height,
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
     };
   }
-  return this.bbox;
-};
 
-SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-    if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
-      this._sizeChanged = true;
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
       var i;
-      var len;
-      var renderedLetters = this.textAnimator.renderedLetters;
+      var len = familyArray.length;
+      var enabledFamilies = [];
 
-      var letters = this.textProperty.currentData.l;
-
-      len = letters.length;
-      var renderedLetter;
-      var textSpan;
       for (i = 0; i < len; i += 1) {
-        if (!letters[i].n) {
-          renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
-          if (renderedLetter._mdf.m) {
-            textSpan.setAttribute('transform', renderedLetter.m);
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
           }
-          if (renderedLetter._mdf.o) {
-            textSpan.setAttribute('opacity', renderedLetter.o);
-          }
-          if (renderedLetter._mdf.sw) {
-            textSpan.setAttribute('stroke-width', renderedLetter.sw);
-          }
-          if (renderedLetter._mdf.sc) {
-            textSpan.setAttribute('stroke', renderedLetter.sc);
-          }
-          if (renderedLetter._mdf.fc) {
-            textSpan.setAttribute('fill', renderedLetter.fc);
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
           }
         }
       }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
     }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
+    return function pathInterfaceFactory(shape, view, propertyGroup) {
+      var prop = view.sh;
+
+      function interfaceFunction(val) {
+        if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
+          return interfaceFunction.path;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        path: {
+          get: function get() {
+            if (prop.k) {
+              prop.getValue();
+            }
+
+            return prop;
+          }
+        },
+        shape: {
+          get: function get() {
+            if (prop.k) {
+              prop.getValue();
+            }
+
+            return prop;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
+      });
+      return interfaceFunction;
+    };
+  }();
+
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
+
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
+        }
+      }
+
+      return arr;
+    }
+
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
+
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
+          // Not necessary for now. Keeping them here in case a new case appears
+          // case 'ADBE Vector Transform Group':
+          // case 3:
+
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
+    }
+
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        type: {
+          get: function get() {
+            return 'a';
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
+    }
+
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
+      }
+
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      }
+
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
+          }
+
+          return _sourceText;
+        }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
   }
-};
 
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
 
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
 
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-SVGShapeElement.prototype.identityMatrix = new Matrix();
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
+  function NoValueEffect() {
+    this.p = {};
+  }
 
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
     for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
       }
     }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
+        i += 1;
+      }
+
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
     }
-  }
-};
+  };
 
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
 
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
 
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
   }
 
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
   }
 
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
 
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
     } else {
-      itemsData[i] = prevViewData[processedPos - 1];
+      this._currentTime = num / this.data.sr;
     }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
       }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
+    var i;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
         }
       }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
         }
       }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
         }
       }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
       }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
       }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
+        rect = null;
       }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
       } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
-      ownModifiers.push(modifier);
     }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
 
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
 
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
       }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
     }
   }
-};
 
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
+      });
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
+      }
+
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
+        }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
     }
   }
-};
 
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
 
-/* global createNS */
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
 
-function SVGTintFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  feColorMatrix.setAttribute('result', 'f2');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-  if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
     var feMerge = createNS('feMerge');
     filter.appendChild(feMerge);
     var feMergeNode;
     feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'SourceGraphic');
     feMerge.appendChild(feMergeNode);
     feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'f2');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
     feMerge.appendChild(feMergeNode);
   }
-}
 
-SVGTintFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var colorBlack = this.filterManager.effectElements[0].p.v;
-    var colorWhite = this.filterManager.effectElements[1].p.v;
-    var opacity = this.filterManager.effectElements[2].p.v / 100;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGFillFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-}
-SVGFillFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color = this.filterManager.effectElements[2].p.v;
-    var opacity = this.filterManager.effectElements[6].p.v;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGGaussianBlurEffect(filter, filterManager) {
-  // Outset the filter region by 100% on all sides to accommodate blur expansion.
-  filter.setAttribute('x', '-100%');
-  filter.setAttribute('y', '-100%');
-  filter.setAttribute('width', '300%');
-  filter.setAttribute('height', '300%');
-
-  this.filterManager = filterManager;
-  var feGaussianBlur = createNS('feGaussianBlur');
-  filter.appendChild(feGaussianBlur);
-  this.feGaussianBlur = feGaussianBlur;
-}
-
-SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    // Empirical value, matching AE's blur appearance.
-    var kBlurrinessToSigma = 0.3;
-    var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
-
-    // Dimensions mapping:
-    //
-    //   1 -> horizontal & vertical
-    //   2 -> horizontal only
-    //   3 -> vertical only
-    //
-    var dimensions = this.filterManager.effectElements[1].p.v;
-    var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq
-    var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq
-
-    this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);
-
-    // Repeat edges mapping:
-    //
-    //   0 -> off -> duplicate
-    //   1 -> on  -> wrap
-    var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
-    this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
-  }
-};
-
-/* global createNS, createElementID, locationHref, bmFloor */
-
-function SVGStrokeEffect(elem, filterManager) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.elem = elem;
-  this.paths = [];
-}
-
-SVGStrokeEffect.prototype.initialize = function () {
-  var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-  var path;
-  var groupPath;
-  var i;
-  var len;
-  if (this.filterManager.effectElements[1].p.v === 1) {
-    len = this.elem.maskManager.masksProperties.length;
-    i = 0;
-  } else {
-    i = this.filterManager.effectElements[0].p.v - 1;
-    len = i + 1;
-  }
-  groupPath = createNS('g');
-  groupPath.setAttribute('fill', 'none');
-  groupPath.setAttribute('stroke-linecap', 'round');
-  groupPath.setAttribute('stroke-dashoffset', 1);
-  for (i; i < len; i += 1) {
-    path = createNS('path');
-    groupPath.appendChild(path);
-    this.paths.push({ p: path, m: i });
-  }
-  if (this.filterManager.effectElements[10].p.v === 3) {
-    var mask = createNS('mask');
-    var id = createElementID();
-    mask.setAttribute('id', id);
-    mask.setAttribute('mask-type', 'alpha');
-    mask.appendChild(groupPath);
-    this.elem.globalData.defs.appendChild(mask);
-    var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-    while (elemChildren[0]) {
-      g.appendChild(elemChildren[0]);
-    }
-    this.elem.layerElement.appendChild(g);
-    this.masker = mask;
-    groupPath.setAttribute('stroke', '#fff');
-  } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (this.filterManager.effectElements[10].p.v === 2) {
-      elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-      while (elemChildren.length) {
-        this.elem.layerElement.removeChild(elemChildren[0]);
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
       }
-    }
-    this.elem.layerElement.appendChild(groupPath);
-    this.elem.layerElement.removeAttribute('mask');
-    groupPath.setAttribute('stroke', '#fff');
-  }
-  this.initialized = true;
-  this.pathMasker = groupPath;
-};
 
-SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
-  if (!this.initialized) {
-    this.initialize();
-  }
-  var i;
-  var len = this.paths.length;
-  var mask;
-  var path;
-  for (i = 0; i < len; i += 1) {
-    if (this.paths[i].m !== -1) {
-      mask = this.elem.maskManager.viewData[this.paths[i].m];
-      path = this.paths[i].p;
-      if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
-        path.setAttribute('d', mask.lastPath);
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
       }
-      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) {
-        var dasharrayValue;
-        if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
-          var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var l = path.getTotalLength();
-          dasharrayValue = '0 0 0 ' + l * s + ' ';
-          var lineLength = l * (e - s);
-          var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-          var units = Math.floor(lineLength / segment);
-          var j;
-          for (j = 0; j < units; j += 1) {
-            dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
-          }
-          dasharrayValue += '0 ' + l * 10 + ' 0 0';
-        } else {
-          dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-        }
-        path.setAttribute('stroke-dasharray', dasharrayValue);
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
       }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
     }
-  }
-  if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-    this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
   }
 
-  if (forceRender || this.filterManager.effectElements[6].p._mdf) {
-    this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
-  }
-  if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (forceRender || this.filterManager.effectElements[3].p._mdf) {
-      var color = this.filterManager.effectElements[3].p.v;
-      this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
-    }
-  }
-};
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
 
-/* global createNS */
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
 
-function SVGTritoneFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  var feComponentTransfer = createNS('feComponentTransfer');
-  feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-  filter.appendChild(feComponentTransfer);
-  this.matrixFilter = feComponentTransfer;
-  var feFuncR = createNS('feFuncR');
-  feFuncR.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncR);
-  this.feFuncR = feFuncR;
-  var feFuncG = createNS('feFuncG');
-  feFuncG.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncG);
-  this.feFuncG = feFuncG;
-  var feFuncB = createNS('feFuncB');
-  feFuncB.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncB);
-  this.feFuncB = feFuncB;
-}
-
-SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color1 = this.filterManager.effectElements[0].p.v;
-    var color2 = this.filterManager.effectElements[1].p.v;
-    var color3 = this.filterManager.effectElements[2].p.v;
-    var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
-    var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
-    var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
-    this.feFuncR.setAttribute('tableValues', tableR);
-    this.feFuncG.setAttribute('tableValues', tableG);
-    this.feFuncB.setAttribute('tableValues', tableB);
-    // var opacity = this.filterManager.effectElements[2].p.v/100;
-    // 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');
-  }
-};
-
-/* global createNS */
-
-function SVGProLevelsFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var effectElements = this.filterManager.effectElements;
-  var feComponentTransfer = createNS('feComponentTransfer');
-
-  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) {
-    this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
-  }
-  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) {
-    this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
-  }
-  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) {
-    this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-  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) {
-    this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
-  }
-
-  if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    feComponentTransfer = createNS('feComponentTransfer');
-  }
-
-  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) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
-    this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
-    this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-}
-
-SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
-  var feFunc = createNS(type);
-  feFunc.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFunc);
-  return feFunc;
-};
-
-SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
-  var cnt = 0;
-  var segments = 256;
-  var perc;
-  var min = Math.min(inputBlack, inputWhite);
-  var max = Math.max(inputBlack, inputWhite);
-  var table = Array.call(null, { length: segments });
-  var colorValue;
-  var pos = 0;
-  var outputDelta = outputWhite - outputBlack;
-  var inputDelta = inputWhite - inputBlack;
-  while (cnt <= 256) {
-    perc = cnt / 256;
-    if (perc <= min) {
-      colorValue = inputDelta < 0 ? outputWhite : outputBlack;
-    } else if (perc >= max) {
-      colorValue = inputDelta < 0 ? outputBlack : outputWhite;
-    } else {
-      colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
-    }
-    table[pos] = colorValue;
-    pos += 1;
-    cnt += 256 / (segments - 1);
-  }
-  return table.join(' ');
-};
-
-SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var val;
-    var effectElements = this.filterManager.effectElements;
-    if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
-      val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
-      this.feFuncRComposed.setAttribute('tableValues', val);
-      this.feFuncGComposed.setAttribute('tableValues', val);
-      this.feFuncBComposed.setAttribute('tableValues', val);
+      i += 1;
     }
 
-    if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
-      val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
-      this.feFuncR.setAttribute('tableValues', val);
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
     }
 
-    if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
-      val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
-      this.feFuncG.setAttribute('tableValues', val);
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
     }
 
-    if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
-      val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
-      this.feFuncB.setAttribute('tableValues', val);
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
     }
 
-    if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
-      val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
-      this.feFuncA.setAttribute('tableValues', val);
-    }
-  }
-};
-
-/* global createNS, rgbToHex, degToRads */
-
-function SVGDropShadowEffect(filter, filterManager) {
-  var filterSize = filterManager.container.globalData.renderConfig.filterSize;
-  filter.setAttribute('x', filterSize.x);
-  filter.setAttribute('y', filterSize.y);
-  filter.setAttribute('width', filterSize.width);
-  filter.setAttribute('height', filterSize.height);
-  this.filterManager = filterManager;
-
-  var feGaussianBlur = createNS('feGaussianBlur');
-  feGaussianBlur.setAttribute('in', 'SourceAlpha');
-  feGaussianBlur.setAttribute('result', 'drop_shadow_1');
-  feGaussianBlur.setAttribute('stdDeviation', '0');
-  this.feGaussianBlur = feGaussianBlur;
-  filter.appendChild(feGaussianBlur);
-
-  var feOffset = createNS('feOffset');
-  feOffset.setAttribute('dx', '25');
-  feOffset.setAttribute('dy', '0');
-  feOffset.setAttribute('in', 'drop_shadow_1');
-  feOffset.setAttribute('result', 'drop_shadow_2');
-  this.feOffset = feOffset;
-  filter.appendChild(feOffset);
-  var feFlood = createNS('feFlood');
-  feFlood.setAttribute('flood-color', '#00ff00');
-  feFlood.setAttribute('flood-opacity', '1');
-  feFlood.setAttribute('result', 'drop_shadow_3');
-  this.feFlood = feFlood;
-  filter.appendChild(feFlood);
-
-  var feComposite = createNS('feComposite');
-  feComposite.setAttribute('in', 'drop_shadow_3');
-  feComposite.setAttribute('in2', 'drop_shadow_2');
-  feComposite.setAttribute('operator', 'in');
-  feComposite.setAttribute('result', 'drop_shadow_4');
-  filter.appendChild(feComposite);
-
-  var feMerge = createNS('feMerge');
-  filter.appendChild(feMerge);
-  var feMergeNode;
-  feMergeNode = createNS('feMergeNode');
-  feMerge.appendChild(feMergeNode);
-  feMergeNode = createNS('feMergeNode');
-  feMergeNode.setAttribute('in', 'SourceGraphic');
-  this.feMergeNode = feMergeNode;
-  this.feMerge = feMerge;
-  this.originalNodeAdded = false;
-  feMerge.appendChild(feMergeNode);
-}
-
-SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-      this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
-    }
-    if (forceRender || this.filterManager.effectElements[0].p._mdf) {
-      var col = this.filterManager.effectElements[0].p.v;
-      this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
-    }
-    if (forceRender || this.filterManager.effectElements[1].p._mdf) {
-      this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
-    }
-    if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
-      var distance = this.filterManager.effectElements[3].p.v;
-      var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
-      var x = distance * Math.cos(angle);
-      var y = distance * Math.sin(angle);
-      this.feOffset.setAttribute('dx', x);
-      this.feOffset.setAttribute('dy', y);
-    }
-    /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
-            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
-                this.feMerge.removeChild(this.feMergeNode);
-                this.originalNodeAdded = false;
-            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
-                this.feMerge.appendChild(this.feMergeNode);
-                this.originalNodeAdded = true;
-            }
-        } */
-  }
-};
-
-/* global createElementID, createNS */
-
-var _svgMatteSymbols = [];
-
-function SVGMatte3Effect(filterElem, filterManager, elem) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.filterElem = filterElem;
-  this.elem = elem;
-  elem.matteElement = createNS('g');
-  elem.matteElement.appendChild(elem.layerElement);
-  elem.matteElement.appendChild(elem.transformedElement);
-  elem.baseElement = elem.matteElement;
-}
-
-SVGMatte3Effect.prototype.findSymbol = function (mask) {
-  var i = 0;
-  var len = _svgMatteSymbols.length;
-  while (i < len) {
-    if (_svgMatteSymbols[i] === mask) {
-      return _svgMatteSymbols[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
-  var parentNode = mask.layerElement.parentNode;
-  if (!parentNode) {
-    return;
-  }
-  var children = parentNode.children;
-  var i = 0;
-  var len = children.length;
-  while (i < len) {
-    if (children[i] === mask.layerElement) {
-      break;
-    }
-    i += 1;
-  }
-  var nextChild;
-  if (i <= len - 2) {
-    nextChild = children[i + 1];
-  }
-  var useElem = createNS('use');
-  useElem.setAttribute('href', '#' + symbolId);
-  if (nextChild) {
-    parentNode.insertBefore(useElem, nextChild);
-  } else {
-    parentNode.appendChild(useElem);
-  }
-};
-
-SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
-  if (!this.findSymbol(mask)) {
-    var symbolId = createElementID();
-    var masker = createNS('mask');
-    masker.setAttribute('id', mask.layerId);
-    masker.setAttribute('mask-type', 'alpha');
-    _svgMatteSymbols.push(mask);
-    var defs = elem.globalData.defs;
-    defs.appendChild(masker);
-    var symbol = createNS('symbol');
-    symbol.setAttribute('id', symbolId);
-    this.replaceInParent(mask, symbolId);
-    symbol.appendChild(mask.layerElement);
-    defs.appendChild(symbol);
     var useElem = createNS('use');
     useElem.setAttribute('href', '#' + symbolId);
-    masker.appendChild(useElem);
-    mask.data.hd = false;
-    mask.show();
-  }
-  elem.setMatte(mask.layerId);
-};
 
-SVGMatte3Effect.prototype.initialize = function () {
-  var ind = this.filterManager.effectElements[0].p.v;
-  var elements = this.elem.comp.elements;
-  var i = 0;
-  var len = elements.length;
-  while (i < len) {
-    if (elements[i] && elements[i].data.ind === ind) {
-      this.setElementAsMask(this.elem, elements[i]);
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
     }
-    i += 1;
-  }
-  this.initialized = true;
-};
+  };
 
-SVGMatte3Effect.prototype.renderFrame = function () {
-  if (!this.initialized) {
-    this.initialize();
-  }
-};
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
 
-/* exported SVGEffects */
+      _svgMatteSymbols.push(mask);
 
-function SVGEffects() {}
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
 
-/* global createTag, AnimationItem */
-/* exported animationManager */
+    elem.setMatte(mask.layerId);
+  };
 
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
     var i = 0;
-    var animItem = ev.target;
+    var len = elements.length;
+
     while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
         }
       }
-      i += 1;
-    }
-  }
 
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
       }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
 
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
+      if (filterManager) {
+        this.filters.push(filterManager);
       }
     }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
   }
 
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
     var i;
+    var len = this.filters.length;
+
     for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
+      this.filters[i].renderFrame(_isFirstFrame);
     }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
   };
-  var wrapperAttributes = wrapper.attributes;
 
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
 
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
+  function SVGBaseElement() {}
 
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
 
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
+      var filId;
+      var fil;
+      var gg;
 
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
 
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
 
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
 
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
 
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
 
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
 
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
 
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
-
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
-    if (expressionsPlugin) {
-      expressionsPlugin.initExpressions(this);
-    }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
-    }
-  }
-};
-
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
-
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
-
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
-    }
-  }
-};
-
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
-
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
-
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
-
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
-    }
-  }
-  return null;
-};
-
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
-
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
       } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
+        this.baseElement = this.layerElement;
       }
-    }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
 
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
       }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
-      if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
-      }
-    } else {
-      this.setCurrentRawFrameValue(nextValue);
-    }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
         } else {
-          this.trigger('loopComplete');
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
+        i += 1;
+      }
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
+  };
+
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
+  };
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
+
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
+
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
+  }
+
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
+    this.elem = elem;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
         }
       } else {
-        _isComplete = true;
-        nextValue = 0;
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
       }
     }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
 
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
       }
     }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
-      }
-    }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
-    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
   }
 
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
 
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
 
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
 
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
 
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* exported EffectsManager */
-
-function EffectsManager() {
-  this.effectElements = [];
-}
-
-
-var lottie = {};
-
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
-    }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
-
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
-
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
-
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
-
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
-
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
-
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
-    }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
 
-return lottie;
-}));
\ No newline at end of file
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
+    if (this.kf) {
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
+    } else {
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
+    }
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
+  };
+
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
+  }
+
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
+  }
+
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
+
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
+
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
+
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
+      case 1:
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
+        break;
+
+      case 2:
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
+        break;
+
+      default:
+        break;
+    }
+
+    matrixHelper.translate(xPos, yPos, 0);
+  };
+
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  registerRenderer('svg', SVGRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie_light.min.js b/build/player/lottie_light.min.js
index fba4a8c..a9bc1df 100644
--- a/build/player/lottie_light.min.js
+++ b/build/player/lottie_light.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var i,e="http://www.w3.org/2000/svg",A="",s=-999999,p=!1,a=!0,r="",n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_=Math.pow,k=Math.sqrt,f=Math.floor,d=(Math.max,Math.min),h={};!function(){var t,e=["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"],s=e.length;for(t=0;t<s;t+=1)h[e[t]]=Math[e[t]]}(),h.random=Math.random,h.abs=function(t){if("object"===typeof t&&t.length){var e,s=x(t.length),i=t.length;for(e=0;e<i;e+=1)s[e]=Math.abs(t[e]);return s}return Math.abs(t)};var P=150,j=Math.PI/180,v=.5519;function o(t){t?Math.round:function(t){return t}}function l(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}function m(t,e){this.type=t,this.direction=e<0?-1:1}function c(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}function u(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}function g(t,e){this.type=t,this.target=e}function y(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function b(t){this.type="configError",this.nativeError=t}o(!1);var t,S=(t=0,function(){return r+"__lottie_element_"+(t+=1)});function D(t,e,s){var i,a,r,n,h,o,l,p;switch(o=s*(1-e),l=s*(1-(h=6*t-(n=Math.floor(6*t)))*e),p=s*(1-(1-h)*e),n%6){case 0:i=s,a=p,r=o;break;case 1:i=l,a=s,r=o;break;case 2:i=o,a=s,r=p;break;case 3:i=o,a=l,r=s;break;case 4:i=p,a=o,r=s;break;case 5:i=s,a=o,r=l}return[i,a,r]}function w(t,e,s){var i,a=Math.max(t,e,s),r=Math.min(t,e,s),n=a-r,h=0===a?0:n/a,o=a/255;switch(a){case r:i=0;break;case t:i=e-s+n*(e<s?6:0),i/=6*n;break;case e:i=s-t+2*n,i/=6*n;break;case s:i=t-e+4*n,i/=6*n}return[i,h,o]}function lt(t,e){var s=w(255*t[0],255*t[1],255*t[2]);return s[1]+=e,1<s[1]?s[1]=1:s[1]<=0&&(s[1]=0),D(s[0],s[1],s[2])}function pt(t,e){var s=w(255*t[0],255*t[1],255*t[2]);return s[2]+=e,1<s[2]?s[2]=1:s[2]<0&&(s[2]=0),D(s[0],s[1],s[2])}function ft(t,e){var s=w(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,1<s[0]?s[0]-=1:s[0]<0&&(s[0]+=1),D(s[0],s[1],s[2])}!function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1===e.length?"0"+e:e}();function C(){}C.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t],i=0;i<s.length;i+=1)s[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var W=function(){function s(t,e){var s,i=0,a=[];switch(t){case"int16":case"uint8c":s=1;break;default:s=1.1}for(i=0;i<e;i+=1)a.push(s);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):s(t,e)}:s}();function x(t){return Array.apply(null,{length:t})}function F(t){return document.createElementNS(e,t)}function T(t){return document.createElement(t)}function M(){}M.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var E,I=(E={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return E[t]||""}),L={1:"butt",2:"round",3:"square"},V={1:"miter",2:"round",3:"bevel"},R=function(){var a=Math.cos,r=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function s(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var s=a(e),i=r(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}function d(t,e,s){return s||0===s||(s=1),1===t&&1===e&&1===s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function m(t,e,s,i,a,r,n,h,o,l,p,f,d,m,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this.props[6]=n,this.props[7]=h,this.props[8]=o,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=d,this.props[13]=m,this.props[14]=c,this.props[15]=u,this}function c(t,e,s){return s=s||0,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function u(t,e,s,i,a,r,n,h,o,l,p,f,d,m,c,u){var g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===a&&1===r&&0===n&&0===h&&0===o&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*d,g[13]=g[13]*r+g[15]*m,g[14]=g[14]*p+g[15]*c,g[15]*=u,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],_=g[3],k=g[4],A=g[5],P=g[6],S=g[7],D=g[8],w=g[9],C=g[10],x=g[11],F=g[12],T=g[13],M=g[14],E=g[15];return g[0]=y*t+v*a+b*o+_*d,g[1]=y*e+v*r+b*l+_*m,g[2]=y*s+v*n+b*p+_*c,g[3]=y*i+v*h+b*f+_*u,g[4]=k*t+A*a+P*o+S*d,g[5]=k*e+A*r+P*l+S*m,g[6]=k*s+A*n+P*p+S*c,g[7]=k*i+A*h+P*f+S*u,g[8]=D*t+w*a+C*o+x*d,g[9]=D*e+w*r+C*l+x*m,g[10]=D*s+w*n+C*p+x*c,g[11]=D*i+w*h+C*f+x*u,g[12]=F*t+T*a+M*o+E*d,g[13]=F*e+T*r+M*l+E*m,g[14]=F*s+T*n+M*p+E*c,g[15]=F*i+T*h+M*f+E*u,this._identityCalculated=!1,this}function g(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function y(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function _(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function k(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function A(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function P(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function S(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,s=-this.props[1]/t,i=-this.props[4]/t,a=this.props[0]/t,r=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,h=new R;return h.props[0]=e,h.props[1]=s,h.props[4]=i,h.props[5]=a,h.props[12]=r,h.props[13]=n,h}function D(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function w(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=D(t[e]);return i}function C(t,e,s){var i=W("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=s[0],i[5]=s[1];else{var a=this.props[0],r=this.props[1],n=this.props[4],h=this.props[5],o=this.props[12],l=this.props[13];i[0]=t[0]*a+t[1]*n+o,i[1]=t[0]*r+t[1]*h+l,i[2]=e[0]*a+e[1]*n+o,i[3]=e[0]*r+e[1]*h+l,i[4]=s[0]*a+s[1]*n+o,i[5]=s[0]*r+s[1]*h+l}return i}function x(t,e,s){return this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function F(t,e){if(this.isIdentity())return t+","+e;var s=this.props;return Math.round(100*(t*s[0]+e*s[4]+s[12]))/100+","+Math.round(100*(t*s[1]+e*s[5]+s[13]))/100}function T(){for(var t=0,e=this.props,s="matrix3d(";t<16;)s+=i(1e4*e[t])/1e4,s+=15===t?")":",",t+=1;return s}function M(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function E(){var t=this.props;return"matrix("+M(t[0])+","+M(t[1])+","+M(t[4])+","+M(t[5])+","+M(t[12])+","+M(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=s,this.rotateY=h,this.rotateZ=o,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=d,this.setTransform=m,this.translate=c,this.transform=u,this.applyToPoint=_,this.applyToX=k,this.applyToY=A,this.applyToZ=P,this.applyToPointArray=x,this.applyToTriplePoints=C,this.applyToPointStringified=F,this.toCSS=T,this.to2dCSS=E,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=w,this.inversePoint=D,this.getInverseMatrix=S,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=W("float32",16),this.reset()}}();!function(h,o){var l,p=this,f=256,d=6,m="random",c=o.pow(f,d),u=o.pow(2,52),g=2*u,y=f-1;function v(t){var e,s=t.length,n=this,i=0,a=n.i=n.j=0,r=n.S=[];for(s||(t=[s++]);i<f;)r[i]=i++;for(i=0;i<f;i++)r[i]=r[a=y&a+t[i%s]+(e=r[i])],r[a]=e;n.g=function(t){for(var e,s=0,i=n.i,a=n.j,r=n.S;t--;)e=r[i=y&i+1],s=s*f+r[y&(r[i]=r[a=y&a+e])+(r[a]=e)];return n.i=i,n.j=a,s}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function _(t,e){for(var s,i=t+"",a=0;a<i.length;)e[y&a]=y&(s^=19*e[y&a])+i.charCodeAt(a++);return k(e)}function k(t){return String.fromCharCode.apply(0,t)}o["seed"+m]=function(t,e,s){var i=[],a=_(function t(e,s){var i,a=[],r=typeof e;if(s&&"object"==r)for(i in e)try{a.push(t(e[i],s-1))}catch(t){}return a.length?a:"string"==r?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,k(h)]:null===t?function(){try{if(l)return k(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),k(t)}catch(t){var e=p.navigator,s=e&&e.plugins;return[+new Date,p,s,p.screen,k(h)]}}():t,3),i),r=new v(i),n=function(){for(var t=r.g(d),e=c,s=0;t<u;)t=(t+s)*f,e*=f,s=r.g(1);for(;g<=t;)t/=2,e/=2,s>>>=1;return(t+s)/e};return n.int32=function(){return 0|r.g(4)},n.quick=function(){return r.g(4)/4294967296},n.double=n,_(k(r.S),h),(e.pass||s||function(t,e,s,i){return i&&(i.S&&b(i,r),t.state=function(){return b(r,{})}),s?(o[m]=t,e):t})(n,a,"global"in e?e.global:this==o,e.state)},_(o.random(),h)}([],h);var H=function(){var t={getBezierEasing:function(t,e,s,i,a){var r=a||("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p");if(h[r])return h[r];var n=new o([t,e,s,i]);return h[r]=n}},h={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function r(t){return 3*t}function f(t,e,s){return((i(e,s)*t+a(e,s))*t+r(e))*t}function d(t,e,s){return 3*i(e,s)*t*t+2*a(e,s)*t+r(e)}function o(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return o.prototype={get:function(t){var e=this._p[0],s=this._p[1],i=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===s&&i===a?t:0===t?0:1===t?1:f(this._getTForX(t),s,a)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&s===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<l;++s)this._mSampleValues[s]=f(s*p,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],i=this._mSampleValues,a=0,r=1,n=l-1;r!==n&&i[r]<=t;++r)a+=p;var h=a+(t-i[--r])/(i[r+1]-i[r])*p,o=d(h,e,s);return.001<=o?function(t,e,s,i){for(var a=0;a<4;++a){var r=d(e,s,i);if(0===r)return e;e-=(f(e,s,i)-t)/r}return e}(t,h,e,s):0===o?h:function(t,e,s,i,a){for(var r,n,h=0;0<(r=f(n=e+(s-e)/2,i,a)-t)?s=n:e=n,1e-7<Math.abs(r)&&++h<10;);return n}(t,a,a+p,e,s)}},t}();function z(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1)for(var r in i=t[s].prototype)Object.prototype.hasOwnProperty.call(i,r)&&(e.prototype[r]=i[r])}!function(){for(var a=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),s=Math.max(0,16-(e-a)),i=setTimeout(function(){t(e+s)},s);return a=e+s,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var dt=function(){var F=Math;function g(t,e,s,i,a,r){var n=t*i+e*a+s*r-a*i-r*t-s*e;return-.001<n&&n<.001}var p=function(t,e,s,i){var a,r,n,h,o,l,p=P,f=0,d=[],m=[],c=Et.newElement();for(n=s.length,a=0;a<p;a+=1){for(o=a/(p-1),r=l=0;r<n;r+=1)h=_(1-o,3)*t[r]+3*_(1-o,2)*o*s[r]+3*(1-o)*_(o,2)*i[r]+_(o,3)*e[r],d[r]=h,null!==m[r]&&(l+=_(d[r]-m[r],2)),m[r]=d[r];l&&(f+=l=k(l)),c.percents[a]=o,c.lengths[a]=f}return c.addedLength=f,c};function y(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,s,i){var a=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+s[0]+"_"+s[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[a]){var r,n,h,o,l,p,f,d=P,m=0,c=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&g(t[0],t[1],e[0],e[1],t[0]+s[0],t[1]+s[1])&&g(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(d=2);var u=new y(d);for(h=s.length,r=0;r<d;r+=1){for(f=x(h),l=r/(d-1),n=p=0;n<h;n+=1)o=_(1-l,3)*t[n]+3*_(1-l,2)*l*(t[n]+s[n])+3*(1-l)*_(l,2)*(e[n]+i[n])+_(l,3)*e[n],f[n]=o,null!==c&&(p+=_(f[n]-c[n],2));m+=p=k(p),u.points[r]=new v(p,f),c=f}u.segmentLength=m,b[a]=u}return b[a]});function T(t,e){var s=e.percents,i=e.lengths,a=s.length,r=f((a-1)*t),n=t*e.addedLength,h=0;if(r===a-1||0===r||n===i[r])return s[r];for(var o=i[r]>n?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(h=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=o,r<0||a-1<=r){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*h}var M=W("float32",8);return{getSegmentsLength:function(t){var e,s=Mt.newElement(),i=t.c,a=t.v,r=t.o,n=t.i,h=t._length,o=s.lengths,l=0;for(e=0;e<h-1;e+=1)o[e]=p(a[e],a[e+1],r[e],n[e+1]),l+=o[e].addedLength;return i&&h&&(o[e]=p(a[e],a[0],r[e],n[0]),l+=o[e].addedLength),s.totalLength=l,s},getNewSegment:function(t,e,s,i,a,r,n){a<0?a=0:1<a&&(a=1);var h,o=T(a,n),l=T(r=1<r?1:r,n),p=t.length,f=1-o,d=1-l,m=f*f*f,c=o*f*f*3,u=o*o*f*3,g=o*o*o,y=f*f*d,v=o*f*d+f*o*d+f*f*l,b=o*o*d+f*o*l+o*f*l,_=o*o*l,k=f*d*d,A=o*d*d+f*l*d+f*d*l,P=o*l*d+f*l*l+o*d*l,S=o*l*l,D=d*d*d,w=l*d*d+d*l*d+d*d*l,C=l*l*d+d*l*l+l*d*l,x=l*l*l;for(h=0;h<p;h+=1)M[4*h]=F.round(1e3*(m*t[h]+c*s[h]+u*i[h]+g*e[h]))/1e3,M[4*h+1]=F.round(1e3*(y*t[h]+v*s[h]+b*i[h]+_*e[h]))/1e3,M[4*h+2]=F.round(1e3*(k*t[h]+A*s[h]+P*i[h]+S*e[h]))/1e3,M[4*h+3]=F.round(1e3*(D*t[h]+w*s[h]+C*i[h]+x*e[h]))/1e3;return M},getPointInSegment:function(t,e,s,i,a,r){var n=T(a,r),h=1-n;return[F.round(1e3*(h*h*h*t[0]+(n*h*h+h*n*h+h*h*n)*s[0]+(n*n*h+h*n*n+n*h*n)*i[0]+n*n*n*e[0]))/1e3,F.round(1e3*(h*h*h*t[1]+(n*h*h+h*n*h+h*h*n)*s[1]+(n*n*h+h*n*n+n*h*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:g,pointOnLine3D:function(t,e,s,i,a,r,n,h,o){if(0===s&&0===r&&0===o)return g(t,e,i,a,n,h);var l,p=F.sqrt(F.pow(i-t,2)+F.pow(a-e,2)+F.pow(r-s,2)),f=F.sqrt(F.pow(n-t,2)+F.pow(h-e,2)+F.pow(o-s,2)),d=F.sqrt(F.pow(n-i,2)+F.pow(h-a,2)+F.pow(o-r,2));return-1e-4<(l=f<p?d<p?p-f-d:d-f-p:f<d?d-f-p:f-p-d)&&l<1e-4}}}(),N=function(){var i,a,r=1,n=[],h={onmessage:function(){},postMessage:function(t){i({data:t})}},s={postMessage:function(t){h.onmessage({data:t})}};function o(){a||((a=function(t){if(window.Worker&&window.Blob&&p){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),s=URL.createObjectURL(e);return new Worker(s)}return i=t,h}(function(e){if(s.dataManager||(s.dataManager=function(){function f(t,e){var s,i,a,r,n,h,o,l=t.length;for(i=0;i<l;i+=1)if("ks"in(s=t[i])&&!s.completed){if(s.completed=!0,s.tt&&(t[i-1].td=s.tt),s.hasMask){var p=s.masksProperties;for(r=p.length,a=0;a<r;a+=1)if(p[a].pt.k.i)c(p[a].pt.k);else for(h=p[a].pt.k.length,n=0;n<h;n+=1)p[a].pt.k[n].s&&c(p[a].pt.k[n].s[0]),p[a].pt.k[n].e&&c(p[a].pt.k[n].e[0])}0===s.ty?(s.layers=d(s.refId,e),f(s.layers,e)):4===s.ty?m(s.shapes):5===s.ty&&(0!==(o=s).t.a.length||"m"in o.t.p||(o.singleShape=!0))}}function d(t,e){for(var s=0,i=e.length;s<i;){if(e[s].id===t)return e[s].layers.__used?JSON.parse(JSON.stringify(e[s].layers)):(e[s].layers.__used=!0,e[s].layers);s+=1}return null}function m(t){var e,s,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)c(t[e].ks.k);else for(i=t[e].ks.k.length,s=0;s<i;s+=1)t[e].ks.k[s].s&&c(t[e].ks.k[s].s[0]),t[e].ks.k[s].e&&c(t[e].ks.k[s].e[0]);else"gr"===t[e].ty&&m(t[e].it)}function c(t){var e,s=t.i.length;for(e=0;e<s;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function h(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}var o,e=function(){var i=[4,4,14];function a(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(s=t[e],i=s.t.d,s.t.d={k:[{s:i,t:0}]})}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),s=(o=[4,7,99],function(t){if(t.chars&&!h(o,t.v)){var e,s,i,a,r,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(r=t.chars[e].data.shapes[0].it).length,s=0;s<i;s+=1)(a=r[s].ks.k).__converted||(c(r[s].ks.k),a.__converted=!0)}}),i=function(){var i=[5,7,15];function a(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(s=t[e],i=void 0,"number"==typeof(i=s.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),a=function(){var i=[4,1,9];function r(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)if("gr"===t[e].ty)r(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,s=0;s<i;s+=1)t[e].c.k[s].s&&(t[e].c.k[s].s[0]/=255,t[e].c.k[s].s[1]/=255,t[e].c.k[s].s[2]/=255,t[e].c.k[s].s[3]/=255),t[e].c.k[s].e&&(t[e].c.k[s].e[0]/=255,t[e].c.k[s].e[1]/=255,t[e].c.k[s].e[2]/=255,t[e].c.k[s].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function a(t){var e,s=t.length;for(e=0;e<s;e+=1)4===t[e].ty&&r(t[e].shapes)}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),r=function(){var i=[4,4,18];function l(t){var e,s,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,s=0;s<i;s+=1)t[e].ks.k[s].s&&(t[e].ks.k[s].s[0].c=t[e].closed),t[e].ks.k[s].e&&(t[e].ks.k[s].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function a(t){var e,s,i,a,r,n,h=t.length;for(s=0;s<h;s+=1){if((e=t[s]).hasMask){var o=e.masksProperties;for(a=o.length,i=0;i<a;i+=1)if(o[i].pt.k.i)o[i].pt.k.c=o[i].cl;else for(n=o[i].pt.k.length,r=0;r<n;r+=1)o[i].pt.k[r].s&&(o[i].pt.k[r].s[0].c=o[i].cl),o[i].pt.k[r].e&&(o[i].pt.k[r].e[0].c=o[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(a(t),e(t),s(t),i(t),r(t),f(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=a,t.checkChars=s,t.checkPathProperties=i,t.checkShapes=r,t.completeLayers=f,t}()),s.assetLoader||(s.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,s,t,i){var a,r=new XMLHttpRequest;try{r.responseType="json"}catch(t){}r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)a=n(r),t(a);else try{a=n(r),t(a)}catch(t){i&&i(t)}};try{r.open("GET",e,!0)}catch(t){r.open("GET",s+"/"+e,!0)}r.send()}}}()),"loadAnimation"===e.data.type)s.assetLoader.load(e.data.path,e.data.fullPath,function(t){s.dataManager.completeData(t),s.postMessage({id:e.data.id,payload:t,status:"success"})},function(){s.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;s.dataManager.completeData(t),s.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&s.assetLoader.load(e.data.path,e.data.fullPath,function(t){s.postMessage({id:e.data.id,payload:t,status:"success"})},function(){s.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,s=e.id,i=n[s];n[s]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var s="processId_"+(r+=1);return n[s]={onComplete:t,onError:e},s}return{loadAnimation:function(t,e,s){o();var i=l(e,s);a.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,s){o();var i=l(e,s);a.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,s){o();var i=l(e,s);a.postMessage({type:"complete",animation:t,id:i})}}}();function q(t){for(var e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",a=e.length,r=0;r<a;r+=1)switch(e[r].toLowerCase()){case"italic":i="italic";break;case"bold":s="700";break;case"black":s="900";break;case"medium":s="500";break;case"regular":case"normal":s="400";break;case"light":case"thin":s="200"}return{style:i,weight:t.fWeight||s}}var O=function(){var r={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],s=[65039,8205];function d(t,e){var s=T("span");s.setAttribute("aria-hidden",!0),s.style.fontFamily=e;var i=T("span");i.innerText="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=function(t){var e,s=t.split(","),i=s.length,a=[];for(e=0;e<i;e+=1)"sans-serif"!==s[e]&&"monospace"!==s[e]&&a.push(s[e]);return a.join(",")}(t)+", "+e,{node:i,w:a,parent:s}}function m(t,e){var s=F("text");s.style.fontSize="100px";var i=q(e);return s.setAttribute("font-family",e.fFamily),s.setAttribute("font-style",i.style),s.setAttribute("font-weight",i.weight),s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.setAttribute("class",e.fClass)):s.style.fontFamily=e.fFamily,t.appendChild(s),T("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,s}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var s=t.toString(16)+e.toString(16);return-1!==i.indexOf(s)},t.isZeroWidthJoiner=function(t,e){return e?t===s[0]&&e===s[1]:t===s[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var s,i,a=t.length,r=this.chars.length;for(e=0;e<a;e+=1){for(s=0,i=!1;s<r;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(i=!0),s+=1;i||(this.chars.push(t[e]),r+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var s,i=t.list,a=i.length,r=a;for(s=0;s<a;s+=1){var n,h,o=!0;if(i[s].loaded=!1,i[s].monoCase=d(i[s].fFamily,"monospace"),i[s].sansCase=d(i[s].fFamily,"sans-serif"),i[s].fPath){if("p"===i[s].fOrigin||3===i[s].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[s].fFamily+'"], style[f-origin="3"][f-family="'+i[s].fFamily+'"]')).length&&(o=!1),o){var l=T("style");l.setAttribute("f-forigin",i[s].fOrigin),l.setAttribute("f-origin",i[s].origin),l.setAttribute("f-family",i[s].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[s].fFamily+"; font-style: normal; src: url('"+i[s].fPath+"');}",e.appendChild(l)}}else if("g"===i[s].fOrigin||1===i[s].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),h=0;h<n.length;h+=1)-1!==n[h].href.indexOf(i[s].fPath)&&(o=!1);if(o){var p=T("link");p.setAttribute("f-forigin",i[s].fOrigin),p.setAttribute("f-origin",i[s].origin),p.type="text/css",p.rel="stylesheet",p.href=i[s].fPath,document.body.appendChild(p)}}else if("t"===i[s].fOrigin||2===i[s].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),h=0;h<n.length;h+=1)i[s].fPath===n[h].src&&(o=!1);if(o){var f=T("link");f.setAttribute("f-forigin",i[s].fOrigin),f.setAttribute("f-origin",i[s].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[s].fPath),e.appendChild(f)}}}else i[s].loaded=!0,r-=1;i[s].helper=m(e,i[s]),i[s].cache={},this.fonts.push(i[s])}0===r?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,s){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,s)),r},getFontByName:function(t){for(var e=0,s=this.fonts.length;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,s){var i=this.getFontByName(e),a=t.charCodeAt(0);if(!i.cache[a+1]){var r=i.helper;if(" "===t){r.textContent="|"+t+"|";var n=r.getComputedTextLength();r.textContent="||";var h=r.getComputedTextLength();i.cache[a+1]=(n-h)/100}else r.textContent=t,i.cache[a+1]=r.getComputedTextLength()/100}return i.cache[a+1]*s},checkLoadedFonts:function(){var t,e,s,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,e.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,e.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),B=function(){var f=s,a=Math.abs;function d(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=W("float32",this.pv.length));for(var a,r,n,h,o,l,p,f,d,m=e.lastIndex,c=m,u=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[c],r=this.keyframes[c+1],c===u-1&&t>=r.t-i){a.h&&(a=r),m=0;break}if(r.t-i>t){m=c;break}c<u-1?c+=1:(m=0,g=!1)}n=this.keyframesMetadata[c]||{};var y,v,b,_,k,A,P,S,D,w,C=r.t-i,x=a.t-i;if(a.to){n.bezierData||(n.bezierData=dt.buildBezierData(a.s,r.s||a.e,a.to,a.ti));var F=n.bezierData;if(C<=t||t<x){var T=C<=t?F.points.length-1:0;for(o=F.points[T].point.length,h=0;h<o;h+=1)s[h]=F.points[T].point[h]}else{n.__fnct?d=n.__fnct:(d=H.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,n.__fnct=d),l=d((t-x)/(C-x));var M,E=F.segmentLength*l,I=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastPoint:0,g=!0,p=F.points.length;g;){if(I+=F.points[f].partialLength,0===E||0===l||f===F.points.length-1){for(o=F.points[f].point.length,h=0;h<o;h+=1)s[h]=F.points[f].point[h];break}if(I<=E&&E<I+F.points[f+1].partialLength){for(M=(E-I)/F.points[f+1].partialLength,o=F.points[f].point.length,h=0;h<o;h+=1)s[h]=F.points[f].point[h]+(F.points[f+1].point[h]-F.points[f].point[h])*M;break}f<p-1?f+=1:g=!1}e._lastPoint=f,e._lastAddedLength=I-F.points[f].partialLength,e._lastKeyframeIndex=c}}else{var L,V,R,z,N;if(u=a.s.length,y=r.s||a.e,this.sh&&1!==a.h)if(C<=t)s[0]=y[0],s[1]=y[1],s[2]=y[2];else if(t<=x)s[0]=a.s[0],s[1]=a.s[1],s[2]=a.s[2];else{var O=B(a.s),q=B(y);v=s,b=function(t,e,s){var i,a,r,n,h,o=[],l=t[0],p=t[1],f=t[2],d=t[3],m=e[0],c=e[1],u=e[2],g=e[3];(a=l*m+p*c+f*u+d*g)<0&&(a=-a,m=-m,c=-c,u=-u,g=-g);h=1e-6<1-a?(i=Math.acos(a),r=Math.sin(i),n=Math.sin((1-s)*i)/r,Math.sin(s*i)/r):(n=1-s,s);return o[0]=n*l+h*m,o[1]=n*p+h*c,o[2]=n*f+h*u,o[3]=n*d+h*g,o}(O,q,(t-x)/(C-x)),_=b[0],k=b[1],A=b[2],P=b[3],S=Math.atan2(2*k*P-2*_*A,1-2*k*k-2*A*A),D=Math.asin(2*_*k+2*A*P),w=Math.atan2(2*_*P-2*k*A,1-2*_*_-2*A*A),v[0]=S/j,v[1]=D/j,v[2]=w/j}else for(c=0;c<u;c+=1)1!==a.h&&(l=C<=t?1:t<x?0:(a.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[c]?d=n.__fnct[c]:(L=void 0===a.o.x[c]?a.o.x[0]:a.o.x[c],V=void 0===a.o.y[c]?a.o.y[0]:a.o.y[c],R=void 0===a.i.x[c]?a.i.x[0]:a.i.x[c],z=void 0===a.i.y[c]?a.i.y[0]:a.i.y[c],d=H.getBezierEasing(L,V,R,z).get,n.__fnct[c]=d)):n.__fnct?d=n.__fnct:(L=a.o.x,V=a.o.y,R=a.i.x,z=a.i.y,d=H.getBezierEasing(L,V,R,z).get,a.keyframeMetadata=d),d((t-x)/(C-x)))),y=r.s||a.e,N=1===a.h?a.s[c]:a.s[c]+(y[c]-a.s[c])*l,"multidimensional"===this.propType?s[c]=N:s=N}return e.lastIndex=m,s}function B(t){var e=t[0]*j,s=t[1]*j,i=t[2]*j,a=Math.cos(e/2),r=Math.cos(s/2),n=Math.cos(i/2),h=Math.sin(e/2),o=Math.sin(s/2),l=Math.sin(i/2);return[h*o*n+a*r*l,h*r*n+a*o*l,a*o*n-h*r*l,a*r*n-h*o*l]}function m(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=s&&s<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function c(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<a(this.v-e)&&(this.v=e,this._mdf=!0);else for(var s=0,i=this.v.length;s<i;)e=t[s]*this.mult,1e-5<a(this.v[s]-e)&&(this.v[s]=e,this._mdf=!0),s+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)s=this.effectsSequence[t](s);this.setVValue(s),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function g(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,s,i){this.propType="unidimensional",this.mult=s||1,this.data=e,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=c,this.addEffect=g}function h(t,e,s,i){var a;this.propType="multidimensional",this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r=e.k.length;for(this.v=W("float32",r),this.pv=W("float32",r),this.vel=W("float32",r),a=0;a<r;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=c,this.addEffect=g}function o(t,e,s,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=c,this.interpolateValue=d,this.effectsSequence=[m.bind(this)],this.addEffect=g}function l(t,e,s,i){var a;this.propType="multidimensional";var r,n,h,o,l=e.k.length;for(a=0;a<l-1;a+=1)e.k[a].to&&e.k[a].s&&e.k[a+1]&&e.k[a+1].s&&(r=e.k[a].s,n=e.k[a+1].s,h=e.k[a].to,o=e.k[a].ti,(2===r.length&&(r[0]!==n[0]||r[1]!==n[1])&&dt.pointOnLine2D(r[0],r[1],n[0],n[1],r[0]+h[0],r[1]+h[1])&&dt.pointOnLine2D(r[0],r[1],n[0],n[1],n[0]+o[0],n[1]+o[1])||3===r.length&&(r[0]!==n[0]||r[1]!==n[1]||r[2]!==n[2])&&dt.pointOnLine3D(r[0],r[1],r[2],n[0],n[1],n[2],r[0]+h[0],r[1]+h[1],r[2]+h[2])&&dt.pointOnLine3D(r[0],r[1],r[2],n[0],n[1],n[2],n[0]+o[0],n[1]+o[1],n[2]+o[2]))&&(e.k[a].to=null,e.k[a].ti=null),r[0]===n[0]&&r[1]===n[1]&&0===h[0]&&0===h[1]&&0===o[0]&&0===o[1]&&(2===r.length||r[2]===n[2]&&0===h[2]&&0===o[2])&&(e.k[a].to=null,e.k[a].ti=null));this.effectsSequence=[m.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=c,this.interpolateValue=d,this.frameId=-1;var p=e.k[0].s.length;for(this.v=W("float32",p),this.pv=W("float32",p),a=0;a<p;a+=1)this.v[a]=f,this.pv[a]=f;this._caching={lastFrame:f,lastIndex:0,value:W("float32",p)},this.addEffect=g}return{getProp:function(t,e,s,i,a){var r;if(e.k.length)if("number"==typeof e.k[0])r=new h(t,e,i,a);else switch(s){case 0:r=new o(t,e,i,a);break;case 1:r=new l(t,e,i,a)}else r=new n(t,e,i,a);return r.effectsSequence.length&&a.addDynamicProperty(r),r}}}(),X=function(){var n=[0,0];function i(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new R,this.pre=new R,this.appliedTransformations=0,this.initDynamicPropertyContainer(s||t),e.p&&e.p.s?(this.px=B.getProp(t,e.p.x,0,0,this),this.py=B.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=B.getProp(t,e.p.z,0,0,this))):this.p=B.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=B.getProp(t,e.rx,0,j,this),this.ry=B.getProp(t,e.ry,0,j,this),this.rz=B.getProp(t,e.rz,0,j,this),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=B.getProp(t,e.or,1,j,this),this.or.sh=!0}else this.r=B.getProp(t,e.r||{k:0},0,j,this);e.sk&&(this.sk=B.getProp(t,e.sk,0,j,this),this.sa=B.getProp(t,e.sa,0,j,this)),this.a=B.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=B.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=B.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var s,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(s=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(s=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],i=[];var a=this.px,r=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(s[0]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),s[1]=r.getValueAtTime((r.keyframes[0].t+.01)/e,0),i[0]=a.getValueAtTime(a.keyframes[0].t/e,0),i[1]=r.getValueAtTime(r.keyframes[0].t/e,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(s[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),s[1]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/e,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0),i[1]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/e,0)):(s=[a.pv,r.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime),i[1]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/e,r.offsetTime))}else s=i=n;this.v.rotate(-Math.atan2(s[1]-i[1],s[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},z([M],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=M.prototype.addDynamicProperty,{getTransformProperty:function(t,e,s){return new i(t,e,s)}}}();function Y(){this.c=!1,this._length=0,this._maxLength=8,this.v=x(this._maxLength),this.o=x(this._maxLength),this.i=x(this._maxLength)}Y.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=xt.newElement(),this.o[s]=xt.newElement(),this.i[s]=xt.newElement(),s+=1},Y.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},Y.prototype.doubleArrayLength=function(){this.v=this.v.concat(x(this._maxLength)),this.i=this.i.concat(x(this._maxLength)),this.o=this.o.concat(x(this._maxLength)),this._maxLength*=2},Y.prototype.setXYAt=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[i]||r[i]&&!a)&&(r[i]=xt.newElement()),r[i][0]=t,r[i][1]=e},Y.prototype.setTripleAt=function(t,e,s,i,a,r,n,h){this.setXYAt(t,e,"v",n,h),this.setXYAt(s,i,"o",n,h),this.setXYAt(a,r,"i",n,h)},Y.prototype.reverse=function(){var t=new Y;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),a=1);var r,n=this._length-1,h=this._length;for(r=a;r<h;r+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],s[n][0],s[n][1],r,!1),n-=1;return t};var G,J,K=function(){var a=-999999;function t(t,e,s){var i,a,r,n,h,o,l,p,f,d=s.lastIndex,m=this.keyframes;if(t<m[0].t-this.offsetTime)i=m[0].s[0],r=!0,d=0;else if(t>=m[m.length-1].t-this.offsetTime)i=m[m.length-1].s?m[m.length-1].s[0]:m[m.length-2].e[0],r=!0;else{for(var c,u,g,y=d,v=m.length-1,b=!0;b&&(c=m[y],!((u=m[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},d=y,!(r=1===c.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<c.t-this.offsetTime)p=0;else{var _;g.__fnct?_=g.__fnct:(_=H.getBezierEasing(c.o.x,c.o.y,c.i.x,c.i.y).get,g.__fnct=_),p=_((t-(c.t-this.offsetTime))/(u.t-this.offsetTime-(c.t-this.offsetTime)))}a=u.s?u.s[0]:c.e[0]}i=c.s[0]}for(o=e._length,l=i.i[0].length,s.lastIndex=d,n=0;n<o;n+=1)for(h=0;h<l;h+=1)f=r?i.i[n][h]:i.i[n][h]+(a.i[n][h]-i.i[n][h])*p,e.i[n][h]=f,f=r?i.o[n][h]:i.o[n][h]+(a.o[n][h]-i.o[n][h])*p,e.o[n][h]=f,f=r?i.v[n][h]:i.v[n][h]+(a.v[n][h]-i.v[n][h])*p,e.v[n][h]=f}function r(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var s,i=t._length;for(s=0;s<i;s+=1)if(t.v[s][0]!==e.v[s][0]||t.v[s][1]!==e.v[s][1]||t.o[s][0]!==e.o[s][0]||t.o[s][1]!==e.o[s][1]||t.i[s][0]!==e.i[s][0]||t.i[s][1]!==e.i[s][1])return!1;return!0})(this.v,t)||(this.v=Ft.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var s=this.effectsSequence.length;for(e=0;e<s;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,s){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===s?e.pt.k:e.ks.k;this.v=Ft.clone(i),this.pv=Ft.clone(this.v),this.localShapeCollection=Tt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(t,e,s){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===s?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=Ft.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=Ft.clone(this.v),this.localShapeCollection=Tt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=a,this.reset=r,this._caching={lastFrame:a,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==a&&(i<e&&t<e||s<i&&s<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=s,n.prototype.setVValue=e,n.prototype.addEffect=i,h.prototype.getValue=s,h.prototype.interpolateShape=t,h.prototype.setVValue=e,h.prototype.addEffect=i;var o=function(){var n=v;function t(t,e){this.v=Ft.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=Tt.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=B.getProp(t,e.p,1,0,this),this.s=B.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=3!==this.d,r=this.v;r.v[0][0]=t,r.v[0][1]=e-i,r.v[1][0]=a?t+s:t-s,r.v[1][1]=e,r.v[2][0]=t,r.v[2][1]=e+i,r.v[3][0]=a?t-s:t+s,r.v[3][1]=e,r.i[0][0]=a?t-s*n:t+s*n,r.i[0][1]=e-i,r.i[1][0]=a?t+s:t-s,r.i[1][1]=e-i*n,r.i[2][0]=a?t+s*n:t-s*n,r.i[2][1]=e+i,r.i[3][0]=a?t-s:t+s,r.i[3][1]=e+i*n,r.o[0][0]=a?t+s*n:t-s*n,r.o[0][1]=e-i,r.o[1][0]=a?t+s:t-s,r.o[1][1]=e+i*n,r.o[2][0]=a?t-s*n:t+s*n,r.o[2][1]=e+i,r.o[3][0]=a?t-s:t+s,r.o[3][1]=e-i*n}},z([M],t),t}(),l=function(){function t(t,e){this.v=Ft.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=B.getProp(t,e.ir,0,0,this),this.is=B.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=B.getProp(t,e.pt,0,0,this),this.p=B.getProp(t,e.p,1,0,this),this.r=B.getProp(t,e.r,0,j,this),this.or=B.getProp(t,e.or,0,0,this),this.os=B.getProp(t,e.os,0,.01,this),this.localShapeCollection=Tt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,s,i,a=2*Math.floor(this.pt.v),r=2*Math.PI/a,n=!0,h=this.or.v,o=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*h/(2*a),d=2*Math.PI*o/(2*a),m=-Math.PI/2;m+=this.r.v;var c=3===this.data.d?-1:1;for(t=this.v._length=0;t<a;t+=1){s=n?l:p,i=n?f:d;var u=(e=n?h:o)*Math.cos(m),g=e*Math.sin(m),y=0===u&&0===g?0:g/Math.sqrt(u*u+g*g),v=0===u&&0===g?0:-u/Math.sqrt(u*u+g*g);u+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(u,g,u-y*i*s*c,g-v*i*s*c,u+y*i*s*c,g+v*i*s*c,t,!0),n=!n,m+=r*c}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),s=2*Math.PI/e,i=this.or.v,a=this.os.v,r=2*Math.PI*i/(4*e),n=.5*-Math.PI,h=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var o=i*Math.cos(n),l=i*Math.sin(n),p=0===o&&0===l?0:l/Math.sqrt(o*o+l*l),f=0===o&&0===l?0:-o/Math.sqrt(o*o+l*l);o+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(o,l,o-p*r*a*h,l-f*r*a*h,o+p*r*a*h,l+f*r*a*h,t,!0),n+=s*h}this.paths.length=0,this.paths[0]=this.v}},z([M],t),t}(),p=function(){function t(t,e){this.v=Ft.newElement(),this.v.c=!0,this.localShapeCollection=Tt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=B.getProp(t,e.p,1,0,this),this.s=B.getProp(t,e.s,1,0,this),this.r=B.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=d(s,i,this.r.v),r=a*(1-v);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+a,t+s,e-i+r,0,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-r,t+s,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+s-a,e+i,t+s-a,e+i,t+s-r,e+i,2,!0),this.v.setTripleAt(t-s+a,e+i,t-s+r,e+i,t-s+a,e+i,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-a,t-s,e+i-r,4,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+r,t-s,e-i+a,5,!0),this.v.setTripleAt(t-s+a,e-i,t-s+a,e-i,t-s+r,e-i,6,!0),this.v.setTripleAt(t+s-a,e-i,t+s-r,e-i,t+s-a,e-i,7,!0)):(this.v.setTripleAt(t-s,e+i,t-s+r,e+i,t-s,e+i,2),this.v.setTripleAt(t-s,e-i,t-s,e-i+r,t-s,e-i,3))):(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+r,t+s,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+s-a,e-i,t+s-a,e-i,t+s-r,e-i,1,!0),this.v.setTripleAt(t-s+a,e-i,t-s+r,e-i,t-s+a,e-i,2,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+a,t-s,e-i+r,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-r,t-s,e+i-a,4,!0),this.v.setTripleAt(t-s+a,e+i,t-s+a,e+i,t-s+r,e+i,5,!0),this.v.setTripleAt(t+s-a,e+i,t+s-r,e+i,t+s-a,e+i,6,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-a,t+s,e+i-r,7,!0)):(this.v.setTripleAt(t-s,e-i,t-s+r,e-i,t-s,e-i,1,!0),this.v.setTripleAt(t-s,e+i,t-s,e+i-r,t-s,e+i,2,!0),this.v.setTripleAt(t+s,e+i,t+s-r,e+i,t+s,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},z([M],t),t}();var f={getShapeProp:function(t,e,s){var i;return 3===s||4===s?i=(3===s?e.pt:e.ks).k.length?new h(t,e,s):new n(t,e,s):5===s?i=new p(t,e):6===s?i=new o(t,e):7===s&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return h}};return f}(),U=(J={},(G={}).registerModifier=function(t,e){J[t]||(J[t]=e)},G.getModifier=function(t,e,s){return new J[t](e,s)},G);function Z(){}function Q(){}function $(){}function tt(){}function et(){}function st(){this._length=0,this._maxLength=4,this.shapes=x(this._maxLength)}function it(t,e,s,i){var a;this.elem=t,this.frameId=-1,this.dataProps=x(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=W("float32",e.length?e.length-1:0),this.dashoffset=W("float32",1),this.initDynamicPropertyContainer(i);var r,n=e.length||0;for(a=0;a<n;a+=1)r=B.getProp(t,e[a].v,0,0,this),this.k=r.k||this.k,this.dataProps[a]={n:e[a].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}function at(t,e,s){this.data=e,this.c=W("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=W("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=B.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}Z.prototype.initModifierProperties=function(){},Z.prototype.addShapeToModifier=function(){},Z.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:Tt.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},Z.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=s,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Z.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},z([M],Z),z([Z],Q),Q.prototype.initModifierProperties=function(t,e){this.s=B.getProp(t,e.s,0,.01,this),this.e=B.getProp(t,e.e,0,.01,this),this.o=B.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},Q.prototype.addShapeToModifier=function(t){t.pathsData=[]},Q.prototype.calculateShapeEdges=function(t,e,s,i,a){var r=[];e<=1?r.push({s:t,e:e}):1<=t?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,h,o=[],l=r.length;for(n=0;n<l;n+=1){var p,f;if(!((h=r[n]).e*a<i||h.s*a>i+s))p=h.s*a<=i?0:(h.s*a-i)/s,f=h.e*a>=i+s?1:(h.e*a-i)/s,o.push([p,f])}return o.length||o.push([0,0]),o},Q.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)Mt.release(t[e]);return t.length=0,t},Q.prototype.processShapes=function(t){var e,s,i,a;if(this._mdf||t){var r=this.o.v%360/360;if(r<0&&(r+=1),e=1<this.s.v?1+r:this.s.v<0?0+r:this.s.v+r,(s=1<this.e.v?1+r:this.e.v<0?0+r:this.e.v+r)<e){var n=e;e=s,s=n}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var h,o,l,p,f,d=this.shapes.length,m=0;if(s===e)for(a=0;a<d;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===s&&0===e||0===s&&1===e){if(this._mdf)for(a=0;a<d;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var c,u,g=[];for(a=0;a<d;a+=1)if((c=this.shapes[a]).shape._mdf||this._mdf||t||2===this.m){if(o=(i=c.shape.paths)._length,f=0,!c.shape._mdf&&c.pathsData.length)f=c.totalShapeLength;else{for(l=this.releasePathsData(c.pathsData),h=0;h<o;h+=1)p=dt.getSegmentsLength(i.shapes[h]),l.push(p),f+=p.totalLength;c.totalShapeLength=f,c.pathsData=l}m+=f,c.shape._mdf=!0}else c.shape.paths=c.localShapeCollection;var y,v=e,b=s,_=0;for(a=d-1;0<=a;a-=1)if((c=this.shapes[a]).shape._mdf){for((u=c.localShapeCollection).releaseShapes(),2===this.m&&1<d?(y=this.calculateShapeEdges(e,s,c.totalShapeLength,_,m),_+=c.totalShapeLength):y=[[v,b]],o=y.length,h=0;h<o;h+=1){v=y[h][0],b=y[h][1],g.length=0,b<=1?g.push({s:c.totalShapeLength*v,e:c.totalShapeLength*b}):1<=v?g.push({s:c.totalShapeLength*(v-1),e:c.totalShapeLength*(b-1)}):(g.push({s:c.totalShapeLength*v,e:c.totalShapeLength}),g.push({s:0,e:c.totalShapeLength*(b-1)}));var k=this.addShapes(c,g[0]);if(g[0].s!==g[0].e){if(1<g.length)if(c.shape.paths.shapes[c.shape.paths._length-1].c){var A=k.pop();this.addPaths(k,u),k=this.addShapes(c,g[1],A)}else this.addPaths(k,u),k=this.addShapes(c,g[1]);this.addPaths(k,u)}}c.shape.paths=u}}},Q.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},Q.prototype.addSegment=function(t,e,s,i,a,r,n){a.setXYAt(e[0],e[1],"o",r),a.setXYAt(s[0],s[1],"i",r+1),n&&a.setXYAt(t[0],t[1],"v",r),a.setXYAt(i[0],i[1],"v",r+1)},Q.prototype.addSegmentFromArray=function(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)},Q.prototype.addShapes=function(t,e,s){var i,a,r,n,h,o,l,p,f=t.pathsData,d=t.shape.paths.shapes,m=t.shape.paths._length,c=0,u=[],g=!0;for(p=s?(h=s._length,s._length):(s=Ft.newElement(),h=0),u.push(s),i=0;i<m;i+=1){for(o=f[i].lengths,s.c=d[i].c,r=d[i].c?o.length:o.length+1,a=1;a<r;a+=1)if(c+(n=o[a-1]).addedLength<e.s)c+=n.addedLength,s.c=!1;else{if(c>e.e){s.c=!1;break}e.s<=c&&e.e>=c+n.addedLength?(this.addSegment(d[i].v[a-1],d[i].o[a-1],d[i].i[a],d[i].v[a],s,h,g),g=!1):(l=dt.getNewSegment(d[i].v[a-1],d[i].v[a],d[i].o[a-1],d[i].i[a],(e.s-c)/n.addedLength,(e.e-c)/n.addedLength,o[a-1]),this.addSegmentFromArray(l,s,h,g),g=!1,s.c=!1),c+=n.addedLength,h+=1}if(d[i].c&&o.length){if(n=o[a-1],c<=e.e){var y=o[a-1].addedLength;e.s<=c&&e.e>=c+y?(this.addSegment(d[i].v[a-1],d[i].o[a-1],d[i].i[0],d[i].v[0],s,h,g),g=!1):(l=dt.getNewSegment(d[i].v[a-1],d[i].v[0],d[i].o[a-1],d[i].i[0],(e.s-c)/y,(e.e-c)/y,o[a-1]),this.addSegmentFromArray(l,s,h,g),g=!1,s.c=!1)}else s.c=!1;c+=n.addedLength,h+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),c>e.e)break;i<m-1&&(s=Ft.newElement(),g=!0,u.push(s),h=0)}return u},U.registerModifier("tm",Q),z([Z],$),$.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=B.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},$.prototype.processPath=function(t,e){var s,i=Ft.newElement();i.c=t.c;var a,r,n,h,o,l,p,f,d,m,c,u,g=t._length,y=0;for(s=0;s<g;s+=1)a=t.v[s],n=t.o[s],r=t.i[s],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==s&&s!==g-1||t.c?(h=0===s?t.v[g-1]:t.v[s-1],l=(o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)))?Math.min(o/2,e)/o:0,p=c=a[0]+(h[0]-a[0])*l,f=u=a[1]-(a[1]-h[1])*l,d=p-(p-a[0])*v,m=f-(f-a[1])*v,i.setTripleAt(p,f,d,m,c,u,y),y+=1,h=s===g-1?t.v[0]:t.v[s+1],l=(o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)))?Math.min(o/2,e)/o:0,p=d=a[0]+(h[0]-a[0])*l,f=m=a[1]+(h[1]-a[1])*l,c=p-(p-a[0])*v,u=f-(f-a[1])*v,i.setTripleAt(p,f,d,m,c,u,y)):i.setTripleAt(a[0],a[1],n[0],n[1],r[0],r[1],y):i.setTripleAt(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],y),y+=1;return i},$.prototype.processShapes=function(t){var e,s,i,a,r,n,h=this.shapes.length,o=this.rd.v;if(0!==o)for(s=0;s<h;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],o));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},U.registerModifier("rd",$),z([Z],tt),tt.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=B.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},tt.prototype.processPath=function(t,e){var s=e/100,i=[0,0],a=t._length,r=0;for(r=0;r<a;r+=1)i[0]+=t.v[r][0],i[1]+=t.v[r][1];i[0]/=a,i[1]/=a;var n,h,o,l,p,f,d=Ft.newElement();for(d.c=t.c,r=0;r<a;r+=1)n=t.v[r][0]+(i[0]-t.v[r][0])*s,h=t.v[r][1]+(i[1]-t.v[r][1])*s,o=t.o[r][0]+(i[0]-t.o[r][0])*-s,l=t.o[r][1]+(i[1]-t.o[r][1])*-s,p=t.i[r][0]+(i[0]-t.i[r][0])*-s,f=t.i[r][1]+(i[1]-t.i[r][1])*-s,d.setTripleAt(n,h,o,l,p,f,r);return d},tt.prototype.processShapes=function(t){var e,s,i,a,r,n,h=this.shapes.length,o=this.amount.v;if(0!==o)for(s=0;s<h;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],o));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},U.registerModifier("pb",tt),z([Z],et),et.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=B.getProp(t,e.c,0,null,this),this.o=B.getProp(t,e.o,0,null,this),this.tr=X.getTransformProperty(t,e.tr,this),this.so=B.getProp(t,e.tr.so,0,.01,this),this.eo=B.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new R,this.rMatrix=new R,this.sMatrix=new R,this.tMatrix=new R,this.matrix=new R},et.prototype.applyTransforms=function(t,e,s,i,a,r){var n=r?-1:1,h=i.s.v[0]+(1-i.s.v[0])*(1-a),o=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(r?1/h:h,r?1/o:o),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])},et.prototype.init=function(t,e,s,i){for(this.elem=t,this.arr=e,this.pos=s,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[s]);0<s;)s-=1,this._elements.unshift(e[s]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},et.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},et.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},et.prototype.changeGroupRender=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]._render=e,"gr"===t[s].ty&&this.changeGroupRender(t[s].it,e)},et.prototype.processShapes=function(t){var e,s,i,a,r,n=!1;if(this._mdf||t){var h,o=Math.ceil(this.c.v);if(this._groups.length<o){for(;this._groups.length<o;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=r=0;i<=this._groups.length-1;i+=1){if(h=r<o,this._groups[i]._render=h,this.changeGroupRender(this._groups[i].it,h),!h){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}r+=1}this._currentCopies=o;var d=this.o.v,m=d%1,c=0<d?Math.floor(d):Math.ceil(d),u=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(0<d){for(;_<c;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,m,!1),_+=m)}else if(d<0){for(;c<_;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-m,!0),_-=m)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)s[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)s[v]=this.matrix.props[v];_+=1,r-=1,i+=a}}else for(r=this._currentCopies,i=0,a=1;r;)s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,r-=1,i+=a;return n},et.prototype.addShape=function(){},U.registerModifier("rp",et),st.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(x(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},st.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)Ft.release(this.shapes[t]);this._length=0},it.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,s=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<s;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},z([M],it),at.prototype.comparePoints=function(t,e){for(var s=0,i=this.o.length/2;s<i;){if(.01<Math.abs(t[4*s]-t[4*e+2*s]))return!1;s+=1}return!0},at.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},at.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,s,i,a=4*this.data.p;for(e=0;e<a;e+=1)s=e%4==0?100:255,i=Math.round(this.prop.v[e]*s),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)s=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},z([M],at);var rt,nt,ht=function(t,e,s,i){if(0===e)return"";var a,r=t.o,n=t.i,h=t.v,o=" M"+i.applyToPointStringified(h[0][0],h[0][1]);for(a=1;a<e;a+=1)o+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[a][0],n[a][1])+" "+i.applyToPointStringified(h[a][0],h[a][1]);return s&&e&&(o+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(h[0][0],h[0][1]),o+="z"),o},ot=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),mt=function(){var a=function(){var t=T("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(t,e,s){var i="";if(t.e)i=t.p;else if(e){var a=t.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),i=e+a}else i=s,i+=t.u?t.u:"",i+=t.p;return i}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,s=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(s)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},s=r(t,this.assetsPath,this.path);return N.loadData(s,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(t,e){var s;this.imagesLoadedCb=e;var i=t.length;for(s=0;s<i;s+=1)t[s].layers||(t[s].t&&"seq"!==t[s].t?3===t[s].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[s]))):(this.totalImages+=1,this.images.push(this._createImageData(t[s]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,s=this.images.length;e<s;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=r(t,this.assetsPath,this.path),s=T("img");s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){i.img=a,this._imageLoaded()}.bind(this),!1),s.src=e;var i={img:s,assetData:t};return i},createImageData:function(t){var e=r(t,this.assetsPath,this.path),s=F("image");n?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){i.img=a,this._imageLoaded()}.bind(this),!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(s):this._elementHelper.appendChild(s);var i={img:s,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},s}(),ct=(rt={maskType:!0},(/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))&&(rt.maskType=!1),rt),ut=((nt={}).createFilter=function(t,e){var s=F("filter");return s.setAttribute("id",t),!0!==e&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%")),s},nt.createAlphaToLuminanceFilter=function(){var t=F("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},nt);function gt(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=x(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function yt(t,e,s){var i={propType:!1},a=B.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,j,s):i,rx:r.rx?a(t,r.rx,0,j,s):i,ry:r.ry?a(t,r.ry,0,j,s):i,sk:r.sk?a(t,r.sk,0,j,s):i,sa:r.sa?a(t,r.sa,0,j,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=Dt.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function vt(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function bt(t,e){this._frameId=s,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}gt.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=B.getProp;for(t=0;t<s;t+=1)e=this._textData.a[t],this._animatorsData[t]=new yt(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},gt.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var s,i,a,r,n,h,o,l,p,f,d,m,c,u,g,y,v,b,_,k=this._moreOptions.alignment.v,A=this._animatorsData,P=this._textData,S=this.mHelper,D=this._renderType,w=this.renderedLetters.length,C=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var x,F=_.v;for(this._pathData.r.v&&(F=F.reverse()),n={tLength:0,segments:[]},r=F._length-1,a=y=0;a<r;a+=1)x=dt.buildBezierData(F.v[a],F.v[a+1],[F.o[a][0]-F.v[a][0],F.o[a][1]-F.v[a][1]],[F.i[a+1][0]-F.v[a+1][0],F.i[a+1][1]-F.v[a+1][1]]),n.tLength+=x.segmentLength,n.segments.push(x),y+=x.segmentLength;a=r,_.v.c&&(x=dt.buildBezierData(F.v[a],F.v[0],[F.o[a][0]-F.v[a][0],F.o[a][1]-F.v[a][1]],[F.i[0][0]-F.v[0][0],F.i[0][1]-F.v[0][1]]),n.tLength+=x.segmentLength,n.segments.push(x),y+=x.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,h=this._pathData.f.v,f=1,p=!(l=d=0),u=n.segments,h<0&&_.v.c)for(n.tLength<Math.abs(h)&&(h=-Math.abs(h)%n.tLength),f=(c=u[d=u.length-1].points).length-1;h<0;)h+=c[f].partialLength,(f-=1)<0&&(f=(c=u[d-=1].points).length-1);m=(c=u[d].points)[f-1],g=(o=c[f]).partialLength}r=C.length,i=s=0;var T,M,E,I,L,V=1.2*t.finalSize*.714,R=!0;E=A.length;var z,N,O,q,B,j,W,H,X,Y,G,J,K=-1,U=h,Z=d,Q=f,$=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var st=0,it=0,at=2===t.j?-.5:-1,rt=0,nt=!0;for(a=0;a<r;a+=1)if(C[a].n){for(st&&(st+=it);rt<a;)C[rt].animatorJustifyOffset=st,rt+=1;nt=!(st=0)}else{for(M=0;M<E;M+=1)(T=A[M].a).t.propType&&(nt&&2===t.j&&(it+=T.t.v*at),(L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars)).length?st+=T.t.v*L[0]*at:st+=T.t.v*L*at);nt=!1}for(st&&(st+=it);rt<a;)C[rt].animatorJustifyOffset=st,rt+=1}for(a=0;a<r;a+=1){if(S.reset(),q=1,C[a].n)s=0,i+=t.yOffset,i+=R?1:0,h=U,R=!1,this._hasMaskedPath&&(f=Q,m=(c=u[d=Z].points)[f-1],g=(o=c[f]).partialLength,l=0),J=X=G=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if($!==C[a].line){switch(t.j){case 1:h+=y-t.lineWidths[C[a].line];break;case 2:h+=(y-t.lineWidths[C[a].line])/2}$=C[a].line}K!==C[a].ind&&(C[K]&&(h+=C[K].extra),h+=C[a].an/2,K=C[a].ind),h+=k[0]*C[a].an*.005;var ht=0;for(M=0;M<E;M+=1)(T=A[M].a).p.propType&&((L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars)).length?ht+=T.p.v[0]*L[0]:ht+=T.p.v[0]*L),T.a.propType&&((L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars)).length?ht+=T.a.v[0]*L[0]:ht+=T.a.v[0]*L);for(p=!0,this._pathData.a.v&&(h=.5*C[0].an+(y-this._pathData.f.v-.5*C[0].an-.5*C[C.length-1].an)*K/(r-1),h+=this._pathData.f.v);p;)h+ht<=l+g||!c?(v=(h+ht-l)/o.partialLength,N=m.point[0]+(o.point[0]-m.point[0])*v,O=m.point[1]+(o.point[1]-m.point[1])*v,S.translate(-k[0]*C[a].an*.005,-k[1]*V*.01),p=!1):c&&(l+=o.partialLength,(f+=1)>=c.length&&(f=0,c=u[d+=1]?u[d].points:_.v.c?u[d=f=0].points:(l-=o.partialLength,null)),c&&(m=o,g=(o=c[f]).partialLength));z=C[a].an/2-C[a].add,S.translate(-z,0,0)}else z=C[a].an/2-C[a].add,S.translate(-z,0,0),S.translate(-k[0]*C[a].an*.005,-k[1]*V*.01,0);for(M=0;M<E;M+=1)(T=A[M].a).t.propType&&(L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars),0===s&&0===t.j||(this._hasMaskedPath?L.length?h+=T.t.v*L[0]:h+=T.t.v*L:L.length?s+=T.t.v*L[0]:s+=T.t.v*L));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(B=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),M=0;M<E;M+=1)(T=A[M].a).a.propType&&((L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars)).length?S.translate(-T.a.v[0]*L[0],-T.a.v[1]*L[1],T.a.v[2]*L[2]):S.translate(-T.a.v[0]*L,-T.a.v[1]*L,T.a.v[2]*L));for(M=0;M<E;M+=1)(T=A[M].a).s.propType&&((L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars)).length?S.scale(1+(T.s.v[0]-1)*L[0],1+(T.s.v[1]-1)*L[1],1):S.scale(1+(T.s.v[0]-1)*L,1+(T.s.v[1]-1)*L,1));for(M=0;M<E;M+=1){if(T=A[M].a,L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars),T.sk.propType&&(L.length?S.skewFromAxis(-T.sk.v*L[0],T.sa.v*L[1]):S.skewFromAxis(-T.sk.v*L,T.sa.v*L)),T.r.propType&&(L.length?S.rotateZ(-T.r.v*L[2]):S.rotateZ(-T.r.v*L)),T.ry.propType&&(L.length?S.rotateY(T.ry.v*L[1]):S.rotateY(T.ry.v*L)),T.rx.propType&&(L.length?S.rotateX(T.rx.v*L[0]):S.rotateX(T.rx.v*L)),T.o.propType&&(L.length?q+=(T.o.v*L[0]-q)*L[0]:q+=(T.o.v*L-q)*L),t.strokeWidthAnim&&T.sw.propType&&(L.length?j+=T.sw.v*L[0]:j+=T.sw.v*L),t.strokeColorAnim&&T.sc.propType)for(H=0;H<3;H+=1)L.length?B[H]+=(T.sc.v[H]-B[H])*L[0]:B[H]+=(T.sc.v[H]-B[H])*L;if(t.fillColorAnim&&t.fc){if(T.fc.propType)for(H=0;H<3;H+=1)L.length?W[H]+=(T.fc.v[H]-W[H])*L[0]:W[H]+=(T.fc.v[H]-W[H])*L;T.fh.propType&&(W=L.length?ft(W,T.fh.v*L[0]):ft(W,T.fh.v*L)),T.fs.propType&&(W=L.length?lt(W,T.fs.v*L[0]):lt(W,T.fs.v*L)),T.fb.propType&&(W=L.length?pt(W,T.fb.v*L[0]):pt(W,T.fb.v*L))}}for(M=0;M<E;M+=1)(T=A[M].a).p.propType&&(L=A[M].s.getMult(C[a].anIndexes[M],P.a[M].s.totalChars),this._hasMaskedPath?L.length?S.translate(0,T.p.v[1]*L[0],-T.p.v[2]*L[1]):S.translate(0,T.p.v[1]*L,-T.p.v[2]*L):L.length?S.translate(T.p.v[0]*L[0],T.p.v[1]*L[1],-T.p.v[2]*L[2]):S.translate(T.p.v[0]*L,T.p.v[1]*L,-T.p.v[2]*L));if(t.strokeWidthAnim&&(X=j<0?0:j),t.strokeColorAnim&&(Y="rgb("+Math.round(255*B[0])+","+Math.round(255*B[1])+","+Math.round(255*B[2])+")"),t.fillColorAnim&&t.fc&&(G="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(S.translate(0,-t.ls),S.translate(0,k[1]*V*.01+i,0),this._pathData.p.v){b=(o.point[1]-m.point[1])/(o.point[0]-m.point[0]);var ot=180*Math.atan(b)/Math.PI;o.point[0]<m.point[0]&&(ot+=180),S.rotate(-ot*Math.PI/180)}S.translate(N,O,0),h-=k[0]*C[a].an*.005,C[a+1]&&K!==C[a+1].ind&&(h+=C[a].an/2,h+=.001*t.tr*t.finalSize)}else{switch(S.translate(s,i,0),t.ps&&S.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:S.translate(C[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[a].line]),0,0);break;case 2:S.translate(C[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[a].line])/2,0,0)}S.translate(0,-t.ls),S.translate(z,0,0),S.translate(k[0]*C[a].an*.005,k[1]*V*.01,0),s+=C[a].l+.001*t.tr*t.finalSize}"html"===D?tt=S.toCSS():"svg"===D?tt=S.to2dCSS():et=[S.props[0],S.props[1],S.props[2],S.props[3],S.props[4],S.props[5],S.props[6],S.props[7],S.props[8],S.props[9],S.props[10],S.props[11],S.props[12],S.props[13],S.props[14],S.props[15]],J=q}this.lettersChangedFlag=w<=a?(I=new vt(J,X,Y,G,tt,et),this.renderedLetters.push(I),w+=1,!0):(I=this.renderedLetters[a]).update(J,X,Y,G,tt,et)||this.lettersChangedFlag}}},gt.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},gt.prototype.mHelper=new R,gt.prototype.defaultPropsArray=[],z([M],gt),vt.prototype.update=function(t,e,s,i,a,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==s&&(this.sc=s,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==a&&(this.m=a,n=this._mdf.m=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,n=this._mdf.p=!0),n},bt.prototype.defaultBoxWidth=[0,0],bt.prototype.copyData=function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},bt.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},bt.prototype.searchProperty=function(){return this.searchKeyframes()},bt.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},bt.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},bt.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,s=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(i=0;i<a;i+=1)r=s!==this.keysIndex?this.effectsSequence[i](r,r.t):this.effectsSequence[i](this.currentData,r.t);e!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},bt.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,s=0,i=t.length;s<=i-1&&!(s===i-1||t[s+1].t>e);)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},bt.prototype.buildFinalText=function(t){for(var e,s,i=[],a=0,r=t.length,n=!1;a<r;)e=t.charCodeAt(a),O.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(a):55296<=e&&e<=56319?56320<=(s=t.charCodeAt(a+1))&&s<=57343?(n||O.isModifier(e,s)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):56319<e?(s=t.charCodeAt(a+1),O.isZeroWidthJoiner(e,s)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):O.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},bt.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,h,o=this.elem.globalData.fontManager,l=this.data,p=[],f=0,d=l.m.g,m=0,c=0,u=0,g=[],y=0,v=0,b=o.getFontByName(t.f),_=0,k=q(b);t.fWeight=k.weight,t.fStyle=k.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),s=t.finalText.length,t.finalLineHeight=t.lh;var A,P=t.tr/1e3*t.finalSize;if(t.sz)for(var S,D,w=!0,C=t.sz[0],x=t.sz[1];w;){y=S=0,s=(D=this.buildFinalText(t.t)).length,P=t.tr/1e3*t.finalSize;var F=-1;for(e=0;e<s;e+=1)A=D[e].charCodeAt(0),i=!1," "===D[e]?F=e:13!==A&&3!==A||(i=!(y=0),S+=t.finalLineHeight||1.2*t.finalSize),C<y+(_=o.chars?(h=o.getCharData(D[e],b.fStyle,b.fFamily),i?0:h.w*t.finalSize/100):o.measureText(D[e],t.f,t.finalSize))&&" "!==D[e]?(-1===F?s+=1:e=F,S+=t.finalLineHeight||1.2*t.finalSize,D.splice(e,F===e?1:0,"\r"),F=-1,y=0):(y+=_,y+=P);S+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&x<S?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=D,s=t.finalText.length,w=!1)}y=-P;var T,M=_=0;for(e=0;e<s;e+=1)if(i=!1,13===(A=(T=t.finalText[e]).charCodeAt(0))||3===A?(M=0,g.push(y),v=v<y?y:v,y=-2*P,i=!(a=""),u+=1):a=T,_=o.chars?(h=o.getCharData(T,b.fStyle,o.getFontByName(t.f).fFamily),i?0:h.w*t.finalSize/100):o.measureText(a,t.f,t.finalSize)," "===T?M+=_+P:(y+=_+P+M,M=0),p.push({l:_,an:_,add:m,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==d){if(m+=_,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(m-=_);c<=e;)p[c].an=m,p[c].ind=f,p[c].extra=_,c+=1;f+=1,m=0}}else if(3==d){if(m+=_,""===a||e===s-1){for(""===a&&(m-=_);c<=e;)p[c].an=m,p[c].ind=f,p[c].extra=_,c+=1;m=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<y?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var E,I,L,V,R=l.a;n=R.length;var z=[];for(r=0;r<n;r+=1){for((E=R[r]).a.sc&&(t.strokeColorAnim=!0),E.a.sw&&(t.strokeWidthAnim=!0),(E.a.fc||E.a.fh||E.a.fs||E.a.fb)&&(t.fillColorAnim=!0),V=0,L=E.s.b,e=0;e<s;e+=1)(I=p[e]).anIndexes[r]=V,(1==L&&""!==I.val||2==L&&""!==I.val&&" "!==I.val||3==L&&(I.n||" "==I.val||e==s-1)||4==L&&(I.n||e==s-1))&&(1===E.s.rn&&z.push(V),V+=1);l.a[r].s.totalChars=V;var N,O=-1;if(1===E.s.rn)for(e=0;e<s;e+=1)O!=(I=p[e]).anIndexes[r]&&(O=I.anIndexes[r],N=z.splice(Math.floor(Math.random()*z.length),1)[0]),I.anIndexes[r]=N}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},bt.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var s=this.copyData({},this.data.d.k[e].s);s=this.copyData(s,t),this.data.d.k[e].s=s,this.recalculate(e),this.elem.addDynamicProperty(this)},bt.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},bt.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},bt.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var _t,kt,At,Pt,St,Dt=function(){var u=Math.max,g=Math.min,y=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=B.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?B.getProp(t,e.e,0,0,this):{v:100},this.o=B.getProp(t,e.o||{k:0},0,0,this),this.xe=B.getProp(t,e.xe||{k:0},0,0,this),this.ne=B.getProp(t,e.ne||{k:0},0,0,this),this.sm=B.getProp(t,e.sm||{k:100},0,0,this),this.a=B.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,s=0,i=1,a=1;0<this.ne.v?e=this.ne.v/100:s=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:a=1+this.xe.v/100;var r=H.getBezierEasing(e,s,i,a).get,n=0,h=this.finalS,o=this.finalE,l=this.data.sh;if(2===l)n=r(n=o===h?o<=t?1:0:u(0,g(.5/(o-h)+(t-h)/(o-h),1)));else if(3===l)n=r(n=o===h?o<=t?0:1:1-u(0,g(.5/(o-h)+(t-h)/(o-h),1)));else if(4===l)o===h?n=0:(n=u(0,g(.5/(o-h)+(t-h)/(o-h),1)))<.5?n*=2:n=1-2*(n-.5),n=r(n);else if(5===l){if(o===h)n=0;else{var p=o-h,f=-p/2+(t=g(u(0,t+.5-h),o-h)),d=p/2;n=Math.sqrt(1-f*f/(d*d))}n=r(n)}else n=6===l?r(n=o===h?0:(t=g(u(0,t+.5-h),o-h),(1+Math.cos(Math.PI+2*Math.PI*t/(o-h)))/2)):(t>=y(h)&&(n=u(0,g(t-h<0?g(o,1)-(h-t):o-t,1))),r(n));if(100!==this.sm.v){var m=.01*this.sm.v;0===m&&(m=1e-8);var c=.5-.5*m;n<c?n=0:1<(n=(n-c)/m)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,s=this.o.v/e,i=this.s.v/e+s,a=this.e.v/e+s;if(a<i){var r=i;i=a,a=r}this.finalS=i,this.finalE=a}},z([M],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}(),wt=function(t,e,s){var i=0,a=t,r=x(a);return{newElement:function(){return i?r[i-=1]:e()},release:function(t){i===a&&(r=Ct.double(r),a*=2),s&&s(t),r[i]=t,i+=1}}},Ct={double:function(t){return t.concat(x(t.length))}},xt=wt(8,function(){return W("float32",2)}),Ft=((_t=wt(4,function(){return new Y},function(t){var e,s=t._length;for(e=0;e<s;e+=1)xt.release(t.v[e]),xt.release(t.i[e]),xt.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})).clone=function(t){var e,s=_t.newElement(),i=void 0===t._length?t.v.length:t._length;for(s.setLength(i),s.c=t.c,e=0;e<i;e+=1)s.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return s},_t),Tt=(kt={newShapeCollection:function(){var t;t=At?St[At-=1]:new st;return t},release:function(t){var e,s=t._length;for(e=0;e<s;e+=1)Ft.release(t.shapes[e]);t._length=0,At===Pt&&(St=Ct.double(St),Pt*=2);St[At]=t,At+=1}},At=0,St=x(Pt=4),kt),Mt=wt(8,function(){return{lengths:[],totalLength:0}},function(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)Et.release(t.lengths[e]);t.lengths.length=0}),Et=wt(8,function(){return{addedLength:0,percents:W("float32",P),lengths:W("float32",P)}}),It=function(){function r(t){for(var e,s=t.split("\r\n"),i={},a=0,r=0;r<s.length;r+=1)2===(e=s[r].split(":")).length&&(i[e[0]]=e[1].trim(),a+=1);if(0===a)throw new Error;return i}return function(e){for(var t=[],s=0;s<e.length;s+=1){var i=e[s],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(e[s].cm)}catch(t){try{a.payload=r(e[s].cm)}catch(t){a.payload={name:e[s]}}}t.push(a)}return t}}();function Lt(){}function Vt(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=F("svg");var s="";if(e&&e.title){var i=F("title"),a=S();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),s+=a}if(e&&e.description){var r=F("desc"),n=S();r.setAttribute("id",n),r.textContent=e.description,this.svgElement.appendChild(r),s+=" "+n}s&&this.svgElement.setAttribute("aria-labelledby",s);var h=F("defs");this.svgElement.appendChild(h);var o=F("g");this.svgElement.appendChild(o),this.layerElement=o,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:h,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function Rt(t,e,s){this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,a,r=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=x(n),this.solidPath="";var h,o,l,p,f,d,m=this.masksProperties,c=0,u=[],g=S(),y="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==m[i].mode&&"n"!==m[i].mode||m[i].inv||100!==m[i].o.k||m[i].o.x)&&(v=y="mask"),"s"!==m[i].mode&&"i"!==m[i].mode||0!==c?l=null:((l=F("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),a=F("path"),"n"===m[i].mode)this.viewData[i]={op:B.getProp(this.element,m[i].o,0,.01,this.element),prop:K.getShapeProp(this.element,m[i],3),elem:a,lastPath:""},r.appendChild(a);else{var b;if(c+=1,a.setAttribute("fill","s"===m[i].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==m[i].x.k?(v=y="mask",d=B.getProp(this.element,m[i].x,0,null,this.element),b=S(),(p=F("filter")).setAttribute("id",b),(f=F("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),r.appendChild(p),a.setAttribute("stroke","s"===m[i].mode?"#000000":"#ffffff")):d=f=null,this.storedData[i]={elem:a,x:d,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===m[i].mode){o=u.length;var _=F("g");for(h=0;h<o;h+=1)_.appendChild(u[h]);var k=F("mask");k.setAttribute("mask-type","alpha"),k.setAttribute("id",g+"_"+c),k.appendChild(a),r.appendChild(k),_.setAttribute("mask","url("+A+"#"+g+"_"+c+")"),u.length=0,u.push(_)}else u.push(a);m[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",op:B.getProp(this.element,m[i].o,0,.01,this.element),prop:K.getShapeProp(this.element,m[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(m[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=F(y),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<c&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+A+"#"+g+")"),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function zt(){}function Nt(){}function Ot(){}function qt(){}function Bt(){}function jt(t,e){this.elem=t,this.pos=e}function Wt(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=F("path"),this.msElem=null}function Ht(t,e,s){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e,this._isAnimated=!!s.k;for(var i=0,a=t.length;i<a;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function Xt(t,e,s){this.transform={mProps:t,op:e,container:s},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function Yt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=B.getProp(t,e.o,0,.01,this),this.w=B.getProp(t,e.w,0,null,this),this.d=new it(t,e.d||{},"svg",this),this.c=B.getProp(t,e.c,1,255,this),this.style=s,this._isAnimated=!!this._isAnimated}function Gt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=B.getProp(t,e.o,0,.01,this),this.c=B.getProp(t,e.c,1,255,this),this.style=s}function Jt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,s)}function Kt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=B.getProp(t,e.w,0,null,this),this.d=new it(t,e.d||{},"svg",this),this.initGradientData(t,e,s),this._isAnimated=!!this._isAnimated}function Ut(){this.it=[],this.prevViewData=[],this.gr=F("g")}Lt.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(s=this.layers[e]).ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},Lt.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},Lt.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},Lt.prototype.createAudio=function(t){return new ne(t,this.globalData,this)},Lt.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},Lt.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},Lt.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var s,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(s=0;s<a;){if(this.layers[s].id===t[e].id){this.layers[s]=t[e];break}s+=1}},Lt.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},Lt.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},Lt.prototype.buildElementParenting=function(t,e,s){for(var i=this.elements,a=this.layers,r=0,n=a.length;r<n;)a[r].ind==e&&(i[r]&&!0!==i[r]?(s.push(i[r]),i[r].setAsParent(),void 0!==a[r].parent?this.buildElementParenting(t,a[r].parent,s):t.setHierarchy(s)):(this.buildItem(r),this.addPendingElement(t))),r+=1},Lt.prototype.addPendingElement=function(t){this.pendingElements.push(t)},Lt.prototype.searchExtraCompositions=function(t){var e,s=t.length;for(e=0;e<s;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},Lt.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new O,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},z([Lt],Vt),Vt.prototype.createNull=function(t){return new $t(t,this.globalData,this)},Vt.prototype.createShape=function(t){return new le(t,this.globalData,this)},Vt.prototype.createText=function(t){return new oe(t,this.globalData,this)},Vt.prototype.createImage=function(t){return new ae(t,this.globalData,this)},Vt.prototype.createComp=function(t){return new he(t,this.globalData,this)},Vt.prototype.createSolid=function(t){return new re(t,this.globalData,this)},Vt.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var s=F("clipPath"),i=F("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a=S();s.setAttribute("id",a),s.appendChild(i),this.layerElement.setAttribute("clip-path","url("+A+"#"+a+")"),e.appendChild(s),this.layers=t.layers,this.elements=x(t.layers.length)},Vt.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},Vt.prototype.updateContainerSize=function(){},Vt.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var s=this.createItem(this.layers[t]);e[t]=s,i&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(s),s.initExpressions()),this.appendElementInPos(s,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?s.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(s)))}},Vt.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,s=this.elements.length;e<s;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},Vt.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var s=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=s-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<s;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},Vt.prototype.appendElementInPos=function(t,e){var s=t.getBaseElement();if(s){for(var i,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(s,i):this.layerElement.appendChild(s)}},Vt.prototype.hide=function(){this.layerElement.style.display="none"},Vt.prototype.show=function(){this.layerElement.style.display="block"},Rt.prototype.getMaskProperty=function(t){return this.viewData[t].prop},Rt.prototype.renderFrame=function(t){var e,s=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",s.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+A+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},Rt.prototype.getMaskelement=function(){return this.maskElement},Rt.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},Rt.prototype.drawPath=function(t,e,s){var i,a,r=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<a&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},Rt.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},zt.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},Nt.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var s,i=this.dynamicProperties.length;for(s=0;s<i;s+=1)(e||this._isParent&&"transform"===this.dynamicProperties[s].propType)&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},Ot.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?X.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new R},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,s=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<i;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),s=0;s<i;s+=1)t=this.hierarchy[s].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var s,i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&e.splice(0,0,a.finalTransform),a=a.comp):i=!1;var r,n=e.length;for(s=0;s<n;s+=1)r=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new R},qt.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},z([qt,function(t){function e(){}return e.prototype=t,e}({initElement:function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],Bt),Wt.prototype.reset=function(){this.d="",this._mdf=!1},Ht.prototype.setAsAnimated=function(){this._isAnimated=!0},z([M],Yt),z([M],Gt),Jt.prototype.initGradientData=function(t,e,s){this.o=B.getProp(t,e.o,0,.01,this),this.s=B.getProp(t,e.s,1,null,this),this.e=B.getProp(t,e.e,1,null,this),this.h=B.getProp(t,e.h||{k:0},0,.01,this),this.a=B.getProp(t,e.a||{k:0},0,j,this),this.g=new at(t,e.g,this),this.style=s,this.stops=[],this.setGradientData(s.pElem,e),this.setGradientOpacity(e,s),this._isAnimated=!!this._isAnimated},Jt.prototype.setGradientData=function(t,e){var s=S(),i=F(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",s),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var a,r,n,h=[];for(n=4*e.g.p,r=0;r<n;r+=4)a=F("stop"),i.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+A+"#"+s+")"),this.gf=i,this.cst=h},Jt.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var s,i,a,r=F("mask"),n=F("path");r.appendChild(n);var h=S(),o=S();r.setAttribute("id",o);var l=F(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",h),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<a;i+=2)(s=F("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(s),p.push(s);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+A+"#"+h+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",L[t.lc||2]),n.setAttribute("stroke-linejoin",V[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=r,this.ost=p,this.maskId=o,e.msElem=n}},z([M],Jt),z([Jt,M],Kt);var Zt=function(){var g=new R,y=new R;function e(t,e,s){(s||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(s||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function s(t,e,s){var i,a,r,n,h,o,l,p,f,d,m,c=e.styles.length,u=e.lvl;for(o=0;o<c;o+=1){if(n=e.sh._mdf||s,e.styles[o].lvl<u){for(p=y.reset(),d=u-e.styles[o].lvl,m=e.transformers.length-1;!n&&0<d;)n=e.transformers[m].mProps._mdf||n,d-=1,m-=1;if(n)for(d=u-e.styles[o].lvl,m=e.transformers.length-1;0<d;)f=e.transformers[m].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),d-=1,m-=1}else p=g;if(a=(l=e.sh.paths)._length,n){for(r="",i=0;i<a;i+=1)(h=l.shapes[i])&&h._length&&(r+=ht(h,h._length,h.c,p));e.caches[o]=r}else r=e.caches[o];e.styles[o].d+=!0===t.hd?"":r,e.styles[o]._mdf=n||e.styles[o]._mdf}}function i(t,e,s){var i=e.style;(e.c._mdf||s)&&i.pElem.setAttribute("fill","rgb("+f(e.c.v[0])+","+f(e.c.v[1])+","+f(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function a(t,e,s){r(t,e,s),n(t,e,s)}function r(t,e,s){var i,a,r,n,h,o=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||s){var d="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(d,e.o.v)}if(e.s._mdf||s){var m=1===t.t?"x1":"cx",c="x1"===m?"y1":"cy";o.setAttribute(m,p[0]),o.setAttribute(c,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(m,p[0]),e.of.setAttribute(c,p[1]))}if(e.g._cmdf||s){i=e.cst;var u=e.g.c;for(r=i.length,a=0;a<r;a+=1)(n=i[a]).setAttribute("offset",u[4*a]+"%"),n.setAttribute("stop-color","rgb("+u[4*a+1]+","+u[4*a+2]+","+u[4*a+3]+")")}if(l&&(e.g._omdf||s)){var g=e.g.o;for(r=(i=e.g._collapsable?e.cst:e.ost).length,a=0;a<r;a+=1)n=i[a],e.g._collapsable||n.setAttribute("offset",g[2*a]+"%"),n.setAttribute("stop-opacity",g[2*a+1])}if(1===t.t)(e.e._mdf||s)&&(o.setAttribute("x2",f[0]),o.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||s)&&(h=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),o.setAttribute("r",h),l&&!e.g._collapsable&&e.of.setAttribute("r",h)),e.e._mdf||e.h._mdf||e.a._mdf||s){h||(h=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var y=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=h*v,_=Math.cos(y+e.a.v)*b+p[0],k=Math.sin(y+e.a.v)*b+p[1];o.setAttribute("fx",_),o.setAttribute("fy",k),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",k))}}function n(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||s)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||s)&&i.pElem.setAttribute("stroke","rgb("+f(e.c.v[0])+","+f(e.c.v[1])+","+f(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||s)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return i;case"gf":return r;case"gs":return a;case"st":return n;case"sh":case"el":case"rc":case"sr":return s;case"tr":return e;default:return null}}}}();function Qt(){}function $t(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function te(){}function ee(){}function se(){}function ie(){}function ae(t,e,s){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function re(t,e,s){this.initElement(t,e,s)}function ne(t,e,s){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,s),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?B.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function he(t,e,s){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?x(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?B.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function oe(t,e,s){this.textSpans=[],this.renderType="svg",this.initElement(t,e,s)}function le(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}Qt.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=I(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId=S(),this.data.sr||(this.data.sr=1),this.effectsManager=new ce(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},$t.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},$t.prototype.renderFrame=function(){},$t.prototype.getBaseElement=function(){return null},$t.prototype.destroy=function(){},$t.prototype.sourceRectAtTime=function(){},$t.prototype.hide=function(){},z([Qt,Ot,zt,Nt],$t),te.prototype={initRendererElement:function(){this.layerElement=F("g")},createContainerElements:function(){this.matteElement=F("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,s,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=F("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),i=a,this.globalData.defs.appendChild(a),ct.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=S(),e=ut.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(ut.createAlphaToLuminanceFilter()),(s=F("g")).appendChild(this.layerElement),i=s,a.appendChild(s),s.setAttribute("filter","url("+A+"#"+t+")"))}else if(2==this.data.td){var r=F("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type","alpha");var n=F("g");r.appendChild(n),t=S(),e=ut.createFilter(t);var h=F("feComponentTransfer");h.setAttribute("in","SourceGraphic"),e.appendChild(h);var o=F("feFuncA");o.setAttribute("type","table"),o.setAttribute("tableValues","1.0 0.0"),h.appendChild(o),this.globalData.defs.appendChild(e);var l=F("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+A+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,ct.maskType||(r.setAttribute("mask-type","luminance"),e.appendChild(ut.createAlphaToLuminanceFilter()),s=F("g"),n.appendChild(l),s.appendChild(this.layerElement),i=s,n.appendChild(s)),this.globalData.defs.appendChild(r)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=F("clipPath"),f=F("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var d=S();if(p.setAttribute("id",d),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var m=F("g");m.setAttribute("clip-path","url("+A+"#"+d+")"),m.appendChild(this.layerElement),this.transformedElement=m,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+A+"#"+d+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new Rt(this.data,this,this.globalData),this.renderableEffectsManager=new fe(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+A+"#"+t+")")}},ee.prototype={addShapeToModifiers:function(t){var e,s=this.shapeModifiers.length;for(e=0;e<s;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,s=0,i=e.length;s<i;){if(e[s].elem===t)return e[s].pos;s+=1}return 0},addProcessedElement:function(t,e){for(var s=this.processedElements,i=s.length;i;)if(s[i-=1].elem===t)return void(s[i].pos=e);s.push(new jt(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},se.prototype.initElement=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new bt(this,t.t,this.dynamicProperties),this.textAnimator=new gt(t.t,this.renderType,this),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},se.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},se.prototype.createPathShape=function(t,e){var s,i,a=e.length,r="";for(s=0;s<a;s+=1)i=e[s].ks.k,r+=ht(i,i.i.length,!0,t);return r},se.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},se.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},se.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},se.prototype.applyTextPropertiesToMatrix=function(t,e,s,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s])/2,0,0)}e.translate(i,a,0)},se.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},se.prototype.emptyProp=new vt,se.prototype.destroy=function(){},z([Qt,Ot,zt,Nt,Bt],ie),ie.prototype.initElement=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ie.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var s,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),s=i-1;0<=s;s-=1)(this.completeLayers||this.elements[s])&&(this.elements[s].prepareFrame(this.renderedFrame-this.layers[s].st),this.elements[s]._mdf&&(this._mdf=!0))}},ie.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ie.prototype.setElements=function(t){this.elements=t},ie.prototype.getElements=function(){return this.elements},ie.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ie.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},z([Qt,Ot,te,zt,Nt,Bt],ae),ae.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=F("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},ae.prototype.sourceRectAtTime=function(){return this.sourceRect},z([ae],re),re.prototype.createContent=function(){var t=F("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},ne.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},z([qt,Qt,Nt],ne),ne.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},ne.prototype.show=function(){},ne.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},ne.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},ne.prototype.resume=function(){this._canPlay=!0},ne.prototype.setRate=function(t){this.audio.rate(t)},ne.prototype.volume=function(t){this.audio.volume(t)},ne.prototype.getBaseElement=function(){return null},ne.prototype.destroy=function(){},ne.prototype.sourceRectAtTime=function(){},ne.prototype.initExpressions=function(){},z([Vt,ie,te],he),z([Qt,Ot,te,zt,Nt,Bt,se],oe),oe.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=F("text"))},oe.prototype.buildTextContents=function(t){for(var e=0,s=t.length,i=[],a="";e<s;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(a),a=""):a+=t[e],e+=1;return i.push(a),i},oe.prototype.buildNewText=function(){var t,e,s=this.textProperty.currentData;this.renderedLetters=x(s?s.l.length:0),s.fc?this.layerElement.setAttribute("fill",this.buildColor(s.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(s.sc)),this.layerElement.setAttribute("stroke-width",s.sw)),this.layerElement.setAttribute("font-size",s.finalSize);var i=this.globalData.fontManager.getFontByName(s.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var a=s.fWeight,r=s.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",s.t);var n,h=s.l||[],o=!!this.globalData.fontManager.chars;e=h.length;var l,p=this.mHelper,f="",d=this.data.singleShape,m=0,c=0,u=!0,g=.001*s.tr*s.finalSize;if(!d||o||s.sz){var y,v,b=this.textSpans.length;for(t=0;t<e;t+=1)o&&d&&0!==t||(n=t<b?this.textSpans[t]:F(o?"path":"text"),b<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(s.finalSize/100,s.finalSize/100),d&&(h[t].n&&(m=-g,c+=s.yOffset,c+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(s,p,h[t].line,m,c),m+=h[t].l||0,m+=g),o?(l=(y=(v=this.globalData.fontManager.getCharData(s.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily))&&v.data||{}).shapes?y.shapes[0].it:[],d?f+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(d&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=h[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));d&&n&&n.setAttribute("d",f)}else{var _=this.textContainer,k="start";switch(s.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}_.setAttribute("text-anchor",k),_.setAttribute("letter-spacing",g);var A=this.buildTextContents(s.finalText);for(e=A.length,c=s.ps?s.ps[1]+s.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||F("tspan")).textContent=A[t],n.setAttribute("x",0),n.setAttribute("y",c),n.style.display="inherit",_.appendChild(n),this.textSpans[t]=n,c+=s.finalLineHeight;this.layerElement.appendChild(_)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},oe.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},oe.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var s,i,a=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;for(e=r.length,t=0;t<e;t+=1)r[t].n||(s=a[t],i=this.textSpans[t],s._mdf.m&&i.setAttribute("transform",s.m),s._mdf.o&&i.setAttribute("opacity",s.o),s._mdf.sw&&i.setAttribute("stroke-width",s.sw),s._mdf.sc&&i.setAttribute("stroke",s.sc),s._mdf.fc&&i.setAttribute("fill",s.fc))}},z([Qt,Ot,te,ee,zt,Nt,Bt],le),le.prototype.initSecondaryElement=function(){},le.prototype.identityMatrix=new R,le.prototype.buildExpressionInterface=function(){},le.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},le.prototype.filterUniqueShapes=function(){var t,e,s,i,a=this.shapes.length,r=this.stylesList.length,n=[],h=!1;for(s=0;s<r;s+=1){for(i=this.stylesList[s],h=!1,t=n.length=0;t<a;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),h=e._isAnimated||h);1<n.length&&h&&this.setShapesAsAnimated(n)}},le.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].setAsAnimated()},le.prototype.createStyleElement=function(t,e){var s,i=new Wt(t,e),a=i.pElem;if("st"===t.ty)s=new Yt(this,t,i);else if("fl"===t.ty)s=new Gt(this,t,i);else if("gf"===t.ty||"gs"===t.ty){s=new("gf"===t.ty?Jt:Kt)(this,t,i),this.globalData.defs.appendChild(s.gf),s.maskId&&(this.globalData.defs.appendChild(s.ms),this.globalData.defs.appendChild(s.of),a.setAttribute("mask","url("+A+"#"+s.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",L[t.lc||2]),a.setAttribute("stroke-linejoin",V[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=I(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,s),s},le.prototype.createGroupElement=function(t){var e=new Ut;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=I(t.bm)),e},le.prototype.createTransformElement=function(t,e){var s=X.getTransformProperty(this,t,this),i=new Xt(s,s.o,e);return this.addToAnimatedContents(t,i),i},le.prototype.createShapeElement=function(t,e,s){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=new Ht(e,s,K.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},le.prototype.addToAnimatedContents=function(t,e){for(var s=0,i=this.animatedContents.length;s<i;){if(this.animatedContents[s].element===e)return;s+=1}this.animatedContents.push({fn:Zt.createRenderFunction(t),element:e,data:t})},le.prototype.setElementStyles=function(t){var e,s=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||s.push(this.stylesList[e])},le.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},le.prototype.searchShapes=function(t,e,s,i,a,r,n){var h,o,l,p,f,d,m=[].concat(r),c=t.length-1,u=[],g=[];for(h=c;0<=h;h-=1){if((d=this.searchProcessedElement(t[h]))?e[h]=s[d-1]:t[h]._render=n,"fl"===t[h].ty||"st"===t[h].ty||"gf"===t[h].ty||"gs"===t[h].ty)d?e[h].style.closed=!1:e[h]=this.createStyleElement(t[h],a),t[h]._render&&e[h].style.pElem.parentNode!==i&&i.appendChild(e[h].style.pElem),u.push(e[h].style);else if("gr"===t[h].ty){if(d)for(l=e[h].it.length,o=0;o<l;o+=1)e[h].prevViewData[o]=e[h].it[o];else e[h]=this.createGroupElement(t[h]);this.searchShapes(t[h].it,e[h].it,e[h].prevViewData,e[h].gr,a+1,m,n),t[h]._render&&e[h].gr.parentNode!==i&&i.appendChild(e[h].gr)}else"tr"===t[h].ty?(d||(e[h]=this.createTransformElement(t[h],i)),p=e[h].transform,m.push(p)):"sh"===t[h].ty||"rc"===t[h].ty||"el"===t[h].ty||"sr"===t[h].ty?(d||(e[h]=this.createShapeElement(t[h],m,a)),this.setElementStyles(e[h])):"tm"===t[h].ty||"rd"===t[h].ty||"ms"===t[h].ty||"pb"===t[h].ty?(d?(f=e[h]).closed=!1:((f=U.getModifier(t[h].ty)).init(this,t[h]),e[h]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===t[h].ty&&(d?(f=e[h]).closed=!0:(f=U.getModifier(t[h].ty),(e[h]=f).init(this,t,h,e),this.shapeModifiers.push(f),n=!1),g.push(f));this.addProcessedElement(t[h],h+1)}for(c=u.length,h=0;h<c;h+=1)u[h].closed=!0;for(c=g.length,h=0;h<c;h+=1)g[h].closed=!0},le.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},le.prototype.renderShape=function(){var t,e,s=this.animatedContents.length;for(t=0;t<s;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},le.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};var pe=[];function fe(){}var de=function(){var t={},a=[],i=0,r=0,n=0,h=!0,o=!1;function s(t){for(var e=0,s=t.target;e<r;)a[e].animation===s&&(a.splice(e,1),e-=1,r-=1,s.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var s=0;s<r;){if(a[s].elem===t&&null!==a[s].elem)return a[s].animation;s+=1}var i=new me;return d(i,t),i.setData(t,e),i}function p(){n+=1,c()}function f(){n-=1}function d(t,e){t.addEventListener("destroy",s),t.addEventListener("_active",p),t.addEventListener("_idle",f),a.push({elem:e,animation:t}),r+=1}function m(t){var e,s=t-i;for(e=0;e<r;e+=1)a[e].animation.advanceTime(s);i=t,n&&!o?window.requestAnimationFrame(m):h=!0}function e(t){i=t,window.requestAnimationFrame(m)}function c(){!o&&n&&h&&(window.requestAnimationFrame(e),h=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new me;return d(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setSpeed(t,e)},t.setDirection=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.togglePause(t)},t.searchAnimations=function(t,e,s){var i,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),r=a.length;for(i=0;i<r;i+=1)s&&a[i].setAttribute("data-bm-type",s),l(a[i],t);if(e&&0===r){s||(s="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var h=T("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",s),n.appendChild(h),l(h,t)}},t.resize=function(){var t;for(t=0;t<r;t+=1)a[t].animation.resize()},t.goToAndStop=function(t,e,s){var i;for(i=0;i<r;i+=1)a[i].animation.goToAndStop(t,e,s)},t.destroy=function(t){var e;for(e=r-1;0<=e;e-=1)a[e].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,c()},t.setVolume=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=a.length,s=[];for(t=0;t<e;t+=1)s.push(a[t].animation);return s},t}(),me=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=S(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=a,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface={},this.imagePreloader=new mt,this.audioController=ot(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};function ce(){this.effectElements=[]}z([C],me),me.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new Vt(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),N.loadAnimation(t.path,this.configAnimation,this.onSetupError))},me.prototype.onSetupError=function(){this.trigger("data_failed")},me.prototype.setupAnimation=function(t){N.completeAnimation(t,this.configAnimation)},me.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var s={wrapper:t,animationData:e},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===a?s.loop=!1:"true"===a?s.loop=!0:""!==a&&(s.loop=parseInt(a,10));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;s.autoplay="false"!==r,s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(s.prerender=!1),this.setParams(s)},me.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;s<n;s+=1)for(e=0;e<a;){if(i[e].id===r[s].id){i[e]=r[s];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,N.completeAnimation(this.animationData,this.onSegmentComplete)},me.prototype.onSegmentComplete=function(t){this.animationData=t,i&&i.initExpressions(this),this.loadNextSegment()},me.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,N.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},me.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},me.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},me.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},me.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=It(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},me.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},me.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,i&&i.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},me.prototype.resize=function(){this.renderer.updateContainerSize()},me.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},me.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},me.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},me.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},me.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},me.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},me.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},me.prototype.getMarkerData=function(t){for(var e,s=0;s<this.markers.length;s+=1)if((e=this.markers[s]).payload&&e.payload.name===t)return e;return null},me.prototype.goToAndStop=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},me.prototype.goToAndPlay=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(i,e,s);this.play()}},me.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(s=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},me.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},me.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)},me.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},me.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},me.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},me.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},me.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},me.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},me.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},me.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},me.prototype.getVolume=function(){return this.audioController.getVolume()},me.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},me.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},me.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},me.prototype.getPath=function(){return this.path},me.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},me.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},me.prototype.hide=function(){this.renderer.hide()},me.prototype.show=function(){this.renderer.show()},me.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},me.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new l(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new c(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new m(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new u(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new g(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new l(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new c(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new m(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new u(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new g(t,this))},me.prototype.triggerRenderFrameError=function(t){var e=new y(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},me.prototype.triggerConfigError=function(t){var e=new b(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var lottie={};function ue(){!0===ye?de.searchAnimations(ve,ye,be):de.searchAnimations()}lottie.play=de.play,lottie.pause=de.pause,lottie.setLocationHref=function(t){A=t},lottie.togglePause=de.togglePause,lottie.setSpeed=de.setSpeed,lottie.setDirection=de.setDirection,lottie.stop=de.stop,lottie.searchAnimations=ue,lottie.registerAnimation=de.registerAnimation,lottie.loadAnimation=function(t){return!0===ye&&(t.animationData=JSON.parse(ve)),de.loadAnimation(t)},lottie.setSubframeRendering=function(t){a=t},lottie.resize=de.resize,lottie.goToAndStop=de.goToAndStop,lottie.destroy=de.destroy,lottie.setQuality=function(t){if("string"==typeof t)switch(t){case"high":P=200;break;default:case"medium":P=50;break;case"low":P=10}else!isNaN(t)&&1<t&&(P=t);o(!(50<=P))},lottie.inBrowser=function(){return"undefined"!=typeof navigator},lottie.installPlugin=function(t,e){"expressions"===t&&(i=e)},lottie.freeze=de.freeze,lottie.unfreeze=de.unfreeze,lottie.setVolume=de.setVolume,lottie.mute=de.mute,lottie.unmute=de.unmute,lottie.getRegisteredAnimations=de.getRegisteredAnimations,lottie.useWebWorker=function(t){p=t},lottie.setIDPrefix=function(t){r=t},lottie.__getFactory=function(t){switch(t){case"propertyFactory":return B;case"shapePropertyFactory":return K;case"matrix":return R;default:return null}},lottie.version="5.8.1";var ge,ye="__[STANDALONE]__",ve="__[ANIMATIONDATA]__",be="";if(ye){var _e=document.getElementsByTagName("script"),ke=_e[_e.length-1]||{src:""};ge=ke.src.replace(/^[^\?]+\??/,""),be=function(t){for(var e=ge.split("&"),s=0;s<e.length;s+=1){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}("renderer")}var Ae=setInterval(function(){"complete"===document.readyState&&(clearInterval(Ae),ue())},100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var t="",e=!1,i=-999999,s=function(){return t};function r(t){return document.createElement(t)}function a(t,e){var i,s,r=t.length;for(i=0;i<r;i+=1)for(var a in s=t[i].prototype)Object.prototype.hasOwnProperty.call(s,a)&&(e.prototype[a]=s[a])}function n(t,e){return Object.getOwnPropertyDescriptor(t,e)}function o(t){function e(){}return e.prototype=t,e}var h=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,i=this.audios.length;for(e=0;e<i;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),l=function(){function t(t,e){var i,s=0,r=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(s=0;s<e;s+=1)r.push(i);return r}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,i){return"float32"===e?new Float32Array(i):"int16"===e?new Int16Array(i):"uint8c"===e?new Uint8ClampedArray(i):t(e,i)}:t}();function p(t){return Array.apply(null,{length:t})}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}var u=!0,c=null,m="",d=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),g=Math.pow,y=Math.sqrt,v=Math.floor,b=(Math.max,Math.min),_={};!function(){var t,e=["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"],i=e.length;for(t=0;t<i;t+=1)_[e[t]]=Math[e[t]]}(),_.random=Math.random,_.abs=function(t){if("object"===f(t)&&t.length){var e,i=p(t.length),s=t.length;for(e=0;e<s;e+=1)i[e]=Math.abs(t[e]);return i}return Math.abs(t)};var k=150,P=Math.PI/180,A=.5519;function x(t){!!t}function S(t,e,i,s){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=s<0?-1:1}function C(t,e){this.type=t,this.direction=e<0?-1:1}function D(t,e,i,s){this.type=t,this.currentLoop=i,this.totalLoops=e,this.direction=s<0?-1:1}function w(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function M(t,e){this.type=t,this.target=e}function E(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function F(t){this.type="configError",this.nativeError=t}var T,I=(T=0,function(){return m+"__lottie_element_"+(T+=1)});function L(t,e,i){var s,r,a,n,o,h,l,p;switch(h=i*(1-e),l=i*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=i*(1-(1-o)*e),n%6){case 0:s=i,r=p,a=h;break;case 1:s=l,r=i,a=h;break;case 2:s=h,r=i,a=p;break;case 3:s=h,r=l,a=i;break;case 4:s=p,r=h,a=i;break;case 5:s=i,r=h,a=l}return[s,r,a]}function R(t,e,i){var s,r=Math.max(t,e,i),a=Math.min(t,e,i),n=r-a,o=0===r?0:n/r,h=r/255;switch(r){case a:s=0;break;case t:s=e-i+n*(e<i?6:0),s/=6*n;break;case e:s=i-t+2*n,s/=6*n;break;case i:s=t-e+4*n,s/=6*n}return[s,o,h]}function V(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[1]+=e,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),L(i[0],i[1],i[2])}function O(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),L(i[0],i[1],i[2])}function z(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),L(i[0],i[1],i[2])}var B=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,s){return t<0&&(t=0),e<0&&(e=0),s<0&&(s=0),"#"+i[t]+i[e]+i[s]}}(),N=function(){return c},G=function(t){k=t},j=function(){return k};function q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}var X=function(){var t,i,s=1,r=[],a={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){a.onmessage({data:t})}};function o(i){if(window.Worker&&window.Blob&&e){var s=new Blob(["var _workerSelf = self; self.onmessage = ",i.toString()],{type:"text/javascript"}),r=URL.createObjectURL(s);return new Worker(r)}return t=i,a}function h(){i||(i=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(r,a){var n,o,h,l,p,u,c=r.length;for(o=0;o<c;o+=1)if("ks"in(n=r[o])&&!n.completed){if(n.completed=!0,n.tt&&(r[o-1].td=n.tt),n.hasMask){var m=n.masksProperties;for(l=m.length,h=0;h<l;h+=1)if(m[h].pt.k.i)s(m[h].pt.k);else for(u=m[h].pt.k.length,p=0;p<u;p+=1)m[h].pt.k[p].s&&s(m[h].pt.k[p].s[0]),m[h].pt.k[p].e&&s(m[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,a),t(n.layers,a)):4===n.ty?i(n.shapes):5===n.ty&&f(n)}}function e(t,e){var i=function(t,e){for(var i=0,s=e.length;i<s;){if(e[i].id===t)return e[i];i+=1}return null}(t,e);return i?i.layers.__used?JSON.parse(JSON.stringify(i.layers)):(i.layers.__used=!0,i.layers):null}function i(t){var e,r,a;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)s(t[e].ks.k);else for(a=t[e].ks.k.length,r=0;r<a;r+=1)t[e].ks.k[r].s&&s(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&s(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&i(t[e].it)}function s(t){var e,i=t.i.length;for(e=0;e<i;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function r(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,i,s,r=t.length;for(e=0;e<r;e+=1)5===t[e].ty&&(s=void 0,s=(i=t[e]).t.d,i.t.d={k:[{s:s,t:0}]})}return function(i){if(r(t,i.v)&&(e(i.layers),i.assets)){var s,a=i.assets.length;for(s=0;s<a;s+=1)i.assets[s].layers&&e(i.assets[s].layers)}}}(),o=(a=[4,7,99],function(t){if(t.chars&&!r(a,t.v)){var e,s=t.chars.length;for(e=0;e<s;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(i(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=void 0,"number"==typeof(i=t[e].t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(i){if(r(t,i.v)&&(e(i.layers),i.assets)){var s,a=i.assets.length;for(s=0;s<a;s+=1)i.assets[s].layers&&e(i.assets[s].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var i,s,r,a=t.length;for(i=0;i<a;i+=1)if("gr"===t[i].ty)e(t[i].it);else if("fl"===t[i].ty||"st"===t[i].ty)if(t[i].c.k&&t[i].c.k[0].i)for(r=t[i].c.k.length,s=0;s<r;s+=1)t[i].c.k[s].s&&(t[i].c.k[s].s[0]/=255,t[i].c.k[s].s[1]/=255,t[i].c.k[s].s[2]/=255,t[i].c.k[s].s[3]/=255),t[i].c.k[s].e&&(t[i].c.k[s].e[0]/=255,t[i].c.k[s].e[1]/=255,t[i].c.k[s].e[2]/=255,t[i].c.k[s].e[3]/=255);else t[i].c.k[0]/=255,t[i].c.k[1]/=255,t[i].c.k[2]/=255,t[i].c.k[3]/=255}function i(t){var i,s=t.length;for(i=0;i<s;i+=1)4===t[i].ty&&e(t[i].shapes)}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var s,a=e.assets.length;for(s=0;s<a;s+=1)e.assets[s].layers&&i(e.assets[s].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var i,s,r;for(i=t.length-1;i>=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(r=t[i].ks.k.length,s=0;s<r;s+=1)t[i].ks.k[s].s&&(t[i].ks.k[s].s[0].c=t[i].closed),t[i].ks.k[s].e&&(t[i].ks.k[s].e[0].c=t[i].closed);else"gr"===t[i].ty&&e(t[i].it)}function i(t){var i,s,r,a,n,o,h=t.length;for(s=0;s<h;s+=1){if((i=t[s]).hasMask){var l=i.masksProperties;for(a=l.length,r=0;r<a;r+=1)if(l[r].pt.k.i)l[r].pt.k.c=l[r].cl;else for(o=l[r].pt.k.length,n=0;n<o;n+=1)l[r].pt.k[n].s&&(l[r].pt.k[n].s[0].c=l[r].cl),l[r].pt.k[n].e&&(l[r].pt.k[n].e[0].c=l[r].cl)}4===i.ty&&e(i.shapes)}}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var s,a=e.assets.length;for(s=0;s<a;s+=1)e.assets[s].layers&&i(e.assets[s].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var u={completeData:function(i){i.__complete||(l(i),n(i),o(i),h(i),p(i),t(i.layers,i.assets),function(i,s){if(i){var r=0,a=i.length;for(r=0;r<a;r+=1)1===i[r].t&&(i[r].data.layers=e(i[r].data.refId,s),t(i[r].data.layers,s))}}(i.chars,i.assets),i.__complete=!0)}};return u.checkColors=l,u.checkChars=o,u.checkPathProperties=h,u.checkShapes=p,u.completeLayers=t,u}()),n.assetLoader||(n.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===W(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,i,s,r){var a,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)a=t(n),s(a);else try{a=t(n),s(a)}catch(t){r&&r(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",i+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)n.assetLoader.load(t.data.path,t.data.fullPath,(function(e){n.dataManager.completeData(e),n.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){n.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;n.dataManager.completeData(e),n.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&n.assetLoader.load(t.data.path,t.data.fullPath,(function(e){n.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){n.postMessage({id:t.data.id,status:"error"})}))})),i.onmessage=function(t){var e=t.data,i=e.id,s=r[i];r[i]=null,"success"===e.status?s.onComplete(e.payload):s.onError&&s.onError()})}function l(t,e){var i="processId_"+(s+=1);return r[i]={onComplete:t,onError:e},i}return{loadAnimation:function(t,e,s){h();var r=l(e,s);i.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},loadData:function(t,e,s){h();var r=l(e,s);i.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},completeAnimation:function(t,e,s){h();var r=l(e,s);i.postMessage({type:"complete",animation:t,id:r})}}}(),Y=function(){var t=function(){var t=r("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(t,e,i){var s="";if(t.e)s=t.p;else if(e){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),s=e+r}else s=i,s+=t.u?t.u:"",s+=t.p;return s}function a(t){var e=0,i=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},i=s(t,this.assetsPath,this.path);return X.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var s=t.length;for(i=0;i<s;i+=1)t[i].layers||(t[i].t&&"seq"!==t[i].t?3===t[i].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[i]))):(this.totalImages+=1,this.images.push(this._createImageData(t[i]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,i=this.images.length;e<i;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var i=s(e,this.assetsPath,this.path),a=r("img");a.crossOrigin="anonymous",a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){n.img=t,this._imageLoaded()}.bind(this),!1),a.src=i;var n={img:a,assetData:e};return n},createImageData:function(e){var i=s(e,this.assetsPath,this.path),r=q("image");d?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",i),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var a={img:r,assetData:e};return a},imageLoaded:e,footageLoaded:i,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},o}();function H(){}H.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var i=this._cbs[t],s=0;s<i.length;s+=1)i[s](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var i=0,s=this._cbs[t].length;i<s;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,s-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var K=function(){function t(t){for(var e,i=t.split("\r\n"),s={},r=0,a=0;a<i.length;a+=1)2===(e=i[a].split(":")).length&&(s[e[0]]=e[1].trim(),r+=1);if(0===r)throw new Error;return s}return function(e){for(var i=[],s=0;s<e.length;s+=1){var r=e[s],a={time:r.tm,duration:r.dr};try{a.payload=JSON.parse(e[s].cm)}catch(i){try{a.payload=t(e[s].cm)}catch(t){a.payload={name:e[s]}}}i.push(a)}return i}}(),J=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,i=this.compositions.length;e<i;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),U={};function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}var Q=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=I(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=u,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=J(),this.imagePreloader=new Y,this.audioController=h(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};a([H],Q),Q.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var i=U[e];this.renderer=new i(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),X.loadAnimation(t.path,this.configAnimation,this.onSetupError))},Q.prototype.onSetupError=function(){this.trigger("data_failed")},Q.prototype.setupAnimation=function(t){X.completeAnimation(t,this.configAnimation)},Q.prototype.setData=function(t,e){e&&"object"!==Z(e)&&(e=JSON.parse(e));var i={wrapper:t,animationData:e},s=t.attributes;i.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",i.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:"canvas";var r=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";"false"===r?i.loop=!1:"true"===r?i.loop=!0:""!==r&&(i.loop=parseInt(r,10));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:!s.getNamedItem("bm-autoplay")||s.getNamedItem("bm-autoplay").value;i.autoplay="false"!==a,i.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"","false"===(s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"")&&(i.prerender=!1),this.setParams(i)},Q.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,s=this.animationData.layers,r=s.length,a=t.layers,n=a.length;for(i=0;i<n;i+=1)for(e=0;e<r;){if(s[e].id===a[i].id){s[e]=a[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(r=t.assets.length,e=0;e<r;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,X.completeAnimation(this.animationData,this.onSegmentComplete)},Q.prototype.onSegmentComplete=function(t){this.animationData=t;var e=N();e&&e.initExpressions(this),this.loadNextSegment()},Q.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,X.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},Q.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Q.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},Q.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},Q.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=K(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},Q.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},Q.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=N();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},Q.prototype.resize=function(){this.renderer.updateContainerSize()},Q.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},Q.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Q.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},Q.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Q.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Q.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},Q.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Q.prototype.getMarkerData=function(t){for(var e,i=0;i<this.markers.length;i+=1)if((e=this.markers[i]).payload&&e.payload.name===t)return e;return null},Q.prototype.goToAndStop=function(t,e,i){if(!i||this.name===i){var s=Number(t);if(isNaN(s)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},Q.prototype.goToAndPlay=function(t,e,i){if(!i||this.name===i){var s=Number(t);if(isNaN(s)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0))}else this.goToAndStop(s,e,i);this.play()}},Q.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},Q.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},Q.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?i=t:this.currentRawFrame+this.firstFrame>e&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},Q.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===Z(t[0])){var i,s=t.length;for(i=0;i<s;i+=1)this.segments.push(t[i])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},Q.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},Q.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},Q.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},Q.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},Q.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},Q.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},Q.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},Q.prototype.getVolume=function(){return this.audioController.getVolume()},Q.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},Q.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},Q.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},Q.prototype.getPath=function(){return this.path},Q.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var i=t.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},Q.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;e<i;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},Q.prototype.hide=function(){this.renderer.hide()},Q.prototype.show=function(){this.renderer.show()},Q.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},Q.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new S(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new D(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new C(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new w(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new M(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new S(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new D(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new C(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new w(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new M(t,this))},Q.prototype.triggerRenderFrameError=function(t){var e=new E(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},Q.prototype.triggerConfigError=function(t){var e=new F(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var $=function(){var t={},e=[],i=0,s=0,a=0,n=!0,o=!1;function h(t){for(var i=0,r=t.target;i<s;)e[i].animation===r&&(e.splice(i,1),i-=1,s-=1,r.isPaused||f()),i+=1}function l(t,i){if(!t)return null;for(var r=0;r<s;){if(e[r].elem===t&&null!==e[r].elem)return e[r].animation;r+=1}var a=new Q;return u(a,t),a.setData(t,i),a}function p(){a+=1,d()}function f(){a-=1}function u(t,i){t.addEventListener("destroy",h),t.addEventListener("_active",p),t.addEventListener("_idle",f),e.push({elem:i,animation:t}),s+=1}function c(t){var r,h=t-i;for(r=0;r<s;r+=1)e[r].animation.advanceTime(h);i=t,a&&!o?window.requestAnimationFrame(c):n=!0}function m(t){i=t,window.requestAnimationFrame(c)}function d(){!o&&a&&n&&(window.requestAnimationFrame(m),n=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new Q;return u(e,null),e.setParams(t),e},t.setSpeed=function(t,i){var r;for(r=0;r<s;r+=1)e[r].animation.setSpeed(t,i)},t.setDirection=function(t,i){var r;for(r=0;r<s;r+=1)e[r].animation.setDirection(t,i)},t.play=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.play(t)},t.pause=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.pause(t)},t.stop=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.stop(t)},t.togglePause=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.togglePause(t)},t.searchAnimations=function(t,e,i){var s,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=a.length;for(s=0;s<n;s+=1)i&&a[s].setAttribute("data-bm-type",i),l(a[s],t);if(e&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerText="";var h=r("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),l(h,t)}},t.resize=function(){var t;for(t=0;t<s;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,i,r){var a;for(a=0;a<s;a+=1)e[a].animation.goToAndStop(t,i,r)},t.destroy=function(t){var i;for(i=s-1;i>=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,d()},t.setVolume=function(t,i){var r;for(r=0;r<s;r+=1)e[r].animation.setVolume(t,i)},t.mute=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.mute(t)},t.unmute=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,i=e.length,s=[];for(t=0;t<i;t+=1)s.push(e[t].animation);return s},t}(),tt=function(){var t={getBezierEasing:function(t,i,s,r,a){var n=a||("bez_"+t+"_"+i+"_"+s+"_"+r).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,i,s,r]);return e[n]=o,o}},e={};var i=.1,s="function"==typeof Float32Array;function r(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,i){return((r(e,i)*t+a(e,i))*t+n(e))*t}function h(t,e,i){return 3*r(e,i)*t*t+2*a(e,i)*t+n(e)}function l(t){this._p=t,this._mSampleValues=s?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],i=this._p[1],s=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===i&&s===r?t:0===t?0:1===t?1:o(this._getTForX(t),i,r)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],s=this._p[3];this._precomputed=!0,t===e&&i===s||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<11;++s)this._mSampleValues[s]=o(s*i,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],r=this._mSampleValues,a=0,n=1;10!==n&&r[n]<=t;++n)a+=i;var l=a+(t-r[--n])/(r[n+1]-r[n])*i,p=h(l,e,s);return p>=.001?function(t,e,i,s){for(var r=0;r<4;++r){var a=h(e,i,s);if(0===a)return e;e-=(o(e,i,s)-t)/a}return e}(t,l,e,s):0===p?l:function(t,e,i,s,r){var a,n,h=0;do{(a=o(n=e+(i-e)/2,s,r)-t)>0?i=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+i,e,s)}},t}(),et={double:function(t){return t.concat(p(t.length))}},it=function(t,e,i){var s=0,r=t,a=p(r);return{newElement:function(){return s?a[s-=1]:e()},release:function(t){s===r&&(a=et.double(a),r*=2),i&&i(t),a[s]=t,s+=1}}},st=it(8,(function(){return{addedLength:0,percents:l("float32",j()),lengths:l("float32",j())}})),rt=it(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,i=t.lengths.length;for(e=0;e<i;e+=1)st.release(t.lengths[e]);t.lengths.length=0}));var at=function(){var t=Math;function e(t,e,i,s,r,a){var n=t*s+e*r+i*a-r*s-a*t-i*e;return n>-.001&&n<.001}var i=function(t,e,i,s){var r,a,n,o,h,l,p=j(),f=0,u=[],c=[],m=st.newElement();for(n=i.length,r=0;r<p;r+=1){for(h=r/(p-1),l=0,a=0;a<n;a+=1)o=g(1-h,3)*t[a]+3*g(1-h,2)*h*i[a]+3*(1-h)*g(h,2)*s[a]+g(h,3)*e[a],u[a]=o,null!==c[a]&&(l+=g(u[a]-c[a],2)),c[a]=u[a];l&&(f+=l=y(l)),m.percents[r]=h,m.lengths[r]=f}return m.addedLength=f,m};function s(t){this.segmentLength=0,this.points=new Array(t)}function r(t,e){this.partialLength=t,this.point=e}var a,n=(a={},function(t,i,n,o){var h=(t[0]+"_"+t[1]+"_"+i[0]+"_"+i[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!a[h]){var l,f,u,c,m,d,v,b=j(),_=0,k=null;2===t.length&&(t[0]!==i[0]||t[1]!==i[1])&&e(t[0],t[1],i[0],i[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],i[0],i[1],i[0]+o[0],i[1]+o[1])&&(b=2);var P=new s(b);for(u=n.length,l=0;l<b;l+=1){for(v=p(u),m=l/(b-1),d=0,f=0;f<u;f+=1)c=g(1-m,3)*t[f]+3*g(1-m,2)*m*(t[f]+n[f])+3*(1-m)*g(m,2)*(i[f]+o[f])+g(m,3)*i[f],v[f]=c,null!==k&&(d+=g(v[f]-k[f],2));_+=d=y(d),P.points[l]=new r(d,v),k=v}P.segmentLength=_,a[h]=P}return a[h]});function o(t,e){var i=e.percents,s=e.lengths,r=i.length,a=v((r-1)*t),n=t*e.addedLength,o=0;if(a===r-1||0===a||n===s[a])return i[a];for(var h=s[a]>n?-1:1,l=!0;l;)if(s[a]<=n&&s[a+1]>n?(o=(n-s[a])/(s[a+1]-s[a]),l=!1):a+=h,a<0||a>=r-1){if(a===r-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var h=l("float32",8);return{getSegmentsLength:function(t){var e,s=rt.newElement(),r=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=s.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=i(a[e],a[e+1],n[e],o[e+1]),p+=l[e].addedLength;return r&&h&&(l[e]=i(a[e],a[0],n[e],o[0]),p+=l[e].addedLength),s.totalLength=p,s},getNewSegment:function(e,i,s,r,a,n,l){a<0?a=0:a>1&&(a=1);var p,f=o(a,l),u=o(n=n>1?1:n,l),c=e.length,m=1-f,d=1-u,g=m*m*m,y=f*m*m*3,v=f*f*m*3,b=f*f*f,_=m*m*d,k=f*m*d+m*f*d+m*m*u,P=f*f*d+m*f*u+f*m*u,A=f*f*u,x=m*d*d,S=f*d*d+m*u*d+m*d*u,C=f*u*d+m*u*u+f*d*u,D=f*u*u,w=d*d*d,M=u*d*d+d*u*d+d*d*u,E=u*u*d+d*u*u+u*d*u,F=u*u*u;for(p=0;p<c;p+=1)h[4*p]=t.round(1e3*(g*e[p]+y*s[p]+v*r[p]+b*i[p]))/1e3,h[4*p+1]=t.round(1e3*(_*e[p]+k*s[p]+P*r[p]+A*i[p]))/1e3,h[4*p+2]=t.round(1e3*(x*e[p]+S*s[p]+C*r[p]+D*i[p]))/1e3,h[4*p+3]=t.round(1e3*(w*e[p]+M*s[p]+E*r[p]+F*i[p]))/1e3;return h},getPointInSegment:function(e,i,s,r,a,n){var h=o(a,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*s[0]+(h*h*l+l*h*h+h*l*h)*r[0]+h*h*h*i[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*s[1]+(h*h*l+l*h*h+h*l*h)*r[1]+h*h*h*i[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(i,s,r,a,n,o,h,l,p){if(0===r&&0===o&&0===p)return e(i,s,a,n,h,l);var f,u=t.sqrt(t.pow(a-i,2)+t.pow(n-s,2)+t.pow(o-r,2)),c=t.sqrt(t.pow(h-i,2)+t.pow(l-s,2)+t.pow(p-r,2)),m=t.sqrt(t.pow(h-a,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=u>c?u>m?u-c-m:m-c-u:m>c?m-c-u:c-u-m)>-1e-4&&f<1e-4}}}(),nt=function(){var t=i,e=Math.abs;function s(t,e){var i,s=this.offsetTime;"multidimensional"===this.propType&&(i=l("float32",this.pv.length));for(var a,n,o,h,p,f,u,c,m,d=e.lastIndex,g=d,y=this.keyframes.length-1,v=!0;v;){if(a=this.keyframes[g],n=this.keyframes[g+1],g===y-1&&t>=n.t-s){a.h&&(a=n),d=0;break}if(n.t-s>t){d=g;break}g<y-1?g+=1:(d=0,v=!1)}o=this.keyframesMetadata[g]||{};var b,_,k,A,x,S,C,D,w,M,E=n.t-s,F=a.t-s;if(a.to){o.bezierData||(o.bezierData=at.buildBezierData(a.s,n.s||a.e,a.to,a.ti));var T=o.bezierData;if(t>=E||t<F){var I=t>=E?T.points.length-1:0;for(p=T.points[I].point.length,h=0;h<p;h+=1)i[h]=T.points[I].point[h]}else{o.__fnct?m=o.__fnct:(m=tt.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,o.__fnct=m),f=m((t-F)/(E-F));var L,R=T.segmentLength*f,V=e.lastFrame<t&&e._lastKeyframeIndex===g?e._lastAddedLength:0;for(c=e.lastFrame<t&&e._lastKeyframeIndex===g?e._lastPoint:0,v=!0,u=T.points.length;v;){if(V+=T.points[c].partialLength,0===R||0===f||c===T.points.length-1){for(p=T.points[c].point.length,h=0;h<p;h+=1)i[h]=T.points[c].point[h];break}if(R>=V&&R<V+T.points[c+1].partialLength){for(L=(R-V)/T.points[c+1].partialLength,p=T.points[c].point.length,h=0;h<p;h+=1)i[h]=T.points[c].point[h]+(T.points[c+1].point[h]-T.points[c].point[h])*L;break}c<u-1?c+=1:v=!1}e._lastPoint=c,e._lastAddedLength=V-T.points[c].partialLength,e._lastKeyframeIndex=g}}else{var O,z,B,N,G;if(y=a.s.length,b=n.s||a.e,this.sh&&1!==a.h)if(t>=E)i[0]=b[0],i[1]=b[1],i[2]=b[2];else if(t<=F)i[0]=a.s[0],i[1]=a.s[1],i[2]=a.s[2];else{var j=r(a.s),q=r(b);_=i,k=function(t,e,i){var s,r,a,n,o,h=[],l=t[0],p=t[1],f=t[2],u=t[3],c=e[0],m=e[1],d=e[2],g=e[3];return(r=l*c+p*m+f*d+u*g)<0&&(r=-r,c=-c,m=-m,d=-d,g=-g),1-r>1e-6?(s=Math.acos(r),a=Math.sin(s),n=Math.sin((1-i)*s)/a,o=Math.sin(i*s)/a):(n=1-i,o=i),h[0]=n*l+o*c,h[1]=n*p+o*m,h[2]=n*f+o*d,h[3]=n*u+o*g,h}(j,q,(t-F)/(E-F)),A=k[0],x=k[1],S=k[2],C=k[3],D=Math.atan2(2*x*C-2*A*S,1-2*x*x-2*S*S),w=Math.asin(2*A*x+2*S*C),M=Math.atan2(2*A*C-2*x*S,1-2*A*A-2*S*S),_[0]=D/P,_[1]=w/P,_[2]=M/P}else for(g=0;g<y;g+=1)1!==a.h&&(t>=E?f=1:t<F?f=0:(a.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[g]?m=o.__fnct[g]:(O=void 0===a.o.x[g]?a.o.x[0]:a.o.x[g],z=void 0===a.o.y[g]?a.o.y[0]:a.o.y[g],B=void 0===a.i.x[g]?a.i.x[0]:a.i.x[g],N=void 0===a.i.y[g]?a.i.y[0]:a.i.y[g],m=tt.getBezierEasing(O,z,B,N).get,o.__fnct[g]=m)):o.__fnct?m=o.__fnct:(O=a.o.x,z=a.o.y,B=a.i.x,N=a.i.y,m=tt.getBezierEasing(O,z,B,N).get,a.keyframeMetadata=m),f=m((t-F)/(E-F)))),b=n.s||a.e,G=1===a.h?a.s[g]:a.s[g]+(b[g]-a.s[g])*f,"multidimensional"===this.propType?i[g]=G:i=G}return e.lastIndex=d,i}function r(t){var e=t[0]*P,i=t[1]*P,s=t[2]*P,r=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(s/2),o=Math.sin(e/2),h=Math.sin(i/2),l=Math.sin(s/2);return[o*h*n+r*a*l,o*a*n+r*h*l,r*h*n-o*a*l,r*a*n-o*h*l]}function a(){var e=this.comp.renderedFrame-this.offsetTime,i=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=s&&e>=s||this._caching.lastFrame<i&&e<i))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function n(t){var i;if("unidimensional"===this.propType)i=t*this.mult,e(this.v-i)>1e-5&&(this.v=i,this._mdf=!0);else for(var s=0,r=this.v.length;s<r;)i=t[s]*this.mult,e(this.v[s]-i)>1e-5&&(this.v[s]=i,this._mdf=!0),s+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)i=this.effectsSequence[t](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function h(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function p(t,e,i,s){this.propType="unidimensional",this.mult=i||1,this.data=e,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=s,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=o,this.setVValue=n,this.addEffect=h}function f(t,e,i,s){var r;this.propType="multidimensional",this.mult=i||1,this.data=e,this._mdf=!1,this.elem=t,this.container=s,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=l("float32",a),this.pv=l("float32",a),this.vel=l("float32",a),r=0;r<a;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=o,this.setVValue=n,this.addEffect=h}function u(e,i,r,l){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=r||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=o,this.setVValue=n,this.interpolateValue=s,this.effectsSequence=[a.bind(this)],this.addEffect=h}function c(e,i,r,p){var f;this.propType="multidimensional";var u,c,m,d,g=i.k.length;for(f=0;f<g-1;f+=1)i.k[f].to&&i.k[f].s&&i.k[f+1]&&i.k[f+1].s&&(u=i.k[f].s,c=i.k[f+1].s,m=i.k[f].to,d=i.k[f].ti,(2===u.length&&(u[0]!==c[0]||u[1]!==c[1])&&at.pointOnLine2D(u[0],u[1],c[0],c[1],u[0]+m[0],u[1]+m[1])&&at.pointOnLine2D(u[0],u[1],c[0],c[1],c[0]+d[0],c[1]+d[1])||3===u.length&&(u[0]!==c[0]||u[1]!==c[1]||u[2]!==c[2])&&at.pointOnLine3D(u[0],u[1],u[2],c[0],c[1],c[2],u[0]+m[0],u[1]+m[1],u[2]+m[2])&&at.pointOnLine3D(u[0],u[1],u[2],c[0],c[1],c[2],c[0]+d[0],c[1]+d[1],c[2]+d[2]))&&(i.k[f].to=null,i.k[f].ti=null),u[0]===c[0]&&u[1]===c[1]&&0===m[0]&&0===m[1]&&0===d[0]&&0===d[1]&&(2===u.length||u[2]===c[2]&&0===m[2]&&0===d[2])&&(i.k[f].to=null,i.k[f].ti=null));this.effectsSequence=[a.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=p,this.comp=e.comp,this.getValue=o,this.setVValue=n,this.interpolateValue=s,this.frameId=-1;var y=i.k[0].s.length;for(this.v=l("float32",y),this.pv=l("float32",y),f=0;f<y;f+=1)this.v[f]=t,this.pv[f]=t;this._caching={lastFrame:t,lastIndex:0,value:l("float32",y)},this.addEffect=h}return{getProp:function(t,e,i,s,r){var a;if(e.k.length)if("number"==typeof e.k[0])a=new f(t,e,s,r);else switch(i){case 0:a=new u(t,e,s,r);break;case 1:a=new c(t,e,s,r)}else a=new p(t,e,s,r);return a.effectsSequence.length&&r.addDynamicProperty(a),a}}}();function ot(){}ot.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var ht=it(8,(function(){return l("float32",2)}));function lt(){this.c=!1,this._length=0,this._maxLength=8,this.v=p(this._maxLength),this.o=p(this._maxLength),this.i=p(this._maxLength)}lt.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var i=0;i<e;)this.v[i]=ht.newElement(),this.o[i]=ht.newElement(),this.i[i]=ht.newElement(),i+=1},lt.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},lt.prototype.doubleArrayLength=function(){this.v=this.v.concat(p(this._maxLength)),this.i=this.i.concat(p(this._maxLength)),this.o=this.o.concat(p(this._maxLength)),this._maxLength*=2},lt.prototype.setXYAt=function(t,e,i,s,r){var a;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[s]||a[s]&&!r)&&(a[s]=ht.newElement()),a[s][0]=t,a[s][1]=e},lt.prototype.setTripleAt=function(t,e,i,s,r,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,s,"o",n,o),this.setXYAt(r,a,"i",n,o)},lt.prototype.reverse=function(){var t=new lt;t.setPathData(this.c,this._length);var e=this.v,i=this.o,s=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],i[0][0],i[0][1],0,!1),r=1);var a,n=this._length-1,o=this._length;for(a=r;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],s[n][0],s[n][1],i[n][0],i[n][1],a,!1),n-=1;return t};var pt,ft=((pt=it(4,(function(){return new lt}),(function(t){var e,i=t._length;for(e=0;e<i;e+=1)ht.release(t.v[e]),ht.release(t.i[e]),ht.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}))).clone=function(t){var e,i=pt.newElement(),s=void 0===t._length?t.v.length:t._length;for(i.setLength(s),i.c=t.c,e=0;e<s;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i},pt);function ut(){this._length=0,this._maxLength=4,this.shapes=p(this._maxLength)}ut.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(p(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ut.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)ft.release(this.shapes[t]);this._length=0};var ct,mt,dt,gt,yt=(ct={newShapeCollection:function(){return mt?gt[mt-=1]:new ut},release:function(t){var e,i=t._length;for(e=0;e<i;e+=1)ft.release(t.shapes[e]);t._length=0,mt===dt&&(gt=et.double(gt),dt*=2),gt[mt]=t,mt+=1}},mt=0,gt=p(dt=4),ct),vt=function(){var t=-999999;function e(t,e,i){var s,r,a,n,o,h,l,p,f,u=i.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)s=c[0].s[0],a=!0,u=0;else if(t>=c[c.length-1].t-this.offsetTime)s=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var m,d,g,y=u,v=c.length-1,b=!0;b&&(m=c[y],!((d=c[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},u=y,!(a=1===m.h)){if(t>=d.t-this.offsetTime)p=1;else if(t<m.t-this.offsetTime)p=0;else{var _;g.__fnct?_=g.__fnct:(_=tt.getBezierEasing(m.o.x,m.o.y,m.i.x,m.i.y).get,g.__fnct=_),p=_((t-(m.t-this.offsetTime))/(d.t-this.offsetTime-(m.t-this.offsetTime)))}r=d.s?d.s[0]:m.e[0]}s=m.s[0]}for(h=e._length,l=s.i[0].length,i.lastIndex=u,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?s.i[n][o]:s.i[n][o]+(r.i[n][o]-s.i[n][o])*p,e.i[n][o]=f,f=a?s.o[n][o]:s.o[n][o]+(r.o[n][o]-s.o[n][o])*p,e.o[n][o]=f,f=a?s.v[n][o]:s.v[n][o]+(r.v[n][o]-s.v[n][o])*p,e.v[n][o]=f}function i(){var e=this.comp.renderedFrame-this.offsetTime,i=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==t&&(r<i&&e<i||r>s&&e>s)||(this._caching.lastIndex=r<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function s(){this.paths=this.localShapeCollection}function r(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,s=t._length;for(i=0;i<s;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0})(this.v,t)||(this.v=ft.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var i=this.effectsSequence.length;for(e=0;e<i;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function o(t,e,i){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===i?e.pt.k:e.ks.k;this.v=ft.clone(r),this.pv=ft.clone(this.v),this.localShapeCollection=yt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=s,this.effectsSequence=[]}function h(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(e,r,a){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===a?r.pt.k:r.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=ft.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=ft.clone(this.v),this.localShapeCollection=yt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=s,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[i.bind(this)]}o.prototype.interpolateShape=e,o.prototype.getValue=n,o.prototype.setVValue=r,o.prototype.addEffect=h,l.prototype.getValue=n,l.prototype.interpolateShape=e,l.prototype.setVValue=r,l.prototype.addEffect=h;var p=function(){var t=A;function e(t,e){this.v=ft.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=yt.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=nt.getProp(t,e.p,1,0,this),this.s=nt.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],i=this.p.v[1],s=this.s.v[0]/2,r=this.s.v[1]/2,a=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=i-r,n.v[1][0]=a?e+s:e-s,n.v[1][1]=i,n.v[2][0]=e,n.v[2][1]=i+r,n.v[3][0]=a?e-s:e+s,n.v[3][1]=i,n.i[0][0]=a?e-s*t:e+s*t,n.i[0][1]=i-r,n.i[1][0]=a?e+s:e-s,n.i[1][1]=i-r*t,n.i[2][0]=a?e+s*t:e-s*t,n.i[2][1]=i+r,n.i[3][0]=a?e-s:e+s,n.i[3][1]=i+r*t,n.o[0][0]=a?e+s*t:e-s*t,n.o[0][1]=i-r,n.o[1][0]=a?e+s:e-s,n.o[1][1]=i+r*t,n.o[2][0]=a?e-s*t:e+s*t,n.o[2][1]=i+r,n.o[3][0]=a?e-s:e+s,n.o[3][1]=i-r*t}},a([ot],e),e}(),f=function(){function t(t,e){this.v=ft.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=nt.getProp(t,e.ir,0,0,this),this.is=nt.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=nt.getProp(t,e.pt,0,0,this),this.p=nt.getProp(t,e.p,1,0,this),this.r=nt.getProp(t,e.r,0,P,this),this.or=nt.getProp(t,e.or,0,0,this),this.os=nt.getProp(t,e.os,0,.01,this),this.localShapeCollection=yt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,i,s,r=2*Math.floor(this.pt.v),a=2*Math.PI/r,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*r),u=2*Math.PI*h/(2*r),c=-Math.PI/2;c+=this.r.v;var m=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<r;t+=1){i=n?l:p,s=n?f:u;var d=(e=n?o:h)*Math.cos(c),g=e*Math.sin(c),y=0===d&&0===g?0:g/Math.sqrt(d*d+g*g),v=0===d&&0===g?0:-d/Math.sqrt(d*d+g*g);d+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(d,g,d-y*s*i*m,g-v*s*i*m,d+y*s*i*m,g+v*s*i*m,t,!0),n=!n,c+=a*m}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,s=this.or.v,r=this.os.v,a=2*Math.PI*s/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=s*Math.cos(n),l=s*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*r*o,l-f*a*r*o,h+p*a*r*o,l+f*a*r*o,t,!0),n+=i*o}this.paths.length=0,this.paths[0]=this.v}},a([ot],t),t}(),u=function(){function t(t,e){this.v=ft.newElement(),this.v.c=!0,this.localShapeCollection=yt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=nt.getProp(t,e.p,1,0,this),this.s=nt.getProp(t,e.s,1,0,this),this.r=nt.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,r=b(i,s,this.r.v),a=r*(1-A);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-s+r,t+i,e-s+r,t+i,e-s+a,0,!0),this.v.setTripleAt(t+i,e+s-r,t+i,e+s-a,t+i,e+s-r,1,!0),0!==r?(this.v.setTripleAt(t+i-r,e+s,t+i-r,e+s,t+i-a,e+s,2,!0),this.v.setTripleAt(t-i+r,e+s,t-i+a,e+s,t-i+r,e+s,3,!0),this.v.setTripleAt(t-i,e+s-r,t-i,e+s-r,t-i,e+s-a,4,!0),this.v.setTripleAt(t-i,e-s+r,t-i,e-s+a,t-i,e-s+r,5,!0),this.v.setTripleAt(t-i+r,e-s,t-i+r,e-s,t-i+a,e-s,6,!0),this.v.setTripleAt(t+i-r,e-s,t+i-a,e-s,t+i-r,e-s,7,!0)):(this.v.setTripleAt(t-i,e+s,t-i+a,e+s,t-i,e+s,2),this.v.setTripleAt(t-i,e-s,t-i,e-s+a,t-i,e-s,3))):(this.v.setTripleAt(t+i,e-s+r,t+i,e-s+a,t+i,e-s+r,0,!0),0!==r?(this.v.setTripleAt(t+i-r,e-s,t+i-r,e-s,t+i-a,e-s,1,!0),this.v.setTripleAt(t-i+r,e-s,t-i+a,e-s,t-i+r,e-s,2,!0),this.v.setTripleAt(t-i,e-s+r,t-i,e-s+r,t-i,e-s+a,3,!0),this.v.setTripleAt(t-i,e+s-r,t-i,e+s-a,t-i,e+s-r,4,!0),this.v.setTripleAt(t-i+r,e+s,t-i+r,e+s,t-i+a,e+s,5,!0),this.v.setTripleAt(t+i-r,e+s,t+i-a,e+s,t+i-r,e+s,6,!0),this.v.setTripleAt(t+i,e+s-r,t+i,e+s-r,t+i,e+s-a,7,!0)):(this.v.setTripleAt(t-i,e-s,t-i+a,e-s,t-i,e-s,1,!0),this.v.setTripleAt(t-i,e+s,t-i,e+s-a,t-i,e+s,2,!0),this.v.setTripleAt(t+i,e+s,t+i-a,e+s,t+i,e+s,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:s},a([ot],t),t}();var c={getShapeProp:function(t,e,i){var s;return 3===i||4===i?s=(3===i?e.pt:e.ks).k.length?new l(t,e,i):new o(t,e,i):5===i?s=new u(t,e):6===i?s=new p(t,e):7===i&&(s=new f(t,e)),s.k&&t.addDynamicProperty(s),s},getConstructorFunction:function(){return o},getKeyframedConstructorFunction:function(){return l}};return c}(),bt=function(){var t=Math.cos,e=Math.sin,i=Math.tan,s=Math.round;function r(){return 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,this}function a(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(s,-r,0,0,r,s,0,0,0,0,1,0,0,0,0,1)}function n(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(1,0,0,0,0,s,-r,0,0,r,s,0,0,0,0,1)}function o(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(s,0,r,0,0,1,0,0,-r,0,s,0,0,0,0,1)}function h(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(s,-r,0,0,r,s,0,0,0,0,1,0,0,0,0,1)}function p(t,e){return this._t(1,e,t,1,0,0)}function f(t,e){return this.shear(i(t),i(e))}function u(s,r){var a=t(r),n=e(r);return this._t(a,n,0,0,-n,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(s),1,0,0,0,0,1,0,0,0,0,1)._t(a,-n,0,0,n,a,0,0,0,0,1,0,0,0,0,1)}function c(t,e,i){return i||0===i||(i=1),1===t&&1===e&&1===i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function m(t,e,i,s,r,a,n,o,h,l,p,f,u,c,m,d){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=s,this.props[4]=r,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=u,this.props[13]=c,this.props[14]=m,this.props[15]=d,this}function d(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function g(t,e,i,s,r,a,n,o,h,l,p,f,u,c,m,d){var g=this.props;if(1===t&&0===e&&0===i&&0===s&&0===r&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*u,g[13]=g[13]*a+g[15]*c,g[14]=g[14]*p+g[15]*m,g[15]*=d,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],_=g[3],k=g[4],P=g[5],A=g[6],x=g[7],S=g[8],C=g[9],D=g[10],w=g[11],M=g[12],E=g[13],F=g[14],T=g[15];return g[0]=y*t+v*r+b*h+_*u,g[1]=y*e+v*a+b*l+_*c,g[2]=y*i+v*n+b*p+_*m,g[3]=y*s+v*o+b*f+_*d,g[4]=k*t+P*r+A*h+x*u,g[5]=k*e+P*a+A*l+x*c,g[6]=k*i+P*n+A*p+x*m,g[7]=k*s+P*o+A*f+x*d,g[8]=S*t+C*r+D*h+w*u,g[9]=S*e+C*a+D*l+w*c,g[10]=S*i+C*n+D*p+w*m,g[11]=S*s+C*o+D*f+w*d,g[12]=M*t+E*r+F*h+T*u,g[13]=M*e+E*a+F*l+T*c,g[14]=M*i+E*n+F*p+T*m,g[15]=M*s+E*o+F*f+T*d,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function b(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function _(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function k(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function P(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function A(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function x(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function S(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,i=-this.props[1]/t,s=-this.props[4]/t,r=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new bt;return o.props[0]=e,o.props[1]=i,o.props[4]=s,o.props[5]=r,o.props[12]=a,o.props[13]=n,o}function C(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function D(t){var e,i=t.length,s=[];for(e=0;e<i;e+=1)s[e]=C(t[e]);return s}function w(t,e,i){var s=l("float32",6);if(this.isIdentity())s[0]=t[0],s[1]=t[1],s[2]=e[0],s[3]=e[1],s[4]=i[0],s[5]=i[1];else{var r=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],p=this.props[13];s[0]=t[0]*r+t[1]*n+h,s[1]=t[0]*a+t[1]*o+p,s[2]=e[0]*r+e[1]*n+h,s[3]=e[0]*a+e[1]*o+p,s[4]=i[0]*r+i[1]*n+h,s[5]=i[0]*a+i[1]*o+p}return s}function M(t,e,i){return this.isIdentity()?[t,e,i]:[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function E(t,e){if(this.isIdentity())return t+","+e;var i=this.props;return Math.round(100*(t*i[0]+e*i[4]+i[12]))/100+","+Math.round(100*(t*i[1]+e*i[5]+i[13]))/100}function F(){for(var t=0,e=this.props,i="matrix3d(";t<16;)i+=s(1e4*e[t])/1e4,i+=15===t?")":",",t+=1;return i}function T(t){return t<1e-6&&t>0||t>-1e-6&&t<0?s(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+T(t[0])+","+T(t[1])+","+T(t[4])+","+T(t[5])+","+T(t[12])+","+T(t[13])+")"}return function(){this.reset=r,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=f,this.skewFromAxis=u,this.shear=p,this.scale=c,this.setTransform=m,this.translate=d,this.transform=g,this.applyToPoint=k,this.applyToX=P,this.applyToY=A,this.applyToZ=x,this.applyToPointArray=M,this.applyToTriplePoints=w,this.applyToPointStringified=E,this.toCSS=F,this.to2dCSS=I,this.clone=b,this.cloneFromProps=_,this.equals=v,this.inversePoints=D,this.inversePoint=C,this.getInverseMatrix=S,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=l("float32",16),this.reset()}}();function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}var kt,Pt={};function At(){$.searchAnimations()}Pt.play=$.play,Pt.pause=$.pause,Pt.setLocationHref=function(e){t=e},Pt.togglePause=$.togglePause,Pt.setSpeed=$.setSpeed,Pt.setDirection=$.setDirection,Pt.stop=$.stop,Pt.searchAnimations=At,Pt.registerAnimation=$.registerAnimation,Pt.loadAnimation=function(t){return $.loadAnimation(t)},Pt.setSubframeRendering=function(t){!function(t){u=!!t}(t)},Pt.resize=$.resize,Pt.goToAndStop=$.goToAndStop,Pt.destroy=$.destroy,Pt.setQuality=function(t){if("string"==typeof t)switch(t){case"high":G(200);break;default:case"medium":G(50);break;case"low":G(10)}else!isNaN(t)&&t>1&&G(t);j()>=50?x(!1):x(!0)},Pt.inBrowser=function(){return"undefined"!=typeof navigator},Pt.installPlugin=function(t,e){"expressions"===t&&(c=e)},Pt.freeze=$.freeze,Pt.unfreeze=$.unfreeze,Pt.setVolume=$.setVolume,Pt.mute=$.mute,Pt.unmute=$.unmute,Pt.getRegisteredAnimations=$.getRegisteredAnimations,Pt.useWebWorker=function(t){e=!!t},Pt.setIDPrefix=function(t){m=t},Pt.__getFactory=function(t){switch(t){case"propertyFactory":return nt;case"shapePropertyFactory":return vt;case"matrix":return bt;default:return null}},Pt.version="5.9.1";var xt=document.getElementsByTagName("script"),St=xt[xt.length-1]||{src:""};kt=St.src.replace(/^[^\?]+\??/,""),function(t){for(var e=kt.split("&"),i=0;i<e.length;i+=1){var s=e[i].split("=");if(decodeURIComponent(s[0])==t)return decodeURIComponent(s[1])}}("renderer");var Ct=setInterval((function(){"complete"===document.readyState&&(clearInterval(Ct),At())}),100);try{"object"===("undefined"==typeof exports?"undefined":_t(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=Pt)}catch(t){}var Dt=function(){var t={},e={};return t.registerModifier=function(t,i){e[t]||(e[t]=i)},t.getModifier=function(t,i,s){return new e[t](i,s)},t}();function wt(){}function Mt(){}function Et(){}wt.prototype.initModifierProperties=function(){},wt.prototype.addShapeToModifier=function(){},wt.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:yt.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},wt.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=i,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},wt.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},a([ot],wt),a([wt],Mt),Mt.prototype.initModifierProperties=function(t,e){this.s=nt.getProp(t,e.s,0,.01,this),this.e=nt.getProp(t,e.e,0,.01,this),this.o=nt.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},Mt.prototype.addShapeToModifier=function(t){t.pathsData=[]},Mt.prototype.calculateShapeEdges=function(t,e,i,s,r){var a=[];e<=1?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*r<s||o.s*r>s+i))p=o.s*r<=s?0:(o.s*r-s)/i,f=o.e*r>=s+i?1:(o.e*r-s)/i,h.push([p,f])}return h.length||h.push([0,0]),h},Mt.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e<i;e+=1)rt.release(t[e]);return t.length=0,t},Mt.prototype.processShapes=function(t){var e,i,s,r;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=this.s.v>1?1+a:this.s.v<0?0+a:this.s.v+a)>(i=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,u=this.shapes.length,c=0;if(i===e)for(r=0;r<u;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape._mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection,this._mdf&&(this.shapes[r].pathsData.length=0);else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(r=0;r<u;r+=1)this.shapes[r].pathsData.length=0,this.shapes[r].shape._mdf=!0}else{var m,d,g=[];for(r=0;r<u;r+=1)if((m=this.shapes[r]).shape._mdf||this._mdf||t||2===this.m){if(h=(s=m.shape.paths)._length,f=0,!m.shape._mdf&&m.pathsData.length)f=m.totalShapeLength;else{for(l=this.releasePathsData(m.pathsData),o=0;o<h;o+=1)p=at.getSegmentsLength(s.shapes[o]),l.push(p),f+=p.totalLength;m.totalShapeLength=f,m.pathsData=l}c+=f,m.shape._mdf=!0}else m.shape.paths=m.localShapeCollection;var y,v=e,b=i,_=0;for(r=u-1;r>=0;r-=1)if((m=this.shapes[r]).shape._mdf){for((d=m.localShapeCollection).releaseShapes(),2===this.m&&u>1?(y=this.calculateShapeEdges(e,i,m.totalShapeLength,_,c),_+=m.totalShapeLength):y=[[v,b]],h=y.length,o=0;o<h;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:m.totalShapeLength*v,e:m.totalShapeLength*b}):v>=1?g.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(b-1)}):(g.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),g.push({s:0,e:m.totalShapeLength*(b-1)}));var k=this.addShapes(m,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var P=k.pop();this.addPaths(k,d),k=this.addShapes(m,g[1],P)}else this.addPaths(k,d),k=this.addShapes(m,g[1]);this.addPaths(k,d)}}m.shape.paths=d}}},Mt.prototype.addPaths=function(t,e){var i,s=t.length;for(i=0;i<s;i+=1)e.addShape(t[i])},Mt.prototype.addSegment=function(t,e,i,s,r,a,n){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(i[0],i[1],"i",a+1),n&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(s[0],s[1],"v",a+1)},Mt.prototype.addSegmentFromArray=function(t,e,i,s){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),s&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},Mt.prototype.addShapes=function(t,e,i){var s,r,a,n,o,h,l,p,f=t.pathsData,u=t.shape.paths.shapes,c=t.shape.paths._length,m=0,d=[],g=!0;for(i?(o=i._length,p=i._length):(i=ft.newElement(),o=0,p=0),d.push(i),s=0;s<c;s+=1){for(h=f[s].lengths,i.c=u[s].c,a=u[s].c?h.length:h.length+1,r=1;r<a;r+=1)if(m+(n=h[r-1]).addedLength<e.s)m+=n.addedLength,i.c=!1;else{if(m>e.e){i.c=!1;break}e.s<=m&&e.e>=m+n.addedLength?(this.addSegment(u[s].v[r-1],u[s].o[r-1],u[s].i[r],u[s].v[r],i,o,g),g=!1):(l=at.getNewSegment(u[s].v[r-1],u[s].v[r],u[s].o[r-1],u[s].i[r],(e.s-m)/n.addedLength,(e.e-m)/n.addedLength,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1),m+=n.addedLength,o+=1}if(u[s].c&&h.length){if(n=h[r-1],m<=e.e){var y=h[r-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(u[s].v[r-1],u[s].o[r-1],u[s].i[0],u[s].v[0],i,o,g),g=!1):(l=at.getNewSegment(u[s].v[r-1],u[s].v[0],u[s].o[r-1],u[s].i[0],(e.s-m)/y,(e.e-m)/y,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1)}else i.c=!1;m+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),m>e.e)break;s<c-1&&(i=ft.newElement(),g=!0,d.push(i),o=0)}return d},a([wt],Et),Et.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=nt.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},Et.prototype.processPath=function(t,e){var i=e/100,s=[0,0],r=t._length,a=0;for(a=0;a<r;a+=1)s[0]+=t.v[a][0],s[1]+=t.v[a][1];s[0]/=r,s[1]/=r;var n,o,h,l,p,f,u=ft.newElement();for(u.c=t.c,a=0;a<r;a+=1)n=t.v[a][0]+(s[0]-t.v[a][0])*i,o=t.v[a][1]+(s[1]-t.v[a][1])*i,h=t.o[a][0]+(s[0]-t.o[a][0])*-i,l=t.o[a][1]+(s[1]-t.o[a][1])*-i,p=t.i[a][0]+(s[0]-t.i[a][0])*-i,f=t.i[a][1]+(s[1]-t.i[a][1])*-i,u.setTripleAt(n,o,h,l,p,f,a);return u},Et.prototype.processShapes=function(t){var e,i,s,r,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(i=0;i<o;i+=1){if(n=(a=this.shapes[i]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,s=0;s<r;s+=1)n.addShape(this.processPath(e[s],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var Ft=function(){var t=[0,0];function e(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new bt,this.pre=new bt,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||t),e.p&&e.p.s?(this.px=nt.getProp(t,e.p.x,0,0,this),this.py=nt.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=nt.getProp(t,e.p.z,0,0,this))):this.p=nt.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=nt.getProp(t,e.rx,0,P,this),this.ry=nt.getProp(t,e.ry,0,P,this),this.rz=nt.getProp(t,e.rz,0,P,this),e.or.k[0].ti){var s,r=e.or.k.length;for(s=0;s<r;s+=1)e.or.k[s].to=null,e.or.k[s].ti=null}this.or=nt.getProp(t,e.or,1,P,this),this.or.sh=!0}else this.r=nt.getProp(t,e.r||{k:0},0,P,this);e.sk&&(this.sk=nt.getProp(t,e.sk,0,P,this),this.sa=nt.getProp(t,e.sa,0,P,this)),this.a=nt.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=nt.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=nt.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var s,r;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(s=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),r=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(s=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],r=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(s[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),s[1]=n.getValueAtTime((n.keyframes[0].t+.01)/i,0),r[0]=a.getValueAtTime(a.keyframes[0].t/i,0),r[1]=n.getValueAtTime(n.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(s[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),s[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/i,0),r[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),r[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/i,0)):(s=[a.pv,n.pv],r[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),r[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/i,n.offsetTime))}else s=r=t;this.v.rotate(-Math.atan2(s[1]-r[1],s[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},a([ot],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=ot.prototype.addDynamicProperty,{getTransformProperty:function(t,i,s){return new e(t,i,s)}}}();function Tt(){}function It(){}function Lt(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",s="normal",r=e.length,a=0;a<r;a+=1)switch(e[a].toLowerCase()){case"italic":s="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200"}return{style:s,weight:t.fWeight||i}}a([wt],Tt),Tt.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=nt.getProp(t,e.c,0,null,this),this.o=nt.getProp(t,e.o,0,null,this),this.tr=Ft.getTransformProperty(t,e.tr,this),this.so=nt.getProp(t,e.tr.so,0,.01,this),this.eo=nt.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new bt,this.rMatrix=new bt,this.sMatrix=new bt,this.tMatrix=new bt,this.matrix=new bt},Tt.prototype.applyTransforms=function(t,e,i,s,r,a){var n=a?-1:1,o=s.s.v[0]+(1-s.s.v[0])*(1-r),h=s.s.v[1]+(1-s.s.v[1])*(1-r);t.translate(s.p.v[0]*n*r,s.p.v[1]*n*r,s.p.v[2]),e.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),e.rotate(-s.r.v*n*r),e.translate(s.a.v[0],s.a.v[1],s.a.v[2]),i.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),i.scale(a?1/o:o,a?1/h:h),i.translate(s.a.v[0],s.a.v[1],s.a.v[2])},Tt.prototype.init=function(t,e,i,s){for(this.elem=t,this.arr=e,this.pos=i,this.elemsData=s,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[i]);i>0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Tt.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},Tt.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},Tt.prototype.changeGroupRender=function(t,e){var i,s=t.length;for(i=0;i<s;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},Tt.prototype.processShapes=function(t){var e,i,s,r,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(a=0,s=0;s<=this._groups.length-1;s+=1){if(o=a<h,this._groups[s]._render=o,this.changeGroupRender(this._groups[s].it,o),!o){var p=this.elemsData[s].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var u=this.o.v,c=u%1,m=u>0?Math.floor(u):Math.ceil(u),d=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(u>0){for(;_<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),_+=c)}else if(u<0){for(;_>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),_-=c)}for(s=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(i=(e=this.elemsData[s].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),0!==_){for((0!==s&&1===r||s!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),v=0;v<b;v+=1)i[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)i[v]=this.matrix.props[v];_+=1,a-=1,s+=r}}else for(a=this._currentCopies,s=0,r=1;a;)i=(e=this.elemsData[s].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,s+=r;return n},Tt.prototype.addShape=function(){},a([wt],It),It.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=nt.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},It.prototype.processPath=function(t,e){var i,s=ft.newElement();s.c=t.c;var r,a,n,o,h,l,p,f,u,c,m,d,g=t._length,y=0;for(i=0;i<g;i+=1)r=t.v[i],n=t.o[i],a=t.i[i],r[0]===n[0]&&r[1]===n[1]&&r[0]===a[0]&&r[1]===a[1]?0!==i&&i!==g-1||t.c?(o=0===i?t.v[g-1]:t.v[i-1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=r[0]+(o[0]-r[0])*l,f=d=r[1]-(r[1]-o[1])*l,u=p-(p-r[0])*A,c=f-(f-r[1])*A,s.setTripleAt(p,f,u,c,m,d,y),y+=1,o=i===g-1?t.v[0]:t.v[i+1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=u=r[0]+(o[0]-r[0])*l,f=c=r[1]+(o[1]-r[1])*l,m=p-(p-r[0])*A,d=f-(f-r[1])*A,s.setTripleAt(p,f,u,c,m,d,y),y+=1):(s.setTripleAt(r[0],r[1],n[0],n[1],a[0],a[1],y),y+=1):(s.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],y),y+=1);return s},It.prototype.processShapes=function(t){var e,i,s,r,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(i=0;i<o;i+=1){if(n=(a=this.shapes[i]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,s=0;s<r;s+=1)n.addShape(this.processPath(e[s],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var Rt=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],s=[65039,8205];function a(t,e){var i=r("span");i.setAttribute("aria-hidden",!0),i.style.fontFamily=e;var s=r("span");s.innerText="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(s),document.body.appendChild(i);var a=s.offsetWidth;return s.style.fontFamily=function(t){var e,i=t.split(","),s=i.length,r=[];for(e=0;e<s;e+=1)"sans-serif"!==i[e]&&"monospace"!==i[e]&&r.push(i[e]);return r.join(",")}(t)+", "+e,{node:s,w:a,parent:i}}function n(t,e){var i=q("text");i.style.fontSize="100px";var s=Lt(e);return i.setAttribute("font-family",e.fFamily),i.setAttribute("font-style",s.style),i.setAttribute("font-weight",s.weight),i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.setAttribute("class",e.fClass)):i.style.fontFamily=e.fFamily,t.appendChild(i),r("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,i}var o=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};o.isModifier=function(t,e){var s=t.toString(16)+e.toString(16);return-1!==i.indexOf(s)},o.isZeroWidthJoiner=function(t,e){return e?t===s[0]&&e===s[1]:t===s[1]},o.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var h={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,s,r=t.length,a=this.chars.length;for(e=0;e<r;e+=1){for(i=0,s=!1;i<a;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(s=!0),i+=1;s||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var i,s=t.list,o=s.length,h=o;for(i=0;i<o;i+=1){var l,p,f=!0;if(s[i].loaded=!1,s[i].monoCase=a(s[i].fFamily,"monospace"),s[i].sansCase=a(s[i].fFamily,"sans-serif"),s[i].fPath){if("p"===s[i].fOrigin||3===s[i].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+s[i].fFamily+'"], style[f-origin="3"][f-family="'+s[i].fFamily+'"]')).length>0&&(f=!1),f){var u=r("style");u.setAttribute("f-forigin",s[i].fOrigin),u.setAttribute("f-origin",s[i].origin),u.setAttribute("f-family",s[i].fFamily),u.type="text/css",u.innerText="@font-face {font-family: "+s[i].fFamily+"; font-style: normal; src: url('"+s[i].fPath+"');}",e.appendChild(u)}}else if("g"===s[i].fOrigin||1===s[i].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;p<l.length;p+=1)-1!==l[p].href.indexOf(s[i].fPath)&&(f=!1);if(f){var c=r("link");c.setAttribute("f-forigin",s[i].fOrigin),c.setAttribute("f-origin",s[i].origin),c.type="text/css",c.rel="stylesheet",c.href=s[i].fPath,document.body.appendChild(c)}}else if("t"===s[i].fOrigin||2===s[i].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),p=0;p<l.length;p+=1)s[i].fPath===l[p].src&&(f=!1);if(f){var m=r("link");m.setAttribute("f-forigin",s[i].fOrigin),m.setAttribute("f-origin",s[i].origin),m.setAttribute("rel","stylesheet"),m.setAttribute("href",s[i].fPath),e.appendChild(m)}}}else s[i].loaded=!0,h-=1;s[i].helper=n(e,s[i]),s[i].cache={},this.fonts.push(s[i])}0===h?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,i,s){for(var r=0,a=this.chars.length;r<a;){if(this.chars[r].ch===e&&this.chars[r].style===i&&this.chars[r].fFamily===s)return this.chars[r];r+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,i,s)),t},getFontByName:function(t){for(var e=0,i=this.fonts.length;e<i;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,i){var s=this.getFontByName(e),r=t.charCodeAt(0);if(!s.cache[r+1]){var a=s.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();s.cache[r+1]=(n-o)/100}else a.textContent=t,s.cache[r+1]=a.getComputedTextLength()/100}return s.cache[r+1]*i},checkLoadedFonts:function(){var t,e,i,s=this.fonts.length,r=s;for(t=0;t<s;t+=1)this.fonts[t].loaded?r-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,e.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,e.offsetWidth!==i&&(r-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==r&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return o.prototype=h,o}();function Vt(){}Vt.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var Ot,zt=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var i,s=p(e.viewData.length),r=e.viewData.length;for(i=0;i<r;i+=1)s[i]=new t(e.viewData[i],e.masksProperties[i]);return function(t){for(i=0;i<r;){if(e.masksProperties[i].nm===t)return s[i];i+=1}return null}}}(),Bt=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function i(t,e,i){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(s){if(!t.numKeys)return 0;var r="";r="s"in e.keyframes[s-1]?e.keyframes[s-1].s:"e"in e.keyframes[s-2]?e.keyframes[s-2].e:e.keyframes[s-2].s;var a="unidimensional"===i?new Number(r):Object.assign({},r);return a.time=e.keyframes[s-1].t/e.elem.comp.globalData.frameRate,a.value="unidimensional"===i?r[0]:r,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function s(){return t}return function(r){return r?"unidimensional"===r.propType?function(e){e&&"pv"in e||(e=t);var s=1/e.mult,r=e.pv*s,a=new Number(r);return a.value=r,i(a,e,"unidimensional"),function(){return e.k&&e.getValue(),r=e.v*s,a.value!==r&&((a=new Number(r)).value=r,i(a,e,"unidimensional")),a}}(r):function(t){t&&"pv"in t||(t=e);var s=1/t.mult,r=t.data&&t.data.l||t.pv.length,a=l("float32",r),n=l("float32",r);return a.value=n,i(a,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<r;e+=1)n[e]=t.v[e]*s,a[e]=n[e];return a}}(r):s}}(),Nt=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var i,s,r,a;return Object.defineProperty(e,"rotation",{get:Bt(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:Bt(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:Bt(t.rx)}),Object.defineProperty(e,"yRotation",{get:Bt(t.ry)}),Object.defineProperty(e,"scale",{get:Bt(t.s)}),t.p?a=Bt(t.p):(i=Bt(t.px),s=Bt(t.py),t.pz&&(r=Bt(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[i(),s(),r?r():0]}}),Object.defineProperty(e,"xPosition",{get:Bt(t.px)}),Object.defineProperty(e,"yPosition",{get:Bt(t.py)}),Object.defineProperty(e,"zPosition",{get:Bt(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:Bt(t.a)}),Object.defineProperty(e,"opacity",{get:Bt(t.o)}),Object.defineProperty(e,"skew",{get:Bt(t.sk)}),Object.defineProperty(e,"skewAxis",{get:Bt(t.sa)}),Object.defineProperty(e,"orientation",{get:Bt(t.or)}),e},Gt=function(){function t(t){var e=new bt;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.applyPoint(i,t)}function i(t,e){var i=this.getMatrix(e);return this.applyPoint(i,t)}function s(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.invertPoint(i,t)}function r(t,e){var i=this.getMatrix(e);return this.invertPoint(i,t)}function a(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,s=this._elem.hierarchy.length;for(i=0;i<s;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function o(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,s=this._elem.hierarchy.length;for(i=0;i<s;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function h(t){var e=new bt;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,s=this._elem.hierarchy.length;for(i=0;i<s;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function l(){return[1,1,1,1]}return function(p){var f;function u(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return u.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return f;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return u.effect;case"ADBE Text Properties":return u.textInterface;default:return null}}u.getMatrix=t,u.invertPoint=o,u.applyPoint=a,u.toWorld=i,u.toWorldVec=e,u.fromWorld=r,u.fromWorldVec=s,u.toComp=i,u.fromComp=h,u.sampleImage=l,u.sourceRectAtTime=p.sourceRectAtTime.bind(p),u._elem=p;var c=n(f=Nt(p.finalTransform.mProp),"anchorPoint");return Object.defineProperties(u,{hasParent:{get:function(){return p.hierarchy.length}},parent:{get:function(){return p.hierarchy[0].layerInterface}},rotation:n(f,"rotation"),scale:n(f,"scale"),position:n(f,"position"),opacity:n(f,"opacity"),anchorPoint:c,anchor_point:c,transform:{get:function(){return f}},active:{get:function(){return p.isInRange}}}),u.startTime=p.data.st,u.index=p.data.ind,u.source=p.data.refId,u.height=0===p.data.ty?p.data.h:100,u.width=0===p.data.ty?p.data.w:100,u.inPoint=p.data.ip/p.comp.globalData.frameRate,u.outPoint=p.data.op/p.comp.globalData.frameRate,u._name=p.data.nm,u.registerMaskInterface=function(t){u.mask=new zt(t,p)},u.registerEffectsInterface=function(t){u.effect=t},u}}(),jt=function(t,e){return function(i){return(i=void 0===i?1:i)<=0?t:e(i-1)}},qt=function(t,e){var i={_name:t};return function(t){return(t=void 0===t?1:t)<=0?i:e(t-1)}},Wt=function(){function t(i,s,r,a){function n(t){for(var e=i.ef,s=0,r=e.length;s<r;){if(t===e[s].nm||t===e[s].mn||t===e[s].ix)return 5===e[s].ty?l[s]:l[s]();s+=1}throw new Error}var o,h=jt(n,r),l=[],p=i.ef.length;for(o=0;o<p;o+=1)5===i.ef[o].ty?l.push(t(i.ef[o],s.effectElements[o],s.effectElements[o].propertyGroup,a)):l.push(e(s.effectElements[o],i.ef[o].ty,a,h));return"ADBE Color Control"===i.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return i.np}},_name:{value:i.nm},propertyGroup:{value:h}}),n.enabled=0!==i.en,n.active=n.enabled,n}function e(t,e,i,s){var r=Bt(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(qt("",s)),function(){return 10===e?i.comp.compInterface(t.p.v):r()}}return{createEffectsInterface:function(e,i){if(e.effectsManager){var s,r=[],a=e.data.ef,n=e.effectsManager.effectElements.length;for(s=0;s<n;s+=1)r.push(t(a[s],e.effectsManager.effectElements[s],i,e));var o=e.data.ef||[],h=function(t){for(s=0,n=o.length;s<n;){if(t===o[s].nm||t===o[s].mn||t===o[s].ix)return r[s];s+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),Xt=function(t){function e(e){for(var i=0,s=t.layers.length;i<s;){if(t.layers[i].nm===e||t.layers[i].ind===e)return t.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},Yt=function(t,e,i){var s=e.sh;function r(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?r.path:null}var a=jt(r,i);return s.setGroupProperty(qt("Path",a)),Object.defineProperties(r,{path:{get:function(){return s.k&&s.getValue(),s}},shape:{get:function(){return s.k&&s.getValue(),s}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:i}}),r},Ht=function(){function t(t,o,c){var m,d=[],g=t?t.length:0;for(m=0;m<g;m+=1)"gr"===t[m].ty?d.push(e(t[m],o[m],c)):"fl"===t[m].ty?d.push(i(t[m],o[m],c)):"st"===t[m].ty?d.push(a(t[m],o[m],c)):"tm"===t[m].ty?d.push(n(t[m],o[m],c)):"tr"===t[m].ty||("el"===t[m].ty?d.push(h(t[m],o[m],c)):"sr"===t[m].ty?d.push(l(t[m],o[m],c)):"sh"===t[m].ty?d.push(Yt(t[m],o[m],c)):"rc"===t[m].ty?d.push(p(t[m],o[m],c)):"rd"===t[m].ty?d.push(f(t[m],o[m],c)):"rp"===t[m].ty?d.push(u(t[m],o[m],c)):"gf"===t[m].ty?d.push(s(t[m],o[m],c)):d.push(r(t[m],o[m])));return d}function e(e,i,s){var r=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=jt(r,s);var a=function(e,i,s){var r,a=function(t){for(var e=0,i=r.length;e<i;){if(r[e]._name===t||r[e].mn===t||r[e].propertyIndex===t||r[e].ix===t||r[e].ind===t)return r[e];e+=1}return"number"==typeof t?r[t-1]:null};a.propertyGroup=jt(a,s),r=t(e.it,i.it,a.propertyGroup),a.numProperties=r.length;var n=o(e.it[e.it.length-1],i.it[i.it.length-1],a.propertyGroup);return a.transform=n,a.propertyIndex=e.cix,a._name=e.nm,a}(e,i,r.propertyGroup),n=o(e.it[e.it.length-1],i.it[i.it.length-1],r.propertyGroup);return r.content=a,r.transform=n,Object.defineProperty(r,"_name",{get:function(){return e.nm}}),r.numProperties=e.np,r.propertyIndex=e.ix,r.nm=e.nm,r.mn=e.mn,r}function i(t,e,i){function s(t){return"Color"===t||"color"===t?s.color:"Opacity"===t||"opacity"===t?s.opacity:null}return Object.defineProperties(s,{color:{get:Bt(e.c)},opacity:{get:Bt(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(qt("Color",i)),e.o.setGroupProperty(qt("Opacity",i)),s}function s(t,e,i){function s(t){return"Start Point"===t||"start point"===t?s.startPoint:"End Point"===t||"end point"===t?s.endPoint:"Opacity"===t||"opacity"===t?s.opacity:null}return Object.defineProperties(s,{startPoint:{get:Bt(e.s)},endPoint:{get:Bt(e.e)},opacity:{get:Bt(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(qt("Start Point",i)),e.e.setGroupProperty(qt("End Point",i)),e.o.setGroupProperty(qt("Opacity",i)),s}function r(){return function(){return null}}function a(t,e,i){var s,r=jt(l,i),a=jt(h,r);function n(i){Object.defineProperty(h,t.d[i].nm,{get:Bt(e.d.dataProps[i].p)})}var o=t.d?t.d.length:0,h={};for(s=0;s<o;s+=1)n(s),e.d.dataProps[s].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:Bt(e.c)},opacity:{get:Bt(e.o)},strokeWidth:{get:Bt(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(qt("Color",r)),e.o.setGroupProperty(qt("Opacity",r)),e.w.setGroupProperty(qt("Stroke Width",r)),l}function n(t,e,i){function s(e){return e===t.e.ix||"End"===e||"end"===e?s.end:e===t.s.ix?s.start:e===t.o.ix?s.offset:null}var r=jt(s,i);return s.propertyIndex=t.ix,e.s.setGroupProperty(qt("Start",r)),e.e.setGroupProperty(qt("End",r)),e.o.setGroupProperty(qt("Offset",r)),s.propertyIndex=t.ix,s.propertyGroup=i,Object.defineProperties(s,{start:{get:Bt(e.s)},end:{get:Bt(e.e)},offset:{get:Bt(e.o)},_name:{value:t.nm}}),s.mn=t.mn,s}function o(t,e,i){function s(e){return t.a.ix===e||"Anchor Point"===e?s.anchorPoint:t.o.ix===e||"Opacity"===e?s.opacity:t.p.ix===e||"Position"===e?s.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?s.rotation:t.s.ix===e||"Scale"===e?s.scale:t.sk&&t.sk.ix===e||"Skew"===e?s.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?s.skewAxis:null}var r=jt(s,i);return e.transform.mProps.o.setGroupProperty(qt("Opacity",r)),e.transform.mProps.p.setGroupProperty(qt("Position",r)),e.transform.mProps.a.setGroupProperty(qt("Anchor Point",r)),e.transform.mProps.s.setGroupProperty(qt("Scale",r)),e.transform.mProps.r.setGroupProperty(qt("Rotation",r)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(qt("Skew",r)),e.transform.mProps.sa.setGroupProperty(qt("Skew Angle",r))),e.transform.op.setGroupProperty(qt("Opacity",r)),Object.defineProperties(s,{opacity:{get:Bt(e.transform.mProps.o)},position:{get:Bt(e.transform.mProps.p)},anchorPoint:{get:Bt(e.transform.mProps.a)},scale:{get:Bt(e.transform.mProps.s)},rotation:{get:Bt(e.transform.mProps.r)},skew:{get:Bt(e.transform.mProps.sk)},skewAxis:{get:Bt(e.transform.mProps.sa)},_name:{value:t.nm}}),s.ty="tr",s.mn=t.mn,s.propertyGroup=i,s}function h(t,e,i){function s(e){return t.p.ix===e?s.position:t.s.ix===e?s.size:null}var r=jt(s,i);s.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(qt("Size",r)),a.p.setGroupProperty(qt("Position",r)),Object.defineProperties(s,{size:{get:Bt(a.s)},position:{get:Bt(a.p)},_name:{value:t.nm}}),s.mn=t.mn,s}function l(t,e,i){function s(e){return t.p.ix===e?s.position:t.r.ix===e?s.rotation:t.pt.ix===e?s.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?s.outerRadius:t.os.ix===e?s.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?s.innerRoundness:null:s.innerRadius}var r=jt(s,i),a="tm"===e.sh.ty?e.sh.prop:e.sh;return s.propertyIndex=t.ix,a.or.setGroupProperty(qt("Outer Radius",r)),a.os.setGroupProperty(qt("Outer Roundness",r)),a.pt.setGroupProperty(qt("Points",r)),a.p.setGroupProperty(qt("Position",r)),a.r.setGroupProperty(qt("Rotation",r)),t.ir&&(a.ir.setGroupProperty(qt("Inner Radius",r)),a.is.setGroupProperty(qt("Inner Roundness",r))),Object.defineProperties(s,{position:{get:Bt(a.p)},rotation:{get:Bt(a.r)},points:{get:Bt(a.pt)},outerRadius:{get:Bt(a.or)},outerRoundness:{get:Bt(a.os)},innerRadius:{get:Bt(a.ir)},innerRoundness:{get:Bt(a.is)},_name:{value:t.nm}}),s.mn=t.mn,s}function p(t,e,i){function s(e){return t.p.ix===e?s.position:t.r.ix===e?s.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?s.size:null}var r=jt(s,i),a="tm"===e.sh.ty?e.sh.prop:e.sh;return s.propertyIndex=t.ix,a.p.setGroupProperty(qt("Position",r)),a.s.setGroupProperty(qt("Size",r)),a.r.setGroupProperty(qt("Rotation",r)),Object.defineProperties(s,{position:{get:Bt(a.p)},roundness:{get:Bt(a.r)},size:{get:Bt(a.s)},_name:{value:t.nm}}),s.mn=t.mn,s}function f(t,e,i){function s(e){return t.r.ix===e||"Round Corners 1"===e?s.radius:null}var r=jt(s,i),a=e;return s.propertyIndex=t.ix,a.rd.setGroupProperty(qt("Radius",r)),Object.defineProperties(s,{radius:{get:Bt(a.rd)},_name:{value:t.nm}}),s.mn=t.mn,s}function u(t,e,i){function s(e){return t.c.ix===e||"Copies"===e?s.copies:t.o.ix===e||"Offset"===e?s.offset:null}var r=jt(s,i),a=e;return s.propertyIndex=t.ix,a.c.setGroupProperty(qt("Copies",r)),a.o.setGroupProperty(qt("Offset",r)),Object.defineProperties(s,{copies:{get:Bt(a.c)},offset:{get:Bt(a.o)},_name:{value:t.nm}}),s.mn=t.mn,s}return function(e,i,s){var r;function a(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?s:r[t-1];for(var e=0,i=r.length;e<i;){if(r[e]._name===t)return r[e];e+=1}return null}return a.propertyGroup=jt(a,(function(){return s})),r=t(e,i,a.propertyGroup),a.numProperties=r.length,a._name="Contents",a}}(),Kt=function(t){var e,i;function s(t){return"ADBE Text Document"===t?s.sourceText:null}return Object.defineProperty(s,"sourceText",{get:function(){t.textProperty.getValue();var s=t.textProperty.currentData.t;return s!==e&&(t.textProperty.currentData.t=e,(i=new String(s)).value=s||new String(s)),i}}),s},Jt=(Ot={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Ot[t]||""});function Ut(t,e,i){this.p=nt.getProp(e,t.v,0,0,i)}function Zt(t,e,i){this.p=nt.getProp(e,t.v,0,0,i)}function Qt(t,e,i){this.p=nt.getProp(e,t.v,1,0,i)}function $t(t,e,i){this.p=nt.getProp(e,t.v,1,0,i)}function te(t,e,i){this.p=nt.getProp(e,t.v,0,0,i)}function ee(t,e,i){this.p=nt.getProp(e,t.v,0,0,i)}function ie(t,e,i){this.p=nt.getProp(e,t.v,0,0,i)}function se(){this.p={}}function re(t,e){var i,s=t.ef||[];this.effectElements=[];var r,a=s.length;for(i=0;i<a;i+=1)r=new ae(s[i],e),this.effectElements.push(r)}function ae(t,e){this.init(t,e)}function ne(){}function oe(){}function he(t){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(t)}a([ot],ae),ae.prototype.getValue=ae.prototype.iterateDynamicProperties,ae.prototype.init=function(t,e){var i;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var s,r=this.data.ef.length,a=this.data.ef;for(i=0;i<r;i+=1){switch(s=null,a[i].ty){case 0:s=new Ut(a[i],e,this);break;case 1:s=new Zt(a[i],e,this);break;case 2:s=new Qt(a[i],e,this);break;case 3:s=new $t(a[i],e,this);break;case 4:case 7:s=new ie(a[i],e,this);break;case 10:s=new te(a[i],e,this);break;case 11:s=new ee(a[i],e,this);break;case 5:s=new re(a[i],e,this);break;default:s=new se(a[i],e,this)}s&&this.effectElements.push(s)}},ne.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=Gt(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=Wt.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=Xt(this):4===this.data.ty?(this.layerInterface.shapeInterface=Ht(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=Kt(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=Jt(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId=I(),this.data.sr||(this.data.sr=1),this.effectsManager=new re(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},oe.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var i,s=this.dynamicProperties.length;for(i=0;i<s;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var le,pe=(le=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",i=t.getFootageData();function s(t){if(i[t])return e=t,"object"===he(i=i[t])?s:i;var r=t.indexOf(e);if(-1!==r){var a=parseInt(t.substr(r+e.length),10);return"object"===he(i=i[a])?s:i}return""}return function(){return e="",i=t.getFootageData(),s}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=le(t),e});function fe(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,i)}function ue(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,i),this._isPlaying=!1,this._canPlay=!1;var s=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(s),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?nt.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function ce(){}function me(){}function de(t,e,i){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r,a,n=this.globalData.defs,o=this.masksProperties?this.masksProperties.length:0;this.viewData=p(o),this.solidPath="";var h,l,f,u,c,m,d=this.masksProperties,g=0,y=[],v=I(),b="clipPath",_="clip-path";for(r=0;r<o;r+=1)if(("a"!==d[r].mode&&"n"!==d[r].mode||d[r].inv||100!==d[r].o.k||d[r].o.x)&&(b="mask",_="mask"),"s"!==d[r].mode&&"i"!==d[r].mode||0!==g?f=null:((f=q("rect")).setAttribute("fill","#ffffff"),f.setAttribute("width",this.element.comp.data.w||0),f.setAttribute("height",this.element.comp.data.h||0),y.push(f)),a=q("path"),"n"===d[r].mode)this.viewData[r]={op:nt.getProp(this.element,d[r].o,0,.01,this.element),prop:vt.getShapeProp(this.element,d[r],3),elem:a,lastPath:""},n.appendChild(a);else{var k;if(g+=1,a.setAttribute("fill","s"===d[r].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==d[r].x.k?(b="mask",_="mask",m=nt.getProp(this.element,d[r].x,0,null,this.element),k=I(),(u=q("filter")).setAttribute("id",k),(c=q("feMorphology")).setAttribute("operator","erode"),c.setAttribute("in","SourceGraphic"),c.setAttribute("radius","0"),u.appendChild(c),n.appendChild(u),a.setAttribute("stroke","s"===d[r].mode?"#000000":"#ffffff")):(c=null,m=null),this.storedData[r]={elem:a,x:m,expan:c,lastPath:"",lastOperator:"",filterId:k,lastRadius:0},"i"===d[r].mode){l=y.length;var P=q("g");for(h=0;h<l;h+=1)P.appendChild(y[h]);var A=q("mask");A.setAttribute("mask-type","alpha"),A.setAttribute("id",v+"_"+g),A.appendChild(a),n.appendChild(A),P.setAttribute("mask","url("+s()+"#"+v+"_"+g+")"),y.length=0,y.push(P)}else y.push(a);d[r].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[r]={elem:a,lastPath:"",op:nt.getProp(this.element,d[r].o,0,.01,this.element),prop:vt.getShapeProp(this.element,d[r],3),invRect:f},this.viewData[r].prop.k||this.drawPath(d[r],this.viewData[r].prop.v,this.viewData[r])}for(this.maskElement=q(b),o=y.length,r=0;r<o;r+=1)this.maskElement.appendChild(y[r]);g>0&&(this.maskElement.setAttribute("id",v),this.element.maskedElement.setAttribute(_,"url("+s()+"#"+v+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}fe.prototype.prepareFrame=function(){},a([Vt,ne,oe],fe),fe.prototype.getBaseElement=function(){return null},fe.prototype.renderFrame=function(){},fe.prototype.destroy=function(){},fe.prototype.initExpressions=function(){this.layerInterface=pe(this)},fe.prototype.getFootageData=function(){return this.footageData},ue.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},a([Vt,ne,oe],ue),ue.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},ue.prototype.show=function(){},ue.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},ue.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},ue.prototype.resume=function(){this._canPlay=!0},ue.prototype.setRate=function(t){this.audio.rate(t)},ue.prototype.volume=function(t){this.audio.volume(t)},ue.prototype.getBaseElement=function(){return null},ue.prototype.destroy=function(){},ue.prototype.sourceRectAtTime=function(){},ue.prototype.initExpressions=function(){},ce.prototype.checkLayers=function(t){var e,i,s=this.layers.length;for(this.completeLayers=!0,e=s-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},ce.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},ce.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},ce.prototype.createAudio=function(t){return new ue(t,this.globalData,this)},ce.prototype.createFootage=function(t){return new fe(t,this.globalData,this)},ce.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},ce.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var i,s=t.length,r=this.layers.length;for(e=0;e<s;e+=1)for(i=0;i<r;){if(this.layers[i].id===t[e].id){this.layers[i]=t[e];break}i+=1}},ce.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},ce.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},ce.prototype.buildElementParenting=function(t,e,i){for(var s=this.elements,r=this.layers,a=0,n=r.length;a<n;)r[a].ind==e&&(s[a]&&!0!==s[a]?(i.push(s[a]),s[a].setAsParent(),void 0!==r[a].parent?this.buildElementParenting(t,r[a].parent,i):t.setHierarchy(i)):(this.buildItem(a),this.addPendingElement(t))),a+=1},ce.prototype.addPendingElement=function(t){this.pendingElements.push(t)},ce.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;e<i;e+=1)if(t[e].xt){var s=this.createComp(t[e]);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},ce.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new Rt,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},me.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?Ft.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new bt},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,s=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<s;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;i<s;i+=1)t=this.hierarchy[i].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i,s=!0,r=this.comp;s;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):s=!1;var a,n=e.length;for(i=0;i<n;i+=1)a=e[i].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new bt},de.prototype.getMaskProperty=function(t){return this.viewData[t].prop},de.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,r=this.masksProperties.length;for(e=0;e<r;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+s()+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},de.prototype.getMaskelement=function(){return this.maskElement},de.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},de.prototype.drawPath=function(t,e,i){var s,r,a=" M"+e.v[0][0]+","+e.v[0][1];for(r=e._length,s=1;s<r;s+=1)a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[s][0]+","+e.i[s][1]+" "+e.v[s][0]+","+e.v[s][1];if(e.c&&r>1&&(a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},de.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var ge=function(){var t={};return t.createFilter=function(t,e){var i=q("filter");i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},t.createAlphaToLuminanceFilter=function(){var t=q("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),ye=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function ve(t,e){this.filterManager=e;var i=q("feColorMatrix");if(i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i),(i=q("feColorMatrix")).setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result","f2"),t.appendChild(i),this.matrixFilter=i,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var s,r=q("feMerge");t.appendChild(r),(s=q("feMergeNode")).setAttribute("in","SourceGraphic"),r.appendChild(s),(s=q("feMergeNode")).setAttribute("in","f2"),r.appendChild(s)}}function be(t,e){this.filterManager=e;var i=q("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(i),this.matrixFilter=i}function _e(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function ke(t,e){this.filterManager=e;var i=q("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i);var s=q("feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.matrixFilter=s;var r=q("feFuncR");r.setAttribute("type","table"),s.appendChild(r),this.feFuncR=r;var a=q("feFuncG");a.setAttribute("type","table"),s.appendChild(a),this.feFuncG=a;var n=q("feFuncB");n.setAttribute("type","table"),s.appendChild(n),this.feFuncB=n}function Pe(t,e){this.filterManager=e;var i=this.filterManager.effectElements,s=q("feComponentTransfer");(i[10].p.k||0!==i[10].p.v||i[11].p.k||1!==i[11].p.v||i[12].p.k||1!==i[12].p.v||i[13].p.k||0!==i[13].p.v||i[14].p.k||1!==i[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(i[17].p.k||0!==i[17].p.v||i[18].p.k||1!==i[18].p.v||i[19].p.k||1!==i[19].p.v||i[20].p.k||0!==i[20].p.v||i[21].p.k||1!==i[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(i[24].p.k||0!==i[24].p.v||i[25].p.k||1!==i[25].p.v||i[26].p.k||1!==i[26].p.v||i[27].p.k||0!==i[27].p.v||i[28].p.k||1!==i[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(i[31].p.k||0!==i[31].p.v||i[32].p.k||1!==i[32].p.v||i[33].p.k||1!==i[33].p.v||i[34].p.k||0!==i[34].p.v||i[35].p.k||1!==i[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),s=q("feComponentTransfer")),(i[3].p.k||0!==i[3].p.v||i[4].p.k||1!==i[4].p.v||i[5].p.k||1!==i[5].p.v||i[6].p.k||0!==i[6].p.v||i[7].p.k||1!==i[7].p.v)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function Ae(t,e){var i=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",i.x),t.setAttribute("y",i.y),t.setAttribute("width",i.width),t.setAttribute("height",i.height),this.filterManager=e;var s=q("feGaussianBlur");s.setAttribute("in","SourceAlpha"),s.setAttribute("result","drop_shadow_1"),s.setAttribute("stdDeviation","0"),this.feGaussianBlur=s,t.appendChild(s);var r=q("feOffset");r.setAttribute("dx","25"),r.setAttribute("dy","0"),r.setAttribute("in","drop_shadow_1"),r.setAttribute("result","drop_shadow_2"),this.feOffset=r,t.appendChild(r);var a=q("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=q("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=q("feMerge");t.appendChild(h),o=q("feMergeNode"),h.appendChild(o),(o=q("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}ve.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},be.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},_e.prototype.initialize=function(){var t,e,i,r,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(r=this.elem.maskManager.masksProperties.length,i=0):r=(i=this.filterManager.effectElements[0].p.v-1)+1,(e=q("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);i<r;i+=1)t=q("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var n=q("mask"),o=I();n.setAttribute("id",o),n.setAttribute("mask-type","alpha"),n.appendChild(e),this.elem.globalData.defs.appendChild(n);var h=q("g");for(h.setAttribute("mask","url("+s()+"#"+o+")");a[0];)h.appendChild(a[0]);this.elem.layerElement.appendChild(h),this.masker=n,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},_e.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var i,s,r=this.paths.length;for(e=0;e<r;e+=1)if(-1!==this.paths[e].m&&(i=this.elem.maskManager.viewData[this.paths[e].m],s=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&s.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=s.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,u=Math.floor(p/f);for(l=0;l<u;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;s.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+v(255*c[0])+","+v(255*c[1])+","+v(255*c[2])+")")}},ke.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v,r=s[0]+" "+i[0]+" "+e[0],a=s[1]+" "+i[1]+" "+e[1],n=s[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},Pe.prototype.createFeFunc=function(t,e){var i=q(t);return i.setAttribute("type","table"),e.appendChild(i),i},Pe.prototype.getTableValue=function(t,e,i,s,r){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,u=r-s,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?r:s:a>=l?c<0?s:r:s+u*Math.pow((a-t)/c,1/i),p[f]=n,f+=1,o+=256/255;return p.join(" ")},Pe.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},Ae.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",B(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*P,r=i*Math.cos(s),a=i*Math.sin(s);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",a)}}};var xe=[];function Se(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=q("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function Ce(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var i=q("feGaussianBlur");t.appendChild(i),this.feGaussianBlur=i}Se.prototype.findSymbol=function(t){for(var e=0,i=xe.length;e<i;){if(xe[e]===t)return xe[e];e+=1}return null},Se.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var s,r=i.children,a=0,n=r.length;a<n&&r[a]!==t.layerElement;)a+=1;a<=n-2&&(s=r[a+1]);var o=q("use");o.setAttribute("href","#"+e),s?i.insertBefore(o,s):i.appendChild(o)}},Se.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i=I(),s=q("mask");s.setAttribute("id",e.layerId),s.setAttribute("mask-type","alpha"),xe.push(e);var r=t.globalData.defs;r.appendChild(s);var a=q("symbol");a.setAttribute("id",i),this.replaceInParent(e,i),a.appendChild(e.layerElement),r.appendChild(a);var n=q("use");n.setAttribute("href","#"+i),s.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},Se.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,i=0,s=e.length;i<s;)e[i]&&e[i].data.ind===t&&this.setElementAsMask(this.elem,e[i]),i+=1;this.initialized=!0},Se.prototype.renderFrame=function(){this.initialized||this.initialize()},Ce.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=3==i?0:e,r=2==i?0:e;this.feGaussianBlur.setAttribute("stdDeviation",s+" "+r);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}};var De={};function we(t){var e,i,r=t.data.ef?t.data.ef.length:0,a=I(),n=ge.createFilter(a,!0),o=0;for(this.filters=[],e=0;e<r;e+=1){i=null;var h=t.data.ef[e].ty;if(De[h])i=new(0,De[h].effect)(n,t.effectsManager.effectElements[e],t),De[h].countsAsEffect&&(o+=1);20===t.data.ef[e].ty?(o+=1,i=new ve(n,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(o+=1,i=new be(n,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?i=new _e(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(o+=1,i=new ke(n,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(o+=1,i=new Pe(n,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(o+=1,i=new Ae(n,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?i=new Se(n,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(o+=1,i=new Ce(n,t.effectsManager.effectElements[e])),i&&this.filters.push(i)}o&&(t.globalData.defs.appendChild(n),t.layerElement.setAttribute("filter","url("+s()+"#"+a+")")),this.filters.length&&t.addRenderableComponent(this)}function Me(){}function Ee(){}function Fe(){}function Te(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function Ie(t,e){this.elem=t,this.pos=e}function Le(){}we.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)},Me.prototype={initRendererElement:function(){this.layerElement=q("g")},createContainerElements:function(){this.matteElement=q("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,r=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=q("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),r=a,this.globalData.defs.appendChild(a),ye.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=I(),e=ge.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(ge.createAlphaToLuminanceFilter()),(i=q("g")).appendChild(this.layerElement),r=i,a.appendChild(i),i.setAttribute("filter","url("+s()+"#"+t+")"))}else if(2==this.data.td){var n=q("mask");n.setAttribute("id",this.layerId),n.setAttribute("mask-type","alpha");var o=q("g");n.appendChild(o),t=I(),e=ge.createFilter(t);var h=q("feComponentTransfer");h.setAttribute("in","SourceGraphic"),e.appendChild(h);var l=q("feFuncA");l.setAttribute("type","table"),l.setAttribute("tableValues","1.0 0.0"),h.appendChild(l),this.globalData.defs.appendChild(e);var p=q("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),o.setAttribute("filter","url("+s()+"#"+t+")"),o.appendChild(p),o.appendChild(this.layerElement),r=o,ye.maskType||(n.setAttribute("mask-type","luminance"),e.appendChild(ge.createAlphaToLuminanceFilter()),i=q("g"),o.appendChild(p),i.appendChild(this.layerElement),r=i,o.appendChild(i)),this.globalData.defs.appendChild(n)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var f=q("clipPath"),u=q("path");u.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var c=I();if(f.setAttribute("id",c),f.appendChild(u),this.globalData.defs.appendChild(f),this.checkMasks()){var m=q("g");m.setAttribute("clip-path","url("+s()+"#"+c+")"),m.appendChild(this.layerElement),this.transformedElement=m,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+s()+"#"+c+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new de(this.data,this,this.globalData),this.renderableEffectsManager=new we(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+s()+"#"+t+")")}},Ee.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},a([Vt,o({initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],Fe),a([ne,me,Me,Ee,oe,Fe],Te),Te.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=q("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},Te.prototype.sourceRectAtTime=function(){return this.sourceRect},Le.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;e<i;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,s=e.length;i<s;){if(e[i].elem===t)return e[i].pos;i+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements,s=i.length;s;)if(i[s-=1].elem===t)return void(i[s].pos=e);i.push(new Ie(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var Re={1:"butt",2:"round",3:"square"},Ve={1:"miter",2:"round",3:"bevel"};function Oe(t,e,i){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=i,this.lvl=e,this._isAnimated=!!i.k;for(var s=0,r=t.length;s<r;){if(t[s].mProps.dynamicProperties.length){this._isAnimated=!0;break}s+=1}}function ze(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=q("path"),this.msElem=null}function Be(t,e,i,s){var r;this.elem=t,this.frameId=-1,this.dataProps=p(e.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=l("float32",e.length?e.length-1:0),this.dashoffset=l("float32",1),this.initDynamicPropertyContainer(s);var a,n=e.length||0;for(r=0;r<n;r+=1)a=nt.getProp(t,e[r].v,0,0,this),this.k=a.k||this.k,this.dataProps[r]={n:e[r].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function Ne(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=nt.getProp(t,e.o,0,.01,this),this.w=nt.getProp(t,e.w,0,null,this),this.d=new Be(t,e.d||{},"svg",this),this.c=nt.getProp(t,e.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}function Ge(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=nt.getProp(t,e.o,0,.01,this),this.c=nt.getProp(t,e.c,1,255,this),this.style=i}function je(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=i}function qe(t,e,i){this.data=e,this.c=l("uint8c",4*e.p);var s=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=l("float32",s),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=s,this.initDynamicPropertyContainer(i),this.prop=nt.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function We(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,i)}function Xe(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=nt.getProp(t,e.w,0,null,this),this.d=new Be(t,e.d||{},"svg",this),this.initGradientData(t,e,i),this._isAnimated=!!this._isAnimated}function Ye(){this.it=[],this.prevViewData=[],this.gr=q("g")}function He(t,e,i){this.transform={mProps:t,op:e,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}Oe.prototype.setAsAnimated=function(){this._isAnimated=!0},ze.prototype.reset=function(){this.d="",this._mdf=!1},Be.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,i=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<i;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},a([ot],Be),a([ot],Ne),a([ot],Ge),a([ot],je),qe.prototype.comparePoints=function(t,e){for(var i=0,s=this.o.length/2;i<s;){if(Math.abs(t[4*i]-t[4*e+2*i])>.01)return!1;i+=1}return!0},qe.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},qe.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,s,r=4*this.data.p;for(e=0;e<r;e+=1)i=e%4==0?100:255,s=Math.round(this.prop.v[e]*i),this.c[e]!==s&&(this.c[e]=s,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=4*this.data.p;e<r;e+=1)i=e%2==0?100:1,s=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==s&&(this.o[e-4*this.data.p]=s,this._omdf=!t);this._mdf=!t}},a([ot],qe),We.prototype.initGradientData=function(t,e,i){this.o=nt.getProp(t,e.o,0,.01,this),this.s=nt.getProp(t,e.s,1,null,this),this.e=nt.getProp(t,e.e,1,null,this),this.h=nt.getProp(t,e.h||{k:0},0,.01,this),this.a=nt.getProp(t,e.a||{k:0},0,P,this),this.g=new qe(t,e.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i),this._isAnimated=!!this._isAnimated},We.prototype.setGradientData=function(t,e){var i=I(),r=q(1===e.t?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var a,n,o,h=[];for(o=4*e.g.p,n=0;n<o;n+=4)a=q("stop"),r.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+s()+"#"+i+")"),this.gf=r,this.cst=h},We.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,a,n=q("mask"),o=q("path");n.appendChild(o);var h=I(),l=I();n.setAttribute("id",l);var p=q(1===t.t?"linearGradient":"radialGradient");p.setAttribute("id",h),p.setAttribute("spreadMethod","pad"),p.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var f=this.stops;for(r=4*t.g.p;r<a;r+=2)(i=q("stop")).setAttribute("stop-color","rgb(255,255,255)"),p.appendChild(i),f.push(i);o.setAttribute("gf"===t.ty?"fill":"stroke","url("+s()+"#"+h+")"),"gs"===t.ty&&(o.setAttribute("stroke-linecap",Re[t.lc||2]),o.setAttribute("stroke-linejoin",Ve[t.lj||2]),1===t.lj&&o.setAttribute("stroke-miterlimit",t.ml)),this.of=p,this.ms=n,this.ost=f,this.maskId=l,e.msElem=o}},a([ot],We),a([We,ot],Xe);var Ke=function(t,e,i,s){if(0===e)return"";var r,a=t.o,n=t.i,o=t.v,h=" M"+s.applyToPointStringified(o[0][0],o[0][1]);for(r=1;r<e;r+=1)h+=" C"+s.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+s.applyToPointStringified(n[r][0],n[r][1])+" "+s.applyToPointStringified(o[r][0],o[r][1]);return i&&e&&(h+=" C"+s.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+s.applyToPointStringified(n[0][0],n[0][1])+" "+s.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},Je=function(){var t=new bt,e=new bt;function i(t,e,i){(i||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(i||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function s(){}function r(i,s,r){var a,n,o,h,l,p,f,u,c,m,d,g=s.styles.length,y=s.lvl;for(p=0;p<g;p+=1){if(h=s.sh._mdf||r,s.styles[p].lvl<y){for(u=e.reset(),m=y-s.styles[p].lvl,d=s.transformers.length-1;!h&&m>0;)h=s.transformers[d].mProps._mdf||h,m-=1,d-=1;if(h)for(m=y-s.styles[p].lvl,d=s.transformers.length-1;m>0;)c=s.transformers[d].mProps.v.props,u.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),m-=1,d-=1}else u=t;if(n=(f=s.sh.paths)._length,h){for(o="",a=0;a<n;a+=1)(l=f.shapes[a])&&l._length&&(o+=Ke(l,l._length,l.c,u));s.caches[p]=o}else o=s.caches[p];s.styles[p].d+=!0===i.hd?"":o,s.styles[p]._mdf=h||s.styles[p]._mdf}}function a(t,e,i){var s=e.style;(e.c._mdf||i)&&s.pElem.setAttribute("fill","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||i)&&s.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,i){o(t,e,i),h(t,e,i)}function o(t,e,i){var s,r,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||i){var u="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(u,e.o.v)}if(e.s._mdf||i){var c=1===t.t?"x1":"cx",m="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(m,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(m,p[1]))}if(e.g._cmdf||i){s=e.cst;var d=e.g.c;for(a=s.length,r=0;r<a;r+=1)(n=s[r]).setAttribute("offset",d[4*r]+"%"),n.setAttribute("stop-color","rgb("+d[4*r+1]+","+d[4*r+2]+","+d[4*r+3]+")")}if(l&&(e.g._omdf||i)){var g=e.g.o;for(a=(s=e.g._collapsable?e.cst:e.ost).length,r=0;r<a;r+=1)n=s[r],e.g._collapsable||n.setAttribute("offset",g[2*r]+"%"),n.setAttribute("stop-opacity",g[2*r+1])}if(1===t.t)(e.e._mdf||i)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||i)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||i){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var y=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,_=Math.cos(y+e.a.v)*b+p[0],k=Math.sin(y+e.a.v)*b+p[1];h.setAttribute("fx",_),h.setAttribute("fy",k),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",k))}}function h(t,e,i){var s=e.style,r=e.d;r&&(r._mdf||i)&&r.dashStr&&(s.pElem.setAttribute("stroke-dasharray",r.dashStr),s.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||i)&&s.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||i)&&s.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(s.pElem.setAttribute("stroke-width",e.w.v),s.msElem&&s.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return r;case"tr":return i;case"no":return s;default:return null}}}}();function Ue(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function Ze(t,e,i,s,r,a){this.o=t,this.sw=e,this.sc=i,this.fc=s,this.m=r,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!s,m:!0,p:!0}}function Qe(t,e){this._frameId=i,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}a([ne,me,Me,Le,Ee,oe,Fe],Ue),Ue.prototype.initSecondaryElement=function(){},Ue.prototype.identityMatrix=new bt,Ue.prototype.buildExpressionInterface=function(){},Ue.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Ue.prototype.filterUniqueShapes=function(){var t,e,i,s,r=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i<a;i+=1){for(s=this.stylesList[i],o=!1,n.length=0,t=0;t<r;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(s)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},Ue.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e].setAsAnimated()},Ue.prototype.createStyleElement=function(t,e){var i,r=new ze(t,e),a=r.pElem;if("st"===t.ty)i=new Ne(this,t,r);else if("fl"===t.ty)i=new Ge(this,t,r);else if("gf"===t.ty||"gs"===t.ty){i=new("gf"===t.ty?We:Xe)(this,t,r),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),a.setAttribute("mask","url("+s()+"#"+i.maskId+")"))}else"no"===t.ty&&(i=new je(this,t,r));return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",Re[t.lc||2]),a.setAttribute("stroke-linejoin",Ve[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=Jt(t.bm)),this.stylesList.push(r),this.addToAnimatedContents(t,i),i},Ue.prototype.createGroupElement=function(t){var e=new Ye;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=Jt(t.bm)),e},Ue.prototype.createTransformElement=function(t,e){var i=Ft.getTransformProperty(this,t,this),s=new He(i,i.o,e);return this.addToAnimatedContents(t,s),s},Ue.prototype.createShapeElement=function(t,e,i){var s=4;"rc"===t.ty?s=5:"el"===t.ty?s=6:"sr"===t.ty&&(s=7);var r=new Oe(e,i,vt.getShapeProp(this,t,s,this));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r},Ue.prototype.addToAnimatedContents=function(t,e){for(var i=0,s=this.animatedContents.length;i<s;){if(this.animatedContents[i].element===e)return;i+=1}this.animatedContents.push({fn:Je.createRenderFunction(t),element:e,data:t})},Ue.prototype.setElementStyles=function(t){var e,i=t.styles,s=this.stylesList.length;for(e=0;e<s;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},Ue.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},Ue.prototype.searchShapes=function(t,e,i,s,r,a,n){var o,h,l,p,f,u,c=[].concat(a),m=t.length-1,d=[],g=[];for(o=m;o>=0;o-=1){if((u=this.searchProcessedElement(t[o]))?e[o]=i[u-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)u?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],r),t[o]._render&&e[o].style.pElem.parentNode!==s&&s.appendChild(e[o].style.pElem),d.push(e[o].style);else if("gr"===t[o].ty){if(u)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,r+1,c,n),t[o]._render&&e[o].gr.parentNode!==s&&s.appendChild(e[o].gr)}else"tr"===t[o].ty?(u||(e[o]=this.createTransformElement(t[o],s)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(u||(e[o]=this.createShapeElement(t[o],c,r)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(u?(f=e[o]).closed=!1:((f=Dt.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===t[o].ty&&(u?(f=e[o]).closed=!0:(f=Dt.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),g.push(f));this.addProcessedElement(t[o],o+1)}for(m=d.length,o=0;o<m;o+=1)d[o].closed=!0;for(m=g.length,o=0;o<m;o+=1)g[o].closed=!0},Ue.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},Ue.prototype.renderShape=function(){var t,e,i=this.animatedContents.length;for(t=0;t<i;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},Ue.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},Ze.prototype.update=function(t,e,i,s,r,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,n=!0),this.fc!==s&&(this.fc=s,this._mdf.fc=!0,n=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,n=!0),n},Qe.prototype.defaultBoxWidth=[0,0],Qe.prototype.copyData=function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Qe.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},Qe.prototype.searchProperty=function(){return this.searchKeyframes()},Qe.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},Qe.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},Qe.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var s;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(s=0;s<r;s+=1)a=i!==this.keysIndex?this.effectsSequence[s](a,a.t):this.effectsSequence[s](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},Qe.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,i=0,s=t.length;i<=s-1&&!(i===s-1||t[i+1].t>e);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},Qe.prototype.buildFinalText=function(t){for(var e,i,s=[],r=0,a=t.length,n=!1;r<a;)e=t.charCodeAt(r),Rt.isCombinedCharacter(e)?s[s.length-1]+=t.charAt(r):e>=55296&&e<=56319?(i=t.charCodeAt(r+1))>=56320&&i<=57343?(n||Rt.isModifier(e,i)?(s[s.length-1]+=t.substr(r,2),n=!1):s.push(t.substr(r,2)),r+=1):s.push(t.charAt(r)):e>56319?(i=t.charCodeAt(r+1),Rt.isZeroWidthJoiner(e,i)?(n=!0,s[s.length-1]+=t.substr(r,2),r+=1):s.push(t.charAt(r))):Rt.isZeroWidthJoiner(e)?(s[s.length-1]+=t.charAt(r),n=!0):s.push(t.charAt(r)),r+=1;return s},Qe.prototype.completeTextData=function(t){t.__complete=!0;var e,i,s,r,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,u=l.m.g,c=0,m=0,d=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,k=Lt(b);t.fWeight=k.weight,t.fStyle=k.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var P,A=t.tr/1e3*t.finalSize;if(t.sz)for(var x,S,C=!0,D=t.sz[0],w=t.sz[1];C;){x=0,y=0,i=(S=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var M=-1;for(e=0;e<i;e+=1)P=S[e].charCodeAt(0),s=!1," "===S[e]?M=e:13!==P&&3!==P||(y=0,s=!0,x+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(S[e],b.fStyle,b.fFamily),_=s?0:o.w*t.finalSize/100):_=h.measureText(S[e],t.f,t.finalSize),y+_>D&&" "!==S[e]?(-1===M?i+=1:e=M,x+=t.finalLineHeight||1.2*t.finalSize,S.splice(e,M===e?1:0,"\r"),M=-1,y=0):(y+=_,y+=A);x+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&w<x?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=S,i=t.finalText.length,C=!1)}y=-A,_=0;var E,F=0;for(e=0;e<i;e+=1)if(s=!1,13===(P=(E=t.finalText[e]).charCodeAt(0))||3===P?(F=0,g.push(y),v=y>v?y:v,y=-2*A,r="",s=!0,d+=1):r=E,h.chars?(o=h.getCharData(E,b.fStyle,h.getFontByName(t.f).fFamily),_=s?0:o.w*t.finalSize/100):_=h.measureText(r,t.f,t.finalSize)," "===E?F+=_+A:(y+=_+A+F,F=0),p.push({l:_,an:_,add:c,n:s,anIndexes:[],val:r,line:d,animatorJustifyOffset:0}),2==u){if(c+=_,""===r||" "===r||e===i-1){for(""!==r&&" "!==r||(c-=_);m<=e;)p[m].an=c,p[m].ind=f,p[m].extra=_,m+=1;f+=1,c=0}}else if(3==u){if(c+=_,""===r||e===i-1){for(""===r&&(c-=_);m<=e;)p[m].an=c,p[m].ind=f,p[m].extra=_,m+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var T,I,L,R,V=l.a;n=V.length;var O=[];for(a=0;a<n;a+=1){for((T=V[a]).a.sc&&(t.strokeColorAnim=!0),T.a.sw&&(t.strokeWidthAnim=!0),(T.a.fc||T.a.fh||T.a.fs||T.a.fb)&&(t.fillColorAnim=!0),R=0,L=T.s.b,e=0;e<i;e+=1)(I=p[e]).anIndexes[a]=R,(1==L&&""!==I.val||2==L&&""!==I.val&&" "!==I.val||3==L&&(I.n||" "==I.val||e==i-1)||4==L&&(I.n||e==i-1))&&(1===T.s.rn&&O.push(R),R+=1);l.a[a].s.totalChars=R;var z,B=-1;if(1===T.s.rn)for(e=0;e<i;e+=1)B!=(I=p[e]).anIndexes[a]&&(B=I.anIndexes[a],z=O.splice(Math.floor(Math.random()*O.length),1)[0]),I.anIndexes[a]=z}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},Qe.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.copyData({},this.data.d.k[e].s);i=this.copyData(i,t),this.data.d.k[e].s=i,this.recalculate(e),this.elem.addDynamicProperty(this)},Qe.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},Qe.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},Qe.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var $e=function(){var t=Math.max,e=Math.min,i=Math.floor;function s(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=nt.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?nt.getProp(t,e.e,0,0,this):{v:100},this.o=nt.getProp(t,e.o||{k:0},0,0,this),this.xe=nt.getProp(t,e.xe||{k:0},0,0,this),this.ne=nt.getProp(t,e.ne||{k:0},0,0,this),this.sm=nt.getProp(t,e.sm||{k:100},0,0,this),this.a=nt.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return s.prototype={getMult:function(s){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var r=0,a=0,n=1,o=1;this.ne.v>0?r=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=tt.getBezierEasing(r,a,n,o).get,l=0,p=this.finalS,f=this.finalE,u=this.data.sh;if(2===u)l=h(l=f===p?s>=f?1:0:t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(3===u)l=h(l=f===p?s>=f?0:1:1-t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(4===u)f===p?l=0:(l=t(0,e(.5/(f-p)+(s-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===u){if(f===p)l=0;else{var c=f-p,m=-c/2+(s=e(t(0,s+.5-p),f-p)),d=c/2;l=Math.sqrt(1-m*m/(d*d))}l=h(l)}else 6===u?(f===p?l=0:(s=e(t(0,s+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*s/(f-p)))/2),l=h(l)):(s>=i(p)&&(l=t(0,e(s-p<0?e(f,1)-(p-s):f-s,1))),l=h(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;l<y?l=0:(l=(l-y)/g)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,s=this.s.v/e+i,r=this.e.v/e+i;if(s>r){var a=s;s=r,r=a}this.finalS=s,this.finalE=r}},a([ot],s),{getTextSelectorProp:function(t,e,i){return new s(t,e,i)}}}();function ti(t,e,i){var s={propType:!1},r=nt.getProp,a=e.a;this.a={r:a.r?r(t,a.r,0,P,i):s,rx:a.rx?r(t,a.rx,0,P,i):s,ry:a.ry?r(t,a.ry,0,P,i):s,sk:a.sk?r(t,a.sk,0,P,i):s,sa:a.sa?r(t,a.sa,0,P,i):s,s:a.s?r(t,a.s,1,.01,i):s,a:a.a?r(t,a.a,1,0,i):s,o:a.o?r(t,a.o,0,.01,i):s,p:a.p?r(t,a.p,1,0,i):s,sw:a.sw?r(t,a.sw,0,0,i):s,sc:a.sc?r(t,a.sc,1,0,i):s,fc:a.fc?r(t,a.fc,1,0,i):s,fh:a.fh?r(t,a.fh,0,0,i):s,fs:a.fs?r(t,a.fs,0,.01,i):s,fb:a.fb?r(t,a.fb,0,.01,i):s,t:a.t?r(t,a.t,0,0,i):s},this.s=$e.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function ei(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=p(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function ii(){}ei.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,s=nt.getProp;for(t=0;t<i;t+=1)e=this._textData.a[t],this._animatorsData[t]=new ti(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this),p:s(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m.a,1,0,this)},ei.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,s,r,a,n,o,h,l,p,f,u,c,m,d,g,y,v,b,_,k=this._moreOptions.alignment.v,P=this._animatorsData,A=this._textData,x=this.mHelper,S=this._renderType,C=this.renderedLetters.length,D=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var w,M=_.v;for(this._pathData.r.v&&(M=M.reverse()),n={tLength:0,segments:[]},a=M._length-1,y=0,r=0;r<a;r+=1)w=at.buildBezierData(M.v[r],M.v[r+1],[M.o[r][0]-M.v[r][0],M.o[r][1]-M.v[r][1]],[M.i[r+1][0]-M.v[r+1][0],M.i[r+1][1]-M.v[r+1][1]]),n.tLength+=w.segmentLength,n.segments.push(w),y+=w.segmentLength;r=a,_.v.c&&(w=at.buildBezierData(M.v[r],M.v[0],[M.o[r][0]-M.v[r][0],M.o[r][1]-M.v[r][1]],[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]),n.tLength+=w.segmentLength,n.segments.push(w),y+=w.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,u=0,f=1,l=0,p=!0,d=n.segments,o<0&&_.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(m=d[u=d.length-1].points).length-1;o<0;)o+=m[f].partialLength,(f-=1)<0&&(f=(m=d[u-=1].points).length-1);c=(m=d[u].points)[f-1],g=(h=m[f]).partialLength}a=D.length,i=0,s=0;var E,F,T,I,L,R=1.2*t.finalSize*.714,B=!0;T=P.length;var N,G,j,q,W,X,Y,H,K,J,U,Z,Q=-1,$=o,tt=u,et=f,it=-1,st="",rt=this.defaultPropsArray;if(2===t.j||1===t.j){var nt=0,ot=0,ht=2===t.j?-.5:-1,lt=0,pt=!0;for(r=0;r<a;r+=1)if(D[r].n){for(nt&&(nt+=ot);lt<r;)D[lt].animatorJustifyOffset=nt,lt+=1;nt=0,pt=!0}else{for(F=0;F<T;F+=1)(E=P[F].a).t.propType&&(pt&&2===t.j&&(ot+=E.t.v*ht),(L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars)).length?nt+=E.t.v*L[0]*ht:nt+=E.t.v*L*ht);pt=!1}for(nt&&(nt+=ot);lt<r;)D[lt].animatorJustifyOffset=nt,lt+=1}for(r=0;r<a;r+=1){if(x.reset(),q=1,D[r].n)i=0,s+=t.yOffset,s+=B?1:0,o=$,B=!1,this._hasMaskedPath&&(f=et,c=(m=d[u=tt].points)[f-1],g=(h=m[f]).partialLength,l=0),st="",U="",K="",Z="",rt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(it!==D[r].line){switch(t.j){case 1:o+=y-t.lineWidths[D[r].line];break;case 2:o+=(y-t.lineWidths[D[r].line])/2}it=D[r].line}Q!==D[r].ind&&(D[Q]&&(o+=D[Q].extra),o+=D[r].an/2,Q=D[r].ind),o+=k[0]*D[r].an*.005;var ft=0;for(F=0;F<T;F+=1)(E=P[F].a).p.propType&&((L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars)).length?ft+=E.p.v[0]*L[0]:ft+=E.p.v[0]*L),E.a.propType&&((L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars)).length?ft+=E.a.v[0]*L[0]:ft+=E.a.v[0]*L);for(p=!0,this._pathData.a.v&&(o=.5*D[0].an+(y-this._pathData.f.v-.5*D[0].an-.5*D[D.length-1].an)*Q/(a-1),o+=this._pathData.f.v);p;)l+g>=o+ft||!m?(v=(o+ft-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,j=c.point[1]+(h.point[1]-c.point[1])*v,x.translate(-k[0]*D[r].an*.005,-k[1]*R*.01),p=!1):m&&(l+=h.partialLength,(f+=1)>=m.length&&(f=0,d[u+=1]?m=d[u].points:_.v.c?(f=0,m=d[u=0].points):(l-=h.partialLength,m=null)),m&&(c=h,g=(h=m[f]).partialLength));N=D[r].an/2-D[r].add,x.translate(-N,0,0)}else N=D[r].an/2-D[r].add,x.translate(-N,0,0),x.translate(-k[0]*D[r].an*.005,-k[1]*R*.01,0);for(F=0;F<T;F+=1)(E=P[F].a).t.propType&&(L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars),0===i&&0===t.j||(this._hasMaskedPath?L.length?o+=E.t.v*L[0]:o+=E.t.v*L:L.length?i+=E.t.v*L[0]:i+=E.t.v*L));for(t.strokeWidthAnim&&(X=t.sw||0),t.strokeColorAnim&&(W=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(Y=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<T;F+=1)(E=P[F].a).a.propType&&((L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars)).length?x.translate(-E.a.v[0]*L[0],-E.a.v[1]*L[1],E.a.v[2]*L[2]):x.translate(-E.a.v[0]*L,-E.a.v[1]*L,E.a.v[2]*L));for(F=0;F<T;F+=1)(E=P[F].a).s.propType&&((L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars)).length?x.scale(1+(E.s.v[0]-1)*L[0],1+(E.s.v[1]-1)*L[1],1):x.scale(1+(E.s.v[0]-1)*L,1+(E.s.v[1]-1)*L,1));for(F=0;F<T;F+=1){if(E=P[F].a,L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars),E.sk.propType&&(L.length?x.skewFromAxis(-E.sk.v*L[0],E.sa.v*L[1]):x.skewFromAxis(-E.sk.v*L,E.sa.v*L)),E.r.propType&&(L.length?x.rotateZ(-E.r.v*L[2]):x.rotateZ(-E.r.v*L)),E.ry.propType&&(L.length?x.rotateY(E.ry.v*L[1]):x.rotateY(E.ry.v*L)),E.rx.propType&&(L.length?x.rotateX(E.rx.v*L[0]):x.rotateX(E.rx.v*L)),E.o.propType&&(L.length?q+=(E.o.v*L[0]-q)*L[0]:q+=(E.o.v*L-q)*L),t.strokeWidthAnim&&E.sw.propType&&(L.length?X+=E.sw.v*L[0]:X+=E.sw.v*L),t.strokeColorAnim&&E.sc.propType)for(H=0;H<3;H+=1)L.length?W[H]+=(E.sc.v[H]-W[H])*L[0]:W[H]+=(E.sc.v[H]-W[H])*L;if(t.fillColorAnim&&t.fc){if(E.fc.propType)for(H=0;H<3;H+=1)L.length?Y[H]+=(E.fc.v[H]-Y[H])*L[0]:Y[H]+=(E.fc.v[H]-Y[H])*L;E.fh.propType&&(Y=L.length?z(Y,E.fh.v*L[0]):z(Y,E.fh.v*L)),E.fs.propType&&(Y=L.length?V(Y,E.fs.v*L[0]):V(Y,E.fs.v*L)),E.fb.propType&&(Y=L.length?O(Y,E.fb.v*L[0]):O(Y,E.fb.v*L))}}for(F=0;F<T;F+=1)(E=P[F].a).p.propType&&(L=P[F].s.getMult(D[r].anIndexes[F],A.a[F].s.totalChars),this._hasMaskedPath?L.length?x.translate(0,E.p.v[1]*L[0],-E.p.v[2]*L[1]):x.translate(0,E.p.v[1]*L,-E.p.v[2]*L):L.length?x.translate(E.p.v[0]*L[0],E.p.v[1]*L[1],-E.p.v[2]*L[2]):x.translate(E.p.v[0]*L,E.p.v[1]*L,-E.p.v[2]*L));if(t.strokeWidthAnim&&(K=X<0?0:X),t.strokeColorAnim&&(J="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),t.fillColorAnim&&t.fc&&(U="rgb("+Math.round(255*Y[0])+","+Math.round(255*Y[1])+","+Math.round(255*Y[2])+")"),this._hasMaskedPath){if(x.translate(0,-t.ls),x.translate(0,k[1]*R*.01+s,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ut=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ut+=180),x.rotate(-ut*Math.PI/180)}x.translate(G,j,0),o-=k[0]*D[r].an*.005,D[r+1]&&Q!==D[r+1].ind&&(o+=D[r].an/2,o+=.001*t.tr*t.finalSize)}else{switch(x.translate(i,s,0),t.ps&&x.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:x.translate(D[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[D[r].line]),0,0);break;case 2:x.translate(D[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[D[r].line])/2,0,0)}x.translate(0,-t.ls),x.translate(N,0,0),x.translate(k[0]*D[r].an*.005,k[1]*R*.01,0),i+=D[r].l+.001*t.tr*t.finalSize}"html"===S?st=x.toCSS():"svg"===S?st=x.to2dCSS():rt=[x.props[0],x.props[1],x.props[2],x.props[3],x.props[4],x.props[5],x.props[6],x.props[7],x.props[8],x.props[9],x.props[10],x.props[11],x.props[12],x.props[13],x.props[14],x.props[15]],Z=q}C<=r?(I=new Ze(Z,K,J,U,st,rt),this.renderedLetters.push(I),C+=1,this.lettersChangedFlag=!0):(I=this.renderedLetters[r],this.lettersChangedFlag=I.update(Z,K,J,U,st,rt)||this.lettersChangedFlag)}}},ei.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},ei.prototype.mHelper=new bt,ei.prototype.defaultPropsArray=[],a([ot],ei),ii.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textProperty=new Qe(this,t.t,this.dynamicProperties),this.textAnimator=new ei(t.t,this.renderType,this),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ii.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ii.prototype.createPathShape=function(t,e){var i,s,r=e.length,a="";for(i=0;i<r;i+=1)"sh"===e[i].ty&&(s=e[i].ks.k,a+=Ke(s,s.i.length,!0,t));return a},ii.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ii.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ii.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ii.prototype.applyTextPropertiesToMatrix=function(t,e,i,s,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(s,r,0)},ii.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ii.prototype.emptyProp=new Ze,ii.prototype.destroy=function(){};var si,ri={shapes:[]};function ai(t,e,i){this.textSpans=[],this.renderType="svg",this.initElement(t,e,i)}function ni(t,e,i){this.initElement(t,e,i)}function oi(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initFrame(),this.initTransform(t,e,i),this.initHierarchy()}function hi(){}function li(){}function pi(t,e,i){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?p(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?nt.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function fi(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=q("svg");var i="";if(e&&e.title){var s=q("title"),r=I();s.setAttribute("id",r),s.textContent=e.title,this.svgElement.appendChild(s),i+=r}if(e&&e.description){var a=q("desc"),n=I();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),i+=" "+n}i&&this.svgElement.setAttribute("aria-labelledby",i);var o=q("defs");this.svgElement.appendChild(o);var h=q("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}return a([ne,me,Me,Ee,oe,Fe,ii],ai),ai.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=q("text"))},ai.prototype.buildTextContents=function(t){for(var e=0,i=t.length,s=[],r="";e<i;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(s.push(r),r=""):r+=t[e],e+=1;return s.push(r),s},ai.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var i=this.textProperty.currentData;this.renderedLetters=p(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var s=this.globalData.fontManager.getFontByName(i.f);if(s.fClass)this.layerElement.setAttribute("class",s.fClass);else{this.layerElement.setAttribute("font-family",s.fFamily);var r=i.fWeight,a=i.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",i.t);var n,o=i.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,f=this.data.singleShape,u=0,c=0,m=!0,d=.001*i.tr*i.finalSize;if(!f||h||i.sz){var g,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!f||0===t){if(n=y>t?this.textSpans[t].span:q(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var v=q("g");n.appendChild(v),this.textSpans[t].childSpan=v}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(i.finalSize/100,i.finalSize/100),f&&(o[t].n&&(u=-d,c+=i.yOffset,c+=m?1:0,m=!1),this.applyTextPropertiesToMatrix(i,l,o[t].line,u,c),u+=o[t].l||0,u+=d),h){var b;if(1===(g=this.globalData.fontManager.getCharData(i.finalText[t],s.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)b=new pi(g.data,this.globalData,this);else{var _=ri;g.data&&g.data.shapes&&(_=g.data),b=new Ue(_,this.globalData,this)}this.textSpans[t].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[t].childSpan.appendChild(b.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else f&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&n&&n.setAttribute("d","")}else{var k=this.textContainer,P="start";switch(i.j){case 1:P="end";break;case 2:P="middle";break;default:P="start"}k.setAttribute("text-anchor",P),k.setAttribute("letter-spacing",d);var A=this.buildTextContents(i.finalText);for(e=A.length,c=i.ps?i.ps[1]+i.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||q("tspan")).textContent=A[t],n.setAttribute("x",0),n.setAttribute("y",c),n.style.display="inherit",k.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,c+=i.finalLineHeight;this.layerElement.appendChild(k)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},ai.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},ai.prototype.getValue=function(){var t,e,i=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<i;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},ai.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var i,s,r,a=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(i=a[t],s=this.textSpans[t].span,(r=this.textSpans[t].glyph)&&r.renderFrame(),i._mdf.m&&s.setAttribute("transform",i.m),i._mdf.o&&s.setAttribute("opacity",i.o),i._mdf.sw&&s.setAttribute("stroke-width",i.sw),i._mdf.sc&&s.setAttribute("stroke",i.sc),i._mdf.fc&&s.setAttribute("fill",i.fc))}},a([Te],ni),ni.prototype.createContent=function(){var t=q("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},oi.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},oi.prototype.renderFrame=function(){},oi.prototype.getBaseElement=function(){return null},oi.prototype.destroy=function(){},oi.prototype.sourceRectAtTime=function(){},oi.prototype.hide=function(){},a([ne,me,Ee,oe],oi),a([ce],hi),hi.prototype.createNull=function(t){return new oi(t,this.globalData,this)},hi.prototype.createShape=function(t){return new Ue(t,this.globalData,this)},hi.prototype.createText=function(t){return new ai(t,this.globalData,this)},hi.prototype.createImage=function(t){return new Te(t,this.globalData,this)},hi.prototype.createSolid=function(t){return new ni(t,this.globalData,this)},hi.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=q("clipPath"),r=q("rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var a=I();i.setAttribute("id",a),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+s()+"#"+a+")"),e.appendChild(i),this.layers=t.layers,this.elements=p(t.layers.length)},hi.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},hi.prototype.updateContainerSize=function(){},hi.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);e[t]=i,N()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?i.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},hi.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;e<i;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},hi.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<i;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},hi.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var s,r=0;r<e;)this.elements[r]&&!0!==this.elements[r]&&this.elements[r].getBaseElement()&&(s=this.elements[r].getBaseElement()),r+=1;s?this.layerElement.insertBefore(i,s):this.layerElement.appendChild(i)}},hi.prototype.hide=function(){this.layerElement.style.display="none"},hi.prototype.show=function(){this.layerElement.style.display="block"},a([ne,me,Ee,oe,Fe],li),li.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},li.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,s=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=s-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},li.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},li.prototype.setElements=function(t){this.elements=t},li.prototype.getElements=function(){return this.elements},li.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},li.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},a([hi,li,Me],pi),pi.prototype.createComp=function(t){return new pi(t,this.globalData,this)},a([hi],fi),fi.prototype.createComp=function(t){return new pi(t,this.globalData,this)},si=fi,U["svg"]=si,Dt.registerModifier("tm",Mt),Dt.registerModifier("pb",Et),Dt.registerModifier("rp",Tt),Dt.registerModifier("rd",It),Pt}));
diff --git a/build/player/lottie_light_canvas.js b/build/player/lottie_light_canvas.js
index 591c3c0..047bc83 100644
--- a/build/player/lottie_light_canvas.js
+++ b/build/player/lottie_light_canvas.js
@@ -1,1903 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$4(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1905,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$3(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6766,4594 +1620,13811 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$2(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,
-CVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */
-
-function CanvasRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.renderConfig = {
-    clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
-    context: (config && config.context) || null,
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.renderConfig.dpr = (config && config.dpr) || 1;
-  if (this.animationItem.wrapper) {
-    this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
-  }
-  this.renderedFrame = -1;
-  this.globalData = {
-    frameNum: -1,
-    _mdf: false,
-    renderConfig: this.renderConfig,
-    currentGlobalAlpha: -1,
-  };
-  this.contextData = new CVContextData();
-  this.elements = [];
-  this.pendingElements = [];
-  this.transformMat = new Matrix();
-  this.completeLayers = false;
-  this.rendererType = 'canvas';
-}
-extendPrototype([BaseRenderer], CanvasRenderer);
 
-CanvasRenderer.prototype.createShape = function (data) {
-  return new CVShapeElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createText = function (data) {
-  return new CVTextElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createImage = function (data) {
-  return new CVImageElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createComp = function (data) {
-  return new CVCompElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createSolid = function (data) {
-  return new CVSolidElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-CanvasRenderer.prototype.ctxTransform = function (props) {
-  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
-    return;
-  }
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
-    return;
-  }
-  this.transformMat.cloneFromProps(props);
-  var cProps = this.contextData.cTr.props;
-  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]);
-  // 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]);
-  this.contextData.cTr.cloneFromProps(this.transformMat.props);
-  var trProps = this.contextData.cTr.props;
-  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
-};
-
-CanvasRenderer.prototype.ctxOpacity = function (op) {
-  /* if(op === 1){
-        return;
-    } */
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-    return;
-  }
-  this.contextData.cO *= op < 0 ? 0 : op;
-  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
-    this.canvasContext.globalAlpha = this.contextData.cO;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-  }
-};
-
-CanvasRenderer.prototype.reset = function () {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  this.contextData.reset();
-};
-
-CanvasRenderer.prototype.save = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.save();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.save();
-  }
-  var props = this.contextData.cTr.props;
-  if (this.contextData._length <= this.contextData.cArrPos) {
-    this.contextData.duplicate();
-  }
-  var i;
-  var arr = this.contextData.saved[this.contextData.cArrPos];
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = props[i];
-  }
-  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
-  this.contextData.cArrPos += 1;
-};
-
-CanvasRenderer.prototype.restore = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.restore();
-    this.globalData.blendMode = 'source-over';
-  }
-  this.contextData.cArrPos -= 1;
-  var popped = this.contextData.saved[this.contextData.cArrPos];
-  var i;
-  var arr = this.contextData.cTr.props;
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = popped[i];
-  }
-  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
-  popped = this.contextData.savedOp[this.contextData.cArrPos];
-  this.contextData.cO = popped;
-  if (this.globalData.currentGlobalAlpha !== popped) {
-    this.canvasContext.globalAlpha = popped;
-    this.globalData.currentGlobalAlpha = popped;
-  }
-};
-
-CanvasRenderer.prototype.configAnimation = function (animData) {
-  if (this.animationItem.wrapper) {
-    this.animationItem.container = createTag('canvas');
-    var containerStyle = this.animationItem.container.style;
-    containerStyle.width = '100%';
-    containerStyle.height = '100%';
-    var origin = '0px 0px 0px';
-    containerStyle.transformOrigin = origin;
-    containerStyle.mozTransformOrigin = origin;
-    containerStyle.webkitTransformOrigin = origin;
-    containerStyle['-webkit-transform'] = origin;
-    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
-    this.animationItem.wrapper.appendChild(this.animationItem.container);
-    this.canvasContext = this.animationItem.container.getContext('2d');
-    if (this.renderConfig.className) {
-      this.animationItem.container.setAttribute('class', this.renderConfig.className);
-    }
-    if (this.renderConfig.id) {
-      this.animationItem.container.setAttribute('id', this.renderConfig.id);
-    }
-  } else {
-    this.canvasContext = this.renderConfig.context;
-  }
-  this.data = animData;
-  this.layers = animData.layers;
-  this.transformCanvas = {
-    w: animData.w,
-    h: animData.h,
-    sx: 0,
-    sy: 0,
-    tx: 0,
-    ty: 0,
-  };
-  this.setupGlobalData(animData, document.body);
-  this.globalData.canvasContext = this.canvasContext;
-  this.globalData.renderer = this;
-  this.globalData.isDashed = false;
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.globalData.transformCanvas = this.transformCanvas;
-  this.elements = createSizedArray(animData.layers.length);
-
-  this.updateContainerSize();
-};
-
-CanvasRenderer.prototype.updateContainerSize = function () {
-  this.reset();
-  var elementWidth;
-  var elementHeight;
-  if (this.animationItem.wrapper && this.animationItem.container) {
-    elementWidth = this.animationItem.wrapper.offsetWidth;
-    elementHeight = this.animationItem.wrapper.offsetHeight;
-    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
-    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
-  } else {
-    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
-    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
-  }
-  var elementRel;
-  var animationRel;
-  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
-    var par = this.renderConfig.preserveAspectRatio.split(' ');
-    var fillType = par[1] || 'meet';
-    var pos = par[0] || 'xMidYMid';
-    var xPos = pos.substr(0, 4);
-    var yPos = pos.substr(4);
-    elementRel = elementWidth / elementHeight;
-    animationRel = this.transformCanvas.w / this.transformCanvas.h;
-    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
-      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    } else {
-      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    }
-
-    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
-    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.tx = 0;
-    }
-    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
-    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.ty = 0;
-    }
-  } else if (this.renderConfig.preserveAspectRatio === 'none') {
-    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  } else {
-    this.transformCanvas.sx = this.renderConfig.dpr;
-    this.transformCanvas.sy = this.renderConfig.dpr;
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  }
-  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];
-  /* var i, len = this.elements.length;
-    for(i=0;i<len;i+=1){
-        if(this.elements[i] && this.elements[i].data.ty === 0){
-            this.elements[i].resize(this.globalData.transformCanvas);
-        }
-    } */
-  this.ctxTransform(this.transformCanvas.props);
-  this.canvasContext.beginPath();
-  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-  this.canvasContext.closePath();
-  this.canvasContext.clip();
-
-  this.renderFrame(this.renderedFrame, true);
-};
-
-CanvasRenderer.prototype.destroy = function () {
-  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.globalData.canvasContext = null;
-  this.animationItem.container = null;
-  this.destroyed = true;
-};
-
-CanvasRenderer.prototype.renderFrame = function (num, forceRender) {
-  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
-    return;
-  }
-  this.renderedFrame = num;
-  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
-  this.globalData.frameId += 1;
-  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
-  this.globalData.projectInterface.currentFrame = num;
-
-  // console.log('--------');
-  // console.log('NEW: ',num);
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    if (this.renderConfig.clearCanvas === true) {
-      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-    } else {
-      this.save();
-    }
-    for (i = len - 1; i >= 0; i -= 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-    if (this.renderConfig.clearCanvas !== true) {
-      this.restore();
-    }
-  }
-};
-
-CanvasRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  var element = this.createItem(this.layers[pos], this, this.globalData);
-  elements[pos] = element;
-  element.initExpressions();
-  /* if(this.layers[pos].ty === 0){
-        element.resize(this.globalData.transformCanvas);
-    } */
-};
-
-CanvasRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-CanvasRenderer.prototype.hide = function () {
-  this.animationItem.container.style.display = 'none';
-};
-
-CanvasRenderer.prototype.show = function () {
-  this.animationItem.container.style.display = 'block';
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
-    }
-
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
-    } else {
-      rect = null;
-    }
-
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
-    } else {
-      count += 1;
-
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
-
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      } else {
-        feMorph = null;
-        x = null;
-      }
-
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
-
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
-      }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
-      }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
-      }
-    }
-  }
-
-  this.maskElement = createNS(maskType);
-
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
-
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
-    }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
-    }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
-      }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
-        } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
-          }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
-        }
-      }
-    }
-  }
-};
-
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
-
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
-
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
-
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
-      }
-      viewData.elem.setAttribute('d', pathShapeValue);
-    }
-    viewData.lastPath = pathString;
-  }
-};
-
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
-
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
-
-function HierarchyElement() {}
-
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
-    }
-  },
-};
-
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
-
-function FrameElement() {}
-
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
-          this._mdf = true;
-        }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
-
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
-        while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
-          }
-          i += 1;
-        }
-      }
-
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
-        return;
-      }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
-      }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
-      this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
-    }
-    i += 1;
-  }
-}
-
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
-
-/* global createNS */
-/* exported ShapeGroupData */
-
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global ShapePropertyFactory, SVGShapeData */
-
-function CVShapeData(element, data, styles, transformsManager) {
-  this.styledShapes = [];
-  this.tr = [0, 0, 0, 0, 0, 0];
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
-  var i;
-  var len = styles.length;
-  var styledShape;
-  for (i = 0; i < len; i += 1) {
-    if (!styles[i].closed) {
-      styledShape = {
-        transforms: transformsManager.addTransformSequence(styles[i].transforms),
-        trNodes: [],
-      };
-      this.styledShapes.push(styledShape);
-      styles[i].elements.push(styledShape);
-    }
-  }
-}
-
-CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global Matrix, createTypedArray */
-
-function CVContextData() {
-  this.saved = [];
-  this.cArrPos = 0;
-  this.cTr = new Matrix();
-  this.cO = 1;
-  var i;
-  var len = 15;
-  this.savedOp = createTypedArray('float32', len);
-  for (i = 0; i < len; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = len;
-}
-
-CVContextData.prototype.duplicate = function () {
-  var newLength = this._length * 2;
-  var currentSavedOp = this.savedOp;
-  this.savedOp = createTypedArray('float32', newLength);
-  this.savedOp.set(currentSavedOp);
-  var i = 0;
-  for (i = this._length; i < newLength; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = newLength;
-};
-
-CVContextData.prototype.reset = function () {
-  this.cArrPos = 0;
-  this.cTr.reset();
-  this.cO = 1;
-};
-
-/* global CVEffects, getBlendMode, CVMaskElement, Matrix */
-
-function CVBaseElement() {
-}
-
-CVBaseElement.prototype = {
-  createElements: function () {},
-  initRendererElement: function () {},
-  createContainerElements: function () {
-    this.canvasContext = this.globalData.canvasContext;
-    this.renderableEffectsManager = new CVEffects(this);
-  },
-  createContent: function () {},
-  setBlendMode: function () {
-    var globalData = this.globalData;
-    if (globalData.blendMode !== this.data.bm) {
-      globalData.blendMode = this.data.bm;
-      var blendModeValue = getBlendMode(this.data.bm);
-      globalData.canvasContext.globalCompositeOperation = blendModeValue;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new CVMaskElement(this.data, this);
-  },
-  hideElement: function () {
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-      this.hidden = true;
-    }
-  },
-  showElement: function () {
-    if (this.isInRange && !this.isTransparent) {
-      this.hidden = false;
-      this._isFirstFrame = true;
-      this.maskManager._isFirstFrame = true;
-    }
-  },
-  renderFrame: function () {
-    if (this.hidden || this.data.hd) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.setBlendMode();
-    var forceRealStack = this.data.ty === 0;
-    this.globalData.renderer.save(forceRealStack);
-    this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
-    this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
-    this.renderInnerContent();
-    this.globalData.renderer.restore(forceRealStack);
-    if (this.maskManager.hasMasks) {
-      this.globalData.renderer.restore(true);
-    }
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.canvasContext = null;
-    this.data = null;
-    this.globalData = null;
-    this.maskManager.destroy();
-  },
-  mHelper: new Matrix(),
-};
-CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
-CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement,HierarchyElement, FrameElement,
-RenderableElement, SVGShapeElement, IImageElement, createTag */
-
-function CVImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.img = globalData.imageLoader.getAsset(this.assetData);
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
-
-CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVImageElement.prototype.createContent = function () {
-  if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
-    var canvas = createTag('canvas');
-    canvas.width = this.assetData.w;
-    canvas.height = this.assetData.h;
-    var ctx = canvas.getContext('2d');
-
-    var imgW = this.img.width;
-    var imgH = this.img.height;
-    var imgRel = imgW / imgH;
-    var canvasRel = this.assetData.w / this.assetData.h;
-    var widthCrop;
-    var heightCrop;
-    var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
-    if ((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) {
-      heightCrop = imgH;
-      widthCrop = heightCrop * canvasRel;
-    } else {
-      widthCrop = imgW;
-      heightCrop = widthCrop / canvasRel;
-    }
-    ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
-    this.img = canvas;
-  }
-};
-
-CVImageElement.prototype.renderInnerContent = function () {
-  this.canvasContext.drawImage(this.img, 0, 0);
-};
-
-CVImageElement.prototype.destroy = function () {
-  this.img = null;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */
-
-function CVCompElement(data, globalData, comp) {
-  this.completeLayers = false;
-  this.layers = data.layers;
-  this.pendingElements = [];
-  this.elements = createSizedArray(this.layers.length);
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
-
-CVCompElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.beginPath();
-  ctx.moveTo(0, 0);
-  ctx.lineTo(this.data.w, 0);
-  ctx.lineTo(this.data.w, this.data.h);
-  ctx.lineTo(0, this.data.h);
-  ctx.lineTo(0, 0);
-  ctx.clip();
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-CVCompElement.prototype.destroy = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.layers = null;
-  this.elements = null;
-};
-
-/* global createSizedArray, ShapePropertyFactory, MaskElement */
-
-function CVMaskElement(data, element) {
-  this.data = data;
-  this.element = element;
-  this.masksProperties = this.data.masksProperties || [];
-  this.viewData = createSizedArray(this.masksProperties.length);
-  var i;
-  var len = this.masksProperties.length;
-  var hasMasks = false;
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      hasMasks = true;
-    }
-    this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
-  }
-  this.hasMasks = hasMasks;
-  if (hasMasks) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-CVMaskElement.prototype.renderFrame = function () {
-  if (!this.hasMasks) {
-    return;
-  }
-  var transform = this.element.finalTransform.mat;
-  var ctx = this.element.canvasContext;
-  var i;
-  var len = this.masksProperties.length;
-  var pt;
-  var pts;
-  var data;
-  ctx.beginPath();
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.masksProperties[i].inv) {
-        ctx.moveTo(0, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
-        ctx.lineTo(0, this.element.globalData.compSize.h);
-        ctx.lineTo(0, 0);
-      }
-      data = this.viewData[i].v;
-      pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
-      ctx.moveTo(pt[0], pt[1]);
-      var j;
-      var jLen = data._length;
-      for (j = 1; j < jLen; j += 1) {
-        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
-        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-      }
-      pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
-      ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-    }
-  }
-  this.element.globalData.renderer.save(true);
-  ctx.clip();
-};
-
-CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
-
-CVMaskElement.prototype.destroy = function () {
-  this.element = null;
-};
-
-/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,
-HierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,
-DashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */
-
-function CVShapeElement(data, globalData, comp) {
-  this.shapes = [];
-  this.shapesData = data.shapes;
-  this.stylesList = [];
-  this.itemsData = [];
-  this.prevViewData = [];
-  this.shapeModifiers = [];
-  this.processedElements = [];
-  this.transformsManager = new ShapeTransformManager();
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
-
-CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
-
-CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false };
-
-CVShapeElement.prototype.dashResetter = [];
-
-CVShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-};
-
-CVShapeElement.prototype.createStyleElement = function (data, transforms) {
-  var styleElem = {
-    data: data,
-    type: data.ty,
-    preTransforms: this.transformsManager.addTransformSequence(transforms),
-    transforms: [],
-    elements: [],
-    closed: data.hd === true,
-  };
-  var elementData = {};
-  if (data.ty === 'fl' || data.ty === 'st') {
-    elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
-    if (!elementData.c.k) {
-      styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
-    }
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
-    elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
-    elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this);
-    elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this);
-    elementData.g = new GradientProperty(this, data.g, this);
-  }
-  elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
-  if (data.ty === 'st' || data.ty === 'gs') {
-    styleElem.lc = lineCapEnum[data.lc || 2];
-    styleElem.lj = lineJoinEnum[data.lj || 2];
-    if (data.lj == 1) { // eslint-disable-line eqeqeq
-      styleElem.ml = data.ml;
-    }
-    elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
-    if (!elementData.w.k) {
-      styleElem.wi = elementData.w.v;
-    }
-    if (data.d) {
-      var d = new DashProperty(this, data.d, 'canvas', this);
-      elementData.d = d;
-      if (!elementData.d.k) {
-        styleElem.da = elementData.d.dashArray;
-        styleElem.do = elementData.d.dashoffset[0];
-      }
-    }
-  } else {
-    styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
-  }
-  this.stylesList.push(styleElem);
-  elementData.style = styleElem;
-  return elementData;
-};
-
-CVShapeElement.prototype.createGroupElement = function () {
-  var elementData = {
-    it: [],
-    prevViewData: [],
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createTransformElement = function (data) {
-  var elementData = {
-    transform: {
-      opacity: 1,
-      _opMdf: false,
-      key: this.transformsManager.getNewKey(),
-      op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
-      mProps: TransformPropertyFactory.getTransformProperty(this, data, this),
-    },
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createShapeElement = function (data) {
-  var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
-
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  return elementData;
-};
-
-CVShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-};
-
-CVShapeElement.prototype.addTransformToStyleList = function (transform) {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.push(transform);
-    }
-  }
-};
-
-CVShapeElement.prototype.removeTransformFromStyleList = function () {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.pop();
-    }
-  }
-};
-
-CVShapeElement.prototype.closeStyles = function (styles) {
-  var i;
-  var len = styles.length;
-  for (i = 0; i < len; i += 1) {
-    styles[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var processedPos;
-  var modifier;
-  var currentTransform;
-  var ownTransforms = [].concat(transforms);
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._shouldRender = shouldRender;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        currentTransform = this.createTransformElement(arr[i]);
-        itemsData[i] = currentTransform;
-      }
-      ownTransforms.push(itemsData[i]);
-      this.addTransformToStyleList(itemsData[i]);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i]);
-      }
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        shouldRender = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  this.removeTransformFromStyleList();
-  this.closeStyles(ownStyles);
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.renderInnerContent = function () {
-  this.transformHelper.opacity = 1;
-  this.transformHelper._opMdf = false;
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-  this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
-};
-
-CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
-  if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
-    groupTransform.opacity = parentTransform.opacity;
-    groupTransform.opacity *= groupTransform.op.v;
-    groupTransform._opMdf = true;
-  }
-};
-
-CVShapeElement.prototype.drawLayer = function () {
-  var i;
-  var len = this.stylesList.length;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var elems;
-  var nodes;
-  var renderer = this.globalData.renderer;
-  var ctx = this.globalData.canvasContext;
-  var type;
-  var currentStyle;
-  for (i = 0; i < len; i += 1) {
-    currentStyle = this.stylesList[i];
-    type = currentStyle.type;
-
-    // Skipping style when
-    // Stroke width equals 0
-    // style should not be rendered (extra unused repeaters)
-    // current opacity equals 0
-    // global opacity equals 0
-    if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
-      renderer.save();
-      elems = currentStyle.elements;
-      if (type === 'st' || type === 'gs') {
-        ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
-        ctx.lineWidth = currentStyle.wi;
-        ctx.lineCap = currentStyle.lc;
-        ctx.lineJoin = currentStyle.lj;
-        ctx.miterLimit = currentStyle.ml || 0;
-      } else {
-        ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
-      }
-      renderer.ctxOpacity(currentStyle.coOp);
-      if (type !== 'st' && type !== 'gs') {
-        ctx.beginPath();
-      }
-      renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
-      jLen = elems.length;
-      for (j = 0; j < jLen; j += 1) {
-        if (type === 'st' || type === 'gs') {
-          ctx.beginPath();
-          if (currentStyle.da) {
-            ctx.setLineDash(currentStyle.da);
-            ctx.lineDashOffset = currentStyle.do;
-          }
-        }
-        nodes = elems[j].trNodes;
-        kLen = nodes.length;
-
-        for (k = 0; k < kLen; k += 1) {
-          if (nodes[k].t === 'm') {
-            ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
-          } else if (nodes[k].t === 'c') {
-            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]);
-          } else {
-            ctx.closePath();
-          }
-        }
-        if (type === 'st' || type === 'gs') {
-          ctx.stroke();
-          if (currentStyle.da) {
-            ctx.setLineDash(this.dashResetter);
-          }
-        }
-      }
-      if (type !== 'st' && type !== 'gs') {
-        ctx.fill(currentStyle.r);
-      }
-      renderer.restore();
-    }
-  }
-};
-
-CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
-  var i;
-  var len = items.length - 1;
-  var groupTransform;
-  groupTransform = parentTransform;
-  for (i = len; i >= 0; i -= 1) {
-    if (items[i].ty === 'tr') {
-      groupTransform = data[i].transform;
-      this.renderShapeTransform(parentTransform, groupTransform);
-    } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
-      this.renderPath(items[i], data[i]);
-    } else if (items[i].ty === 'fl') {
-      this.renderFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'st') {
-      this.renderStroke(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
-      this.renderGradientFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gr') {
-      this.renderShape(groupTransform, items[i].it, data[i].it);
-    } else if (items[i].ty === 'tm') {
-      //
-    }
-  }
-  if (isMain) {
-    this.drawLayer();
-  }
-};
-
-CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
-  if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
-    var shapeNodes = styledShape.trNodes;
-    var paths = shape.paths;
-    var i;
-    var len;
-    var j;
-    var jLen = paths._length;
-    shapeNodes.length = 0;
-    var groupTransformMat = styledShape.transforms.finalTransform;
-    for (j = 0; j < jLen; j += 1) {
-      var pathNodes = paths.shapes[j];
-      if (pathNodes && pathNodes.v) {
-        len = pathNodes._length;
-        for (i = 1; i < len; i += 1) {
-          if (i === 1) {
-            shapeNodes.push({
-              t: 'm',
-              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-            });
-          }
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]),
-          });
-        }
-        if (len === 1) {
-          shapeNodes.push({
-            t: 'm',
-            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-          });
-        }
-        if (pathNodes.c && len) {
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]),
-          });
-          shapeNodes.push({
-            t: 'z',
-          });
-        }
-      }
-    }
-    styledShape.trNodes = shapeNodes;
-  }
-};
-
-CVShapeElement.prototype.renderPath = function (pathData, itemData) {
-  if (pathData.hd !== true && pathData._shouldRender) {
-    var i;
-    var len = itemData.styledShapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
-    }
-  }
-};
-
-CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb('
-        + bmFloor(itemData.c.v[0]) + ','
-        + bmFloor(itemData.c.v[1]) + ','
-        + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-};
-
-CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var grd;
-  if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {
-    var ctx = this.globalData.canvasContext;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
-    if (styleData.t === 1) {
-      grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
-    } else {
-      var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-      var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-      var percent = itemData.h.v;
-      if (percent >= 1) {
-        percent = 0.99;
-      } else if (percent <= -1) {
-        percent = -0.99;
-      }
-      var dist = rad * percent;
-      var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-      var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-      grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
-    }
-
-    var i;
-    var len = styleData.g.p;
-    var cValues = itemData.g.c;
-    var opacity = 1;
-
-    for (i = 0; i < len; i += 1) {
-      if (itemData.g._hasOpacity && itemData.g._collapsable) {
-        opacity = itemData.g.o[i * 2 + 1];
-      }
-      grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
-    }
-    styleElem.grd = grd;
-  }
-  styleElem.coOp = itemData.o.v * groupTransform.opacity;
-};
-
-CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var d = itemData.d;
-  if (d && (d._mdf || this._isFirstFrame)) {
-    styleElem.da = d.dashArray;
-    styleElem.do = d.dashoffset[0];
-  }
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-  if (itemData.w._mdf || this._isFirstFrame) {
-    styleElem.wi = itemData.w.v;
-  }
-};
-
-CVShapeElement.prototype.destroy = function () {
-  this.shapesData = null;
-  this.globalData = null;
-  this.canvasContext = null;
-  this.stylesList.length = 0;
-  this.itemsData.length = 0;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,
-SVGShapeElement, IImageElement */
-
-function CVSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
-
-CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVSolidElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.fillStyle = this.data.sc;
-  ctx.fillRect(0, 0, this.data.sw, this.data.sh);
-  //
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement,
-RenderableElement, ITextElement, createTag, createSizedArray */
-
-function CVTextElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.yOffset = 0;
-  this.fillColorAnim = false;
-  this.strokeColorAnim = false;
-  this.strokeWidthAnim = false;
-  this.stroke = false;
-  this.fill = false;
-  this.justifyOffset = 0;
-  this.currentRender = null;
-  this.renderType = 'canvas';
-  this.values = {
-    fill: 'rgba(0,0,0,0)',
-    stroke: 'rgba(0,0,0,0)',
-    sWidth: 0,
-    fValue: '',
-  };
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
-
-CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
-
-CVTextElement.prototype.buildNewText = function () {
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
-
-  var hasFill = false;
-  if (documentData.fc) {
-    hasFill = true;
-    this.values.fill = this.buildColor(documentData.fc);
-  } else {
-    this.values.fill = 'rgba(0,0,0,0)';
-  }
-  this.fill = hasFill;
-  var hasStroke = false;
-  if (documentData.sc) {
-    hasStroke = true;
-    this.values.stroke = this.buildColor(documentData.sc);
-    this.values.sWidth = documentData.sw;
-  }
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  var i;
-  var len;
-  var letters = documentData.l;
-  var matrixHelper = this.mHelper;
-  this.stroke = hasStroke;
-  this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
-  len = documentData.finalText.length;
-  // this.tHelper.font = this.values.fValue;
-  var charData;
-  var shapeData;
-  var k;
-  var kLen;
-  var shapes;
-  var j;
-  var jLen;
-  var pathNodes;
-  var commands;
-  var pathArr;
-  var singleShape = this.data.singleShape;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var cnt = 0;
-  for (i = 0; i < len; i += 1) {
-    charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-    shapeData = (charData && charData.data) || {};
-    matrixHelper.reset();
-    if (singleShape && letters[i].n) {
-      xPos = -trackingOffset;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      firstLine = false;
-    }
-
-    shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-    jLen = shapes.length;
-    matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-    if (singleShape) {
-      this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-    }
-    commands = createSizedArray(jLen);
-    for (j = 0; j < jLen; j += 1) {
-      kLen = shapes[j].ks.k.i.length;
-      pathNodes = shapes[j].ks.k;
-      pathArr = [];
-      for (k = 1; k < kLen; k += 1) {
-        if (k === 1) {
-          pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
-        }
-        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));
-      }
-      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));
-      commands[j] = pathArr;
-    }
-    if (singleShape) {
-      xPos += letters[i].l;
-      xPos += trackingOffset;
-    }
-    if (this.textSpans[cnt]) {
-      this.textSpans[cnt].elem = commands;
-    } else {
-      this.textSpans[cnt] = { elem: commands };
-    }
-    cnt += 1;
-  }
-};
-
-CVTextElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.font = this.values.fValue;
-  ctx.lineCap = 'butt';
-  ctx.lineJoin = 'miter';
-  ctx.miterLimit = 4;
-
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-  }
-
-  var i;
-  var len;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var renderedLetters = this.textAnimator.renderedLetters;
-
-  var letters = this.textProperty.currentData.l;
-
-  len = letters.length;
-  var renderedLetter;
-  var lastFill = null;
-  var lastStroke = null;
-  var lastStrokeW = null;
-  var commands;
-  var pathArr;
-  for (i = 0; i < len; i += 1) {
-    if (!letters[i].n) {
-      renderedLetter = renderedLetters[i];
-      if (renderedLetter) {
-        this.globalData.renderer.save();
-        this.globalData.renderer.ctxTransform(renderedLetter.p);
-        this.globalData.renderer.ctxOpacity(renderedLetter.o);
-      }
-      if (this.fill) {
-        if (renderedLetter && renderedLetter.fc) {
-          if (lastFill !== renderedLetter.fc) {
-            lastFill = renderedLetter.fc;
-            ctx.fillStyle = renderedLetter.fc;
-          }
-        } else if (lastFill !== this.values.fill) {
-          lastFill = this.values.fill;
-          ctx.fillStyle = this.values.fill;
-        }
-        commands = this.textSpans[i].elem;
-        jLen = commands.length;
-        this.globalData.canvasContext.beginPath();
-        for (j = 0; j < jLen; j += 1) {
-          pathArr = commands[j];
-          kLen = pathArr.length;
-          this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
-          for (k = 2; k < kLen; k += 6) {
-            this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
-          }
-        }
-        this.globalData.canvasContext.closePath();
-        this.globalData.canvasContext.fill();
-        /// ctx.fillText(this.textSpans[i].val,0,0);
-      }
-      if (this.stroke) {
-        if (renderedLetter && renderedLetter.sw) {
-          if (lastStrokeW !== renderedLetter.sw) {
-            lastStrokeW = renderedLetter.sw;
-            ctx.lineWidth = renderedLetter.sw;
-          }
-        } else if (lastStrokeW !== this.values.sWidth) {
-          lastStrokeW = this.values.sWidth;
-          ctx.lineWidth = this.values.sWidth;
-        }
-        if (renderedLetter && renderedLetter.sc) {
-          if (lastStroke !== renderedLetter.sc) {
-            lastStroke = renderedLetter.sc;
-            ctx.strokeStyle = renderedLetter.sc;
-          }
-        } else if (lastStroke !== this.values.stroke) {
-          lastStroke = this.values.stroke;
-          ctx.strokeStyle = this.values.stroke;
-        }
-        commands = this.textSpans[i].elem;
-        jLen = commands.length;
-        this.globalData.canvasContext.beginPath();
-        for (j = 0; j < jLen; j += 1) {
-          pathArr = commands[j];
-          kLen = pathArr.length;
-          this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
-          for (k = 2; k < kLen; k += 6) {
-            this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
-          }
-        }
-        this.globalData.canvasContext.closePath();
-        this.globalData.canvasContext.stroke();
-        /// ctx.strokeText(letters[i].val,0,0);
-      }
-      if (renderedLetter) {
-        this.globalData.renderer.restore();
-      }
-    }
-  }
-};
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
 
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
     if (expressionsPlugin) {
       expressionsPlugin.initExpressions(this);
     }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
+
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-  }
-};
 
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
+  };
 
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
-  }
-};
 
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
+    this.loadNextSegment();
+  };
 
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
 
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
 
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
     }
-  }
-  return null;
-};
 
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
+    try {
+      this.animationData = animData;
 
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
+      }
+
+      this.renderer.configAnimation(animData);
+
+      if (!animData.assets) {
+        animData.assets = [];
+      }
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
+      }
+    } catch (error) {
+      this.triggerConfigError(error);
+    }
+  };
+
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
+    }
+
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
+    } else {
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
       }
     }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
+  };
 
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
+
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
+
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
+
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
+    }
+
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
+    }
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
       }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
+    } else {
+      this.pause();
+    }
+  };
+
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
+
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
+
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
+      }
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
+      }
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
+        } else {
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
       if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
+          }
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
       }
     } else {
       this.setCurrentRawFrameValue(nextValue);
     }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
         } else {
-          this.trigger('loopComplete');
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$2(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
+        }
+      }
+    }
+
+    function freeze() {
+      _isFrozen = true;
+    }
+
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
+
+    function setVolume(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
+      }
+    }
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
+  }
+
+  var bez = bezFunction();
+
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
+
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
+
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
         }
       } else {
-        _isComplete = true;
-        nextValue = 0;
-      }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
 
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
       } else {
-        this.setDirection(-1);
+        scale0 = 1.0 - t;
+        scale1 = t;
       }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
+
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
+
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
+
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
+          this._mdf = true;
+        }
       } else {
-        this.setDirection(1);
+        var i = 0;
+        var len = this.v.length;
+
+        while (i < len) {
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
+          }
+
+          i += 1;
+        }
       }
     }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
     }
-  }
 
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
-
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
     }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
 
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
 
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
+
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-  return null;
-};
 
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
     }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
 
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
 
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
 
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
 
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
 
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
 
-var lottie = {};
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
 
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
     }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
 
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
+    function getProp(elem, data, type, mult, container) {
+      var p;
 
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
 
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
 
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
+          default:
+            break;
+        }
+      }
 
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
 
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
+      return p;
     }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
 
-return lottie;
-}));
\ No newline at end of file
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
+      }
+    }
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
+  }
+
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
+
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
+
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
+
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
+
+    return animationManager.loadAnimation(params);
+  }
+
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
+
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
+
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
+
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
+
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
+      default:
+        return null;
+    }
+  }
+
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
+
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
+
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
+    }
+  }
+
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
+
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
+
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
+      }
+    }
+
+    return null;
+  }
+
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$1(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
+    }
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
+  };
+
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
+
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
+    return function pathInterfaceFactory(shape, view, propertyGroup) {
+      var prop = view.sh;
+
+      function interfaceFunction(val) {
+        if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
+          return interfaceFunction.path;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        path: {
+          get: function get() {
+            if (prop.k) {
+              prop.getValue();
+            }
+
+            return prop;
+          }
+        },
+        shape: {
+          get: function get() {
+            if (prop.k) {
+              prop.getValue();
+            }
+
+            return prop;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
+      });
+      return interfaceFunction;
+    };
+  }();
+
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
+
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
+        }
+      }
+
+      return arr;
+    }
+
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
+
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
+          // Not necessary for now. Keeping them here in case a new case appears
+          // case 'ADBE Vector Transform Group':
+          // case 3:
+
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
+    }
+
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        type: {
+          get: function get() {
+            return 'a';
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
+    }
+
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
+      }
+
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      }
+
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
+          }
+
+          return _sourceText;
+        }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
+        i += 1;
+      }
+
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
+    var i;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
+      } else {
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
+      }
+    }
+
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
+      });
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
+      }
+
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
+        }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
+        i += 1;
+      }
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
+  };
+
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
+  };
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
+
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
+
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
+  }
+
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
+    this.elem = elem;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
+    if (this.kf) {
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
+    } else {
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
+    }
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
+  };
+
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
+  }
+
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
+  }
+
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
+
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
+
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
+
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
+      case 1:
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
+        break;
+
+      case 2:
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
+        break;
+
+      default:
+        break;
+    }
+
+    matrixHelper.translate(xPos, yPos, 0);
+  };
+
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVContextData() {
+    this.saved = [];
+    this.cArrPos = 0;
+    this.cTr = new Matrix();
+    this.cO = 1;
+    var i;
+    var len = 15;
+    this.savedOp = createTypedArray('float32', len);
+
+    for (i = 0; i < len; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = len;
+  }
+
+  CVContextData.prototype.duplicate = function () {
+    var newLength = this._length * 2;
+    var currentSavedOp = this.savedOp;
+    this.savedOp = createTypedArray('float32', newLength);
+    this.savedOp.set(currentSavedOp);
+    var i = 0;
+
+    for (i = this._length; i < newLength; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = newLength;
+  };
+
+  CVContextData.prototype.reset = function () {
+    this.cArrPos = 0;
+    this.cTr.reset();
+    this.cO = 1;
+  };
+
+  function ShapeTransformManager() {
+    this.sequences = {};
+    this.sequenceList = [];
+    this.transform_key_count = 0;
+  }
+
+  ShapeTransformManager.prototype = {
+    addTransformSequence: function addTransformSequence(transforms) {
+      var i;
+      var len = transforms.length;
+      var key = '_';
+
+      for (i = 0; i < len; i += 1) {
+        key += transforms[i].transform.key + '_';
+      }
+
+      var sequence = this.sequences[key];
+
+      if (!sequence) {
+        sequence = {
+          transforms: [].concat(transforms),
+          finalTransform: new Matrix(),
+          _mdf: false
+        };
+        this.sequences[key] = sequence;
+        this.sequenceList.push(sequence);
+      }
+
+      return sequence;
+    },
+    processSequence: function processSequence(sequence, isFirstFrame) {
+      var i = 0;
+      var len = sequence.transforms.length;
+      var _mdf = isFirstFrame;
+
+      while (i < len && !isFirstFrame) {
+        if (sequence.transforms[i].transform.mProps._mdf) {
+          _mdf = true;
+          break;
+        }
+
+        i += 1;
+      }
+
+      if (_mdf) {
+        var props;
+        sequence.finalTransform.reset();
+
+        for (i = len - 1; i >= 0; i -= 1) {
+          props = sequence.transforms[i].transform.mProps.v.props;
+          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]);
+        }
+      }
+
+      sequence._mdf = _mdf;
+    },
+    processSequences: function processSequences(isFirstFrame) {
+      var i;
+      var len = this.sequenceList.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.processSequence(this.sequenceList[i], isFirstFrame);
+      }
+    },
+    getNewKey: function getNewKey() {
+      this.transform_key_count += 1;
+      return '_' + this.transform_key_count;
+    }
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function CVMaskElement(data, element) {
+    this.data = data;
+    this.element = element;
+    this.masksProperties = this.data.masksProperties || [];
+    this.viewData = createSizedArray(this.masksProperties.length);
+    var i;
+    var len = this.masksProperties.length;
+    var hasMasks = false;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        hasMasks = true;
+      }
+
+      this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
+    }
+
+    this.hasMasks = hasMasks;
+
+    if (hasMasks) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  CVMaskElement.prototype.renderFrame = function () {
+    if (!this.hasMasks) {
+      return;
+    }
+
+    var transform = this.element.finalTransform.mat;
+    var ctx = this.element.canvasContext;
+    var i;
+    var len = this.masksProperties.length;
+    var pt;
+    var pts;
+    var data;
+    ctx.beginPath();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.masksProperties[i].inv) {
+          ctx.moveTo(0, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
+          ctx.lineTo(0, this.element.globalData.compSize.h);
+          ctx.lineTo(0, 0);
+        }
+
+        data = this.viewData[i].v;
+        pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
+        ctx.moveTo(pt[0], pt[1]);
+        var j;
+        var jLen = data._length;
+
+        for (j = 1; j < jLen; j += 1) {
+          pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
+          ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+        }
+
+        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
+        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+      }
+    }
+
+    this.element.globalData.renderer.save(true);
+    ctx.clip();
+  };
+
+  CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
+
+  CVMaskElement.prototype.destroy = function () {
+    this.element = null;
+  };
+
+  function CVBaseElement() {}
+
+  CVBaseElement.prototype = {
+    createElements: function createElements() {},
+    initRendererElement: function initRendererElement() {},
+    createContainerElements: function createContainerElements() {
+      this.canvasContext = this.globalData.canvasContext;
+      this.renderableEffectsManager = new CVEffects(this);
+    },
+    createContent: function createContent() {},
+    setBlendMode: function setBlendMode() {
+      var globalData = this.globalData;
+
+      if (globalData.blendMode !== this.data.bm) {
+        globalData.blendMode = this.data.bm;
+        var blendModeValue = getBlendMode(this.data.bm);
+        globalData.canvasContext.globalCompositeOperation = blendModeValue;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new CVMaskElement(this.data, this);
+    },
+    hideElement: function hideElement() {
+      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+        this.hidden = true;
+      }
+    },
+    showElement: function showElement() {
+      if (this.isInRange && !this.isTransparent) {
+        this.hidden = false;
+        this._isFirstFrame = true;
+        this.maskManager._isFirstFrame = true;
+      }
+    },
+    renderFrame: function renderFrame() {
+      if (this.hidden || this.data.hd) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.setBlendMode();
+      var forceRealStack = this.data.ty === 0;
+      this.globalData.renderer.save(forceRealStack);
+      this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
+      this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
+      this.renderInnerContent();
+      this.globalData.renderer.restore(forceRealStack);
+
+      if (this.maskManager.hasMasks) {
+        this.globalData.renderer.restore(true);
+      }
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.canvasContext = null;
+      this.data = null;
+      this.globalData = null;
+      this.maskManager.destroy();
+    },
+    mHelper: new Matrix()
+  };
+  CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
+  CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
+
+  function CVShapeData(element, data, styles, transformsManager) {
+    this.styledShapes = [];
+    this.tr = [0, 0, 0, 0, 0, 0];
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
+    var i;
+    var len = styles.length;
+    var styledShape;
+
+    for (i = 0; i < len; i += 1) {
+      if (!styles[i].closed) {
+        styledShape = {
+          transforms: transformsManager.addTransformSequence(styles[i].transforms),
+          trNodes: []
+        };
+        this.styledShapes.push(styledShape);
+        styles[i].elements.push(styledShape);
+      }
+    }
+  }
+
+  CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
+
+  function CVShapeElement(data, globalData, comp) {
+    this.shapes = [];
+    this.shapesData = data.shapes;
+    this.stylesList = [];
+    this.itemsData = [];
+    this.prevViewData = [];
+    this.shapeModifiers = [];
+    this.processedElements = [];
+    this.transformsManager = new ShapeTransformManager();
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
+  CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
+  CVShapeElement.prototype.transformHelper = {
+    opacity: 1,
+    _opMdf: false
+  };
+  CVShapeElement.prototype.dashResetter = [];
+
+  CVShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+  };
+
+  CVShapeElement.prototype.createStyleElement = function (data, transforms) {
+    var styleElem = {
+      data: data,
+      type: data.ty,
+      preTransforms: this.transformsManager.addTransformSequence(transforms),
+      transforms: [],
+      elements: [],
+      closed: data.hd === true
+    };
+    var elementData = {};
+
+    if (data.ty === 'fl' || data.ty === 'st') {
+      elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
+
+      if (!elementData.c.k) {
+        styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
+      }
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
+      elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
+      elementData.h = PropertyFactory.getProp(this, data.h || {
+        k: 0
+      }, 0, 0.01, this);
+      elementData.a = PropertyFactory.getProp(this, data.a || {
+        k: 0
+      }, 0, degToRads, this);
+      elementData.g = new GradientProperty(this, data.g, this);
+    }
+
+    elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      styleElem.lc = lineCapEnum[data.lc || 2];
+      styleElem.lj = lineJoinEnum[data.lj || 2];
+
+      if (data.lj == 1) {
+        // eslint-disable-line eqeqeq
+        styleElem.ml = data.ml;
+      }
+
+      elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
+
+      if (!elementData.w.k) {
+        styleElem.wi = elementData.w.v;
+      }
+
+      if (data.d) {
+        var d = new DashProperty(this, data.d, 'canvas', this);
+        elementData.d = d;
+
+        if (!elementData.d.k) {
+          styleElem.da = elementData.d.dashArray;
+          styleElem["do"] = elementData.d.dashoffset[0];
+        }
+      }
+    } else {
+      styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
+    }
+
+    this.stylesList.push(styleElem);
+    elementData.style = styleElem;
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createGroupElement = function () {
+    var elementData = {
+      it: [],
+      prevViewData: []
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createTransformElement = function (data) {
+    var elementData = {
+      transform: {
+        opacity: 1,
+        _opMdf: false,
+        key: this.transformsManager.getNewKey(),
+        op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
+        mProps: TransformPropertyFactory.getTransformProperty(this, data, this)
+      }
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createShapeElement = function (data) {
+    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    return elementData;
+  };
+
+  CVShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+  };
+
+  CVShapeElement.prototype.addTransformToStyleList = function (transform) {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.push(transform);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.removeTransformFromStyleList = function () {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.pop();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.closeStyles = function (styles) {
+    var i;
+    var len = styles.length;
+
+    for (i = 0; i < len; i += 1) {
+      styles[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var processedPos;
+    var modifier;
+    var currentTransform;
+    var ownTransforms = [].concat(transforms);
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._shouldRender = shouldRender;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          currentTransform = this.createTransformElement(arr[i]);
+          itemsData[i] = currentTransform;
+        }
+
+        ownTransforms.push(itemsData[i]);
+        this.addTransformToStyleList(itemsData[i]);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i]);
+        }
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          shouldRender = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    this.removeTransformFromStyleList();
+    this.closeStyles(ownStyles);
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.renderInnerContent = function () {
+    this.transformHelper.opacity = 1;
+    this.transformHelper._opMdf = false;
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+    this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
+  };
+
+  CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
+    if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+      groupTransform.opacity = parentTransform.opacity;
+      groupTransform.opacity *= groupTransform.op.v;
+      groupTransform._opMdf = true;
+    }
+  };
+
+  CVShapeElement.prototype.drawLayer = function () {
+    var i;
+    var len = this.stylesList.length;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var elems;
+    var nodes;
+    var renderer = this.globalData.renderer;
+    var ctx = this.globalData.canvasContext;
+    var type;
+    var currentStyle;
+
+    for (i = 0; i < len; i += 1) {
+      currentStyle = this.stylesList[i];
+      type = currentStyle.type; // Skipping style when
+      // Stroke width equals 0
+      // style should not be rendered (extra unused repeaters)
+      // current opacity equals 0
+      // global opacity equals 0
+
+      if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
+        renderer.save();
+        elems = currentStyle.elements;
+
+        if (type === 'st' || type === 'gs') {
+          ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
+          ctx.lineWidth = currentStyle.wi;
+          ctx.lineCap = currentStyle.lc;
+          ctx.lineJoin = currentStyle.lj;
+          ctx.miterLimit = currentStyle.ml || 0;
+        } else {
+          ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
+        }
+
+        renderer.ctxOpacity(currentStyle.coOp);
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.beginPath();
+        }
+
+        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
+        jLen = elems.length;
+
+        for (j = 0; j < jLen; j += 1) {
+          if (type === 'st' || type === 'gs') {
+            ctx.beginPath();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(currentStyle.da);
+              ctx.lineDashOffset = currentStyle["do"];
+            }
+          }
+
+          nodes = elems[j].trNodes;
+          kLen = nodes.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            if (nodes[k].t === 'm') {
+              ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
+            } else if (nodes[k].t === 'c') {
+              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]);
+            } else {
+              ctx.closePath();
+            }
+          }
+
+          if (type === 'st' || type === 'gs') {
+            ctx.stroke();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(this.dashResetter);
+            }
+          }
+        }
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.fill(currentStyle.r);
+        }
+
+        renderer.restore();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
+    var i;
+    var len = items.length - 1;
+    var groupTransform;
+    groupTransform = parentTransform;
+
+    for (i = len; i >= 0; i -= 1) {
+      if (items[i].ty === 'tr') {
+        groupTransform = data[i].transform;
+        this.renderShapeTransform(parentTransform, groupTransform);
+      } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
+        this.renderPath(items[i], data[i]);
+      } else if (items[i].ty === 'fl') {
+        this.renderFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'st') {
+        this.renderStroke(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
+        this.renderGradientFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gr') {
+        this.renderShape(groupTransform, items[i].it, data[i].it);
+      } else if (items[i].ty === 'tm') {//
+      }
+    }
+
+    if (isMain) {
+      this.drawLayer();
+    }
+  };
+
+  CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
+    if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
+      var shapeNodes = styledShape.trNodes;
+      var paths = shape.paths;
+      var i;
+      var len;
+      var j;
+      var jLen = paths._length;
+      shapeNodes.length = 0;
+      var groupTransformMat = styledShape.transforms.finalTransform;
+
+      for (j = 0; j < jLen; j += 1) {
+        var pathNodes = paths.shapes[j];
+
+        if (pathNodes && pathNodes.v) {
+          len = pathNodes._length;
+
+          for (i = 1; i < len; i += 1) {
+            if (i === 1) {
+              shapeNodes.push({
+                t: 'm',
+                p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+              });
+            }
+
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
+            });
+          }
+
+          if (len === 1) {
+            shapeNodes.push({
+              t: 'm',
+              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+            });
+          }
+
+          if (pathNodes.c && len) {
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
+            });
+            shapeNodes.push({
+              t: 'z'
+            });
+          }
+        }
+      }
+
+      styledShape.trNodes = shapeNodes;
+    }
+  };
+
+  CVShapeElement.prototype.renderPath = function (pathData, itemData) {
+    if (pathData.hd !== true && pathData._shouldRender) {
+      var i;
+      var len = itemData.styledShapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+  };
+
+  CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var grd;
+
+    if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {
+      var ctx = this.globalData.canvasContext;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (styleData.t === 1) {
+        grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
+      } else {
+        var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+        var percent = itemData.h.v;
+
+        if (percent >= 1) {
+          percent = 0.99;
+        } else if (percent <= -1) {
+          percent = -0.99;
+        }
+
+        var dist = rad * percent;
+        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+        grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
+      }
+
+      var i;
+      var len = styleData.g.p;
+      var cValues = itemData.g.c;
+      var opacity = 1;
+
+      for (i = 0; i < len; i += 1) {
+        if (itemData.g._hasOpacity && itemData.g._collapsable) {
+          opacity = itemData.g.o[i * 2 + 1];
+        }
+
+        grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
+      }
+
+      styleElem.grd = grd;
+    }
+
+    styleElem.coOp = itemData.o.v * groupTransform.opacity;
+  };
+
+  CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var d = itemData.d;
+
+    if (d && (d._mdf || this._isFirstFrame)) {
+      styleElem.da = d.dashArray;
+      styleElem["do"] = d.dashoffset[0];
+    }
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+
+    if (itemData.w._mdf || this._isFirstFrame) {
+      styleElem.wi = itemData.w.v;
+    }
+  };
+
+  CVShapeElement.prototype.destroy = function () {
+    this.shapesData = null;
+    this.globalData = null;
+    this.canvasContext = null;
+    this.stylesList.length = 0;
+    this.itemsData.length = 0;
+  };
+
+  function CVTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.yOffset = 0;
+    this.fillColorAnim = false;
+    this.strokeColorAnim = false;
+    this.strokeWidthAnim = false;
+    this.stroke = false;
+    this.fill = false;
+    this.justifyOffset = 0;
+    this.currentRender = null;
+    this.renderType = 'canvas';
+    this.values = {
+      fill: 'rgba(0,0,0,0)',
+      stroke: 'rgba(0,0,0,0)',
+      sWidth: 0,
+      fValue: ''
+    };
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
+  CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
+
+  CVTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var hasFill = false;
+
+    if (documentData.fc) {
+      hasFill = true;
+      this.values.fill = this.buildColor(documentData.fc);
+    } else {
+      this.values.fill = 'rgba(0,0,0,0)';
+    }
+
+    this.fill = hasFill;
+    var hasStroke = false;
+
+    if (documentData.sc) {
+      hasStroke = true;
+      this.values.stroke = this.buildColor(documentData.sc);
+      this.values.sWidth = documentData.sw;
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+    var i;
+    var len;
+    var letters = documentData.l;
+    var matrixHelper = this.mHelper;
+    this.stroke = hasStroke;
+    this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
+    len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;
+
+    var charData;
+    var shapeData;
+    var k;
+    var kLen;
+    var shapes;
+    var j;
+    var jLen;
+    var pathNodes;
+    var commands;
+    var pathArr;
+    var singleShape = this.data.singleShape;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+      shapeData = charData && charData.data || {};
+      matrixHelper.reset();
+
+      if (singleShape && letters[i].n) {
+        xPos = -trackingOffset;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        firstLine = false;
+      }
+
+      shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
+      jLen = shapes.length;
+      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+      if (singleShape) {
+        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+      }
+
+      commands = createSizedArray(jLen - 1);
+      var commandsCounter = 0;
+
+      for (j = 0; j < jLen; j += 1) {
+        if (shapes[j].ty === 'sh') {
+          kLen = shapes[j].ks.k.i.length;
+          pathNodes = shapes[j].ks.k;
+          pathArr = [];
+
+          for (k = 1; k < kLen; k += 1) {
+            if (k === 1) {
+              pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+            }
+
+            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));
+          }
+
+          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));
+          commands[commandsCounter] = pathArr;
+          commandsCounter += 1;
+        }
+      }
+
+      if (singleShape) {
+        xPos += letters[i].l;
+        xPos += trackingOffset;
+      }
+
+      if (this.textSpans[cnt]) {
+        this.textSpans[cnt].elem = commands;
+      } else {
+        this.textSpans[cnt] = {
+          elem: commands
+        };
+      }
+
+      cnt += 1;
+    }
+  };
+
+  CVTextElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.font = this.values.fValue;
+    ctx.lineCap = 'butt';
+    ctx.lineJoin = 'miter';
+    ctx.miterLimit = 4;
+
+    if (!this.data.singleShape) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+    }
+
+    var i;
+    var len;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var lastFill = null;
+    var lastStroke = null;
+    var lastStrokeW = null;
+    var commands;
+    var pathArr;
+
+    for (i = 0; i < len; i += 1) {
+      if (!letters[i].n) {
+        renderedLetter = renderedLetters[i];
+
+        if (renderedLetter) {
+          this.globalData.renderer.save();
+          this.globalData.renderer.ctxTransform(renderedLetter.p);
+          this.globalData.renderer.ctxOpacity(renderedLetter.o);
+        }
+
+        if (this.fill) {
+          if (renderedLetter && renderedLetter.fc) {
+            if (lastFill !== renderedLetter.fc) {
+              lastFill = renderedLetter.fc;
+              ctx.fillStyle = renderedLetter.fc;
+            }
+          } else if (lastFill !== this.values.fill) {
+            lastFill = this.values.fill;
+            ctx.fillStyle = this.values.fill;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);
+        }
+
+        if (this.stroke) {
+          if (renderedLetter && renderedLetter.sw) {
+            if (lastStrokeW !== renderedLetter.sw) {
+              lastStrokeW = renderedLetter.sw;
+              ctx.lineWidth = renderedLetter.sw;
+            }
+          } else if (lastStrokeW !== this.values.sWidth) {
+            lastStrokeW = this.values.sWidth;
+            ctx.lineWidth = this.values.sWidth;
+          }
+
+          if (renderedLetter && renderedLetter.sc) {
+            if (lastStroke !== renderedLetter.sc) {
+              lastStroke = renderedLetter.sc;
+              ctx.strokeStyle = renderedLetter.sc;
+            }
+          } else if (lastStroke !== this.values.stroke) {
+            lastStroke = this.values.stroke;
+            ctx.strokeStyle = this.values.stroke;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);
+        }
+
+        if (renderedLetter) {
+          this.globalData.renderer.restore();
+        }
+      }
+    }
+  };
+
+  function CVImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.img = globalData.imageLoader.getAsset(this.assetData);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
+  CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVImageElement.prototype.createContent = function () {
+    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
+      var canvas = createTag('canvas');
+      canvas.width = this.assetData.w;
+      canvas.height = this.assetData.h;
+      var ctx = canvas.getContext('2d');
+      var imgW = this.img.width;
+      var imgH = this.img.height;
+      var imgRel = imgW / imgH;
+      var canvasRel = this.assetData.w / this.assetData.h;
+      var widthCrop;
+      var heightCrop;
+      var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
+
+      if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {
+        heightCrop = imgH;
+        widthCrop = heightCrop * canvasRel;
+      } else {
+        widthCrop = imgW;
+        heightCrop = widthCrop / canvasRel;
+      }
+
+      ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
+      this.img = canvas;
+    }
+  };
+
+  CVImageElement.prototype.renderInnerContent = function () {
+    this.canvasContext.drawImage(this.img, 0, 0);
+  };
+
+  CVImageElement.prototype.destroy = function () {
+    this.img = null;
+  };
+
+  function CVSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
+  CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVSolidElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.fillStyle = this.data.sc;
+    ctx.fillRect(0, 0, this.data.sw, this.data.sh); //
+  };
+
+  function CanvasRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([BaseRenderer], CanvasRendererBase);
+
+  CanvasRendererBase.prototype.createShape = function (data) {
+    return new CVShapeElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createText = function (data) {
+    return new CVTextElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createImage = function (data) {
+    return new CVImageElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createSolid = function (data) {
+    return new CVSolidElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  CanvasRendererBase.prototype.ctxTransform = function (props) {
+    if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
+      return;
+    }
+
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
+      return;
+    }
+
+    this.transformMat.cloneFromProps(props);
+    var cProps = this.contextData.cTr.props;
+    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]); // 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]);
+
+    this.contextData.cTr.cloneFromProps(this.transformMat.props);
+    var trProps = this.contextData.cTr.props;
+    this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
+  };
+
+  CanvasRendererBase.prototype.ctxOpacity = function (op) {
+    /* if(op === 1){
+          return;
+      } */
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+      return;
+    }
+
+    this.contextData.cO *= op < 0 ? 0 : op;
+
+    if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
+      this.canvasContext.globalAlpha = this.contextData.cO;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+    }
+  };
+
+  CanvasRendererBase.prototype.reset = function () {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    this.contextData.reset();
+  };
+
+  CanvasRendererBase.prototype.save = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.save();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.save();
+    }
+
+    var props = this.contextData.cTr.props;
+
+    if (this.contextData._length <= this.contextData.cArrPos) {
+      this.contextData.duplicate();
+    }
+
+    var i;
+    var arr = this.contextData.saved[this.contextData.cArrPos];
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = props[i];
+    }
+
+    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
+    this.contextData.cArrPos += 1;
+  };
+
+  CanvasRendererBase.prototype.restore = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.restore();
+      this.globalData.blendMode = 'source-over';
+    }
+
+    this.contextData.cArrPos -= 1;
+    var popped = this.contextData.saved[this.contextData.cArrPos];
+    var i;
+    var arr = this.contextData.cTr.props;
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = popped[i];
+    }
+
+    this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
+    popped = this.contextData.savedOp[this.contextData.cArrPos];
+    this.contextData.cO = popped;
+
+    if (this.globalData.currentGlobalAlpha !== popped) {
+      this.canvasContext.globalAlpha = popped;
+      this.globalData.currentGlobalAlpha = popped;
+    }
+  };
+
+  CanvasRendererBase.prototype.configAnimation = function (animData) {
+    if (this.animationItem.wrapper) {
+      this.animationItem.container = createTag('canvas');
+      var containerStyle = this.animationItem.container.style;
+      containerStyle.width = '100%';
+      containerStyle.height = '100%';
+      var origin = '0px 0px 0px';
+      containerStyle.transformOrigin = origin;
+      containerStyle.mozTransformOrigin = origin;
+      containerStyle.webkitTransformOrigin = origin;
+      containerStyle['-webkit-transform'] = origin;
+      containerStyle.contentVisibility = this.renderConfig.contentVisibility;
+      this.animationItem.wrapper.appendChild(this.animationItem.container);
+      this.canvasContext = this.animationItem.container.getContext('2d');
+
+      if (this.renderConfig.className) {
+        this.animationItem.container.setAttribute('class', this.renderConfig.className);
+      }
+
+      if (this.renderConfig.id) {
+        this.animationItem.container.setAttribute('id', this.renderConfig.id);
+      }
+    } else {
+      this.canvasContext = this.renderConfig.context;
+    }
+
+    this.data = animData;
+    this.layers = animData.layers;
+    this.transformCanvas = {
+      w: animData.w,
+      h: animData.h,
+      sx: 0,
+      sy: 0,
+      tx: 0,
+      ty: 0
+    };
+    this.setupGlobalData(animData, document.body);
+    this.globalData.canvasContext = this.canvasContext;
+    this.globalData.renderer = this;
+    this.globalData.isDashed = false;
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.transformCanvas = this.transformCanvas;
+    this.elements = createSizedArray(animData.layers.length);
+    this.updateContainerSize();
+  };
+
+  CanvasRendererBase.prototype.updateContainerSize = function () {
+    this.reset();
+    var elementWidth;
+    var elementHeight;
+
+    if (this.animationItem.wrapper && this.animationItem.container) {
+      elementWidth = this.animationItem.wrapper.offsetWidth;
+      elementHeight = this.animationItem.wrapper.offsetHeight;
+      this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
+      this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
+    } else {
+      elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+      elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
+    }
+
+    var elementRel;
+    var animationRel;
+
+    if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
+      var par = this.renderConfig.preserveAspectRatio.split(' ');
+      var fillType = par[1] || 'meet';
+      var pos = par[0] || 'xMidYMid';
+      var xPos = pos.substr(0, 4);
+      var yPos = pos.substr(4);
+      elementRel = elementWidth / elementHeight;
+      animationRel = this.transformCanvas.w / this.transformCanvas.h;
+
+      if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {
+        this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      } else {
+        this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      }
+
+      if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;
+      } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.tx = 0;
+      }
+
+      if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;
+      } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.ty = 0;
+      }
+    } else if (this.renderConfig.preserveAspectRatio === 'none') {
+      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    } else {
+      this.transformCanvas.sx = this.renderConfig.dpr;
+      this.transformCanvas.sy = this.renderConfig.dpr;
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    }
+
+    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];
+    /* var i, len = this.elements.length;
+      for(i=0;i<len;i+=1){
+          if(this.elements[i] && this.elements[i].data.ty === 0){
+              this.elements[i].resize(this.globalData.transformCanvas);
+          }
+      } */
+
+    this.ctxTransform(this.transformCanvas.props);
+    this.canvasContext.beginPath();
+    this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+    this.canvasContext.closePath();
+    this.canvasContext.clip();
+    this.renderFrame(this.renderedFrame, true);
+  };
+
+  CanvasRendererBase.prototype.destroy = function () {
+    if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.globalData.canvasContext = null;
+    this.animationItem.container = null;
+    this.destroyed = true;
+  };
+
+  CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {
+    if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {
+      return;
+    }
+
+    this.renderedFrame = num;
+    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+    this.globalData.frameId += 1;
+    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
+    this.globalData.projectInterface.currentFrame = num; // console.log('--------');
+    // console.log('NEW: ',num);
+
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      if (this.renderConfig.clearCanvas === true) {
+        this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+      } else {
+        this.save();
+      }
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+
+      if (this.renderConfig.clearCanvas !== true) {
+        this.restore();
+      }
+    }
+  };
+
+  CanvasRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    var element = this.createItem(this.layers[pos], this, this.globalData);
+    elements[pos] = element;
+    element.initExpressions();
+    /* if(this.layers[pos].ty === 0){
+          element.resize(this.globalData.transformCanvas);
+      } */
+  };
+
+  CanvasRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  CanvasRendererBase.prototype.hide = function () {
+    this.animationItem.container.style.display = 'none';
+  };
+
+  CanvasRendererBase.prototype.show = function () {
+    this.animationItem.container.style.display = 'block';
+  };
+
+  function CVCompElement(data, globalData, comp) {
+    this.completeLayers = false;
+    this.layers = data.layers;
+    this.pendingElements = [];
+    this.elements = createSizedArray(this.layers.length);
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);
+
+  CVCompElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.beginPath();
+    ctx.moveTo(0, 0);
+    ctx.lineTo(this.data.w, 0);
+    ctx.lineTo(this.data.w, this.data.h);
+    ctx.lineTo(0, this.data.h);
+    ctx.lineTo(0, 0);
+    ctx.clip();
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  CVCompElement.prototype.destroy = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.layers = null;
+    this.elements = null;
+  };
+
+  CVCompElement.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function CanvasRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([CanvasRendererBase], CanvasRenderer);
+
+  CanvasRenderer.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  registerRenderer('canvas', CanvasRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie_light_canvas.min.js b/build/player/lottie_light_canvas.min.js
index 8ad2c3a..a76c18f 100644
--- a/build/player/lottie_light_canvas.min.js
+++ b/build/player/lottie_light_canvas.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var i,C="",s=-999999,p=!1,e=!0,a="",n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_=Math.pow,k=Math.sqrt,f=Math.floor,d=(Math.max,Math.min),r={};!function(){var t,e=["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"],s=e.length;for(t=0;t<s;t+=1)r[e[t]]=Math[e[t]]}(),r.random=Math.random,r.abs=function(t){if("object"===typeof t&&t.length){var e,s=w(t.length),i=t.length;for(e=0;e<i;e+=1)s[e]=Math.abs(t[e]);return s}return Math.abs(t)};var D=150,j=Math.PI/180,v=.5519;function o(t){t?Math.round:function(t){return t}}function h(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}function l(t,e){this.type=t,this.direction=e<0?-1:1}function m(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}function c(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}function u(t,e){this.type=t,this.target=e}function g(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function y(t){this.type="configError",this.nativeError=t}o(!1);var t,S=(t=0,function(){return a+"__lottie_element_"+(t+=1)});function b(t,e,s){var i,a,r,n,o,h,l,p;switch(h=s*(1-e),l=s*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=s*(1-(1-o)*e),n%6){case 0:i=s,a=p,r=h;break;case 1:i=l,a=s,r=h;break;case 2:i=h,a=s,r=p;break;case 3:i=h,a=l,r=s;break;case 4:i=p,a=h,r=s;break;case 5:i=s,a=h,r=l}return[i,a,r]}function P(t,e,s){var i,a=Math.max(t,e,s),r=Math.min(t,e,s),n=a-r,o=0===a?0:n/a,h=a/255;switch(a){case r:i=0;break;case t:i=e-s+n*(e<s?6:0),i/=6*n;break;case e:i=s-t+2*n,i/=6*n;break;case s:i=t-e+4*n,i/=6*n}return[i,o,h]}function lt(t,e){var s=P(255*t[0],255*t[1],255*t[2]);return s[1]+=e,1<s[1]?s[1]=1:s[1]<=0&&(s[1]=0),b(s[0],s[1],s[2])}function pt(t,e){var s=P(255*t[0],255*t[1],255*t[2]);return s[2]+=e,1<s[2]?s[2]=1:s[2]<0&&(s[2]=0),b(s[0],s[1],s[2])}function ft(t,e){var s=P(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,1<s[0]?s[0]-=1:s[0]<0&&(s[0]+=1),b(s[0],s[1],s[2])}!function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1===e.length?"0"+e:e}();function x(){}x.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t],i=0;i<s.length;i+=1)s[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var W=function(){function s(t,e){var s,i=0,a=[];switch(t){case"int16":case"uint8c":s=1;break;default:s=1.1}for(i=0;i<e;i+=1)a.push(s);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):s(t,e)}:s}();function w(t){return Array.apply(null,{length:t})}function A(t){return document.createElement(t)}function T(){}T.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var F,M=(F={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return F[t]||""}),I={1:"butt",2:"round",3:"square"},E={1:"miter",2:"round",3:"bevel"},L=function(){var a=Math.cos,r=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function s(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var s=a(e),i=r(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}function d(t,e,s){return s||0===s||(s=1),1===t&&1===e&&1===s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function m(t,e,s,i,a,r,n,o,h,l,p,f,d,m,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=d,this.props[13]=m,this.props[14]=c,this.props[15]=u,this}function c(t,e,s){return s=s||0,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function u(t,e,s,i,a,r,n,o,h,l,p,f,d,m,c,u){var g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===a&&1===r&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*d,g[13]=g[13]*r+g[15]*m,g[14]=g[14]*p+g[15]*c,g[15]*=u,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],_=g[3],k=g[4],C=g[5],D=g[6],S=g[7],P=g[8],x=g[9],w=g[10],A=g[11],T=g[12],F=g[13],M=g[14],I=g[15];return g[0]=y*t+v*a+b*h+_*d,g[1]=y*e+v*r+b*l+_*m,g[2]=y*s+v*n+b*p+_*c,g[3]=y*i+v*o+b*f+_*u,g[4]=k*t+C*a+D*h+S*d,g[5]=k*e+C*r+D*l+S*m,g[6]=k*s+C*n+D*p+S*c,g[7]=k*i+C*o+D*f+S*u,g[8]=P*t+x*a+w*h+A*d,g[9]=P*e+x*r+w*l+A*m,g[10]=P*s+x*n+w*p+A*c,g[11]=P*i+x*o+w*f+A*u,g[12]=T*t+F*a+M*h+I*d,g[13]=T*e+F*r+M*l+I*m,g[14]=T*s+F*n+M*p+I*c,g[15]=T*i+F*o+M*f+I*u,this._identityCalculated=!1,this}function g(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function y(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function _(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function k(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function C(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function D(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function S(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,s=-this.props[1]/t,i=-this.props[4]/t,a=this.props[0]/t,r=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new L;return o.props[0]=e,o.props[1]=s,o.props[4]=i,o.props[5]=a,o.props[12]=r,o.props[13]=n,o}function P(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function x(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=P(t[e]);return i}function w(t,e,s){var i=W("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=s[0],i[5]=s[1];else{var a=this.props[0],r=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*a+t[1]*n+h,i[1]=t[0]*r+t[1]*o+l,i[2]=e[0]*a+e[1]*n+h,i[3]=e[0]*r+e[1]*o+l,i[4]=s[0]*a+s[1]*n+h,i[5]=s[0]*r+s[1]*o+l}return i}function A(t,e,s){return this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function T(t,e){if(this.isIdentity())return t+","+e;var s=this.props;return Math.round(100*(t*s[0]+e*s[4]+s[12]))/100+","+Math.round(100*(t*s[1]+e*s[5]+s[13]))/100}function F(){for(var t=0,e=this.props,s="matrix3d(";t<16;)s+=i(1e4*e[t])/1e4,s+=15===t?")":",",t+=1;return s}function M(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+M(t[0])+","+M(t[1])+","+M(t[4])+","+M(t[5])+","+M(t[12])+","+M(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=s,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=d,this.setTransform=m,this.translate=c,this.transform=u,this.applyToPoint=_,this.applyToX=k,this.applyToY=C,this.applyToZ=D,this.applyToPointArray=A,this.applyToTriplePoints=w,this.applyToPointStringified=T,this.toCSS=F,this.to2dCSS=I,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=x,this.inversePoint=P,this.getInverseMatrix=S,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=W("float32",16),this.reset()}}();!function(o,h){var l,p=this,f=256,d=6,m="random",c=h.pow(f,d),u=h.pow(2,52),g=2*u,y=f-1;function v(t){var e,s=t.length,n=this,i=0,a=n.i=n.j=0,r=n.S=[];for(s||(t=[s++]);i<f;)r[i]=i++;for(i=0;i<f;i++)r[i]=r[a=y&a+t[i%s]+(e=r[i])],r[a]=e;n.g=function(t){for(var e,s=0,i=n.i,a=n.j,r=n.S;t--;)e=r[i=y&i+1],s=s*f+r[y&(r[i]=r[a=y&a+e])+(r[a]=e)];return n.i=i,n.j=a,s}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function _(t,e){for(var s,i=t+"",a=0;a<i.length;)e[y&a]=y&(s^=19*e[y&a])+i.charCodeAt(a++);return k(e)}function k(t){return String.fromCharCode.apply(0,t)}h["seed"+m]=function(t,e,s){var i=[],a=_(function t(e,s){var i,a=[],r=typeof e;if(s&&"object"==r)for(i in e)try{a.push(t(e[i],s-1))}catch(t){}return a.length?a:"string"==r?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,k(o)]:null===t?function(){try{if(l)return k(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),k(t)}catch(t){var e=p.navigator,s=e&&e.plugins;return[+new Date,p,s,p.screen,k(o)]}}():t,3),i),r=new v(i),n=function(){for(var t=r.g(d),e=c,s=0;t<u;)t=(t+s)*f,e*=f,s=r.g(1);for(;g<=t;)t/=2,e/=2,s>>>=1;return(t+s)/e};return n.int32=function(){return 0|r.g(4)},n.quick=function(){return r.g(4)/4294967296},n.double=n,_(k(r.S),o),(e.pass||s||function(t,e,s,i){return i&&(i.S&&b(i,r),t.state=function(){return b(r,{})}),s?(h[m]=t,e):t})(n,a,"global"in e?e.global:this==h,e.state)},_(h.random(),o)}([],r);var Y=function(){var t={getBezierEasing:function(t,e,s,i,a){var r=a||("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p");if(o[r])return o[r];var n=new h([t,e,s,i]);return o[r]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function r(t){return 3*t}function f(t,e,s){return((i(e,s)*t+a(e,s))*t+r(e))*t}function d(t,e,s){return 3*i(e,s)*t*t+2*a(e,s)*t+r(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],s=this._p[1],i=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===s&&i===a?t:0===t?0:1===t?1:f(this._getTForX(t),s,a)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&s===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<l;++s)this._mSampleValues[s]=f(s*p,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],i=this._mSampleValues,a=0,r=1,n=l-1;r!==n&&i[r]<=t;++r)a+=p;var o=a+(t-i[--r])/(i[r+1]-i[r])*p,h=d(o,e,s);return.001<=h?function(t,e,s,i){for(var a=0;a<4;++a){var r=d(e,s,i);if(0===r)return e;e-=(f(e,s,i)-t)/r}return e}(t,o,e,s):0===h?o:function(t,e,s,i,a){for(var r,n,o=0;0<(r=f(n=e+(s-e)/2,i,a)-t)?s=n:e=n,1e-7<Math.abs(r)&&++o<10;);return n}(t,a,a+p,e,s)}},t}();function N(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1)for(var r in i=t[s].prototype)Object.prototype.hasOwnProperty.call(i,r)&&(e.prototype[r]=i[r])}!function(){for(var a=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),s=Math.max(0,16-(e-a)),i=setTimeout(function(){t(e+s)},s);return a=e+s,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var dt=function(){var T=Math;function g(t,e,s,i,a,r){var n=t*i+e*a+s*r-a*i-r*t-s*e;return-.001<n&&n<.001}var p=function(t,e,s,i){var a,r,n,o,h,l,p=D,f=0,d=[],m=[],c=Ft.newElement();for(n=s.length,a=0;a<p;a+=1){for(h=a/(p-1),r=l=0;r<n;r+=1)o=_(1-h,3)*t[r]+3*_(1-h,2)*h*s[r]+3*(1-h)*_(h,2)*i[r]+_(h,3)*e[r],d[r]=o,null!==m[r]&&(l+=_(d[r]-m[r],2)),m[r]=d[r];l&&(f+=l=k(l)),c.percents[a]=h,c.lengths[a]=f}return c.addedLength=f,c};function y(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,s,i){var a=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+s[0]+"_"+s[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[a]){var r,n,o,h,l,p,f,d=D,m=0,c=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&g(t[0],t[1],e[0],e[1],t[0]+s[0],t[1]+s[1])&&g(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(d=2);var u=new y(d);for(o=s.length,r=0;r<d;r+=1){for(f=w(o),l=r/(d-1),n=p=0;n<o;n+=1)h=_(1-l,3)*t[n]+3*_(1-l,2)*l*(t[n]+s[n])+3*(1-l)*_(l,2)*(e[n]+i[n])+_(l,3)*e[n],f[n]=h,null!==c&&(p+=_(f[n]-c[n],2));m+=p=k(p),u.points[r]=new v(p,f),c=f}u.segmentLength=m,b[a]=u}return b[a]});function F(t,e){var s=e.percents,i=e.lengths,a=s.length,r=f((a-1)*t),n=t*e.addedLength,o=0;if(r===a-1||0===r||n===i[r])return s[r];for(var h=i[r]>n?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(o=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=h,r<0||a-1<=r){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*o}var M=W("float32",8);return{getSegmentsLength:function(t){var e,s=Tt.newElement(),i=t.c,a=t.v,r=t.o,n=t.i,o=t._length,h=s.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(a[e],a[e+1],r[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(a[e],a[0],r[e],n[0]),l+=h[e].addedLength),s.totalLength=l,s},getNewSegment:function(t,e,s,i,a,r,n){a<0?a=0:1<a&&(a=1);var o,h=F(a,n),l=F(r=1<r?1:r,n),p=t.length,f=1-h,d=1-l,m=f*f*f,c=h*f*f*3,u=h*h*f*3,g=h*h*h,y=f*f*d,v=h*f*d+f*h*d+f*f*l,b=h*h*d+f*h*l+h*f*l,_=h*h*l,k=f*d*d,C=h*d*d+f*l*d+f*d*l,D=h*l*d+f*l*l+h*d*l,S=h*l*l,P=d*d*d,x=l*d*d+d*l*d+d*d*l,w=l*l*d+d*l*l+l*d*l,A=l*l*l;for(o=0;o<p;o+=1)M[4*o]=T.round(1e3*(m*t[o]+c*s[o]+u*i[o]+g*e[o]))/1e3,M[4*o+1]=T.round(1e3*(y*t[o]+v*s[o]+b*i[o]+_*e[o]))/1e3,M[4*o+2]=T.round(1e3*(k*t[o]+C*s[o]+D*i[o]+S*e[o]))/1e3,M[4*o+3]=T.round(1e3*(P*t[o]+x*s[o]+w*i[o]+A*e[o]))/1e3;return M},getPointInSegment:function(t,e,s,i,a,r){var n=F(a,r),o=1-n;return[T.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*s[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,T.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*s[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:g,pointOnLine3D:function(t,e,s,i,a,r,n,o,h){if(0===s&&0===r&&0===h)return g(t,e,i,a,n,o);var l,p=T.sqrt(T.pow(i-t,2)+T.pow(a-e,2)+T.pow(r-s,2)),f=T.sqrt(T.pow(n-t,2)+T.pow(o-e,2)+T.pow(h-s,2)),d=T.sqrt(T.pow(n-i,2)+T.pow(o-a,2)+T.pow(h-r,2));return-1e-4<(l=f<p?d<p?p-f-d:d-f-p:f<d?d-f-p:f-p-d)&&l<1e-4}}}(),V=function(){var i,a,r=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},s={postMessage:function(t){o.onmessage({data:t})}};function h(){a||((a=function(t){if(window.Worker&&window.Blob&&p){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),s=URL.createObjectURL(e);return new Worker(s)}return i=t,o}(function(e){if(s.dataManager||(s.dataManager=function(){function f(t,e){var s,i,a,r,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(s=t[i])&&!s.completed){if(s.completed=!0,s.tt&&(t[i-1].td=s.tt),s.hasMask){var p=s.masksProperties;for(r=p.length,a=0;a<r;a+=1)if(p[a].pt.k.i)c(p[a].pt.k);else for(o=p[a].pt.k.length,n=0;n<o;n+=1)p[a].pt.k[n].s&&c(p[a].pt.k[n].s[0]),p[a].pt.k[n].e&&c(p[a].pt.k[n].e[0])}0===s.ty?(s.layers=d(s.refId,e),f(s.layers,e)):4===s.ty?m(s.shapes):5===s.ty&&(0!==(h=s).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function d(t,e){for(var s=0,i=e.length;s<i;){if(e[s].id===t)return e[s].layers.__used?JSON.parse(JSON.stringify(e[s].layers)):(e[s].layers.__used=!0,e[s].layers);s+=1}return null}function m(t){var e,s,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)c(t[e].ks.k);else for(i=t[e].ks.k.length,s=0;s<i;s+=1)t[e].ks.k[s].s&&c(t[e].ks.k[s].s[0]),t[e].ks.k[s].e&&c(t[e].ks.k[s].e[0]);else"gr"===t[e].ty&&m(t[e].it)}function c(t){var e,s=t.i.length;for(e=0;e<s;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}var h,e=function(){var i=[4,4,14];function a(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(s=t[e],i=s.t.d,s.t.d={k:[{s:i,t:0}]})}return function(t){if(o(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),s=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,s,i,a,r,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(r=t.chars[e].data.shapes[0].it).length,s=0;s<i;s+=1)(a=r[s].ks.k).__converted||(c(r[s].ks.k),a.__converted=!0)}}),i=function(){var i=[5,7,15];function a(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(s=t[e],i=void 0,"number"==typeof(i=s.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(o(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),a=function(){var i=[4,1,9];function r(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)if("gr"===t[e].ty)r(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,s=0;s<i;s+=1)t[e].c.k[s].s&&(t[e].c.k[s].s[0]/=255,t[e].c.k[s].s[1]/=255,t[e].c.k[s].s[2]/=255,t[e].c.k[s].s[3]/=255),t[e].c.k[s].e&&(t[e].c.k[s].e[0]/=255,t[e].c.k[s].e[1]/=255,t[e].c.k[s].e[2]/=255,t[e].c.k[s].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function a(t){var e,s=t.length;for(e=0;e<s;e+=1)4===t[e].ty&&r(t[e].shapes)}return function(t){if(o(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),r=function(){var i=[4,4,18];function l(t){var e,s,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,s=0;s<i;s+=1)t[e].ks.k[s].s&&(t[e].ks.k[s].s[0].c=t[e].closed),t[e].ks.k[s].e&&(t[e].ks.k[s].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function a(t){var e,s,i,a,r,n,o=t.length;for(s=0;s<o;s+=1){if((e=t[s]).hasMask){var h=e.masksProperties;for(a=h.length,i=0;i<a;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,r=0;r<n;r+=1)h[i].pt.k[r].s&&(h[i].pt.k[r].s[0].c=h[i].cl),h[i].pt.k[r].e&&(h[i].pt.k[r].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(a(t),e(t),s(t),i(t),r(t),f(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=a,t.checkChars=s,t.checkPathProperties=i,t.checkShapes=r,t.completeLayers=f,t}()),s.assetLoader||(s.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,s,t,i){var a,r=new XMLHttpRequest;try{r.responseType="json"}catch(t){}r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)a=n(r),t(a);else try{a=n(r),t(a)}catch(t){i&&i(t)}};try{r.open("GET",e,!0)}catch(t){r.open("GET",s+"/"+e,!0)}r.send()}}}()),"loadAnimation"===e.data.type)s.assetLoader.load(e.data.path,e.data.fullPath,function(t){s.dataManager.completeData(t),s.postMessage({id:e.data.id,payload:t,status:"success"})},function(){s.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;s.dataManager.completeData(t),s.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&s.assetLoader.load(e.data.path,e.data.fullPath,function(t){s.postMessage({id:e.data.id,payload:t,status:"success"})},function(){s.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,s=e.id,i=n[s];n[s]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var s="processId_"+(r+=1);return n[s]={onComplete:t,onError:e},s}return{loadAnimation:function(t,e,s){h();var i=l(e,s);a.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,s){h();var i=l(e,s);a.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,s){h();var i=l(e,s);a.postMessage({type:"complete",animation:t,id:i})}}}();function q(t){for(var e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",a=e.length,r=0;r<a;r+=1)switch(e[r].toLowerCase()){case"italic":i="italic";break;case"bold":s="700";break;case"black":s="900";break;case"medium":s="500";break;case"regular":case"normal":s="400";break;case"light":case"thin":s="200"}return{style:i,weight:t.fWeight||s}}var R=function(){var r={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],s=[65039,8205];function d(t,e){var s=A("span");s.setAttribute("aria-hidden",!0),s.style.fontFamily=e;var i=A("span");i.innerText="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=function(t){var e,s=t.split(","),i=s.length,a=[];for(e=0;e<i;e+=1)"sans-serif"!==s[e]&&"monospace"!==s[e]&&a.push(s[e]);return a.join(",")}(t)+", "+e,{node:i,w:a,parent:s}}function m(t,e){var s=createNS("text");s.style.fontSize="100px";var i=q(e);return s.setAttribute("font-family",e.fFamily),s.setAttribute("font-style",i.style),s.setAttribute("font-weight",i.weight),s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.setAttribute("class",e.fClass)):s.style.fontFamily=e.fFamily,t.appendChild(s),A("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,s}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var s=t.toString(16)+e.toString(16);return-1!==i.indexOf(s)},t.isZeroWidthJoiner=function(t,e){return e?t===s[0]&&e===s[1]:t===s[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var s,i,a=t.length,r=this.chars.length;for(e=0;e<a;e+=1){for(s=0,i=!1;s<r;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(i=!0),s+=1;i||(this.chars.push(t[e]),r+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var s,i=t.list,a=i.length,r=a;for(s=0;s<a;s+=1){var n,o,h=!0;if(i[s].loaded=!1,i[s].monoCase=d(i[s].fFamily,"monospace"),i[s].sansCase=d(i[s].fFamily,"sans-serif"),i[s].fPath){if("p"===i[s].fOrigin||3===i[s].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[s].fFamily+'"], style[f-origin="3"][f-family="'+i[s].fFamily+'"]')).length&&(h=!1),h){var l=A("style");l.setAttribute("f-forigin",i[s].fOrigin),l.setAttribute("f-origin",i[s].origin),l.setAttribute("f-family",i[s].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[s].fFamily+"; font-style: normal; src: url('"+i[s].fPath+"');}",e.appendChild(l)}}else if("g"===i[s].fOrigin||1===i[s].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[s].fPath)&&(h=!1);if(h){var p=A("link");p.setAttribute("f-forigin",i[s].fOrigin),p.setAttribute("f-origin",i[s].origin),p.type="text/css",p.rel="stylesheet",p.href=i[s].fPath,document.body.appendChild(p)}}else if("t"===i[s].fOrigin||2===i[s].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[s].fPath===n[o].src&&(h=!1);if(h){var f=A("link");f.setAttribute("f-forigin",i[s].fOrigin),f.setAttribute("f-origin",i[s].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[s].fPath),e.appendChild(f)}}}else i[s].loaded=!0,r-=1;i[s].helper=m(e,i[s]),i[s].cache={},this.fonts.push(i[s])}0===r?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,s){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,s)),r},getFontByName:function(t){for(var e=0,s=this.fonts.length;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,s){var i=this.getFontByName(e),a=t.charCodeAt(0);if(!i.cache[a+1]){var r=i.helper;if(" "===t){r.textContent="|"+t+"|";var n=r.getComputedTextLength();r.textContent="||";var o=r.getComputedTextLength();i.cache[a+1]=(n-o)/100}else r.textContent=t,i.cache[a+1]=r.getComputedTextLength()/100}return i.cache[a+1]*s},checkLoadedFonts:function(){var t,e,s,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,e.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,e.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),z=function(){var f=s,a=Math.abs;function d(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=W("float32",this.pv.length));for(var a,r,n,o,h,l,p,f,d,m=e.lastIndex,c=m,u=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[c],r=this.keyframes[c+1],c===u-1&&t>=r.t-i){a.h&&(a=r),m=0;break}if(r.t-i>t){m=c;break}c<u-1?c+=1:(m=0,g=!1)}n=this.keyframesMetadata[c]||{};var y,v,b,_,k,C,D,S,P,x,w=r.t-i,A=a.t-i;if(a.to){n.bezierData||(n.bezierData=dt.buildBezierData(a.s,r.s||a.e,a.to,a.ti));var T=n.bezierData;if(w<=t||t<A){var F=w<=t?T.points.length-1:0;for(h=T.points[F].point.length,o=0;o<h;o+=1)s[o]=T.points[F].point[o]}else{n.__fnct?d=n.__fnct:(d=Y.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,n.__fnct=d),l=d((t-A)/(w-A));var M,I=T.segmentLength*l,E=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastPoint:0,g=!0,p=T.points.length;g;){if(E+=T.points[f].partialLength,0===I||0===l||f===T.points.length-1){for(h=T.points[f].point.length,o=0;o<h;o+=1)s[o]=T.points[f].point[o];break}if(E<=I&&I<E+T.points[f+1].partialLength){for(M=(I-E)/T.points[f+1].partialLength,h=T.points[f].point.length,o=0;o<h;o+=1)s[o]=T.points[f].point[o]+(T.points[f+1].point[o]-T.points[f].point[o])*M;break}f<p-1?f+=1:g=!1}e._lastPoint=f,e._lastAddedLength=E-T.points[f].partialLength,e._lastKeyframeIndex=c}}else{var L,N,V,R,z;if(u=a.s.length,y=r.s||a.e,this.sh&&1!==a.h)if(w<=t)s[0]=y[0],s[1]=y[1],s[2]=y[2];else if(t<=A)s[0]=a.s[0],s[1]=a.s[1],s[2]=a.s[2];else{var O=B(a.s),q=B(y);v=s,b=function(t,e,s){var i,a,r,n,o,h=[],l=t[0],p=t[1],f=t[2],d=t[3],m=e[0],c=e[1],u=e[2],g=e[3];(a=l*m+p*c+f*u+d*g)<0&&(a=-a,m=-m,c=-c,u=-u,g=-g);o=1e-6<1-a?(i=Math.acos(a),r=Math.sin(i),n=Math.sin((1-s)*i)/r,Math.sin(s*i)/r):(n=1-s,s);return h[0]=n*l+o*m,h[1]=n*p+o*c,h[2]=n*f+o*u,h[3]=n*d+o*g,h}(O,q,(t-A)/(w-A)),_=b[0],k=b[1],C=b[2],D=b[3],S=Math.atan2(2*k*D-2*_*C,1-2*k*k-2*C*C),P=Math.asin(2*_*k+2*C*D),x=Math.atan2(2*_*D-2*k*C,1-2*_*_-2*C*C),v[0]=S/j,v[1]=P/j,v[2]=x/j}else for(c=0;c<u;c+=1)1!==a.h&&(l=w<=t?1:t<A?0:(a.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[c]?d=n.__fnct[c]:(L=void 0===a.o.x[c]?a.o.x[0]:a.o.x[c],N=void 0===a.o.y[c]?a.o.y[0]:a.o.y[c],V=void 0===a.i.x[c]?a.i.x[0]:a.i.x[c],R=void 0===a.i.y[c]?a.i.y[0]:a.i.y[c],d=Y.getBezierEasing(L,N,V,R).get,n.__fnct[c]=d)):n.__fnct?d=n.__fnct:(L=a.o.x,N=a.o.y,V=a.i.x,R=a.i.y,d=Y.getBezierEasing(L,N,V,R).get,a.keyframeMetadata=d),d((t-A)/(w-A)))),y=r.s||a.e,z=1===a.h?a.s[c]:a.s[c]+(y[c]-a.s[c])*l,"multidimensional"===this.propType?s[c]=z:s=z}return e.lastIndex=m,s}function B(t){var e=t[0]*j,s=t[1]*j,i=t[2]*j,a=Math.cos(e/2),r=Math.cos(s/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(s/2),l=Math.sin(i/2);return[o*h*n+a*r*l,o*r*n+a*h*l,a*h*n-o*r*l,a*r*n-o*h*l]}function m(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=s&&s<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function c(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<a(this.v-e)&&(this.v=e,this._mdf=!0);else for(var s=0,i=this.v.length;s<i;)e=t[s]*this.mult,1e-5<a(this.v[s]-e)&&(this.v[s]=e,this._mdf=!0),s+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)s=this.effectsSequence[t](s);this.setVValue(s),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function g(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,s,i){this.propType="unidimensional",this.mult=s||1,this.data=e,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=c,this.addEffect=g}function o(t,e,s,i){var a;this.propType="multidimensional",this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r=e.k.length;for(this.v=W("float32",r),this.pv=W("float32",r),this.vel=W("float32",r),a=0;a<r;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=c,this.addEffect=g}function h(t,e,s,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=c,this.interpolateValue=d,this.effectsSequence=[m.bind(this)],this.addEffect=g}function l(t,e,s,i){var a;this.propType="multidimensional";var r,n,o,h,l=e.k.length;for(a=0;a<l-1;a+=1)e.k[a].to&&e.k[a].s&&e.k[a+1]&&e.k[a+1].s&&(r=e.k[a].s,n=e.k[a+1].s,o=e.k[a].to,h=e.k[a].ti,(2===r.length&&(r[0]!==n[0]||r[1]!==n[1])&&dt.pointOnLine2D(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&dt.pointOnLine2D(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===r.length&&(r[0]!==n[0]||r[1]!==n[1]||r[2]!==n[2])&&dt.pointOnLine3D(r[0],r[1],r[2],n[0],n[1],n[2],r[0]+o[0],r[1]+o[1],r[2]+o[2])&&dt.pointOnLine3D(r[0],r[1],r[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[a].to=null,e.k[a].ti=null),r[0]===n[0]&&r[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===r.length||r[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[a].to=null,e.k[a].ti=null));this.effectsSequence=[m.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=c,this.interpolateValue=d,this.frameId=-1;var p=e.k[0].s.length;for(this.v=W("float32",p),this.pv=W("float32",p),a=0;a<p;a+=1)this.v[a]=f,this.pv[a]=f;this._caching={lastFrame:f,lastIndex:0,value:W("float32",p)},this.addEffect=g}return{getProp:function(t,e,s,i,a){var r;if(e.k.length)if("number"==typeof e.k[0])r=new o(t,e,i,a);else switch(s){case 0:r=new h(t,e,i,a);break;case 1:r=new l(t,e,i,a)}else r=new n(t,e,i,a);return r.effectsSequence.length&&a.addDynamicProperty(r),r}}}(),O=function(){var n=[0,0];function i(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new L,this.pre=new L,this.appliedTransformations=0,this.initDynamicPropertyContainer(s||t),e.p&&e.p.s?(this.px=z.getProp(t,e.p.x,0,0,this),this.py=z.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=z.getProp(t,e.p.z,0,0,this))):this.p=z.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=z.getProp(t,e.rx,0,j,this),this.ry=z.getProp(t,e.ry,0,j,this),this.rz=z.getProp(t,e.rz,0,j,this),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=z.getProp(t,e.or,1,j,this),this.or.sh=!0}else this.r=z.getProp(t,e.r||{k:0},0,j,this);e.sk&&(this.sk=z.getProp(t,e.sk,0,j,this),this.sa=z.getProp(t,e.sa,0,j,this)),this.a=z.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=z.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=z.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var s,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(s=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(s=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],i=[];var a=this.px,r=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(s[0]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),s[1]=r.getValueAtTime((r.keyframes[0].t+.01)/e,0),i[0]=a.getValueAtTime(a.keyframes[0].t/e,0),i[1]=r.getValueAtTime(r.keyframes[0].t/e,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(s[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),s[1]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/e,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0),i[1]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/e,0)):(s=[a.pv,r.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime),i[1]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/e,r.offsetTime))}else s=i=n;this.v.rotate(-Math.atan2(s[1]-i[1],s[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},N([T],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=T.prototype.addDynamicProperty,{getTransformProperty:function(t,e,s){return new i(t,e,s)}}}();function B(){this.c=!1,this._length=0,this._maxLength=8,this.v=w(this._maxLength),this.o=w(this._maxLength),this.i=w(this._maxLength)}B.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=xt.newElement(),this.o[s]=xt.newElement(),this.i[s]=xt.newElement(),s+=1},B.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},B.prototype.doubleArrayLength=function(){this.v=this.v.concat(w(this._maxLength)),this.i=this.i.concat(w(this._maxLength)),this.o=this.o.concat(w(this._maxLength)),this._maxLength*=2},B.prototype.setXYAt=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[i]||r[i]&&!a)&&(r[i]=xt.newElement()),r[i][0]=t,r[i][1]=e},B.prototype.setTripleAt=function(t,e,s,i,a,r,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(s,i,"o",n,o),this.setXYAt(a,r,"i",n,o)},B.prototype.reverse=function(){var t=new B;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),a=1);var r,n=this._length-1,o=this._length;for(r=a;r<o;r+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],s[n][0],s[n][1],r,!1),n-=1;return t};var G,H,X=function(){var a=-999999;function t(t,e,s){var i,a,r,n,o,h,l,p,f,d=s.lastIndex,m=this.keyframes;if(t<m[0].t-this.offsetTime)i=m[0].s[0],r=!0,d=0;else if(t>=m[m.length-1].t-this.offsetTime)i=m[m.length-1].s?m[m.length-1].s[0]:m[m.length-2].e[0],r=!0;else{for(var c,u,g,y=d,v=m.length-1,b=!0;b&&(c=m[y],!((u=m[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},d=y,!(r=1===c.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<c.t-this.offsetTime)p=0;else{var _;g.__fnct?_=g.__fnct:(_=Y.getBezierEasing(c.o.x,c.o.y,c.i.x,c.i.y).get,g.__fnct=_),p=_((t-(c.t-this.offsetTime))/(u.t-this.offsetTime-(c.t-this.offsetTime)))}a=u.s?u.s[0]:c.e[0]}i=c.s[0]}for(h=e._length,l=i.i[0].length,s.lastIndex=d,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=r?i.i[n][o]:i.i[n][o]+(a.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=r?i.o[n][o]:i.o[n][o]+(a.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=r?i.v[n][o]:i.v[n][o]+(a.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function r(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var s,i=t._length;for(s=0;s<i;s+=1)if(t.v[s][0]!==e.v[s][0]||t.v[s][1]!==e.v[s][1]||t.o[s][0]!==e.o[s][0]||t.o[s][1]!==e.o[s][1]||t.i[s][0]!==e.i[s][0]||t.i[s][1]!==e.i[s][1])return!1;return!0})(this.v,t)||(this.v=wt.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var s=this.effectsSequence.length;for(e=0;e<s;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,s){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===s?e.pt.k:e.ks.k;this.v=wt.clone(i),this.pv=wt.clone(this.v),this.localShapeCollection=At.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,s){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===s?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=wt.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=wt.clone(this.v),this.localShapeCollection=At.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=a,this.reset=r,this._caching={lastFrame:a,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==a&&(i<e&&t<e||s<i&&s<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=s,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=s,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=v;function t(t,e){this.v=wt.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=At.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=z.getProp(t,e.p,1,0,this),this.s=z.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=3!==this.d,r=this.v;r.v[0][0]=t,r.v[0][1]=e-i,r.v[1][0]=a?t+s:t-s,r.v[1][1]=e,r.v[2][0]=t,r.v[2][1]=e+i,r.v[3][0]=a?t-s:t+s,r.v[3][1]=e,r.i[0][0]=a?t-s*n:t+s*n,r.i[0][1]=e-i,r.i[1][0]=a?t+s:t-s,r.i[1][1]=e-i*n,r.i[2][0]=a?t+s*n:t-s*n,r.i[2][1]=e+i,r.i[3][0]=a?t-s:t+s,r.i[3][1]=e+i*n,r.o[0][0]=a?t+s*n:t-s*n,r.o[0][1]=e-i,r.o[1][0]=a?t+s:t-s,r.o[1][1]=e+i*n,r.o[2][0]=a?t-s*n:t+s*n,r.o[2][1]=e+i,r.o[3][0]=a?t-s:t+s,r.o[3][1]=e-i*n}},N([T],t),t}(),l=function(){function t(t,e){this.v=wt.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=z.getProp(t,e.ir,0,0,this),this.is=z.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=z.getProp(t,e.pt,0,0,this),this.p=z.getProp(t,e.p,1,0,this),this.r=z.getProp(t,e.r,0,j,this),this.or=z.getProp(t,e.or,0,0,this),this.os=z.getProp(t,e.os,0,.01,this),this.localShapeCollection=At.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,s,i,a=2*Math.floor(this.pt.v),r=2*Math.PI/a,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*a),d=2*Math.PI*h/(2*a),m=-Math.PI/2;m+=this.r.v;var c=3===this.data.d?-1:1;for(t=this.v._length=0;t<a;t+=1){s=n?l:p,i=n?f:d;var u=(e=n?o:h)*Math.cos(m),g=e*Math.sin(m),y=0===u&&0===g?0:g/Math.sqrt(u*u+g*g),v=0===u&&0===g?0:-u/Math.sqrt(u*u+g*g);u+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(u,g,u-y*i*s*c,g-v*i*s*c,u+y*i*s*c,g+v*i*s*c,t,!0),n=!n,m+=r*c}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),s=2*Math.PI/e,i=this.or.v,a=this.os.v,r=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*r*a*o,l-f*r*a*o,h+p*r*a*o,l+f*r*a*o,t,!0),n+=s*o}this.paths.length=0,this.paths[0]=this.v}},N([T],t),t}(),p=function(){function t(t,e){this.v=wt.newElement(),this.v.c=!0,this.localShapeCollection=At.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=z.getProp(t,e.p,1,0,this),this.s=z.getProp(t,e.s,1,0,this),this.r=z.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=d(s,i,this.r.v),r=a*(1-v);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+a,t+s,e-i+r,0,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-r,t+s,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+s-a,e+i,t+s-a,e+i,t+s-r,e+i,2,!0),this.v.setTripleAt(t-s+a,e+i,t-s+r,e+i,t-s+a,e+i,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-a,t-s,e+i-r,4,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+r,t-s,e-i+a,5,!0),this.v.setTripleAt(t-s+a,e-i,t-s+a,e-i,t-s+r,e-i,6,!0),this.v.setTripleAt(t+s-a,e-i,t+s-r,e-i,t+s-a,e-i,7,!0)):(this.v.setTripleAt(t-s,e+i,t-s+r,e+i,t-s,e+i,2),this.v.setTripleAt(t-s,e-i,t-s,e-i+r,t-s,e-i,3))):(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+r,t+s,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+s-a,e-i,t+s-a,e-i,t+s-r,e-i,1,!0),this.v.setTripleAt(t-s+a,e-i,t-s+r,e-i,t-s+a,e-i,2,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+a,t-s,e-i+r,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-r,t-s,e+i-a,4,!0),this.v.setTripleAt(t-s+a,e+i,t-s+a,e+i,t-s+r,e+i,5,!0),this.v.setTripleAt(t+s-a,e+i,t+s-r,e+i,t+s-a,e+i,6,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-a,t+s,e+i-r,7,!0)):(this.v.setTripleAt(t-s,e-i,t-s+r,e-i,t-s,e-i,1,!0),this.v.setTripleAt(t-s,e+i,t-s,e+i-r,t-s,e+i,2,!0),this.v.setTripleAt(t+s,e+i,t+s-r,e+i,t+s,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},N([T],t),t}();var f={getShapeProp:function(t,e,s){var i;return 3===s||4===s?i=(3===s?e.pt:e.ks).k.length?new o(t,e,s):new n(t,e,s):5===s?i=new p(t,e):6===s?i=new h(t,e):7===s&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return f}(),J=(H={},(G={}).registerModifier=function(t,e){H[t]||(H[t]=e)},G.getModifier=function(t,e,s){return new H[t](e,s)},G);function K(){}function Z(){}function U(){}function Q(){}function $(){}function tt(){this._length=0,this._maxLength=4,this.shapes=w(this._maxLength)}function et(t,e,s,i){var a;this.elem=t,this.frameId=-1,this.dataProps=w(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=W("float32",e.length?e.length-1:0),this.dashoffset=W("float32",1),this.initDynamicPropertyContainer(i);var r,n=e.length||0;for(a=0;a<n;a+=1)r=z.getProp(t,e[a].v,0,0,this),this.k=r.k||this.k,this.dataProps[a]={n:e[a].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}function st(t,e,s){this.data=e,this.c=W("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=W("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=z.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}K.prototype.initModifierProperties=function(){},K.prototype.addShapeToModifier=function(){},K.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:At.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},K.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=s,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},K.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},N([T],K),N([K],Z),Z.prototype.initModifierProperties=function(t,e){this.s=z.getProp(t,e.s,0,.01,this),this.e=z.getProp(t,e.e,0,.01,this),this.o=z.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},Z.prototype.addShapeToModifier=function(t){t.pathsData=[]},Z.prototype.calculateShapeEdges=function(t,e,s,i,a){var r=[];e<=1?r.push({s:t,e:e}):1<=t?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,o,h=[],l=r.length;for(n=0;n<l;n+=1){var p,f;if(!((o=r[n]).e*a<i||o.s*a>i+s))p=o.s*a<=i?0:(o.s*a-i)/s,f=o.e*a>=i+s?1:(o.e*a-i)/s,h.push([p,f])}return h.length||h.push([0,0]),h},Z.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)Tt.release(t[e]);return t.length=0,t},Z.prototype.processShapes=function(t){var e,s,i,a;if(this._mdf||t){var r=this.o.v%360/360;if(r<0&&(r+=1),e=1<this.s.v?1+r:this.s.v<0?0+r:this.s.v+r,(s=1<this.e.v?1+r:this.e.v<0?0+r:this.e.v+r)<e){var n=e;e=s,s=n}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var o,h,l,p,f,d=this.shapes.length,m=0;if(s===e)for(a=0;a<d;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===s&&0===e||0===s&&1===e){if(this._mdf)for(a=0;a<d;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var c,u,g=[];for(a=0;a<d;a+=1)if((c=this.shapes[a]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=c.shape.paths)._length,f=0,!c.shape._mdf&&c.pathsData.length)f=c.totalShapeLength;else{for(l=this.releasePathsData(c.pathsData),o=0;o<h;o+=1)p=dt.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;c.totalShapeLength=f,c.pathsData=l}m+=f,c.shape._mdf=!0}else c.shape.paths=c.localShapeCollection;var y,v=e,b=s,_=0;for(a=d-1;0<=a;a-=1)if((c=this.shapes[a]).shape._mdf){for((u=c.localShapeCollection).releaseShapes(),2===this.m&&1<d?(y=this.calculateShapeEdges(e,s,c.totalShapeLength,_,m),_+=c.totalShapeLength):y=[[v,b]],h=y.length,o=0;o<h;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:c.totalShapeLength*v,e:c.totalShapeLength*b}):1<=v?g.push({s:c.totalShapeLength*(v-1),e:c.totalShapeLength*(b-1)}):(g.push({s:c.totalShapeLength*v,e:c.totalShapeLength}),g.push({s:0,e:c.totalShapeLength*(b-1)}));var k=this.addShapes(c,g[0]);if(g[0].s!==g[0].e){if(1<g.length)if(c.shape.paths.shapes[c.shape.paths._length-1].c){var C=k.pop();this.addPaths(k,u),k=this.addShapes(c,g[1],C)}else this.addPaths(k,u),k=this.addShapes(c,g[1]);this.addPaths(k,u)}}c.shape.paths=u}}},Z.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},Z.prototype.addSegment=function(t,e,s,i,a,r,n){a.setXYAt(e[0],e[1],"o",r),a.setXYAt(s[0],s[1],"i",r+1),n&&a.setXYAt(t[0],t[1],"v",r),a.setXYAt(i[0],i[1],"v",r+1)},Z.prototype.addSegmentFromArray=function(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)},Z.prototype.addShapes=function(t,e,s){var i,a,r,n,o,h,l,p,f=t.pathsData,d=t.shape.paths.shapes,m=t.shape.paths._length,c=0,u=[],g=!0;for(p=s?(o=s._length,s._length):(s=wt.newElement(),o=0),u.push(s),i=0;i<m;i+=1){for(h=f[i].lengths,s.c=d[i].c,r=d[i].c?h.length:h.length+1,a=1;a<r;a+=1)if(c+(n=h[a-1]).addedLength<e.s)c+=n.addedLength,s.c=!1;else{if(c>e.e){s.c=!1;break}e.s<=c&&e.e>=c+n.addedLength?(this.addSegment(d[i].v[a-1],d[i].o[a-1],d[i].i[a],d[i].v[a],s,o,g),g=!1):(l=dt.getNewSegment(d[i].v[a-1],d[i].v[a],d[i].o[a-1],d[i].i[a],(e.s-c)/n.addedLength,(e.e-c)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1),c+=n.addedLength,o+=1}if(d[i].c&&h.length){if(n=h[a-1],c<=e.e){var y=h[a-1].addedLength;e.s<=c&&e.e>=c+y?(this.addSegment(d[i].v[a-1],d[i].o[a-1],d[i].i[0],d[i].v[0],s,o,g),g=!1):(l=dt.getNewSegment(d[i].v[a-1],d[i].v[0],d[i].o[a-1],d[i].i[0],(e.s-c)/y,(e.e-c)/y,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1)}else s.c=!1;c+=n.addedLength,o+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),c>e.e)break;i<m-1&&(s=wt.newElement(),g=!0,u.push(s),o=0)}return u},J.registerModifier("tm",Z),N([K],U),U.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=z.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},U.prototype.processPath=function(t,e){var s,i=wt.newElement();i.c=t.c;var a,r,n,o,h,l,p,f,d,m,c,u,g=t._length,y=0;for(s=0;s<g;s+=1)a=t.v[s],n=t.o[s],r=t.i[s],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==s&&s!==g-1||t.c?(o=0===s?t.v[g-1]:t.v[s-1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=c=a[0]+(o[0]-a[0])*l,f=u=a[1]-(a[1]-o[1])*l,d=p-(p-a[0])*v,m=f-(f-a[1])*v,i.setTripleAt(p,f,d,m,c,u,y),y+=1,o=s===g-1?t.v[0]:t.v[s+1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=a[0]+(o[0]-a[0])*l,f=m=a[1]+(o[1]-a[1])*l,c=p-(p-a[0])*v,u=f-(f-a[1])*v,i.setTripleAt(p,f,d,m,c,u,y)):i.setTripleAt(a[0],a[1],n[0],n[1],r[0],r[1],y):i.setTripleAt(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],y),y+=1;return i},U.prototype.processShapes=function(t){var e,s,i,a,r,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(s=0;s<o;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},J.registerModifier("rd",U),N([K],Q),Q.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=z.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},Q.prototype.processPath=function(t,e){var s=e/100,i=[0,0],a=t._length,r=0;for(r=0;r<a;r+=1)i[0]+=t.v[r][0],i[1]+=t.v[r][1];i[0]/=a,i[1]/=a;var n,o,h,l,p,f,d=wt.newElement();for(d.c=t.c,r=0;r<a;r+=1)n=t.v[r][0]+(i[0]-t.v[r][0])*s,o=t.v[r][1]+(i[1]-t.v[r][1])*s,h=t.o[r][0]+(i[0]-t.o[r][0])*-s,l=t.o[r][1]+(i[1]-t.o[r][1])*-s,p=t.i[r][0]+(i[0]-t.i[r][0])*-s,f=t.i[r][1]+(i[1]-t.i[r][1])*-s,d.setTripleAt(n,o,h,l,p,f,r);return d},Q.prototype.processShapes=function(t){var e,s,i,a,r,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(s=0;s<o;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},J.registerModifier("pb",Q),N([K],$),$.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=z.getProp(t,e.c,0,null,this),this.o=z.getProp(t,e.o,0,null,this),this.tr=O.getTransformProperty(t,e.tr,this),this.so=z.getProp(t,e.tr.so,0,.01,this),this.eo=z.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new L,this.rMatrix=new L,this.sMatrix=new L,this.tMatrix=new L,this.matrix=new L},$.prototype.applyTransforms=function(t,e,s,i,a,r){var n=r?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-a),h=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(r?1/o:o,r?1/h:h),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])},$.prototype.init=function(t,e,s,i){for(this.elem=t,this.arr=e,this.pos=s,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[s]);0<s;)s-=1,this._elements.unshift(e[s]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},$.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},$.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},$.prototype.changeGroupRender=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]._render=e,"gr"===t[s].ty&&this.changeGroupRender(t[s].it,e)},$.prototype.processShapes=function(t){var e,s,i,a,r,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=r=0;i<=this._groups.length-1;i+=1){if(o=r<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}r+=1}this._currentCopies=h;var d=this.o.v,m=d%1,c=0<d?Math.floor(d):Math.ceil(d),u=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(0<d){for(;_<c;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,m,!1),_+=m)}else if(d<0){for(;c<_;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-m,!0),_-=m)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)s[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)s[v]=this.matrix.props[v];_+=1,r-=1,i+=a}}else for(r=this._currentCopies,i=0,a=1;r;)s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,r-=1,i+=a;return n},$.prototype.addShape=function(){},J.registerModifier("rp",$),tt.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(w(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},tt.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)wt.release(this.shapes[t]);this._length=0},et.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,s=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<s;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},N([T],et),st.prototype.comparePoints=function(t,e){for(var s=0,i=this.o.length/2;s<i;){if(.01<Math.abs(t[4*s]-t[4*e+2*s]))return!1;s+=1}return!0},st.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},st.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,s,i,a=4*this.data.p;for(e=0;e<a;e+=1)s=e%4==0?100:255,i=Math.round(this.prop.v[e]*s),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)s=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},N([T],st);var it,at,rt=function(t,e,s,i){if(0===e)return"";var a,r=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(a=1;a<e;a+=1)h+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[a][0],n[a][1])+" "+i.applyToPointStringified(o[a][0],o[a][1]);return s&&e&&(h+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},nt=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ot=function(){var a=function(){var t=A("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(t,e,s){var i="";if(t.e)i=t.p;else if(e){var a=t.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),i=e+a}else i=s,i+=t.u?t.u:"",i+=t.p;return i}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,s=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(s)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},s=r(t,this.assetsPath,this.path);return V.loadData(s,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(t,e){var s;this.imagesLoadedCb=e;var i=t.length;for(s=0;s<i;s+=1)t[s].layers||(t[s].t&&"seq"!==t[s].t?3===t[s].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[s]))):(this.totalImages+=1,this.images.push(this._createImageData(t[s]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,s=this.images.length;e<s;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=r(t,this.assetsPath,this.path),s=A("img");s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){i.img=a,this._imageLoaded()}.bind(this),!1),s.src=e;var i={img:s,assetData:t};return i},createImageData:function(t){var e=r(t,this.assetsPath,this.path),s=createNS("image");n?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){i.img=a,this._imageLoaded()}.bind(this),!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(s):this._elementHelper.appendChild(s);var i={img:s,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},s}(),ht=(it={maskType:!0},(/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))&&(it.maskType=!1),it),mt=((at={}).createFilter=function(t,e){var s=createNS("filter");return s.setAttribute("id",t),!0!==e&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%")),s},at.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},at);function ct(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=w(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function ut(t,e,s){var i={propType:!1},a=z.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,j,s):i,rx:r.rx?a(t,r.rx,0,j,s):i,ry:r.ry?a(t,r.ry,0,j,s):i,sk:r.sk?a(t,r.sk,0,j,s):i,sa:r.sa?a(t,r.sa,0,j,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=Dt.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function gt(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function yt(t,e){this._frameId=s,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}ct.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=z.getProp;for(t=0;t<s;t+=1)e=this._textData.a[t],this._animatorsData[t]=new ut(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},ct.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var s,i,a,r,n,o,h,l,p,f,d,m,c,u,g,y,v,b,_,k=this._moreOptions.alignment.v,C=this._animatorsData,D=this._textData,S=this.mHelper,P=this._renderType,x=this.renderedLetters.length,w=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var A,T=_.v;for(this._pathData.r.v&&(T=T.reverse()),n={tLength:0,segments:[]},r=T._length-1,a=y=0;a<r;a+=1)A=dt.buildBezierData(T.v[a],T.v[a+1],[T.o[a][0]-T.v[a][0],T.o[a][1]-T.v[a][1]],[T.i[a+1][0]-T.v[a+1][0],T.i[a+1][1]-T.v[a+1][1]]),n.tLength+=A.segmentLength,n.segments.push(A),y+=A.segmentLength;a=r,_.v.c&&(A=dt.buildBezierData(T.v[a],T.v[0],[T.o[a][0]-T.v[a][0],T.o[a][1]-T.v[a][1]],[T.i[0][0]-T.v[0][0],T.i[0][1]-T.v[0][1]]),n.tLength+=A.segmentLength,n.segments.push(A),y+=A.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=1,p=!(l=d=0),u=n.segments,o<0&&_.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(c=u[d=u.length-1].points).length-1;o<0;)o+=c[f].partialLength,(f-=1)<0&&(f=(c=u[d-=1].points).length-1);m=(c=u[d].points)[f-1],g=(h=c[f]).partialLength}r=w.length,i=s=0;var F,M,I,E,L,N=1.2*t.finalSize*.714,V=!0;I=C.length;var R,z,O,q,B,j,W,Y,G,H,X,J,K=-1,Z=o,U=d,Q=f,$=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var st=0,it=0,at=2===t.j?-.5:-1,rt=0,nt=!0;for(a=0;a<r;a+=1)if(w[a].n){for(st&&(st+=it);rt<a;)w[rt].animatorJustifyOffset=st,rt+=1;nt=!(st=0)}else{for(M=0;M<I;M+=1)(F=C[M].a).t.propType&&(nt&&2===t.j&&(it+=F.t.v*at),(L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars)).length?st+=F.t.v*L[0]*at:st+=F.t.v*L*at);nt=!1}for(st&&(st+=it);rt<a;)w[rt].animatorJustifyOffset=st,rt+=1}for(a=0;a<r;a+=1){if(S.reset(),q=1,w[a].n)s=0,i+=t.yOffset,i+=V?1:0,o=Z,V=!1,this._hasMaskedPath&&(f=Q,m=(c=u[d=U].points)[f-1],g=(h=c[f]).partialLength,l=0),J=G=X=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if($!==w[a].line){switch(t.j){case 1:o+=y-t.lineWidths[w[a].line];break;case 2:o+=(y-t.lineWidths[w[a].line])/2}$=w[a].line}K!==w[a].ind&&(w[K]&&(o+=w[K].extra),o+=w[a].an/2,K=w[a].ind),o+=k[0]*w[a].an*.005;var ot=0;for(M=0;M<I;M+=1)(F=C[M].a).p.propType&&((L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars)).length?ot+=F.p.v[0]*L[0]:ot+=F.p.v[0]*L),F.a.propType&&((L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars)).length?ot+=F.a.v[0]*L[0]:ot+=F.a.v[0]*L);for(p=!0,this._pathData.a.v&&(o=.5*w[0].an+(y-this._pathData.f.v-.5*w[0].an-.5*w[w.length-1].an)*K/(r-1),o+=this._pathData.f.v);p;)o+ot<=l+g||!c?(v=(o+ot-l)/h.partialLength,z=m.point[0]+(h.point[0]-m.point[0])*v,O=m.point[1]+(h.point[1]-m.point[1])*v,S.translate(-k[0]*w[a].an*.005,-k[1]*N*.01),p=!1):c&&(l+=h.partialLength,(f+=1)>=c.length&&(f=0,c=u[d+=1]?u[d].points:_.v.c?u[d=f=0].points:(l-=h.partialLength,null)),c&&(m=h,g=(h=c[f]).partialLength));R=w[a].an/2-w[a].add,S.translate(-R,0,0)}else R=w[a].an/2-w[a].add,S.translate(-R,0,0),S.translate(-k[0]*w[a].an*.005,-k[1]*N*.01,0);for(M=0;M<I;M+=1)(F=C[M].a).t.propType&&(L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars),0===s&&0===t.j||(this._hasMaskedPath?L.length?o+=F.t.v*L[0]:o+=F.t.v*L:L.length?s+=F.t.v*L[0]:s+=F.t.v*L));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(B=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),M=0;M<I;M+=1)(F=C[M].a).a.propType&&((L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars)).length?S.translate(-F.a.v[0]*L[0],-F.a.v[1]*L[1],F.a.v[2]*L[2]):S.translate(-F.a.v[0]*L,-F.a.v[1]*L,F.a.v[2]*L));for(M=0;M<I;M+=1)(F=C[M].a).s.propType&&((L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars)).length?S.scale(1+(F.s.v[0]-1)*L[0],1+(F.s.v[1]-1)*L[1],1):S.scale(1+(F.s.v[0]-1)*L,1+(F.s.v[1]-1)*L,1));for(M=0;M<I;M+=1){if(F=C[M].a,L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars),F.sk.propType&&(L.length?S.skewFromAxis(-F.sk.v*L[0],F.sa.v*L[1]):S.skewFromAxis(-F.sk.v*L,F.sa.v*L)),F.r.propType&&(L.length?S.rotateZ(-F.r.v*L[2]):S.rotateZ(-F.r.v*L)),F.ry.propType&&(L.length?S.rotateY(F.ry.v*L[1]):S.rotateY(F.ry.v*L)),F.rx.propType&&(L.length?S.rotateX(F.rx.v*L[0]):S.rotateX(F.rx.v*L)),F.o.propType&&(L.length?q+=(F.o.v*L[0]-q)*L[0]:q+=(F.o.v*L-q)*L),t.strokeWidthAnim&&F.sw.propType&&(L.length?j+=F.sw.v*L[0]:j+=F.sw.v*L),t.strokeColorAnim&&F.sc.propType)for(Y=0;Y<3;Y+=1)L.length?B[Y]+=(F.sc.v[Y]-B[Y])*L[0]:B[Y]+=(F.sc.v[Y]-B[Y])*L;if(t.fillColorAnim&&t.fc){if(F.fc.propType)for(Y=0;Y<3;Y+=1)L.length?W[Y]+=(F.fc.v[Y]-W[Y])*L[0]:W[Y]+=(F.fc.v[Y]-W[Y])*L;F.fh.propType&&(W=L.length?ft(W,F.fh.v*L[0]):ft(W,F.fh.v*L)),F.fs.propType&&(W=L.length?lt(W,F.fs.v*L[0]):lt(W,F.fs.v*L)),F.fb.propType&&(W=L.length?pt(W,F.fb.v*L[0]):pt(W,F.fb.v*L))}}for(M=0;M<I;M+=1)(F=C[M].a).p.propType&&(L=C[M].s.getMult(w[a].anIndexes[M],D.a[M].s.totalChars),this._hasMaskedPath?L.length?S.translate(0,F.p.v[1]*L[0],-F.p.v[2]*L[1]):S.translate(0,F.p.v[1]*L,-F.p.v[2]*L):L.length?S.translate(F.p.v[0]*L[0],F.p.v[1]*L[1],-F.p.v[2]*L[2]):S.translate(F.p.v[0]*L,F.p.v[1]*L,-F.p.v[2]*L));if(t.strokeWidthAnim&&(G=j<0?0:j),t.strokeColorAnim&&(H="rgb("+Math.round(255*B[0])+","+Math.round(255*B[1])+","+Math.round(255*B[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(S.translate(0,-t.ls),S.translate(0,k[1]*N*.01+i,0),this._pathData.p.v){b=(h.point[1]-m.point[1])/(h.point[0]-m.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<m.point[0]&&(ht+=180),S.rotate(-ht*Math.PI/180)}S.translate(z,O,0),o-=k[0]*w[a].an*.005,w[a+1]&&K!==w[a+1].ind&&(o+=w[a].an/2,o+=.001*t.tr*t.finalSize)}else{switch(S.translate(s,i,0),t.ps&&S.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:S.translate(w[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[w[a].line]),0,0);break;case 2:S.translate(w[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[w[a].line])/2,0,0)}S.translate(0,-t.ls),S.translate(R,0,0),S.translate(k[0]*w[a].an*.005,k[1]*N*.01,0),s+=w[a].l+.001*t.tr*t.finalSize}"html"===P?tt=S.toCSS():"svg"===P?tt=S.to2dCSS():et=[S.props[0],S.props[1],S.props[2],S.props[3],S.props[4],S.props[5],S.props[6],S.props[7],S.props[8],S.props[9],S.props[10],S.props[11],S.props[12],S.props[13],S.props[14],S.props[15]],J=q}this.lettersChangedFlag=x<=a?(E=new gt(J,G,H,X,tt,et),this.renderedLetters.push(E),x+=1,!0):(E=this.renderedLetters[a]).update(J,G,H,X,tt,et)||this.lettersChangedFlag}}},ct.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},ct.prototype.mHelper=new L,ct.prototype.defaultPropsArray=[],N([T],ct),gt.prototype.update=function(t,e,s,i,a,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==s&&(this.sc=s,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==a&&(this.m=a,n=this._mdf.m=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,n=this._mdf.p=!0),n},yt.prototype.defaultBoxWidth=[0,0],yt.prototype.copyData=function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},yt.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},yt.prototype.searchProperty=function(){return this.searchKeyframes()},yt.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},yt.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},yt.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,s=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(i=0;i<a;i+=1)r=s!==this.keysIndex?this.effectsSequence[i](r,r.t):this.effectsSequence[i](this.currentData,r.t);e!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},yt.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,s=0,i=t.length;s<=i-1&&!(s===i-1||t[s+1].t>e);)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},yt.prototype.buildFinalText=function(t){for(var e,s,i=[],a=0,r=t.length,n=!1;a<r;)e=t.charCodeAt(a),R.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(a):55296<=e&&e<=56319?56320<=(s=t.charCodeAt(a+1))&&s<=57343?(n||R.isModifier(e,s)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):56319<e?(s=t.charCodeAt(a+1),R.isZeroWidthJoiner(e,s)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):R.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},yt.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,d=l.m.g,m=0,c=0,u=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,k=q(b);t.fWeight=k.weight,t.fStyle=k.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),s=t.finalText.length,t.finalLineHeight=t.lh;var C,D=t.tr/1e3*t.finalSize;if(t.sz)for(var S,P,x=!0,w=t.sz[0],A=t.sz[1];x;){y=S=0,s=(P=this.buildFinalText(t.t)).length,D=t.tr/1e3*t.finalSize;var T=-1;for(e=0;e<s;e+=1)C=P[e].charCodeAt(0),i=!1," "===P[e]?T=e:13!==C&&3!==C||(i=!(y=0),S+=t.finalLineHeight||1.2*t.finalSize),w<y+(_=h.chars?(o=h.getCharData(P[e],b.fStyle,b.fFamily),i?0:o.w*t.finalSize/100):h.measureText(P[e],t.f,t.finalSize))&&" "!==P[e]?(-1===T?s+=1:e=T,S+=t.finalLineHeight||1.2*t.finalSize,P.splice(e,T===e?1:0,"\r"),T=-1,y=0):(y+=_,y+=D);S+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&A<S?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=P,s=t.finalText.length,x=!1)}y=-D;var F,M=_=0;for(e=0;e<s;e+=1)if(i=!1,13===(C=(F=t.finalText[e]).charCodeAt(0))||3===C?(M=0,g.push(y),v=v<y?y:v,y=-2*D,i=!(a=""),u+=1):a=F,_=h.chars?(o=h.getCharData(F,b.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(a,t.f,t.finalSize)," "===F?M+=_+D:(y+=_+D+M,M=0),p.push({l:_,an:_,add:m,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==d){if(m+=_,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(m-=_);c<=e;)p[c].an=m,p[c].ind=f,p[c].extra=_,c+=1;f+=1,m=0}}else if(3==d){if(m+=_,""===a||e===s-1){for(""===a&&(m-=_);c<=e;)p[c].an=m,p[c].ind=f,p[c].extra=_,c+=1;m=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<y?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var I,E,L,N,V=l.a;n=V.length;var R=[];for(r=0;r<n;r+=1){for((I=V[r]).a.sc&&(t.strokeColorAnim=!0),I.a.sw&&(t.strokeWidthAnim=!0),(I.a.fc||I.a.fh||I.a.fs||I.a.fb)&&(t.fillColorAnim=!0),N=0,L=I.s.b,e=0;e<s;e+=1)(E=p[e]).anIndexes[r]=N,(1==L&&""!==E.val||2==L&&""!==E.val&&" "!==E.val||3==L&&(E.n||" "==E.val||e==s-1)||4==L&&(E.n||e==s-1))&&(1===I.s.rn&&R.push(N),N+=1);l.a[r].s.totalChars=N;var z,O=-1;if(1===I.s.rn)for(e=0;e<s;e+=1)O!=(E=p[e]).anIndexes[r]&&(O=E.anIndexes[r],z=R.splice(Math.floor(Math.random()*R.length),1)[0]),E.anIndexes[r]=z}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},yt.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var s=this.copyData({},this.data.d.k[e].s);s=this.copyData(s,t),this.data.d.k[e].s=s,this.recalculate(e),this.elem.addDynamicProperty(this)},yt.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},yt.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},yt.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var vt,bt,_t,kt,Ct,Dt=function(){var u=Math.max,g=Math.min,y=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=z.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?z.getProp(t,e.e,0,0,this):{v:100},this.o=z.getProp(t,e.o||{k:0},0,0,this),this.xe=z.getProp(t,e.xe||{k:0},0,0,this),this.ne=z.getProp(t,e.ne||{k:0},0,0,this),this.sm=z.getProp(t,e.sm||{k:100},0,0,this),this.a=z.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,s=0,i=1,a=1;0<this.ne.v?e=this.ne.v/100:s=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:a=1+this.xe.v/100;var r=Y.getBezierEasing(e,s,i,a).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=r(n=h===o?h<=t?1:0:u(0,g(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=r(n=h===o?h<=t?0:1:1-u(0,g(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,g(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=r(n);else if(5===l){if(h===o)n=0;else{var p=h-o,f=-p/2+(t=g(u(0,t+.5-o),h-o)),d=p/2;n=Math.sqrt(1-f*f/(d*d))}n=r(n)}else n=6===l?r(n=h===o?0:(t=g(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=y(o)&&(n=u(0,g(t-o<0?g(h,1)-(o-t):h-t,1))),r(n));if(100!==this.sm.v){var m=.01*this.sm.v;0===m&&(m=1e-8);var c=.5-.5*m;n<c?n=0:1<(n=(n-c)/m)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,s=this.o.v/e,i=this.s.v/e+s,a=this.e.v/e+s;if(a<i){var r=i;i=a,a=r}this.finalS=i,this.finalE=a}},N([T],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}(),St=function(t,e,s){var i=0,a=t,r=w(a);return{newElement:function(){return i?r[i-=1]:e()},release:function(t){i===a&&(r=Pt.double(r),a*=2),s&&s(t),r[i]=t,i+=1}}},Pt={double:function(t){return t.concat(w(t.length))}},xt=St(8,function(){return W("float32",2)}),wt=((vt=St(4,function(){return new B},function(t){var e,s=t._length;for(e=0;e<s;e+=1)xt.release(t.v[e]),xt.release(t.i[e]),xt.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})).clone=function(t){var e,s=vt.newElement(),i=void 0===t._length?t.v.length:t._length;for(s.setLength(i),s.c=t.c,e=0;e<i;e+=1)s.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return s},vt),At=(bt={newShapeCollection:function(){var t;t=_t?Ct[_t-=1]:new tt;return t},release:function(t){var e,s=t._length;for(e=0;e<s;e+=1)wt.release(t.shapes[e]);t._length=0,_t===kt&&(Ct=Pt.double(Ct),kt*=2);Ct[_t]=t,_t+=1}},_t=0,Ct=w(kt=4),bt),Tt=St(8,function(){return{lengths:[],totalLength:0}},function(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)Ft.release(t.lengths[e]);t.lengths.length=0}),Ft=St(8,function(){return{addedLength:0,percents:W("float32",D),lengths:W("float32",D)}}),Mt=function(){function r(t){for(var e,s=t.split("\r\n"),i={},a=0,r=0;r<s.length;r+=1)2===(e=s[r].split(":")).length&&(i[e[0]]=e[1].trim(),a+=1);if(0===a)throw new Error;return i}return function(e){for(var t=[],s=0;s<e.length;s+=1){var i=e[s],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(e[s].cm)}catch(t){try{a.payload=r(e[s].cm)}catch(t){a.payload={name:e[s]}}}t.push(a)}return t}}();function It(){}function Et(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var s="";if(e&&e.title){var i=createNS("title"),a=S();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),s+=a}if(e&&e.description){var r=createNS("desc"),n=S();r.setAttribute("id",n),r.textContent=e.description,this.svgElement.appendChild(r),s+=" "+n}s&&this.svgElement.setAttribute("aria-labelledby",s);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function Lt(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new se,this.elements=[],this.pendingElements=[],this.transformMat=new L,this.completeLayers=!1,this.rendererType="canvas"}function Nt(t,e,s){this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,a,r=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=w(n),this.solidPath="";var o,h,l,p,f,d,m=this.masksProperties,c=0,u=[],g=S(),y="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==m[i].mode&&"n"!==m[i].mode||m[i].inv||100!==m[i].o.k||m[i].o.x)&&(v=y="mask"),"s"!==m[i].mode&&"i"!==m[i].mode||0!==c?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),a=createNS("path"),"n"===m[i].mode)this.viewData[i]={op:z.getProp(this.element,m[i].o,0,.01,this.element),prop:X.getShapeProp(this.element,m[i],3),elem:a,lastPath:""},r.appendChild(a);else{var b;if(c+=1,a.setAttribute("fill","s"===m[i].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==m[i].x.k?(v=y="mask",d=z.getProp(this.element,m[i].x,0,null,this.element),b=S(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),r.appendChild(p),a.setAttribute("stroke","s"===m[i].mode?"#000000":"#ffffff")):d=f=null,this.storedData[i]={elem:a,x:d,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===m[i].mode){h=u.length;var _=createNS("g");for(o=0;o<h;o+=1)_.appendChild(u[o]);var k=createNS("mask");k.setAttribute("mask-type","alpha"),k.setAttribute("id",g+"_"+c),k.appendChild(a),r.appendChild(k),_.setAttribute("mask","url("+C+"#"+g+"_"+c+")"),u.length=0,u.push(_)}else u.push(a);m[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",op:z.getProp(this.element,m[i].o,0,.01,this.element),prop:X.getShapeProp(this.element,m[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(m[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(y),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<c&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+C+"#"+g+")"),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function Vt(){}function Rt(){}function zt(){}function Ot(){}function qt(){}function Bt(t,e){this.elem=t,this.pos=e}function jt(t,e,s){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e,this._isAnimated=!!s.k;for(var i=0,a=t.length;i<a;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function Wt(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function Yt(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function Gt(t,e,s,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var a,r=4;"rc"===e.ty?r=5:"el"===e.ty?r=6:"sr"===e.ty&&(r=7),this.sh=X.getShapeProp(t,e,r,t);var n,o=s.length;for(a=0;a<o;a+=1)s[a].closed||(n={transforms:i.addTransformSequence(s[a].transforms),trNodes:[]},this.styledShapes.push(n),s[a].elements.push(n))}function Ht(){}function Xt(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function Jt(){}function Kt(){}function Zt(){}function Ut(){}function Qt(t,e,s){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function $t(t,e,s){this.initElement(t,e,s)}function te(t,e,s){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,s),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?z.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function ee(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}function se(){var t;this.saved=[],this.cArrPos=0,this.cTr=new L,this.cO=1;for(this.savedOp=W("float32",15),t=0;t<15;t+=1)this.saved[t]=W("float32",16);this._length=15}function ie(){}function ae(t,e,s){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,s)}function re(t,e,s){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=w(this.layers.length),this.initElement(t,e,s),this.tm=t.tm?z.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function ne(t,e){var s;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=w(this.masksProperties.length);var i=this.masksProperties.length,a=!1;for(s=0;s<i;s+=1)"n"!==this.masksProperties[s].mode&&(a=!0),this.viewData[s]=X.getShapeProp(this.element,this.masksProperties[s],3);(this.hasMasks=a)&&this.element.addRenderableComponent(this)}function oe(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new Yt,this.initElement(t,e,s)}function he(t,e,s){this.initElement(t,e,s)}function le(t,e,s){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,s)}function pe(){}It.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(s=this.layers[e]).ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},It.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},It.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},It.prototype.createAudio=function(t){return new te(t,this.globalData,this)},It.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},It.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},It.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var s,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(s=0;s<a;){if(this.layers[s].id===t[e].id){this.layers[s]=t[e];break}s+=1}},It.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},It.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},It.prototype.buildElementParenting=function(t,e,s){for(var i=this.elements,a=this.layers,r=0,n=a.length;r<n;)a[r].ind==e&&(i[r]&&!0!==i[r]?(s.push(i[r]),i[r].setAsParent(),void 0!==a[r].parent?this.buildElementParenting(t,a[r].parent,s):t.setHierarchy(s)):(this.buildItem(r),this.addPendingElement(t))),r+=1},It.prototype.addPendingElement=function(t){this.pendingElements.push(t)},It.prototype.searchExtraCompositions=function(t){var e,s=t.length;for(e=0;e<s;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},It.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new R,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},N([It],Et),Et.prototype.createNull=function(t){return new Xt(t,this.globalData,this)},Et.prototype.createShape=function(t){return new ee(t,this.globalData,this)},Et.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},Et.prototype.createImage=function(t){return new Qt(t,this.globalData,this)},Et.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},Et.prototype.createSolid=function(t){return new $t(t,this.globalData,this)},Et.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var s=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a=S();s.setAttribute("id",a),s.appendChild(i),this.layerElement.setAttribute("clip-path","url("+C+"#"+a+")"),e.appendChild(s),this.layers=t.layers,this.elements=w(t.layers.length)},Et.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},Et.prototype.updateContainerSize=function(){},Et.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var s=this.createItem(this.layers[t]);e[t]=s,i&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(s),s.initExpressions()),this.appendElementInPos(s,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?s.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(s)))}},Et.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,s=this.elements.length;e<s;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},Et.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var s=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=s-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<s;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},Et.prototype.appendElementInPos=function(t,e){var s=t.getBaseElement();if(s){for(var i,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(s,i):this.layerElement.appendChild(s)}},Et.prototype.hide=function(){this.layerElement.style.display="none"},Et.prototype.show=function(){this.layerElement.style.display="block"},N([It],Lt),Lt.prototype.createShape=function(t){return new oe(t,this.globalData,this)},Lt.prototype.createText=function(t){return new le(t,this.globalData,this)},Lt.prototype.createImage=function(t){return new ae(t,this.globalData,this)},Lt.prototype.createComp=function(t){return new re(t,this.globalData,this)},Lt.prototype.createSolid=function(t){return new he(t,this.globalData,this)},Lt.prototype.createNull=Et.prototype.createNull,Lt.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var s=this.contextData.cTr.props;this.canvasContext.setTransform(s[0],s[1],s[4],s[5],s[12],s[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},Lt.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},Lt.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},Lt.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,s=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=s[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},Lt.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,s=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[4],s[5],s[12],s[13]),s=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=s,this.globalData.currentGlobalAlpha!==s&&(this.canvasContext.globalAlpha=s,this.globalData.currentGlobalAlpha=s)}else this.canvasContext.restore()},Lt.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=A("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var s="0px 0px 0px";e.transformOrigin=s,e.mozTransformOrigin=s,e.webkitTransformOrigin=s,e["-webkit-transform"]=s,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=w(t.layers.length),this.updateContainerSize()},Lt.prototype.updateContainerSize=function(){var t,e,s,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var a=this.renderConfig.preserveAspectRatio.split(" "),r=a[1]||"meet",n=a[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);s=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=s<i&&"meet"===r||i<s&&"slice"===r?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<s&&"meet"===r||s<i&&"slice"===r)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<s&&"meet"===r||s<i&&"slice"===r)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(s<i&&"meet"===r||i<s&&"slice"===r)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(s<i&&"meet"===r||i<s&&"slice"===r)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},Lt.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},Lt.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var s;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),s=0;s<i;s+=1)(this.completeLayers||this.elements[s])&&this.elements[s].prepareFrame(t-this.layers[s].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),s=i-1;0<=s;s-=1)(this.completeLayers||this.elements[s])&&this.elements[s].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},Lt.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var s=this.createItem(this.layers[t],this,this.globalData);(e[t]=s).initExpressions()}},Lt.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},Lt.prototype.hide=function(){this.animationItem.container.style.display="none"},Lt.prototype.show=function(){this.animationItem.container.style.display="block"},Nt.prototype.getMaskProperty=function(t){return this.viewData[t].prop},Nt.prototype.renderFrame=function(t){var e,s=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",s.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+C+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},Nt.prototype.getMaskelement=function(){return this.maskElement},Nt.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},Nt.prototype.drawPath=function(t,e,s){var i,a,r=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<a&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},Nt.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},Vt.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},Rt.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var s,i=this.dynamicProperties.length;for(s=0;s<i;s+=1)(e||this._isParent&&"transform"===this.dynamicProperties[s].propType)&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},zt.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?O.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new L},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,s=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<i;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),s=0;s<i;s+=1)t=this.hierarchy[s].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var s,i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&e.splice(0,0,a.finalTransform),a=a.comp):i=!1;var r,n=e.length;for(s=0;s<n;s+=1)r=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new L},Ot.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},N([Ot,function(t){function e(){}return e.prototype=t,e}({initElement:function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],qt),jt.prototype.setAsAnimated=function(){this._isAnimated=!0},Yt.prototype={addTransformSequence:function(t){var e,s=t.length,i="_";for(e=0;e<s;e+=1)i+=t[e].transform.key+"_";var a=this.sequences[i];return a||(a={transforms:[].concat(t),finalTransform:new L,_mdf:!1},this.sequences[i]=a,this.sequenceList.push(a)),a},processSequence:function(t,e){for(var s,i=0,a=t.transforms.length,r=e;i<a&&!e;){if(t.transforms[i].transform.mProps._mdf){r=!0;break}i+=1}if(r)for(t.finalTransform.reset(),i=a-1;0<=i;i-=1)s=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11],s[12],s[13],s[14],s[15]);t._mdf=r},processSequences:function(t){var e,s=this.sequenceList.length;for(e=0;e<s;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},Gt.prototype.setAsAnimated=jt.prototype.setAsAnimated,Ht.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=M(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId=S(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},Xt.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},Xt.prototype.renderFrame=function(){},Xt.prototype.getBaseElement=function(){return null},Xt.prototype.destroy=function(){},Xt.prototype.sourceRectAtTime=function(){},Xt.prototype.hide=function(){},N([Ht,zt,Vt,Rt],Xt),Jt.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,s,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),i=a,this.globalData.defs.appendChild(a),ht.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=S(),e=mt.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(mt.createAlphaToLuminanceFilter()),(s=createNS("g")).appendChild(this.layerElement),i=s,a.appendChild(s),s.setAttribute("filter","url("+C+"#"+t+")"))}else if(2==this.data.td){var r=createNS("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type","alpha");var n=createNS("g");r.appendChild(n),t=S(),e=mt.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+C+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,ht.maskType||(r.setAttribute("mask-type","luminance"),e.appendChild(mt.createAlphaToLuminanceFilter()),s=createNS("g"),n.appendChild(l),s.appendChild(this.layerElement),i=s,n.appendChild(s)),this.globalData.defs.appendChild(r)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var d=S();if(p.setAttribute("id",d),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var m=createNS("g");m.setAttribute("clip-path","url("+C+"#"+d+")"),m.appendChild(this.layerElement),this.transformedElement=m,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+C+"#"+d+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new Nt(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+C+"#"+t+")")}},Kt.prototype={addShapeToModifiers:function(t){var e,s=this.shapeModifiers.length;for(e=0;e<s;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,s=0,i=e.length;s<i;){if(e[s].elem===t)return e[s].pos;s+=1}return 0},addProcessedElement:function(t,e){for(var s=this.processedElements,i=s.length;i;)if(s[i-=1].elem===t)return void(s[i].pos=e);s.push(new Bt(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},Zt.prototype.initElement=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new yt(this,t.t,this.dynamicProperties),this.textAnimator=new ct(t.t,this.renderType,this),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},Zt.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},Zt.prototype.createPathShape=function(t,e){var s,i,a=e.length,r="";for(s=0;s<a;s+=1)i=e[s].ks.k,r+=rt(i,i.i.length,!0,t);return r},Zt.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},Zt.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},Zt.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},Zt.prototype.applyTextPropertiesToMatrix=function(t,e,s,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s])/2,0,0)}e.translate(i,a,0)},Zt.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},Zt.prototype.emptyProp=new gt,Zt.prototype.destroy=function(){},N([Ht,zt,Vt,Rt,qt],Ut),Ut.prototype.initElement=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},Ut.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var s,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),s=i-1;0<=s;s-=1)(this.completeLayers||this.elements[s])&&(this.elements[s].prepareFrame(this.renderedFrame-this.layers[s].st),this.elements[s]._mdf&&(this._mdf=!0))}},Ut.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},Ut.prototype.setElements=function(t){this.elements=t},Ut.prototype.getElements=function(){return this.elements},Ut.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},Ut.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},N([Ht,zt,Jt,Vt,Rt,qt],Qt),Qt.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},Qt.prototype.sourceRectAtTime=function(){return this.sourceRect},N([Qt],$t),$t.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},te.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},N([Ot,Ht,Rt],te),te.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},te.prototype.show=function(){},te.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},te.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},te.prototype.resume=function(){this._canPlay=!0},te.prototype.setRate=function(t){this.audio.rate(t)},te.prototype.volume=function(t){this.audio.volume(t)},te.prototype.getBaseElement=function(){return null},te.prototype.destroy=function(){},te.prototype.sourceRectAtTime=function(){},te.prototype.initExpressions=function(){},N([Ht,zt,Jt,Kt,Vt,Rt,qt],ee),ee.prototype.initSecondaryElement=function(){},ee.prototype.identityMatrix=new L,ee.prototype.buildExpressionInterface=function(){},ee.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},ee.prototype.filterUniqueShapes=function(){var t,e,s,i,a=this.shapes.length,r=this.stylesList.length,n=[],o=!1;for(s=0;s<r;s+=1){for(i=this.stylesList[s],o=!1,t=n.length=0;t<a;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},ee.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].setAsAnimated()},ee.prototype.createStyleElement=function(t,e){var s,i=new SVGStyleData(t,e),a=i.pElem;if("st"===t.ty)s=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)s=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){s=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(s.gf),s.maskId&&(this.globalData.defs.appendChild(s.ms),this.globalData.defs.appendChild(s.of),a.setAttribute("mask","url("+C+"#"+s.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",I[t.lc||2]),a.setAttribute("stroke-linejoin",E[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=M(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,s),s},ee.prototype.createGroupElement=function(t){var e=new Wt;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=M(t.bm)),e},ee.prototype.createTransformElement=function(t,e){var s=O.getTransformProperty(this,t,this),i=new SVGTransformData(s,s.o,e);return this.addToAnimatedContents(t,i),i},ee.prototype.createShapeElement=function(t,e,s){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=new jt(e,s,X.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},ee.prototype.addToAnimatedContents=function(t,e){for(var s=0,i=this.animatedContents.length;s<i;){if(this.animatedContents[s].element===e)return;s+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},ee.prototype.setElementStyles=function(t){var e,s=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||s.push(this.stylesList[e])},ee.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},ee.prototype.searchShapes=function(t,e,s,i,a,r,n){var o,h,l,p,f,d,m=[].concat(r),c=t.length-1,u=[],g=[];for(o=c;0<=o;o-=1){if((d=this.searchProcessedElement(t[o]))?e[o]=s[d-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)d?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(d)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,a+1,m,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(d||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,m.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(d||(e[o]=this.createShapeElement(t[o],m,a)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(d?(f=e[o]).closed=!1:((f=J.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===t[o].ty&&(d?(f=e[o]).closed=!0:(f=J.getModifier(t[o].ty),(e[o]=f).init(this,t,o,e),this.shapeModifiers.push(f),n=!1),g.push(f));this.addProcessedElement(t[o],o+1)}for(c=u.length,o=0;o<c;o+=1)u[o].closed=!0;for(c=g.length,o=0;o<c;o+=1)g[o].closed=!0},ee.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},ee.prototype.renderShape=function(){var t,e,s=this.animatedContents.length;for(t=0;t<s;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},ee.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},se.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=W("float32",t),this.savedOp.set(e);var s=0;for(s=this._length;s<t;s+=1)this.saved[s]=W("float32",16);this._length=t},se.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},(ie.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new pe(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=M(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new ne(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new L}).hide=ie.prototype.hideElement,ie.prototype.show=ie.prototype.showElement,N([Ht,zt,ie,Vt,Rt,Ot],ae),ae.prototype.initElement=ee.prototype.initElement,ae.prototype.prepareFrame=Qt.prototype.prepareFrame,ae.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=A("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,s,i=t.getContext("2d"),a=this.img.width,r=this.img.height,n=a/r,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o<n&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(s=r)*o:s=(e=a)/o,i.drawImage(this.img,(a-e)/2,(r-s)/2,e,s,0,0,this.assetData.w,this.assetData.h),this.img=t}},ae.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},ae.prototype.destroy=function(){this.img=null},N([Lt,Ut,ie],re),re.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},re.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},ne.prototype.renderFrame=function(){if(this.hasMasks){var t,e,s,i,a=this.element.finalTransform.mat,r=this.element.canvasContext,n=this.masksProperties.length;for(r.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(r.moveTo(0,0),r.lineTo(this.element.globalData.compSize.w,0),r.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r.lineTo(0,this.element.globalData.compSize.h),r.lineTo(0,0)),i=this.viewData[t].v,e=a.applyToPointArray(i.v[0][0],i.v[0][1],0),r.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)s=a.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),r.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);s=a.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),r.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}this.element.globalData.renderer.save(!0),r.clip()}},ne.prototype.getMaskProperty=Nt.prototype.getMaskProperty,ne.prototype.destroy=function(){this.element=null},N([Ht,zt,ie,Kt,Vt,Rt,Ot],oe),oe.prototype.initElement=qt.prototype.initElement,oe.prototype.transformHelper={opacity:1,_opMdf:!1},oe.prototype.dashResetter=[],oe.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},oe.prototype.createStyleElement=function(t,e){var s={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=z.getProp(this,t.c,1,255,this),i.c.k||(s.co="rgb("+f(i.c.v[0])+","+f(i.c.v[1])+","+f(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=z.getProp(this,t.s,1,null,this),i.e=z.getProp(this,t.e,1,null,this),i.h=z.getProp(this,t.h||{k:0},0,.01,this),i.a=z.getProp(this,t.a||{k:0},0,j,this),i.g=new st(this,t.g,this)),i.o=z.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(s.lc=I[t.lc||2],s.lj=E[t.lj||2],1==t.lj&&(s.ml=t.ml),i.w=z.getProp(this,t.w,0,null,this),i.w.k||(s.wi=i.w.v),t.d){var a=new et(this,t.d,"canvas",this);i.d=a,i.d.k||(s.da=i.d.dashArray,s.do=i.d.dashoffset[0])}}else s.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(s),i.style=s,i},oe.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},oe.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:z.getProp(this,t.o,0,.01,this),mProps:O.getTransformProperty(this,t,this)}}},oe.prototype.createShapeElement=function(t){var e=new Gt(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},oe.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},oe.prototype.addTransformToStyleList=function(t){var e,s=this.stylesList.length;for(e=0;e<s;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},oe.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},oe.prototype.closeStyles=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].closed=!0},oe.prototype.searchShapes=function(t,e,s,i,a){var r,n,o,h,l,p,f=t.length-1,d=[],m=[],c=[].concat(a);for(r=f;0<=r;r-=1){if((h=this.searchProcessedElement(t[r]))?e[r]=s[h-1]:t[r]._shouldRender=i,"fl"===t[r].ty||"st"===t[r].ty||"gf"===t[r].ty||"gs"===t[r].ty)h?e[r].style.closed=!1:e[r]=this.createStyleElement(t[r],c),d.push(e[r].style);else if("gr"===t[r].ty){if(h)for(o=e[r].it.length,n=0;n<o;n+=1)e[r].prevViewData[n]=e[r].it[n];else e[r]=this.createGroupElement(t[r]);this.searchShapes(t[r].it,e[r].it,e[r].prevViewData,i,c)}else"tr"===t[r].ty?(h||(p=this.createTransformElement(t[r]),e[r]=p),c.push(e[r]),this.addTransformToStyleList(e[r])):"sh"===t[r].ty||"rc"===t[r].ty||"el"===t[r].ty||"sr"===t[r].ty?h||(e[r]=this.createShapeElement(t[r])):"tm"===t[r].ty||"rd"===t[r].ty||"pb"===t[r].ty?(h?(l=e[r]).closed=!1:((l=J.getModifier(t[r].ty)).init(this,t[r]),e[r]=l,this.shapeModifiers.push(l)),m.push(l)):"rp"===t[r].ty&&(h?(l=e[r]).closed=!0:(l=J.getModifier(t[r].ty),(e[r]=l).init(this,t,r,e),this.shapeModifiers.push(l),i=!1),m.push(l));this.addProcessedElement(t[r],r+1)}for(this.removeTransformFromStyleList(),this.closeStyles(d),f=m.length,r=0;r<f;r+=1)m[r].closed=!0},oe.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},oe.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},oe.prototype.drawLayer=function(){var t,e,s,i,a,r,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),r=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),s=r.length,e=0;e<s;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),a=(n=r[e].trNodes).length,i=0;i<a;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},oe.prototype.renderShape=function(t,e,s,i){var a,r;for(r=t,a=e.length-1;0<=a;a-=1)"tr"===e[a].ty?(r=s[a].transform,this.renderShapeTransform(t,r)):"sh"===e[a].ty||"el"===e[a].ty||"rc"===e[a].ty||"sr"===e[a].ty?this.renderPath(e[a],s[a]):"fl"===e[a].ty?this.renderFill(e[a],s[a],r):"st"===e[a].ty?this.renderStroke(e[a],s[a],r):"gf"===e[a].ty||"gs"===e[a].ty?this.renderGradientFill(e[a],s[a],r):"gr"===e[a].ty?this.renderShape(r,e[a].it,s[a].it):e[a].ty;i&&this.drawLayer()},oe.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var s,i,a,r=t.trNodes,n=e.paths,o=n._length;r.length=0;var h=t.transforms.finalTransform;for(a=0;a<o;a+=1){var l=n.shapes[a];if(l&&l.v){for(i=l._length,s=1;s<i;s+=1)1===s&&r.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),r.push({t:"c",pts:h.applyToTriplePoints(l.o[s-1],l.i[s],l.v[s])});1===i&&r.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(r.push({t:"c",pts:h.applyToTriplePoints(l.o[s-1],l.i[0],l.v[0])}),r.push({t:"z"}))}}t.trNodes=r}},oe.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var s,i=e.styledShapes.length;for(s=0;s<i;s+=1)this.renderStyledShape(e.styledShapes[s],e.sh)}},oe.prototype.renderFill=function(t,e,s){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+f(e.c.v[0])+","+f(e.c.v[1])+","+f(e.c.v[2])+")"),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity)},oe.prototype.renderGradientFill=function(t,e,s){var i,a=e.style;if(!a.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var r,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;1<=f?f=.99:f<=-1&&(f=-.99);var d=l*f,m=Math.cos(p+e.a.v)*d+o[0],c=Math.sin(p+e.a.v)*d+o[1];i=n.createRadialGradient(m,c,0,o[0],o[1],l)}var u=t.g.p,g=e.g.c,y=1;for(r=0;r<u;r+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*r+1]),i.addColorStop(g[4*r]/100,"rgba("+g[4*r+1]+","+g[4*r+2]+","+g[4*r+3]+","+y+")");a.grd=i}a.coOp=e.o.v*s.opacity},oe.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||this._isFirstFrame)&&(i.da=a.dashArray,i.do=a.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+f(e.c.v[0])+","+f(e.c.v[1])+","+f(e.c.v[2])+")"),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},oe.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},N([Ht,zt,ie,Vt,Rt,Ot],he),he.prototype.initElement=ee.prototype.initElement,he.prototype.prepareFrame=Qt.prototype.prepareFrame,he.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},N([Ht,zt,ie,Vt,Rt,Ot,Zt],le),le.prototype.tHelper=A("canvas").getContext("2d"),le.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=w(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,a,r,n,o,h,l,p,f,d,m,c,u=this.globalData.fontManager.getFontByName(t.f),g=t.l,y=this.mHelper;this.stroke=s,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,_=0,k=0,C=!0,D=0;for(i=0;i<a;i+=1){for(n=(r=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&r.data||{},y.reset(),v&&g[i].n&&(_=-b,k+=t.yOffset,k+=C?1:0,C=!1),f=(l=n.shapes?n.shapes[0].it:[]).length,y.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,y,g[i].line,_,k),m=w(f),p=0;p<f;p+=1){for(h=l[p].ks.k.i.length,d=l[p].ks.k,c=[],o=1;o<h;o+=1)1===o&&c.push(y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),c.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[o][0],d.i[o][1],0),y.applyToY(d.i[o][0],d.i[o][1],0),y.applyToX(d.v[o][0],d.v[o][1],0),y.applyToY(d.v[o][0],d.v[o][1],0));c.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[0][0],d.i[0][1],0),y.applyToY(d.i[0][0],d.i[0][1],0),y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),m[p]=c}v&&(_+=g[i].l,_+=b),this.textSpans[D]?this.textSpans[D].elem=m:this.textSpans[D]={elem:m},D+=1}},le.prototype.renderInnerContent=function(){var t,e,s,i,a,r,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,f,d=null,m=null,c=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?d!==o.fc&&(d=o.fc,n.fillStyle=o.fc):d!==this.values.fill&&(d=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),s=0;s<i;s+=1)for(r=(f=p[s]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),a=2;a<r;a+=6)this.globalData.canvasContext.bezierCurveTo(f[a],f[a+1],f[a+2],f[a+3],f[a+4],f[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?c!==o.sw&&(c=o.sw,n.lineWidth=o.sw):c!==this.values.sWidth&&(c=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?m!==o.sc&&(m=o.sc,n.strokeStyle=o.sc):m!==this.values.stroke&&(m=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),s=0;s<i;s+=1)for(r=(f=p[s]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),a=2;a<r;a+=6)this.globalData.canvasContext.bezierCurveTo(f[a],f[a+1],f[a+2],f[a+3],f[a+4],f[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},pe.prototype.renderFrame=function(){};var fe=function(){var t={},a=[],i=0,r=0,n=0,o=!0,h=!1;function s(t){for(var e=0,s=t.target;e<r;)a[e].animation===s&&(a.splice(e,1),e-=1,r-=1,s.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var s=0;s<r;){if(a[s].elem===t&&null!==a[s].elem)return a[s].animation;s+=1}var i=new de;return d(i,t),i.setData(t,e),i}function p(){n+=1,c()}function f(){n-=1}function d(t,e){t.addEventListener("destroy",s),t.addEventListener("_active",p),t.addEventListener("_idle",f),a.push({elem:e,animation:t}),r+=1}function m(t){var e,s=t-i;for(e=0;e<r;e+=1)a[e].animation.advanceTime(s);i=t,n&&!h?window.requestAnimationFrame(m):o=!0}function e(t){i=t,window.requestAnimationFrame(m)}function c(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new de;return d(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setSpeed(t,e)},t.setDirection=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.togglePause(t)},t.searchAnimations=function(t,e,s){var i,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),r=a.length;for(i=0;i<r;i+=1)s&&a[i].setAttribute("data-bm-type",s),l(a[i],t);if(e&&0===r){s||(s="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=A("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",s),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<r;t+=1)a[t].animation.resize()},t.goToAndStop=function(t,e,s){var i;for(i=0;i<r;i+=1)a[i].animation.goToAndStop(t,e,s)},t.destroy=function(t){var e;for(e=r-1;0<=e;e-=1)a[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,c()},t.setVolume=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=a.length,s=[];for(t=0;t<e;t+=1)s.push(a[t].animation);return s},t}(),de=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=S(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=e,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface={},this.imagePreloader=new ot,this.audioController=nt(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};N([x],de),de.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new Lt(this,t.rendererSettings);break;case"svg":this.renderer=new Et(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),V.loadAnimation(t.path,this.configAnimation,this.onSetupError))},de.prototype.onSetupError=function(){this.trigger("data_failed")},de.prototype.setupAnimation=function(t){V.completeAnimation(t,this.configAnimation)},de.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var s={wrapper:t,animationData:e},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===a?s.loop=!1:"true"===a?s.loop=!0:""!==a&&(s.loop=parseInt(a,10));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;s.autoplay="false"!==r,s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(s.prerender=!1),this.setParams(s)},de.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;s<n;s+=1)for(e=0;e<a;){if(i[e].id===r[s].id){i[e]=r[s];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,V.completeAnimation(this.animationData,this.onSegmentComplete)},de.prototype.onSegmentComplete=function(t){this.animationData=t,i&&i.initExpressions(this),this.loadNextSegment()},de.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,V.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},de.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},de.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},de.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},de.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=Mt(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},de.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},de.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,i&&i.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},de.prototype.resize=function(){this.renderer.updateContainerSize()},de.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},de.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},de.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},de.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},de.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},de.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},de.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},de.prototype.getMarkerData=function(t){for(var e,s=0;s<this.markers.length;s+=1)if((e=this.markers[s]).payload&&e.payload.name===t)return e;return null},de.prototype.goToAndStop=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},de.prototype.goToAndPlay=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(i,e,s);this.play()}},de.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(s=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},de.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},de.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)},de.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},de.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},de.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},de.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},de.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},de.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},de.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},de.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},de.prototype.getVolume=function(){return this.audioController.getVolume()},de.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},de.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},de.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},de.prototype.getPath=function(){return this.path},de.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},de.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},de.prototype.hide=function(){this.renderer.hide()},de.prototype.show=function(){this.renderer.show()},de.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},de.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new h(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new m(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new l(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new c(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new u(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new h(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new m(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new l(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new c(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new u(t,this))},de.prototype.triggerRenderFrameError=function(t){var e=new g(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},de.prototype.triggerConfigError=function(t){var e=new y(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var lottie={};function me(){!0===ue?fe.searchAnimations(ge,ue,ye):fe.searchAnimations()}lottie.play=fe.play,lottie.pause=fe.pause,lottie.setLocationHref=function(t){C=t},lottie.togglePause=fe.togglePause,lottie.setSpeed=fe.setSpeed,lottie.setDirection=fe.setDirection,lottie.stop=fe.stop,lottie.searchAnimations=me,lottie.registerAnimation=fe.registerAnimation,lottie.loadAnimation=function(t){return!0===ue&&(t.animationData=JSON.parse(ge)),fe.loadAnimation(t)},lottie.setSubframeRendering=function(t){e=t},lottie.resize=fe.resize,lottie.goToAndStop=fe.goToAndStop,lottie.destroy=fe.destroy,lottie.setQuality=function(t){if("string"==typeof t)switch(t){case"high":D=200;break;default:case"medium":D=50;break;case"low":D=10}else!isNaN(t)&&1<t&&(D=t);o(!(50<=D))},lottie.inBrowser=function(){return"undefined"!=typeof navigator},lottie.installPlugin=function(t,e){"expressions"===t&&(i=e)},lottie.freeze=fe.freeze,lottie.unfreeze=fe.unfreeze,lottie.setVolume=fe.setVolume,lottie.mute=fe.mute,lottie.unmute=fe.unmute,lottie.getRegisteredAnimations=fe.getRegisteredAnimations,lottie.useWebWorker=function(t){p=t},lottie.setIDPrefix=function(t){a=t},lottie.__getFactory=function(t){switch(t){case"propertyFactory":return z;case"shapePropertyFactory":return X;case"matrix":return L;default:return null}},lottie.version="5.8.1";var ce,ue="__[STANDALONE]__",ge="__[ANIMATIONDATA]__",ye="";if(ue){var ve=document.getElementsByTagName("script"),be=ve[ve.length-1]||{src:""};ce=be.src.replace(/^[^\?]+\??/,""),ye=function(t){for(var e=ce.split("&"),s=0;s<e.length;s+=1){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}("renderer")}var _e=setInterval(function(){"complete"===document.readyState&&(clearInterval(_e),me())},100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var t="",e=!1,s=-999999,i=function(){return t};function a(t){return document.createElement(t)}function r(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1)for(var r in i=t[s].prototype)Object.prototype.hasOwnProperty.call(i,r)&&(e.prototype[r]=i[r])}function n(t,e){return Object.getOwnPropertyDescriptor(t,e)}function o(t){function e(){}return e.prototype=t,e}var h=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),l=function(){function t(t,e){var s,i=0,a=[];switch(t){case"int16":case"uint8c":s=1;break;default:s=1.1}for(i=0;i<e;i+=1)a.push(s);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,s){return"float32"===e?new Float32Array(s):"int16"===e?new Int16Array(s):"uint8c"===e?new Uint8ClampedArray(s):t(e,s)}:t}();function p(t){return Array.apply(null,{length:t})}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}var c=!0,m=null,d="",u=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),g=Math.pow,y=Math.sqrt,v=Math.floor,b=(Math.max,Math.min),_={};!function(){var t,e=["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"],s=e.length;for(t=0;t<s;t+=1)_[e[t]]=Math[e[t]]}(),_.random=Math.random,_.abs=function(t){if("object"===f(t)&&t.length){var e,s=p(t.length),i=t.length;for(e=0;e<i;e+=1)s[e]=Math.abs(t[e]);return s}return Math.abs(t)};var P=150,k=Math.PI/180,C=.5519;function x(t){!!t}function A(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}function D(t,e){this.type=t,this.direction=e<0?-1:1}function w(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}function S(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}function M(t,e){this.type=t,this.target=e}function F(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function T(t){this.type="configError",this.nativeError=t}var E,I=(E=0,function(){return d+"__lottie_element_"+(E+=1)});function L(t,e,s){var i,a,r,n,o,h,l,p;switch(h=s*(1-e),l=s*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=s*(1-(1-o)*e),n%6){case 0:i=s,a=p,r=h;break;case 1:i=l,a=s,r=h;break;case 2:i=h,a=s,r=p;break;case 3:i=h,a=l,r=s;break;case 4:i=p,a=h,r=s;break;case 5:i=s,a=h,r=l}return[i,a,r]}function R(t,e,s){var i,a=Math.max(t,e,s),r=Math.min(t,e,s),n=a-r,o=0===a?0:n/a,h=a/255;switch(a){case r:i=0;break;case t:i=e-s+n*(e<s?6:0),i/=6*n;break;case e:i=s-t+2*n,i/=6*n;break;case s:i=t-e+4*n,i/=6*n}return[i,o,h]}function O(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),L(s[0],s[1],s[2])}function V(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),L(s[0],s[1],s[2])}function z(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),L(s[0],s[1],s[2])}var N=function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+s[t]+s[e]+s[i]}}(),G=function(){return m},B=function(t){P=t},j=function(){return P};function q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}var Y=function(){var t,s,i=1,a=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){r.onmessage({data:t})}};function o(s){if(window.Worker&&window.Blob&&e){var i=new Blob(["var _workerSelf = self; self.onmessage = ",s.toString()],{type:"text/javascript"}),a=URL.createObjectURL(i);return new Worker(a)}return t=s,r}function h(){s||(s=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(a,r){var n,o,h,l,p,c,m=a.length;for(o=0;o<m;o+=1)if("ks"in(n=a[o])&&!n.completed){if(n.completed=!0,n.tt&&(a[o-1].td=n.tt),n.hasMask){var d=n.masksProperties;for(l=d.length,h=0;h<l;h+=1)if(d[h].pt.k.i)i(d[h].pt.k);else for(c=d[h].pt.k.length,p=0;p<c;p+=1)d[h].pt.k[p].s&&i(d[h].pt.k[p].s[0]),d[h].pt.k[p].e&&i(d[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,r),t(n.layers,r)):4===n.ty?s(n.shapes):5===n.ty&&f(n)}}function e(t,e){var s=function(t,e){for(var s=0,i=e.length;s<i;){if(e[s].id===t)return e[s];s+=1}return null}(t,e);return s?s.layers.__used?JSON.parse(JSON.stringify(s.layers)):(s.layers.__used=!0,s.layers):null}function s(t){var e,a,r;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(r=t[e].ks.k.length,a=0;a<r;a+=1)t[e].ks.k[a].s&&i(t[e].ks.k[a].s[0]),t[e].ks.k[a].e&&i(t[e].ks.k[a].e[0]);else"gr"===t[e].ty&&s(t[e].it)}function i(t){var e,s=t.i.length;for(e=0;e<s;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function a(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}var r,n=function(){var t=[4,4,14];function e(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(i=void 0,i=(s=t[e]).t.d,s.t.d={k:[{s:i,t:0}]})}return function(s){if(a(t,s.v)&&(e(s.layers),s.assets)){var i,r=s.assets.length;for(i=0;i<r;i+=1)s.assets[i].layers&&e(s.assets[i].layers)}}}(),o=(r=[4,7,99],function(t){if(t.chars&&!a(r,t.v)){var e,i=t.chars.length;for(e=0;e<i;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(s(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,s,i=t.length;for(e=0;e<i;e+=1)5===t[e].ty&&(s=void 0,"number"==typeof(s=t[e].t.p).a&&(s.a={a:0,k:s.a}),"number"==typeof s.p&&(s.p={a:0,k:s.p}),"number"==typeof s.r&&(s.r={a:0,k:s.r}))}return function(s){if(a(t,s.v)&&(e(s.layers),s.assets)){var i,r=s.assets.length;for(i=0;i<r;i+=1)s.assets[i].layers&&e(s.assets[i].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var s,i,a,r=t.length;for(s=0;s<r;s+=1)if("gr"===t[s].ty)e(t[s].it);else if("fl"===t[s].ty||"st"===t[s].ty)if(t[s].c.k&&t[s].c.k[0].i)for(a=t[s].c.k.length,i=0;i<a;i+=1)t[s].c.k[i].s&&(t[s].c.k[i].s[0]/=255,t[s].c.k[i].s[1]/=255,t[s].c.k[i].s[2]/=255,t[s].c.k[i].s[3]/=255),t[s].c.k[i].e&&(t[s].c.k[i].e[0]/=255,t[s].c.k[i].e[1]/=255,t[s].c.k[i].e[2]/=255,t[s].c.k[i].e[3]/=255);else t[s].c.k[0]/=255,t[s].c.k[1]/=255,t[s].c.k[2]/=255,t[s].c.k[3]/=255}function s(t){var s,i=t.length;for(s=0;s<i;s+=1)4===t[s].ty&&e(t[s].shapes)}return function(e){if(a(t,e.v)&&(s(e.layers),e.assets)){var i,r=e.assets.length;for(i=0;i<r;i+=1)e.assets[i].layers&&s(e.assets[i].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var s,i,a;for(s=t.length-1;s>=0;s-=1)if("sh"===t[s].ty)if(t[s].ks.k.i)t[s].ks.k.c=t[s].closed;else for(a=t[s].ks.k.length,i=0;i<a;i+=1)t[s].ks.k[i].s&&(t[s].ks.k[i].s[0].c=t[s].closed),t[s].ks.k[i].e&&(t[s].ks.k[i].e[0].c=t[s].closed);else"gr"===t[s].ty&&e(t[s].it)}function s(t){var s,i,a,r,n,o,h=t.length;for(i=0;i<h;i+=1){if((s=t[i]).hasMask){var l=s.masksProperties;for(r=l.length,a=0;a<r;a+=1)if(l[a].pt.k.i)l[a].pt.k.c=l[a].cl;else for(o=l[a].pt.k.length,n=0;n<o;n+=1)l[a].pt.k[n].s&&(l[a].pt.k[n].s[0].c=l[a].cl),l[a].pt.k[n].e&&(l[a].pt.k[n].e[0].c=l[a].cl)}4===s.ty&&e(s.shapes)}}return function(e){if(a(t,e.v)&&(s(e.layers),e.assets)){var i,r=e.assets.length;for(i=0;i<r;i+=1)e.assets[i].layers&&s(e.assets[i].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var c={completeData:function(s){s.__complete||(l(s),n(s),o(s),h(s),p(s),t(s.layers,s.assets),function(s,i){if(s){var a=0,r=s.length;for(a=0;a<r;a+=1)1===s[a].t&&(s[a].data.layers=e(s[a].data.refId,i),t(s[a].data.layers,i))}}(s.chars,s.assets),s.__complete=!0)}};return c.checkColors=l,c.checkChars=o,c.checkPathProperties=h,c.checkShapes=p,c.completeLayers=t,c}()),n.assetLoader||(n.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===W(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,s,i,a){var r,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)r=t(n),i(r);else try{r=t(n),i(r)}catch(t){a&&a(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",s+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)n.assetLoader.load(t.data.path,t.data.fullPath,(function(e){n.dataManager.completeData(e),n.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){n.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;n.dataManager.completeData(e),n.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&n.assetLoader.load(t.data.path,t.data.fullPath,(function(e){n.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){n.postMessage({id:t.data.id,status:"error"})}))})),s.onmessage=function(t){var e=t.data,s=e.id,i=a[s];a[s]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var s="processId_"+(i+=1);return a[s]={onComplete:t,onError:e},s}return{loadAnimation:function(t,e,i){h();var a=l(e,i);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:a})},loadData:function(t,e,i){h();var a=l(e,i);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:a})},completeAnimation:function(t,e,i){h();var a=l(e,i);s.postMessage({type:"complete",animation:t,id:a})}}}(),X=function(){var t=function(){var t=a("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,s){var i="";if(t.e)i=t.p;else if(e){var a=t.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),i=e+a}else i=s,i+=t.u?t.u:"",i+=t.p;return i}function r(t){var e=0,s=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(s)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},s=i(t,this.assetsPath,this.path);return Y.loadData(s,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=s.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var s;this.imagesLoadedCb=e;var i=t.length;for(s=0;s<i;s+=1)t[s].layers||(t[s].t&&"seq"!==t[s].t?3===t[s].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[s]))):(this.totalImages+=1,this.images.push(this._createImageData(t[s]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,s=this.images.length;e<s;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var s=i(e,this.assetsPath,this.path),r=a("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){n.img=t,this._imageLoaded()}.bind(this),!1),r.src=s;var n={img:r,assetData:e};return n},createImageData:function(e){var s=i(e,this.assetsPath,this.path),a=q("image");u?this.testImageLoaded(a):a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){r.img=t,this._imageLoaded()}.bind(this),!1),a.setAttributeNS("http://www.w3.org/1999/xlink","href",s),this._elementHelper.append?this._elementHelper.append(a):this._elementHelper.appendChild(a);var r={img:a,assetData:e};return r},imageLoaded:e,footageLoaded:s,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},o}();function H(){}H.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t],i=0;i<s.length;i+=1)s[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var K=function(){function t(t){for(var e,s=t.split("\r\n"),i={},a=0,r=0;r<s.length;r+=1)2===(e=s[r].split(":")).length&&(i[e[0]]=e[1].trim(),a+=1);if(0===a)throw new Error;return i}return function(e){for(var s=[],i=0;i<e.length;i+=1){var a=e[i],r={time:a.tm,duration:a.dr};try{r.payload=JSON.parse(e[i].cm)}catch(s){try{r.payload=t(e[i].cm)}catch(t){r.payload={name:e[i]}}}s.push(r)}return s}}(),J=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,s=this.compositions.length;e<s;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),U={};function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}var Q=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=I(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=c,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=J(),this.imagePreloader=new X,this.audioController=h(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};r([H],Q),Q.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var s=U[e];this.renderer=new s(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),Y.loadAnimation(t.path,this.configAnimation,this.onSetupError))},Q.prototype.onSetupError=function(){this.trigger("data_failed")},Q.prototype.setupAnimation=function(t){Y.completeAnimation(t,this.configAnimation)},Q.prototype.setData=function(t,e){e&&"object"!==Z(e)&&(e=JSON.parse(e));var s={wrapper:t,animationData:e},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===a?s.loop=!1:"true"===a?s.loop=!0:""!==a&&(s.loop=parseInt(a,10));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;s.autoplay="false"!==r,s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(s.prerender=!1),this.setParams(s)},Q.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;s<n;s+=1)for(e=0;e<a;){if(i[e].id===r[s].id){i[e]=r[s];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,Y.completeAnimation(this.animationData,this.onSegmentComplete)},Q.prototype.onSegmentComplete=function(t){this.animationData=t;var e=G();e&&e.initExpressions(this),this.loadNextSegment()},Q.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,Y.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},Q.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Q.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},Q.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},Q.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=K(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},Q.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},Q.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=G();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},Q.prototype.resize=function(){this.renderer.updateContainerSize()},Q.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},Q.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Q.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},Q.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Q.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Q.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},Q.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Q.prototype.getMarkerData=function(t){for(var e,s=0;s<this.markers.length;s+=1)if((e=this.markers[s]).payload&&e.payload.name===t)return e;return null},Q.prototype.goToAndStop=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},Q.prototype.goToAndPlay=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(i,e,s);this.play()}},Q.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(s=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},Q.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},Q.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)},Q.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===Z(t[0])){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},Q.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},Q.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},Q.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},Q.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},Q.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},Q.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},Q.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},Q.prototype.getVolume=function(){return this.audioController.getVolume()},Q.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},Q.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},Q.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},Q.prototype.getPath=function(){return this.path},Q.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},Q.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},Q.prototype.hide=function(){this.renderer.hide()},Q.prototype.show=function(){this.renderer.show()},Q.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},Q.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new A(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new w(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new D(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new S(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new M(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new A(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new w(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new D(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new S(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new M(t,this))},Q.prototype.triggerRenderFrameError=function(t){var e=new F(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},Q.prototype.triggerConfigError=function(t){var e=new T(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var $=function(){var t={},e=[],s=0,i=0,r=0,n=!0,o=!1;function h(t){for(var s=0,a=t.target;s<i;)e[s].animation===a&&(e.splice(s,1),s-=1,i-=1,a.isPaused||f()),s+=1}function l(t,s){if(!t)return null;for(var a=0;a<i;){if(e[a].elem===t&&null!==e[a].elem)return e[a].animation;a+=1}var r=new Q;return c(r,t),r.setData(t,s),r}function p(){r+=1,u()}function f(){r-=1}function c(t,s){t.addEventListener("destroy",h),t.addEventListener("_active",p),t.addEventListener("_idle",f),e.push({elem:s,animation:t}),i+=1}function m(t){var a,h=t-s;for(a=0;a<i;a+=1)e[a].animation.advanceTime(h);s=t,r&&!o?window.requestAnimationFrame(m):n=!0}function d(t){s=t,window.requestAnimationFrame(m)}function u(){!o&&r&&n&&(window.requestAnimationFrame(d),n=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new Q;return c(e,null),e.setParams(t),e},t.setSpeed=function(t,s){var a;for(a=0;a<i;a+=1)e[a].animation.setSpeed(t,s)},t.setDirection=function(t,s){var a;for(a=0;a<i;a+=1)e[a].animation.setDirection(t,s)},t.play=function(t){var s;for(s=0;s<i;s+=1)e[s].animation.play(t)},t.pause=function(t){var s;for(s=0;s<i;s+=1)e[s].animation.pause(t)},t.stop=function(t){var s;for(s=0;s<i;s+=1)e[s].animation.stop(t)},t.togglePause=function(t){var s;for(s=0;s<i;s+=1)e[s].animation.togglePause(t)},t.searchAnimations=function(t,e,s){var i,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=r.length;for(i=0;i<n;i+=1)s&&r[i].setAttribute("data-bm-type",s),l(r[i],t);if(e&&0===n){s||(s="svg");var o=document.getElementsByTagName("body")[0];o.innerText="";var h=a("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",s),o.appendChild(h),l(h,t)}},t.resize=function(){var t;for(t=0;t<i;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,s,a){var r;for(r=0;r<i;r+=1)e[r].animation.goToAndStop(t,s,a)},t.destroy=function(t){var s;for(s=i-1;s>=0;s-=1)e[s].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,u()},t.setVolume=function(t,s){var a;for(a=0;a<i;a+=1)e[a].animation.setVolume(t,s)},t.mute=function(t){var s;for(s=0;s<i;s+=1)e[s].animation.mute(t)},t.unmute=function(t){var s;for(s=0;s<i;s+=1)e[s].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,s=e.length,i=[];for(t=0;t<s;t+=1)i.push(e[t].animation);return i},t}(),tt=function(){var t={getBezierEasing:function(t,s,i,a,r){var n=r||("bez_"+t+"_"+s+"_"+i+"_"+a).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,s,i,a]);return e[n]=o,o}},e={};var s=.1,i="function"==typeof Float32Array;function a(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,s){return((a(e,s)*t+r(e,s))*t+n(e))*t}function h(t,e,s){return 3*a(e,s)*t*t+2*r(e,s)*t+n(e)}function l(t){this._p=t,this._mSampleValues=i?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],s=this._p[1],i=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===s&&i===a?t:0===t?0:1===t?1:o(this._getTForX(t),s,a)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&s===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<11;++i)this._mSampleValues[i]=o(i*s,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],a=this._mSampleValues,r=0,n=1;10!==n&&a[n]<=t;++n)r+=s;var l=r+(t-a[--n])/(a[n+1]-a[n])*s,p=h(l,e,i);return p>=.001?function(t,e,s,i){for(var a=0;a<4;++a){var r=h(e,s,i);if(0===r)return e;e-=(o(e,s,i)-t)/r}return e}(t,l,e,i):0===p?l:function(t,e,s,i,a){var r,n,h=0;do{(r=o(n=e+(s-e)/2,i,a)-t)>0?s=n:e=n}while(Math.abs(r)>1e-7&&++h<10);return n}(t,r,r+s,e,i)}},t}(),et={double:function(t){return t.concat(p(t.length))}},st=function(t,e,s){var i=0,a=t,r=p(a);return{newElement:function(){return i?r[i-=1]:e()},release:function(t){i===a&&(r=et.double(r),a*=2),s&&s(t),r[i]=t,i+=1}}},it=st(8,(function(){return{addedLength:0,percents:l("float32",j()),lengths:l("float32",j())}})),at=st(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)it.release(t.lengths[e]);t.lengths.length=0}));var rt=function(){var t=Math;function e(t,e,s,i,a,r){var n=t*i+e*a+s*r-a*i-r*t-s*e;return n>-.001&&n<.001}var s=function(t,e,s,i){var a,r,n,o,h,l,p=j(),f=0,c=[],m=[],d=it.newElement();for(n=s.length,a=0;a<p;a+=1){for(h=a/(p-1),l=0,r=0;r<n;r+=1)o=g(1-h,3)*t[r]+3*g(1-h,2)*h*s[r]+3*(1-h)*g(h,2)*i[r]+g(h,3)*e[r],c[r]=o,null!==m[r]&&(l+=g(c[r]-m[r],2)),m[r]=c[r];l&&(f+=l=y(l)),d.percents[a]=h,d.lengths[a]=f}return d.addedLength=f,d};function i(t){this.segmentLength=0,this.points=new Array(t)}function a(t,e){this.partialLength=t,this.point=e}var r,n=(r={},function(t,s,n,o){var h=(t[0]+"_"+t[1]+"_"+s[0]+"_"+s[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!r[h]){var l,f,c,m,d,u,v,b=j(),_=0,P=null;2===t.length&&(t[0]!==s[0]||t[1]!==s[1])&&e(t[0],t[1],s[0],s[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],s[0],s[1],s[0]+o[0],s[1]+o[1])&&(b=2);var k=new i(b);for(c=n.length,l=0;l<b;l+=1){for(v=p(c),d=l/(b-1),u=0,f=0;f<c;f+=1)m=g(1-d,3)*t[f]+3*g(1-d,2)*d*(t[f]+n[f])+3*(1-d)*g(d,2)*(s[f]+o[f])+g(d,3)*s[f],v[f]=m,null!==P&&(u+=g(v[f]-P[f],2));_+=u=y(u),k.points[l]=new a(u,v),P=v}k.segmentLength=_,r[h]=k}return r[h]});function o(t,e){var s=e.percents,i=e.lengths,a=s.length,r=v((a-1)*t),n=t*e.addedLength,o=0;if(r===a-1||0===r||n===i[r])return s[r];for(var h=i[r]>n?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(o=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=h,r<0||r>=a-1){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*o}var h=l("float32",8);return{getSegmentsLength:function(t){var e,i=at.newElement(),a=t.c,r=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=s(r[e],r[e+1],n[e],o[e+1]),p+=l[e].addedLength;return a&&h&&(l[e]=s(r[e],r[0],n[e],o[0]),p+=l[e].addedLength),i.totalLength=p,i},getNewSegment:function(e,s,i,a,r,n,l){r<0?r=0:r>1&&(r=1);var p,f=o(r,l),c=o(n=n>1?1:n,l),m=e.length,d=1-f,u=1-c,g=d*d*d,y=f*d*d*3,v=f*f*d*3,b=f*f*f,_=d*d*u,P=f*d*u+d*f*u+d*d*c,k=f*f*u+d*f*c+f*d*c,C=f*f*c,x=d*u*u,A=f*u*u+d*c*u+d*u*c,D=f*c*u+d*c*c+f*u*c,w=f*c*c,S=u*u*u,M=c*u*u+u*c*u+u*u*c,F=c*c*u+u*c*c+c*u*c,T=c*c*c;for(p=0;p<m;p+=1)h[4*p]=t.round(1e3*(g*e[p]+y*i[p]+v*a[p]+b*s[p]))/1e3,h[4*p+1]=t.round(1e3*(_*e[p]+P*i[p]+k*a[p]+C*s[p]))/1e3,h[4*p+2]=t.round(1e3*(x*e[p]+A*i[p]+D*a[p]+w*s[p]))/1e3,h[4*p+3]=t.round(1e3*(S*e[p]+M*i[p]+F*a[p]+T*s[p]))/1e3;return h},getPointInSegment:function(e,s,i,a,r,n){var h=o(r,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*i[0]+(h*h*l+l*h*h+h*l*h)*a[0]+h*h*h*s[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*i[1]+(h*h*l+l*h*h+h*l*h)*a[1]+h*h*h*s[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(s,i,a,r,n,o,h,l,p){if(0===a&&0===o&&0===p)return e(s,i,r,n,h,l);var f,c=t.sqrt(t.pow(r-s,2)+t.pow(n-i,2)+t.pow(o-a,2)),m=t.sqrt(t.pow(h-s,2)+t.pow(l-i,2)+t.pow(p-a,2)),d=t.sqrt(t.pow(h-r,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=c>m?c>d?c-m-d:d-m-c:d>m?d-m-c:m-c-d)>-1e-4&&f<1e-4}}}(),nt=function(){var t=s,e=Math.abs;function i(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=l("float32",this.pv.length));for(var r,n,o,h,p,f,c,m,d,u=e.lastIndex,g=u,y=this.keyframes.length-1,v=!0;v;){if(r=this.keyframes[g],n=this.keyframes[g+1],g===y-1&&t>=n.t-i){r.h&&(r=n),u=0;break}if(n.t-i>t){u=g;break}g<y-1?g+=1:(u=0,v=!1)}o=this.keyframesMetadata[g]||{};var b,_,P,C,x,A,D,w,S,M,F=n.t-i,T=r.t-i;if(r.to){o.bezierData||(o.bezierData=rt.buildBezierData(r.s,n.s||r.e,r.to,r.ti));var E=o.bezierData;if(t>=F||t<T){var I=t>=F?E.points.length-1:0;for(p=E.points[I].point.length,h=0;h<p;h+=1)s[h]=E.points[I].point[h]}else{o.__fnct?d=o.__fnct:(d=tt.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,o.__fnct=d),f=d((t-T)/(F-T));var L,R=E.segmentLength*f,O=e.lastFrame<t&&e._lastKeyframeIndex===g?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===g?e._lastPoint:0,v=!0,c=E.points.length;v;){if(O+=E.points[m].partialLength,0===R||0===f||m===E.points.length-1){for(p=E.points[m].point.length,h=0;h<p;h+=1)s[h]=E.points[m].point[h];break}if(R>=O&&R<O+E.points[m+1].partialLength){for(L=(R-O)/E.points[m+1].partialLength,p=E.points[m].point.length,h=0;h<p;h+=1)s[h]=E.points[m].point[h]+(E.points[m+1].point[h]-E.points[m].point[h])*L;break}m<c-1?m+=1:v=!1}e._lastPoint=m,e._lastAddedLength=O-E.points[m].partialLength,e._lastKeyframeIndex=g}}else{var V,z,N,G,B;if(y=r.s.length,b=n.s||r.e,this.sh&&1!==r.h)if(t>=F)s[0]=b[0],s[1]=b[1],s[2]=b[2];else if(t<=T)s[0]=r.s[0],s[1]=r.s[1],s[2]=r.s[2];else{var j=a(r.s),q=a(b);_=s,P=function(t,e,s){var i,a,r,n,o,h=[],l=t[0],p=t[1],f=t[2],c=t[3],m=e[0],d=e[1],u=e[2],g=e[3];return(a=l*m+p*d+f*u+c*g)<0&&(a=-a,m=-m,d=-d,u=-u,g=-g),1-a>1e-6?(i=Math.acos(a),r=Math.sin(i),n=Math.sin((1-s)*i)/r,o=Math.sin(s*i)/r):(n=1-s,o=s),h[0]=n*l+o*m,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*c+o*g,h}(j,q,(t-T)/(F-T)),C=P[0],x=P[1],A=P[2],D=P[3],w=Math.atan2(2*x*D-2*C*A,1-2*x*x-2*A*A),S=Math.asin(2*C*x+2*A*D),M=Math.atan2(2*C*D-2*x*A,1-2*C*C-2*A*A),_[0]=w/k,_[1]=S/k,_[2]=M/k}else for(g=0;g<y;g+=1)1!==r.h&&(t>=F?f=1:t<T?f=0:(r.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[g]?d=o.__fnct[g]:(V=void 0===r.o.x[g]?r.o.x[0]:r.o.x[g],z=void 0===r.o.y[g]?r.o.y[0]:r.o.y[g],N=void 0===r.i.x[g]?r.i.x[0]:r.i.x[g],G=void 0===r.i.y[g]?r.i.y[0]:r.i.y[g],d=tt.getBezierEasing(V,z,N,G).get,o.__fnct[g]=d)):o.__fnct?d=o.__fnct:(V=r.o.x,z=r.o.y,N=r.i.x,G=r.i.y,d=tt.getBezierEasing(V,z,N,G).get,r.keyframeMetadata=d),f=d((t-T)/(F-T)))),b=n.s||r.e,B=1===r.h?r.s[g]:r.s[g]+(b[g]-r.s[g])*f,"multidimensional"===this.propType?s[g]=B:s=B}return e.lastIndex=u,s}function a(t){var e=t[0]*k,s=t[1]*k,i=t[2]*k,a=Math.cos(e/2),r=Math.cos(s/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(s/2),l=Math.sin(i/2);return[o*h*n+a*r*l,o*r*n+a*h*l,a*h*n-o*r*l,a*r*n-o*h*l]}function r(){var e=this.comp.renderedFrame-this.offsetTime,s=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<s&&e<s))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var a=this.interpolateValue(e,this._caching);this.pv=a}return this._caching.lastFrame=e,this.pv}function n(t){var s;if("unidimensional"===this.propType)s=t*this.mult,e(this.v-s)>1e-5&&(this.v=s,this._mdf=!0);else for(var i=0,a=this.v.length;i<a;)s=t[i]*this.mult,e(this.v[i]-s)>1e-5&&(this.v[i]=s,this._mdf=!0),i+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)s=this.effectsSequence[t](s);this.setVValue(s),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function h(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function p(t,e,s,i){this.propType="unidimensional",this.mult=s||1,this.data=e,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=o,this.setVValue=n,this.addEffect=h}function f(t,e,s,i){var a;this.propType="multidimensional",this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r=e.k.length;for(this.v=l("float32",r),this.pv=l("float32",r),this.vel=l("float32",r),a=0;a<r;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=o,this.setVValue=n,this.addEffect=h}function c(e,s,a,l){this.propType="unidimensional",this.keyframes=s.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=s,this.mult=a||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=o,this.setVValue=n,this.interpolateValue=i,this.effectsSequence=[r.bind(this)],this.addEffect=h}function m(e,s,a,p){var f;this.propType="multidimensional";var c,m,d,u,g=s.k.length;for(f=0;f<g-1;f+=1)s.k[f].to&&s.k[f].s&&s.k[f+1]&&s.k[f+1].s&&(c=s.k[f].s,m=s.k[f+1].s,d=s.k[f].to,u=s.k[f].ti,(2===c.length&&(c[0]!==m[0]||c[1]!==m[1])&&rt.pointOnLine2D(c[0],c[1],m[0],m[1],c[0]+d[0],c[1]+d[1])&&rt.pointOnLine2D(c[0],c[1],m[0],m[1],m[0]+u[0],m[1]+u[1])||3===c.length&&(c[0]!==m[0]||c[1]!==m[1]||c[2]!==m[2])&&rt.pointOnLine3D(c[0],c[1],c[2],m[0],m[1],m[2],c[0]+d[0],c[1]+d[1],c[2]+d[2])&&rt.pointOnLine3D(c[0],c[1],c[2],m[0],m[1],m[2],m[0]+u[0],m[1]+u[1],m[2]+u[2]))&&(s.k[f].to=null,s.k[f].ti=null),c[0]===m[0]&&c[1]===m[1]&&0===d[0]&&0===d[1]&&0===u[0]&&0===u[1]&&(2===c.length||c[2]===m[2]&&0===d[2]&&0===u[2])&&(s.k[f].to=null,s.k[f].ti=null));this.effectsSequence=[r.bind(this)],this.data=s,this.keyframes=s.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=a||1,this.elem=e,this.container=p,this.comp=e.comp,this.getValue=o,this.setVValue=n,this.interpolateValue=i,this.frameId=-1;var y=s.k[0].s.length;for(this.v=l("float32",y),this.pv=l("float32",y),f=0;f<y;f+=1)this.v[f]=t,this.pv[f]=t;this._caching={lastFrame:t,lastIndex:0,value:l("float32",y)},this.addEffect=h}return{getProp:function(t,e,s,i,a){var r;if(e.k.length)if("number"==typeof e.k[0])r=new f(t,e,i,a);else switch(s){case 0:r=new c(t,e,i,a);break;case 1:r=new m(t,e,i,a)}else r=new p(t,e,i,a);return r.effectsSequence.length&&a.addDynamicProperty(r),r}}}();function ot(){}ot.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var ht=st(8,(function(){return l("float32",2)}));function lt(){this.c=!1,this._length=0,this._maxLength=8,this.v=p(this._maxLength),this.o=p(this._maxLength),this.i=p(this._maxLength)}lt.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=ht.newElement(),this.o[s]=ht.newElement(),this.i[s]=ht.newElement(),s+=1},lt.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},lt.prototype.doubleArrayLength=function(){this.v=this.v.concat(p(this._maxLength)),this.i=this.i.concat(p(this._maxLength)),this.o=this.o.concat(p(this._maxLength)),this._maxLength*=2},lt.prototype.setXYAt=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[i]||r[i]&&!a)&&(r[i]=ht.newElement()),r[i][0]=t,r[i][1]=e},lt.prototype.setTripleAt=function(t,e,s,i,a,r,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(s,i,"o",n,o),this.setXYAt(a,r,"i",n,o)},lt.prototype.reverse=function(){var t=new lt;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),a=1);var r,n=this._length-1,o=this._length;for(r=a;r<o;r+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],s[n][0],s[n][1],r,!1),n-=1;return t};var pt,ft=((pt=st(4,(function(){return new lt}),(function(t){var e,s=t._length;for(e=0;e<s;e+=1)ht.release(t.v[e]),ht.release(t.i[e]),ht.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}))).clone=function(t){var e,s=pt.newElement(),i=void 0===t._length?t.v.length:t._length;for(s.setLength(i),s.c=t.c,e=0;e<i;e+=1)s.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return s},pt);function ct(){this._length=0,this._maxLength=4,this.shapes=p(this._maxLength)}ct.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(p(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ct.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)ft.release(this.shapes[t]);this._length=0};var mt,dt,ut,gt,yt=(mt={newShapeCollection:function(){return dt?gt[dt-=1]:new ct},release:function(t){var e,s=t._length;for(e=0;e<s;e+=1)ft.release(t.shapes[e]);t._length=0,dt===ut&&(gt=et.double(gt),ut*=2),gt[dt]=t,dt+=1}},dt=0,gt=p(ut=4),mt),vt=function(){var t=-999999;function e(t,e,s){var i,a,r,n,o,h,l,p,f,c=s.lastIndex,m=this.keyframes;if(t<m[0].t-this.offsetTime)i=m[0].s[0],r=!0,c=0;else if(t>=m[m.length-1].t-this.offsetTime)i=m[m.length-1].s?m[m.length-1].s[0]:m[m.length-2].e[0],r=!0;else{for(var d,u,g,y=c,v=m.length-1,b=!0;b&&(d=m[y],!((u=m[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},c=y,!(r=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var _;g.__fnct?_=g.__fnct:(_=tt.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,g.__fnct=_),p=_((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}a=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,s.lastIndex=c,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=r?i.i[n][o]:i.i[n][o]+(a.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=r?i.o[n][o]:i.o[n][o]+(a.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=r?i.v[n][o]:i.v[n][o]+(a.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function s(){var e=this.comp.renderedFrame-this.offsetTime,s=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,a=this._caching.lastFrame;return a!==t&&(a<s&&e<s||a>i&&e>i)||(this._caching.lastIndex=a<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function a(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var s,i=t._length;for(s=0;s<i;s+=1)if(t.v[s][0]!==e.v[s][0]||t.v[s][1]!==e.v[s][1]||t.o[s][0]!==e.o[s][0]||t.o[s][1]!==e.o[s][1]||t.i[s][0]!==e.i[s][0]||t.i[s][1]!==e.i[s][1])return!1;return!0})(this.v,t)||(this.v=ft.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var s=this.effectsSequence.length;for(e=0;e<s;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function o(t,e,s){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var a=3===s?e.pt.k:e.ks.k;this.v=ft.clone(a),this.pv=ft.clone(this.v),this.localShapeCollection=yt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function h(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(e,a,r){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===r?a.pt.k:a.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=ft.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=ft.clone(this.v),this.localShapeCollection=yt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[s.bind(this)]}o.prototype.interpolateShape=e,o.prototype.getValue=n,o.prototype.setVValue=a,o.prototype.addEffect=h,l.prototype.getValue=n,l.prototype.interpolateShape=e,l.prototype.setVValue=a,l.prototype.addEffect=h;var p=function(){var t=C;function e(t,e){this.v=ft.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=yt.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=nt.getProp(t,e.p,1,0,this),this.s=nt.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],s=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2,r=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=s-a,n.v[1][0]=r?e+i:e-i,n.v[1][1]=s,n.v[2][0]=e,n.v[2][1]=s+a,n.v[3][0]=r?e-i:e+i,n.v[3][1]=s,n.i[0][0]=r?e-i*t:e+i*t,n.i[0][1]=s-a,n.i[1][0]=r?e+i:e-i,n.i[1][1]=s-a*t,n.i[2][0]=r?e+i*t:e-i*t,n.i[2][1]=s+a,n.i[3][0]=r?e-i:e+i,n.i[3][1]=s+a*t,n.o[0][0]=r?e+i*t:e-i*t,n.o[0][1]=s-a,n.o[1][0]=r?e+i:e-i,n.o[1][1]=s+a*t,n.o[2][0]=r?e-i*t:e+i*t,n.o[2][1]=s+a,n.o[3][0]=r?e-i:e+i,n.o[3][1]=s-a*t}},r([ot],e),e}(),f=function(){function t(t,e){this.v=ft.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=nt.getProp(t,e.ir,0,0,this),this.is=nt.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=nt.getProp(t,e.pt,0,0,this),this.p=nt.getProp(t,e.p,1,0,this),this.r=nt.getProp(t,e.r,0,k,this),this.or=nt.getProp(t,e.or,0,0,this),this.os=nt.getProp(t,e.os,0,.01,this),this.localShapeCollection=yt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,s,i,a=2*Math.floor(this.pt.v),r=2*Math.PI/a,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*a),c=2*Math.PI*h/(2*a),m=-Math.PI/2;m+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<a;t+=1){s=n?l:p,i=n?f:c;var u=(e=n?o:h)*Math.cos(m),g=e*Math.sin(m),y=0===u&&0===g?0:g/Math.sqrt(u*u+g*g),v=0===u&&0===g?0:-u/Math.sqrt(u*u+g*g);u+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(u,g,u-y*i*s*d,g-v*i*s*d,u+y*i*s*d,g+v*i*s*d,t,!0),n=!n,m+=r*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),s=2*Math.PI/e,i=this.or.v,a=this.os.v,r=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*r*a*o,l-f*r*a*o,h+p*r*a*o,l+f*r*a*o,t,!0),n+=s*o}this.paths.length=0,this.paths[0]=this.v}},r([ot],t),t}(),c=function(){function t(t,e){this.v=ft.newElement(),this.v.c=!0,this.localShapeCollection=yt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=nt.getProp(t,e.p,1,0,this),this.s=nt.getProp(t,e.s,1,0,this),this.r=nt.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=b(s,i,this.r.v),r=a*(1-C);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+a,t+s,e-i+r,0,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-r,t+s,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+s-a,e+i,t+s-a,e+i,t+s-r,e+i,2,!0),this.v.setTripleAt(t-s+a,e+i,t-s+r,e+i,t-s+a,e+i,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-a,t-s,e+i-r,4,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+r,t-s,e-i+a,5,!0),this.v.setTripleAt(t-s+a,e-i,t-s+a,e-i,t-s+r,e-i,6,!0),this.v.setTripleAt(t+s-a,e-i,t+s-r,e-i,t+s-a,e-i,7,!0)):(this.v.setTripleAt(t-s,e+i,t-s+r,e+i,t-s,e+i,2),this.v.setTripleAt(t-s,e-i,t-s,e-i+r,t-s,e-i,3))):(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+r,t+s,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+s-a,e-i,t+s-a,e-i,t+s-r,e-i,1,!0),this.v.setTripleAt(t-s+a,e-i,t-s+r,e-i,t-s+a,e-i,2,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+a,t-s,e-i+r,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-r,t-s,e+i-a,4,!0),this.v.setTripleAt(t-s+a,e+i,t-s+a,e+i,t-s+r,e+i,5,!0),this.v.setTripleAt(t+s-a,e+i,t+s-r,e+i,t+s-a,e+i,6,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-a,t+s,e+i-r,7,!0)):(this.v.setTripleAt(t-s,e-i,t-s+r,e-i,t-s,e-i,1,!0),this.v.setTripleAt(t-s,e+i,t-s,e+i-r,t-s,e+i,2,!0),this.v.setTripleAt(t+s,e+i,t+s-r,e+i,t+s,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},r([ot],t),t}();var m={getShapeProp:function(t,e,s){var i;return 3===s||4===s?i=(3===s?e.pt:e.ks).k.length?new l(t,e,s):new o(t,e,s):5===s?i=new c(t,e):6===s?i=new p(t,e):7===s&&(i=new f(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return o},getKeyframedConstructorFunction:function(){return l}};return m}(),bt=function(){var t=Math.cos,e=Math.sin,s=Math.tan,i=Math.round;function a(){return 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,this}function r(s){if(0===s)return this;var i=t(s),a=e(s);return this._t(i,-a,0,0,a,i,0,0,0,0,1,0,0,0,0,1)}function n(s){if(0===s)return this;var i=t(s),a=e(s);return this._t(1,0,0,0,0,i,-a,0,0,a,i,0,0,0,0,1)}function o(s){if(0===s)return this;var i=t(s),a=e(s);return this._t(i,0,a,0,0,1,0,0,-a,0,i,0,0,0,0,1)}function h(s){if(0===s)return this;var i=t(s),a=e(s);return this._t(i,-a,0,0,a,i,0,0,0,0,1,0,0,0,0,1)}function p(t,e){return this._t(1,e,t,1,0,0)}function f(t,e){return this.shear(s(t),s(e))}function c(i,a){var r=t(a),n=e(a);return this._t(r,n,0,0,-n,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,s(i),1,0,0,0,0,1,0,0,0,0,1)._t(r,-n,0,0,n,r,0,0,0,0,1,0,0,0,0,1)}function m(t,e,s){return s||0===s||(s=1),1===t&&1===e&&1===s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function d(t,e,s,i,a,r,n,o,h,l,p,f,c,m,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=c,this.props[13]=m,this.props[14]=d,this.props[15]=u,this}function u(t,e,s){return s=s||0,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function g(t,e,s,i,a,r,n,o,h,l,p,f,c,m,d,u){var g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===a&&1===r&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*c,g[13]=g[13]*r+g[15]*m,g[14]=g[14]*p+g[15]*d,g[15]*=u,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],_=g[3],P=g[4],k=g[5],C=g[6],x=g[7],A=g[8],D=g[9],w=g[10],S=g[11],M=g[12],F=g[13],T=g[14],E=g[15];return g[0]=y*t+v*a+b*h+_*c,g[1]=y*e+v*r+b*l+_*m,g[2]=y*s+v*n+b*p+_*d,g[3]=y*i+v*o+b*f+_*u,g[4]=P*t+k*a+C*h+x*c,g[5]=P*e+k*r+C*l+x*m,g[6]=P*s+k*n+C*p+x*d,g[7]=P*i+k*o+C*f+x*u,g[8]=A*t+D*a+w*h+S*c,g[9]=A*e+D*r+w*l+S*m,g[10]=A*s+D*n+w*p+S*d,g[11]=A*i+D*o+w*f+S*u,g[12]=M*t+F*a+T*h+E*c,g[13]=M*e+F*r+T*l+E*m,g[14]=M*s+F*n+T*p+E*d,g[15]=M*i+F*o+T*f+E*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function b(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function _(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function k(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function C(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function x(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function A(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,s=-this.props[1]/t,i=-this.props[4]/t,a=this.props[0]/t,r=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new bt;return o.props[0]=e,o.props[1]=s,o.props[4]=i,o.props[5]=a,o.props[12]=r,o.props[13]=n,o}function D(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function w(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=D(t[e]);return i}function S(t,e,s){var i=l("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=s[0],i[5]=s[1];else{var a=this.props[0],r=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],p=this.props[13];i[0]=t[0]*a+t[1]*n+h,i[1]=t[0]*r+t[1]*o+p,i[2]=e[0]*a+e[1]*n+h,i[3]=e[0]*r+e[1]*o+p,i[4]=s[0]*a+s[1]*n+h,i[5]=s[0]*r+s[1]*o+p}return i}function M(t,e,s){return this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function F(t,e){if(this.isIdentity())return t+","+e;var s=this.props;return Math.round(100*(t*s[0]+e*s[4]+s[12]))/100+","+Math.round(100*(t*s[1]+e*s[5]+s[13]))/100}function T(){for(var t=0,e=this.props,s="matrix3d(";t<16;)s+=i(1e4*e[t])/1e4,s+=15===t?")":",",t+=1;return s}function E(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+E(t[0])+","+E(t[1])+","+E(t[4])+","+E(t[5])+","+E(t[12])+","+E(t[13])+")"}return function(){this.reset=a,this.rotate=r,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=f,this.skewFromAxis=c,this.shear=p,this.scale=m,this.setTransform=d,this.translate=u,this.transform=g,this.applyToPoint=P,this.applyToX=k,this.applyToY=C,this.applyToZ=x,this.applyToPointArray=M,this.applyToTriplePoints=S,this.applyToPointStringified=F,this.toCSS=T,this.to2dCSS=I,this.clone=b,this.cloneFromProps=_,this.equals=v,this.inversePoints=w,this.inversePoint=D,this.getInverseMatrix=A,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=l("float32",16),this.reset()}}();function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}var Pt,kt={};function Ct(){$.searchAnimations()}kt.play=$.play,kt.pause=$.pause,kt.setLocationHref=function(e){t=e},kt.togglePause=$.togglePause,kt.setSpeed=$.setSpeed,kt.setDirection=$.setDirection,kt.stop=$.stop,kt.searchAnimations=Ct,kt.registerAnimation=$.registerAnimation,kt.loadAnimation=function(t){return $.loadAnimation(t)},kt.setSubframeRendering=function(t){!function(t){c=!!t}(t)},kt.resize=$.resize,kt.goToAndStop=$.goToAndStop,kt.destroy=$.destroy,kt.setQuality=function(t){if("string"==typeof t)switch(t){case"high":B(200);break;default:case"medium":B(50);break;case"low":B(10)}else!isNaN(t)&&t>1&&B(t);j()>=50?x(!1):x(!0)},kt.inBrowser=function(){return"undefined"!=typeof navigator},kt.installPlugin=function(t,e){"expressions"===t&&(m=e)},kt.freeze=$.freeze,kt.unfreeze=$.unfreeze,kt.setVolume=$.setVolume,kt.mute=$.mute,kt.unmute=$.unmute,kt.getRegisteredAnimations=$.getRegisteredAnimations,kt.useWebWorker=function(t){e=!!t},kt.setIDPrefix=function(t){d=t},kt.__getFactory=function(t){switch(t){case"propertyFactory":return nt;case"shapePropertyFactory":return vt;case"matrix":return bt;default:return null}},kt.version="5.9.1";var xt=document.getElementsByTagName("script"),At=xt[xt.length-1]||{src:""};Pt=At.src.replace(/^[^\?]+\??/,""),function(t){for(var e=Pt.split("&"),s=0;s<e.length;s+=1){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}("renderer");var Dt=setInterval((function(){"complete"===document.readyState&&(clearInterval(Dt),Ct())}),100);try{"object"===("undefined"==typeof exports?"undefined":_t(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=kt)}catch(t){}var wt=function(){var t={},e={};return t.registerModifier=function(t,s){e[t]||(e[t]=s)},t.getModifier=function(t,s,i){return new e[t](s,i)},t}();function St(){}function Mt(){}function Ft(){}St.prototype.initModifierProperties=function(){},St.prototype.addShapeToModifier=function(){},St.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:yt.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},St.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=s,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},St.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},r([ot],St),r([St],Mt),Mt.prototype.initModifierProperties=function(t,e){this.s=nt.getProp(t,e.s,0,.01,this),this.e=nt.getProp(t,e.e,0,.01,this),this.o=nt.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},Mt.prototype.addShapeToModifier=function(t){t.pathsData=[]},Mt.prototype.calculateShapeEdges=function(t,e,s,i,a){var r=[];e<=1?r.push({s:t,e:e}):t>=1?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,o,h=[],l=r.length;for(n=0;n<l;n+=1){var p,f;if(!((o=r[n]).e*a<i||o.s*a>i+s))p=o.s*a<=i?0:(o.s*a-i)/s,f=o.e*a>=i+s?1:(o.e*a-i)/s,h.push([p,f])}return h.length||h.push([0,0]),h},Mt.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)at.release(t[e]);return t.length=0,t},Mt.prototype.processShapes=function(t){var e,s,i,a;if(this._mdf||t){var r=this.o.v%360/360;if(r<0&&(r+=1),(e=this.s.v>1?1+r:this.s.v<0?0+r:this.s.v+r)>(s=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r)){var n=e;e=s,s=n}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var o,h,l,p,f,c=this.shapes.length,m=0;if(s===e)for(a=0;a<c;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===s&&0===e||0===s&&1===e){if(this._mdf)for(a=0;a<c;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var d,u,g=[];for(a=0;a<c;a+=1)if((d=this.shapes[a]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=rt.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}m+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var y,v=e,b=s,_=0;for(a=c-1;a>=0;a-=1)if((d=this.shapes[a]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&c>1?(y=this.calculateShapeEdges(e,s,d.totalShapeLength,_,m),_+=d.totalShapeLength):y=[[v,b]],h=y.length,o=0;o<h;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):v>=1?g.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(g.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),g.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var k=P.pop();this.addPaths(P,u),P=this.addShapes(d,g[1],k)}else this.addPaths(P,u),P=this.addShapes(d,g[1]);this.addPaths(P,u)}}d.shape.paths=u}}},Mt.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},Mt.prototype.addSegment=function(t,e,s,i,a,r,n){a.setXYAt(e[0],e[1],"o",r),a.setXYAt(s[0],s[1],"i",r+1),n&&a.setXYAt(t[0],t[1],"v",r),a.setXYAt(i[0],i[1],"v",r+1)},Mt.prototype.addSegmentFromArray=function(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)},Mt.prototype.addShapes=function(t,e,s){var i,a,r,n,o,h,l,p,f=t.pathsData,c=t.shape.paths.shapes,m=t.shape.paths._length,d=0,u=[],g=!0;for(s?(o=s._length,p=s._length):(s=ft.newElement(),o=0,p=0),u.push(s),i=0;i<m;i+=1){for(h=f[i].lengths,s.c=c[i].c,r=c[i].c?h.length:h.length+1,a=1;a<r;a+=1)if(d+(n=h[a-1]).addedLength<e.s)d+=n.addedLength,s.c=!1;else{if(d>e.e){s.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(c[i].v[a-1],c[i].o[a-1],c[i].i[a],c[i].v[a],s,o,g),g=!1):(l=rt.getNewSegment(c[i].v[a-1],c[i].v[a],c[i].o[a-1],c[i].i[a],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1),d+=n.addedLength,o+=1}if(c[i].c&&h.length){if(n=h[a-1],d<=e.e){var y=h[a-1].addedLength;e.s<=d&&e.e>=d+y?(this.addSegment(c[i].v[a-1],c[i].o[a-1],c[i].i[0],c[i].v[0],s,o,g),g=!1):(l=rt.getNewSegment(c[i].v[a-1],c[i].v[0],c[i].o[a-1],c[i].i[0],(e.s-d)/y,(e.e-d)/y,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1)}else s.c=!1;d+=n.addedLength,o+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),d>e.e)break;i<m-1&&(s=ft.newElement(),g=!0,u.push(s),o=0)}return u},r([St],Ft),Ft.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=nt.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},Ft.prototype.processPath=function(t,e){var s=e/100,i=[0,0],a=t._length,r=0;for(r=0;r<a;r+=1)i[0]+=t.v[r][0],i[1]+=t.v[r][1];i[0]/=a,i[1]/=a;var n,o,h,l,p,f,c=ft.newElement();for(c.c=t.c,r=0;r<a;r+=1)n=t.v[r][0]+(i[0]-t.v[r][0])*s,o=t.v[r][1]+(i[1]-t.v[r][1])*s,h=t.o[r][0]+(i[0]-t.o[r][0])*-s,l=t.o[r][1]+(i[1]-t.o[r][1])*-s,p=t.i[r][0]+(i[0]-t.i[r][0])*-s,f=t.i[r][1]+(i[1]-t.i[r][1])*-s,c.setTripleAt(n,o,h,l,p,f,r);return c},Ft.prototype.processShapes=function(t){var e,s,i,a,r,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(s=0;s<o;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var Tt=function(){var t=[0,0];function e(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new bt,this.pre=new bt,this.appliedTransformations=0,this.initDynamicPropertyContainer(s||t),e.p&&e.p.s?(this.px=nt.getProp(t,e.p.x,0,0,this),this.py=nt.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=nt.getProp(t,e.p.z,0,0,this))):this.p=nt.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=nt.getProp(t,e.rx,0,k,this),this.ry=nt.getProp(t,e.ry,0,k,this),this.rz=nt.getProp(t,e.rz,0,k,this),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=nt.getProp(t,e.or,1,k,this),this.or.sh=!0}else this.r=nt.getProp(t,e.r||{k:0},0,k,this);e.sk&&(this.sk=nt.getProp(t,e.sk,0,k,this),this.sa=nt.getProp(t,e.sa,0,k,this)),this.a=nt.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=nt.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=nt.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var s;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var i,a;if(s=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/s,0),a=this.p.getValueAtTime(this.p.keyframes[0].t/s,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/s,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/s,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],a=[];var r=this.px,n=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(i[0]=r.getValueAtTime((r.keyframes[0].t+.01)/s,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/s,0),a[0]=r.getValueAtTime(r.keyframes[0].t/s,0),a[1]=n.getValueAtTime(n.keyframes[0].t/s,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(i[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/s,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/s,0),a[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/s,0),a[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/s,0)):(i=[r.pv,n.pv],a[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/s,r.offsetTime),a[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/s,n.offsetTime))}else i=a=t;this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},r([ot],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=ot.prototype.addDynamicProperty,{getTransformProperty:function(t,s,i){return new e(t,s,i)}}}();function Et(){}function It(){}function Lt(t){for(var e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",a=e.length,r=0;r<a;r+=1)switch(e[r].toLowerCase()){case"italic":i="italic";break;case"bold":s="700";break;case"black":s="900";break;case"medium":s="500";break;case"regular":case"normal":s="400";break;case"light":case"thin":s="200"}return{style:i,weight:t.fWeight||s}}r([St],Et),Et.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=nt.getProp(t,e.c,0,null,this),this.o=nt.getProp(t,e.o,0,null,this),this.tr=Tt.getTransformProperty(t,e.tr,this),this.so=nt.getProp(t,e.tr.so,0,.01,this),this.eo=nt.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new bt,this.rMatrix=new bt,this.sMatrix=new bt,this.tMatrix=new bt,this.matrix=new bt},Et.prototype.applyTransforms=function(t,e,s,i,a,r){var n=r?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-a),h=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(r?1/o:o,r?1/h:h),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])},Et.prototype.init=function(t,e,s,i){for(this.elem=t,this.arr=e,this.pos=s,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[s]);s>0;)s-=1,this._elements.unshift(e[s]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Et.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},Et.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},Et.prototype.changeGroupRender=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]._render=e,"gr"===t[s].ty&&this.changeGroupRender(t[s].it,e)},Et.prototype.processShapes=function(t){var e,s,i,a,r,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(r=0,i=0;i<=this._groups.length-1;i+=1){if(o=r<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}r+=1}this._currentCopies=h;var c=this.o.v,m=c%1,d=c>0?Math.floor(c):Math.ceil(c),u=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(c>0){for(;_<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,m,!1),_+=m)}else if(c<0){for(;_>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-m,!0),_-=m)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)s[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)s[v]=this.matrix.props[v];_+=1,r-=1,i+=a}}else for(r=this._currentCopies,i=0,a=1;r;)s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,r-=1,i+=a;return n},Et.prototype.addShape=function(){},r([St],It),It.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=nt.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},It.prototype.processPath=function(t,e){var s,i=ft.newElement();i.c=t.c;var a,r,n,o,h,l,p,f,c,m,d,u,g=t._length,y=0;for(s=0;s<g;s+=1)a=t.v[s],n=t.o[s],r=t.i[s],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==s&&s!==g-1||t.c?(o=0===s?t.v[g-1]:t.v[s-1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=a[0]+(o[0]-a[0])*l,f=u=a[1]-(a[1]-o[1])*l,c=p-(p-a[0])*C,m=f-(f-a[1])*C,i.setTripleAt(p,f,c,m,d,u,y),y+=1,o=s===g-1?t.v[0]:t.v[s+1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=c=a[0]+(o[0]-a[0])*l,f=m=a[1]+(o[1]-a[1])*l,d=p-(p-a[0])*C,u=f-(f-a[1])*C,i.setTripleAt(p,f,c,m,d,u,y),y+=1):(i.setTripleAt(a[0],a[1],n[0],n[1],r[0],r[1],y),y+=1):(i.setTripleAt(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],y),y+=1);return i},It.prototype.processShapes=function(t){var e,s,i,a,r,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(s=0;s<o;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var Rt=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var s=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function r(t,e){var s=a("span");s.setAttribute("aria-hidden",!0),s.style.fontFamily=e;var i=a("span");i.innerText="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);var r=i.offsetWidth;return i.style.fontFamily=function(t){var e,s=t.split(","),i=s.length,a=[];for(e=0;e<i;e+=1)"sans-serif"!==s[e]&&"monospace"!==s[e]&&a.push(s[e]);return a.join(",")}(t)+", "+e,{node:i,w:r,parent:s}}function n(t,e){var s=q("text");s.style.fontSize="100px";var i=Lt(e);return s.setAttribute("font-family",e.fFamily),s.setAttribute("font-style",i.style),s.setAttribute("font-weight",i.weight),s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.setAttribute("class",e.fClass)):s.style.fontFamily=e.fFamily,t.appendChild(s),a("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,s}var o=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};o.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==s.indexOf(i)},o.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},o.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var h={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var s,i,a=t.length,r=this.chars.length;for(e=0;e<a;e+=1){for(s=0,i=!1;s<r;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(i=!0),s+=1;i||(this.chars.push(t[e]),r+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var s,i=t.list,o=i.length,h=o;for(s=0;s<o;s+=1){var l,p,f=!0;if(i[s].loaded=!1,i[s].monoCase=r(i[s].fFamily,"monospace"),i[s].sansCase=r(i[s].fFamily,"sans-serif"),i[s].fPath){if("p"===i[s].fOrigin||3===i[s].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[s].fFamily+'"], style[f-origin="3"][f-family="'+i[s].fFamily+'"]')).length>0&&(f=!1),f){var c=a("style");c.setAttribute("f-forigin",i[s].fOrigin),c.setAttribute("f-origin",i[s].origin),c.setAttribute("f-family",i[s].fFamily),c.type="text/css",c.innerText="@font-face {font-family: "+i[s].fFamily+"; font-style: normal; src: url('"+i[s].fPath+"');}",e.appendChild(c)}}else if("g"===i[s].fOrigin||1===i[s].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;p<l.length;p+=1)-1!==l[p].href.indexOf(i[s].fPath)&&(f=!1);if(f){var m=a("link");m.setAttribute("f-forigin",i[s].fOrigin),m.setAttribute("f-origin",i[s].origin),m.type="text/css",m.rel="stylesheet",m.href=i[s].fPath,document.body.appendChild(m)}}else if("t"===i[s].fOrigin||2===i[s].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),p=0;p<l.length;p+=1)i[s].fPath===l[p].src&&(f=!1);if(f){var d=a("link");d.setAttribute("f-forigin",i[s].fOrigin),d.setAttribute("f-origin",i[s].origin),d.setAttribute("rel","stylesheet"),d.setAttribute("href",i[s].fPath),e.appendChild(d)}}}else i[s].loaded=!0,h-=1;i[s].helper=n(e,i[s]),i[s].cache={},this.fonts.push(i[s])}0===h?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,s,i){for(var a=0,r=this.chars.length;a<r;){if(this.chars[a].ch===e&&this.chars[a].style===s&&this.chars[a].fFamily===i)return this.chars[a];a+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,s,i)),t},getFontByName:function(t){for(var e=0,s=this.fonts.length;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,s){var i=this.getFontByName(e),a=t.charCodeAt(0);if(!i.cache[a+1]){var r=i.helper;if(" "===t){r.textContent="|"+t+"|";var n=r.getComputedTextLength();r.textContent="||";var o=r.getComputedTextLength();i.cache[a+1]=(n-o)/100}else r.textContent=t,i.cache[a+1]=r.getComputedTextLength()/100}return i.cache[a+1]*s},checkLoadedFonts:function(){var t,e,s,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,e.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,e.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return o.prototype=h,o}();function Ot(){}Ot.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var Vt,zt=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var s,i=p(e.viewData.length),a=e.viewData.length;for(s=0;s<a;s+=1)i[s]=new t(e.viewData[s],e.masksProperties[s]);return function(t){for(s=0;s<a;){if(e.masksProperties[s].nm===t)return i[s];s+=1}return null}}}(),Nt=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function s(t,e,s){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(i){if(!t.numKeys)return 0;var a="";a="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s;var r="unidimensional"===s?new Number(a):Object.assign({},a);return r.time=e.keyframes[i-1].t/e.elem.comp.globalData.frameRate,r.value="unidimensional"===s?a[0]:a,r},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function i(){return t}return function(a){return a?"unidimensional"===a.propType?function(e){e&&"pv"in e||(e=t);var i=1/e.mult,a=e.pv*i,r=new Number(a);return r.value=a,s(r,e,"unidimensional"),function(){return e.k&&e.getValue(),a=e.v*i,r.value!==a&&((r=new Number(a)).value=a,s(r,e,"unidimensional")),r}}(a):function(t){t&&"pv"in t||(t=e);var i=1/t.mult,a=t.data&&t.data.l||t.pv.length,r=l("float32",a),n=l("float32",a);return r.value=n,s(r,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<a;e+=1)n[e]=t.v[e]*i,r[e]=n[e];return r}}(a):i}}(),Gt=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var s,i,a,r;return Object.defineProperty(e,"rotation",{get:Nt(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:Nt(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:Nt(t.rx)}),Object.defineProperty(e,"yRotation",{get:Nt(t.ry)}),Object.defineProperty(e,"scale",{get:Nt(t.s)}),t.p?r=Nt(t.p):(s=Nt(t.px),i=Nt(t.py),t.pz&&(a=Nt(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?r():[s(),i(),a?a():0]}}),Object.defineProperty(e,"xPosition",{get:Nt(t.px)}),Object.defineProperty(e,"yPosition",{get:Nt(t.py)}),Object.defineProperty(e,"zPosition",{get:Nt(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:Nt(t.a)}),Object.defineProperty(e,"opacity",{get:Nt(t.o)}),Object.defineProperty(e,"skew",{get:Nt(t.sk)}),Object.defineProperty(e,"skewAxis",{get:Nt(t.sa)}),Object.defineProperty(e,"orientation",{get:Nt(t.or)}),e},Bt=function(){function t(t){var e=new bt;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var s=this.getMatrix(e);return s.props[12]=0,s.props[13]=0,s.props[14]=0,this.applyPoint(s,t)}function s(t,e){var s=this.getMatrix(e);return this.applyPoint(s,t)}function i(t,e){var s=this.getMatrix(e);return s.props[12]=0,s.props[13]=0,s.props[14]=0,this.invertPoint(s,t)}function a(t,e){var s=this.getMatrix(e);return this.invertPoint(s,t)}function r(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var s,i=this._elem.hierarchy.length;for(s=0;s<i;s+=1)this._elem.hierarchy[s].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function o(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var s,i=this._elem.hierarchy.length;for(s=0;s<i;s+=1)this._elem.hierarchy[s].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function h(t){var e=new bt;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var s,i=this._elem.hierarchy.length;for(s=0;s<i;s+=1)this._elem.hierarchy[s].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function l(){return[1,1,1,1]}return function(p){var f;function c(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return c.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return f;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return c.effect;case"ADBE Text Properties":return c.textInterface;default:return null}}c.getMatrix=t,c.invertPoint=o,c.applyPoint=r,c.toWorld=s,c.toWorldVec=e,c.fromWorld=a,c.fromWorldVec=i,c.toComp=s,c.fromComp=h,c.sampleImage=l,c.sourceRectAtTime=p.sourceRectAtTime.bind(p),c._elem=p;var m=n(f=Gt(p.finalTransform.mProp),"anchorPoint");return Object.defineProperties(c,{hasParent:{get:function(){return p.hierarchy.length}},parent:{get:function(){return p.hierarchy[0].layerInterface}},rotation:n(f,"rotation"),scale:n(f,"scale"),position:n(f,"position"),opacity:n(f,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return f}},active:{get:function(){return p.isInRange}}}),c.startTime=p.data.st,c.index=p.data.ind,c.source=p.data.refId,c.height=0===p.data.ty?p.data.h:100,c.width=0===p.data.ty?p.data.w:100,c.inPoint=p.data.ip/p.comp.globalData.frameRate,c.outPoint=p.data.op/p.comp.globalData.frameRate,c._name=p.data.nm,c.registerMaskInterface=function(t){c.mask=new zt(t,p)},c.registerEffectsInterface=function(t){c.effect=t},c}}(),jt=function(t,e){return function(s){return(s=void 0===s?1:s)<=0?t:e(s-1)}},qt=function(t,e){var s={_name:t};return function(t){return(t=void 0===t?1:t)<=0?s:e(t-1)}},Wt=function(){function t(s,i,a,r){function n(t){for(var e=s.ef,i=0,a=e.length;i<a;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?l[i]:l[i]();i+=1}throw new Error}var o,h=jt(n,a),l=[],p=s.ef.length;for(o=0;o<p;o+=1)5===s.ef[o].ty?l.push(t(s.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,r)):l.push(e(i.effectElements[o],s.ef[o].ty,r,h));return"ADBE Color Control"===s.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:h}}),n.enabled=0!==s.en,n.active=n.enabled,n}function e(t,e,s,i){var a=Nt(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(qt("",i)),function(){return 10===e?s.comp.compInterface(t.p.v):a()}}return{createEffectsInterface:function(e,s){if(e.effectsManager){var i,a=[],r=e.data.ef,n=e.effectsManager.effectElements.length;for(i=0;i<n;i+=1)a.push(t(r[i],e.effectsManager.effectElements[i],s,e));var o=e.data.ef||[],h=function(t){for(i=0,n=o.length;i<n;){if(t===o[i].nm||t===o[i].mn||t===o[i].ix)return a[i];i+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),Yt=function(t){function e(e){for(var s=0,i=t.layers.length;s<i;){if(t.layers[s].nm===e||t.layers[s].ind===e)return t.elements[s].layerInterface;s+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},Xt=function(t,e,s){var i=e.sh;function a(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?a.path:null}var r=jt(a,s);return i.setGroupProperty(qt("Path",r)),Object.defineProperties(a,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:s}}),a},Ht=function(){function t(t,o,m){var d,u=[],g=t?t.length:0;for(d=0;d<g;d+=1)"gr"===t[d].ty?u.push(e(t[d],o[d],m)):"fl"===t[d].ty?u.push(s(t[d],o[d],m)):"st"===t[d].ty?u.push(r(t[d],o[d],m)):"tm"===t[d].ty?u.push(n(t[d],o[d],m)):"tr"===t[d].ty||("el"===t[d].ty?u.push(h(t[d],o[d],m)):"sr"===t[d].ty?u.push(l(t[d],o[d],m)):"sh"===t[d].ty?u.push(Xt(t[d],o[d],m)):"rc"===t[d].ty?u.push(p(t[d],o[d],m)):"rd"===t[d].ty?u.push(f(t[d],o[d],m)):"rp"===t[d].ty?u.push(c(t[d],o[d],m)):"gf"===t[d].ty?u.push(i(t[d],o[d],m)):u.push(a(t[d],o[d])));return u}function e(e,s,i){var a=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return a.content;default:return a.transform}};a.propertyGroup=jt(a,i);var r=function(e,s,i){var a,r=function(t){for(var e=0,s=a.length;e<s;){if(a[e]._name===t||a[e].mn===t||a[e].propertyIndex===t||a[e].ix===t||a[e].ind===t)return a[e];e+=1}return"number"==typeof t?a[t-1]:null};r.propertyGroup=jt(r,i),a=t(e.it,s.it,r.propertyGroup),r.numProperties=a.length;var n=o(e.it[e.it.length-1],s.it[s.it.length-1],r.propertyGroup);return r.transform=n,r.propertyIndex=e.cix,r._name=e.nm,r}(e,s,a.propertyGroup),n=o(e.it[e.it.length-1],s.it[s.it.length-1],a.propertyGroup);return a.content=r,a.transform=n,Object.defineProperty(a,"_name",{get:function(){return e.nm}}),a.numProperties=e.np,a.propertyIndex=e.ix,a.nm=e.nm,a.mn=e.mn,a}function s(t,e,s){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:Nt(e.c)},opacity:{get:Nt(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(qt("Color",s)),e.o.setGroupProperty(qt("Opacity",s)),i}function i(t,e,s){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:Nt(e.s)},endPoint:{get:Nt(e.e)},opacity:{get:Nt(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(qt("Start Point",s)),e.e.setGroupProperty(qt("End Point",s)),e.o.setGroupProperty(qt("Opacity",s)),i}function a(){return function(){return null}}function r(t,e,s){var i,a=jt(l,s),r=jt(h,a);function n(s){Object.defineProperty(h,t.d[s].nm,{get:Nt(e.d.dataProps[s].p)})}var o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n(i),e.d.dataProps[i].p.setGroupProperty(r);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:Nt(e.c)},opacity:{get:Nt(e.o)},strokeWidth:{get:Nt(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(qt("Color",a)),e.o.setGroupProperty(qt("Opacity",a)),e.w.setGroupProperty(qt("Stroke Width",a)),l}function n(t,e,s){function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:null}var a=jt(i,s);return i.propertyIndex=t.ix,e.s.setGroupProperty(qt("Start",a)),e.e.setGroupProperty(qt("End",a)),e.o.setGroupProperty(qt("Offset",a)),i.propertyIndex=t.ix,i.propertyGroup=s,Object.defineProperties(i,{start:{get:Nt(e.s)},end:{get:Nt(e.e)},offset:{get:Nt(e.o)},_name:{value:t.nm}}),i.mn=t.mn,i}function o(t,e,s){function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:null}var a=jt(i,s);return e.transform.mProps.o.setGroupProperty(qt("Opacity",a)),e.transform.mProps.p.setGroupProperty(qt("Position",a)),e.transform.mProps.a.setGroupProperty(qt("Anchor Point",a)),e.transform.mProps.s.setGroupProperty(qt("Scale",a)),e.transform.mProps.r.setGroupProperty(qt("Rotation",a)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(qt("Skew",a)),e.transform.mProps.sa.setGroupProperty(qt("Skew Angle",a))),e.transform.op.setGroupProperty(qt("Opacity",a)),Object.defineProperties(i,{opacity:{get:Nt(e.transform.mProps.o)},position:{get:Nt(e.transform.mProps.p)},anchorPoint:{get:Nt(e.transform.mProps.a)},scale:{get:Nt(e.transform.mProps.s)},rotation:{get:Nt(e.transform.mProps.r)},skew:{get:Nt(e.transform.mProps.sk)},skewAxis:{get:Nt(e.transform.mProps.sa)},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i.propertyGroup=s,i}function h(t,e,s){function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:null}var a=jt(i,s);i.propertyIndex=t.ix;var r="tm"===e.sh.ty?e.sh.prop:e.sh;return r.s.setGroupProperty(qt("Size",a)),r.p.setGroupProperty(qt("Position",a)),Object.defineProperties(i,{size:{get:Nt(r.s)},position:{get:Nt(r.p)},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,s){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:null:i.innerRadius}var a=jt(i,s),r="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,r.or.setGroupProperty(qt("Outer Radius",a)),r.os.setGroupProperty(qt("Outer Roundness",a)),r.pt.setGroupProperty(qt("Points",a)),r.p.setGroupProperty(qt("Position",a)),r.r.setGroupProperty(qt("Rotation",a)),t.ir&&(r.ir.setGroupProperty(qt("Inner Radius",a)),r.is.setGroupProperty(qt("Inner Roundness",a))),Object.defineProperties(i,{position:{get:Nt(r.p)},rotation:{get:Nt(r.r)},points:{get:Nt(r.pt)},outerRadius:{get:Nt(r.or)},outerRoundness:{get:Nt(r.os)},innerRadius:{get:Nt(r.ir)},innerRoundness:{get:Nt(r.is)},_name:{value:t.nm}}),i.mn=t.mn,i}function p(t,e,s){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:null}var a=jt(i,s),r="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,r.p.setGroupProperty(qt("Position",a)),r.s.setGroupProperty(qt("Size",a)),r.r.setGroupProperty(qt("Rotation",a)),Object.defineProperties(i,{position:{get:Nt(r.p)},roundness:{get:Nt(r.r)},size:{get:Nt(r.s)},_name:{value:t.nm}}),i.mn=t.mn,i}function f(t,e,s){function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:null}var a=jt(i,s),r=e;return i.propertyIndex=t.ix,r.rd.setGroupProperty(qt("Radius",a)),Object.defineProperties(i,{radius:{get:Nt(r.rd)},_name:{value:t.nm}}),i.mn=t.mn,i}function c(t,e,s){function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:null}var a=jt(i,s),r=e;return i.propertyIndex=t.ix,r.c.setGroupProperty(qt("Copies",a)),r.o.setGroupProperty(qt("Offset",a)),Object.defineProperties(i,{copies:{get:Nt(r.c)},offset:{get:Nt(r.o)},_name:{value:t.nm}}),i.mn=t.mn,i}return function(e,s,i){var a;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:a[t-1];for(var e=0,s=a.length;e<s;){if(a[e]._name===t)return a[e];e+=1}return null}return r.propertyGroup=jt(r,(function(){return i})),a=t(e,s,r.propertyGroup),r.numProperties=a.length,r._name="Contents",r}}(),Kt=function(t){var e,s;function i(t){return"ADBE Text Document"===t?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==e&&(t.textProperty.currentData.t=e,(s=new String(i)).value=i||new String(i)),s}}),i},Jt=(Vt={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Vt[t]||""});function Ut(t,e,s){this.p=nt.getProp(e,t.v,0,0,s)}function Zt(t,e,s){this.p=nt.getProp(e,t.v,0,0,s)}function Qt(t,e,s){this.p=nt.getProp(e,t.v,1,0,s)}function $t(t,e,s){this.p=nt.getProp(e,t.v,1,0,s)}function te(t,e,s){this.p=nt.getProp(e,t.v,0,0,s)}function ee(t,e,s){this.p=nt.getProp(e,t.v,0,0,s)}function se(t,e,s){this.p=nt.getProp(e,t.v,0,0,s)}function ie(){this.p={}}function ae(t,e){var s,i=t.ef||[];this.effectElements=[];var a,r=i.length;for(s=0;s<r;s+=1)a=new re(i[s],e),this.effectElements.push(a)}function re(t,e){this.init(t,e)}function ne(){}function oe(){}function he(t){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(t)}r([ot],re),re.prototype.getValue=re.prototype.iterateDynamicProperties,re.prototype.init=function(t,e){var s;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,a=this.data.ef.length,r=this.data.ef;for(s=0;s<a;s+=1){switch(i=null,r[s].ty){case 0:i=new Ut(r[s],e,this);break;case 1:i=new Zt(r[s],e,this);break;case 2:i=new Qt(r[s],e,this);break;case 3:i=new $t(r[s],e,this);break;case 4:case 7:i=new se(r[s],e,this);break;case 10:i=new te(r[s],e,this);break;case 11:i=new ee(r[s],e,this);break;case 5:i=new ae(r[s],e,this);break;default:i=new ie(r[s],e,this)}i&&this.effectElements.push(i)}},ne.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=Bt(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=Wt.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=Yt(this):4===this.data.ty?(this.layerInterface.shapeInterface=Ht(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=Kt(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=Jt(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId=I(),this.data.sr||(this.data.sr=1),this.effectsManager=new ae(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},oe.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var s,i=this.dynamicProperties.length;for(s=0;s<i;s+=1)(e||this._isParent&&"transform"===this.dynamicProperties[s].propType)&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var le,pe=(le=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",s=t.getFootageData();function i(t){if(s[t])return e=t,"object"===he(s=s[t])?i:s;var a=t.indexOf(e);if(-1!==a){var r=parseInt(t.substr(a+e.length),10);return"object"===he(s=s[r])?i:s}return""}return function(){return e="",s=t.getFootageData(),i}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=le(t),e});function fe(t,e,s){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,s)}function ce(t,e,s){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,s),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?nt.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function me(){}function de(){}function ue(t,e,s){this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var a,r,n=this.globalData.defs,o=this.masksProperties?this.masksProperties.length:0;this.viewData=p(o),this.solidPath="";var h,l,f,c,m,d,u=this.masksProperties,g=0,y=[],v=I(),b="clipPath",_="clip-path";for(a=0;a<o;a+=1)if(("a"!==u[a].mode&&"n"!==u[a].mode||u[a].inv||100!==u[a].o.k||u[a].o.x)&&(b="mask",_="mask"),"s"!==u[a].mode&&"i"!==u[a].mode||0!==g?f=null:((f=q("rect")).setAttribute("fill","#ffffff"),f.setAttribute("width",this.element.comp.data.w||0),f.setAttribute("height",this.element.comp.data.h||0),y.push(f)),r=q("path"),"n"===u[a].mode)this.viewData[a]={op:nt.getProp(this.element,u[a].o,0,.01,this.element),prop:vt.getShapeProp(this.element,u[a],3),elem:r,lastPath:""},n.appendChild(r);else{var P;if(g+=1,r.setAttribute("fill","s"===u[a].mode?"#000000":"#ffffff"),r.setAttribute("clip-rule","nonzero"),0!==u[a].x.k?(b="mask",_="mask",d=nt.getProp(this.element,u[a].x,0,null,this.element),P=I(),(c=q("filter")).setAttribute("id",P),(m=q("feMorphology")).setAttribute("operator","erode"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),c.appendChild(m),n.appendChild(c),r.setAttribute("stroke","s"===u[a].mode?"#000000":"#ffffff")):(m=null,d=null),this.storedData[a]={elem:r,x:d,expan:m,lastPath:"",lastOperator:"",filterId:P,lastRadius:0},"i"===u[a].mode){l=y.length;var k=q("g");for(h=0;h<l;h+=1)k.appendChild(y[h]);var C=q("mask");C.setAttribute("mask-type","alpha"),C.setAttribute("id",v+"_"+g),C.appendChild(r),n.appendChild(C),k.setAttribute("mask","url("+i()+"#"+v+"_"+g+")"),y.length=0,y.push(k)}else y.push(r);u[a].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[a]={elem:r,lastPath:"",op:nt.getProp(this.element,u[a].o,0,.01,this.element),prop:vt.getShapeProp(this.element,u[a],3),invRect:f},this.viewData[a].prop.k||this.drawPath(u[a],this.viewData[a].prop.v,this.viewData[a])}for(this.maskElement=q(b),o=y.length,a=0;a<o;a+=1)this.maskElement.appendChild(y[a]);g>0&&(this.maskElement.setAttribute("id",v),this.element.maskedElement.setAttribute(_,"url("+i()+"#"+v+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}fe.prototype.prepareFrame=function(){},r([Ot,ne,oe],fe),fe.prototype.getBaseElement=function(){return null},fe.prototype.renderFrame=function(){},fe.prototype.destroy=function(){},fe.prototype.initExpressions=function(){this.layerInterface=pe(this)},fe.prototype.getFootageData=function(){return this.footageData},ce.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},r([Ot,ne,oe],ce),ce.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},ce.prototype.show=function(){},ce.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},ce.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},ce.prototype.resume=function(){this._canPlay=!0},ce.prototype.setRate=function(t){this.audio.rate(t)},ce.prototype.volume=function(t){this.audio.volume(t)},ce.prototype.getBaseElement=function(){return null},ce.prototype.destroy=function(){},ce.prototype.sourceRectAtTime=function(){},ce.prototype.initExpressions=function(){},me.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(s=this.layers[e]).ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},me.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},me.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},me.prototype.createAudio=function(t){return new ce(t,this.globalData,this)},me.prototype.createFootage=function(t){return new fe(t,this.globalData,this)},me.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},me.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var s,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(s=0;s<a;){if(this.layers[s].id===t[e].id){this.layers[s]=t[e];break}s+=1}},me.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},me.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},me.prototype.buildElementParenting=function(t,e,s){for(var i=this.elements,a=this.layers,r=0,n=a.length;r<n;)a[r].ind==e&&(i[r]&&!0!==i[r]?(s.push(i[r]),i[r].setAsParent(),void 0!==a[r].parent?this.buildElementParenting(t,a[r].parent,s):t.setHierarchy(s)):(this.buildItem(r),this.addPendingElement(t))),r+=1},me.prototype.addPendingElement=function(t){this.pendingElements.push(t)},me.prototype.searchExtraCompositions=function(t){var e,s=t.length;for(e=0;e<s;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},me.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new Rt,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},de.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?Tt.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new bt},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,s=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<i;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),s=0;s<i;s+=1)t=this.hierarchy[s].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var s,i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&e.splice(0,0,a.finalTransform),a=a.comp):i=!1;var r,n=e.length;for(s=0;s<n;s+=1)r=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new bt},ue.prototype.getMaskProperty=function(t){return this.viewData[t].prop},ue.prototype.renderFrame=function(t){var e,s=this.element.finalTransform.mat,a=this.masksProperties.length;for(e=0;e<a;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",s.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var r=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+i()+"#"+this.storedData[e].filterId+")")),r.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},ue.prototype.getMaskelement=function(){return this.maskElement},ue.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},ue.prototype.drawPath=function(t,e,s){var i,a,r=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&a>1&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},ue.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var ge=function(){var t={};return t.createFilter=function(t,e){var s=q("filter");s.setAttribute("id",t),!0!==e&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%"));return s},t.createAlphaToLuminanceFilter=function(){var t=q("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),ye=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function ve(t,e){this.filterManager=e;var s=q("feColorMatrix");if(s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.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"),s.setAttribute("result","f1"),t.appendChild(s),(s=q("feColorMatrix")).setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result","f2"),t.appendChild(s),this.matrixFilter=s,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,a=q("feMerge");t.appendChild(a),(i=q("feMergeNode")).setAttribute("in","SourceGraphic"),a.appendChild(i),(i=q("feMergeNode")).setAttribute("in","f2"),a.appendChild(i)}}function be(t,e){this.filterManager=e;var s=q("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(s),this.matrixFilter=s}function _e(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function Pe(t,e){this.filterManager=e;var s=q("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.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"),s.setAttribute("result","f1"),t.appendChild(s);var i=q("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var a=q("feFuncR");a.setAttribute("type","table"),i.appendChild(a),this.feFuncR=a;var r=q("feFuncG");r.setAttribute("type","table"),i.appendChild(r),this.feFuncG=r;var n=q("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function ke(t,e){this.filterManager=e;var s=this.filterManager.effectElements,i=q("feComponentTransfer");(s[10].p.k||0!==s[10].p.v||s[11].p.k||1!==s[11].p.v||s[12].p.k||1!==s[12].p.v||s[13].p.k||0!==s[13].p.v||s[14].p.k||1!==s[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(s[17].p.k||0!==s[17].p.v||s[18].p.k||1!==s[18].p.v||s[19].p.k||1!==s[19].p.v||s[20].p.k||0!==s[20].p.v||s[21].p.k||1!==s[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(s[24].p.k||0!==s[24].p.v||s[25].p.k||1!==s[25].p.v||s[26].p.k||1!==s[26].p.v||s[27].p.k||0!==s[27].p.v||s[28].p.k||1!==s[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(s[31].p.k||0!==s[31].p.v||s[32].p.k||1!==s[32].p.v||s[33].p.k||1!==s[33].p.v||s[34].p.k||0!==s[34].p.v||s[35].p.k||1!==s[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=q("feComponentTransfer")),(s[3].p.k||0!==s[3].p.v||s[4].p.k||1!==s[4].p.v||s[5].p.k||1!==s[5].p.v||s[6].p.k||0!==s[6].p.v||s[7].p.k||1!==s[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function Ce(t,e){var s=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",s.x),t.setAttribute("y",s.y),t.setAttribute("width",s.width),t.setAttribute("height",s.height),this.filterManager=e;var i=q("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var a=q("feOffset");a.setAttribute("dx","25"),a.setAttribute("dy","0"),a.setAttribute("in","drop_shadow_1"),a.setAttribute("result","drop_shadow_2"),this.feOffset=a,t.appendChild(a);var r=q("feFlood");r.setAttribute("flood-color","#00ff00"),r.setAttribute("flood-opacity","1"),r.setAttribute("result","drop_shadow_3"),this.feFlood=r,t.appendChild(r);var n=q("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=q("feMerge");t.appendChild(h),o=q("feMergeNode"),h.appendChild(o),(o=q("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}ve.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",s[0]-e[0]+" 0 0 0 "+e[0]+" "+(s[1]-e[1])+" 0 0 0 "+e[1]+" "+(s[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},be.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,s=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},_e.prototype.initialize=function(){var t,e,s,a,r=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(a=this.elem.maskManager.masksProperties.length,s=0):a=(s=this.filterManager.effectElements[0].p.v-1)+1,(e=q("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);s<a;s+=1)t=q("path"),e.appendChild(t),this.paths.push({p:t,m:s});if(3===this.filterManager.effectElements[10].p.v){var n=q("mask"),o=I();n.setAttribute("id",o),n.setAttribute("mask-type","alpha"),n.appendChild(e),this.elem.globalData.defs.appendChild(n);var h=q("g");for(h.setAttribute("mask","url("+i()+"#"+o+")");r[0];)h.appendChild(r[0]);this.elem.layerElement.appendChild(h),this.masker=n,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(r=this.elem.layerElement.children||this.elem.layerElement.childNodes;r.length;)this.elem.layerElement.removeChild(r[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},_e.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var s,i,a=this.paths.length;for(e=0;e<a;e+=1)if(-1!==this.paths[e].m&&(s=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||s.prop._mdf)&&i.setAttribute("d",s.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||s.prop._mdf)){var r;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();r="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,c=Math.floor(p/f);for(l=0;l<c;l+=1)r+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";r+="0 "+10*h+" 0 0"}else r="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",r)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var m=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+v(255*m[0])+","+v(255*m[1])+","+v(255*m[2])+")")}},Pe.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,a=i[0]+" "+s[0]+" "+e[0],r=i[1]+" "+s[1]+" "+e[1],n=i[2]+" "+s[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",r),this.feFuncB.setAttribute("tableValues",n)}},ke.prototype.createFeFunc=function(t,e){var s=q(t);return s.setAttribute("type","table"),e.appendChild(s),s},ke.prototype.getTableValue=function(t,e,s,i,a){for(var r,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,c=a-i,m=e-t;o<=256;)n=(r=o/256)<=h?m<0?a:i:r>=l?m<0?i:a:i+c*Math.pow((r-t)/m,1/s),p[f]=n,f+=1,o+=256/255;return p.join(" ")},ke.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,s=this.filterManager.effectElements;this.feFuncRComposed&&(t||s[3].p._mdf||s[4].p._mdf||s[5].p._mdf||s[6].p._mdf||s[7].p._mdf)&&(e=this.getTableValue(s[3].p.v,s[4].p.v,s[5].p.v,s[6].p.v,s[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||s[10].p._mdf||s[11].p._mdf||s[12].p._mdf||s[13].p._mdf||s[14].p._mdf)&&(e=this.getTableValue(s[10].p.v,s[11].p.v,s[12].p.v,s[13].p.v,s[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||s[17].p._mdf||s[18].p._mdf||s[19].p._mdf||s[20].p._mdf||s[21].p._mdf)&&(e=this.getTableValue(s[17].p.v,s[18].p.v,s[19].p.v,s[20].p.v,s[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||s[24].p._mdf||s[25].p._mdf||s[26].p._mdf||s[27].p._mdf||s[28].p._mdf)&&(e=this.getTableValue(s[24].p.v,s[25].p.v,s[26].p.v,s[27].p.v,s[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||s[31].p._mdf||s[32].p._mdf||s[33].p._mdf||s[34].p._mdf||s[35].p._mdf)&&(e=this.getTableValue(s[31].p.v,s[32].p.v,s[33].p.v,s[34].p.v,s[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},Ce.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",N(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var s=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*k,a=s*Math.cos(i),r=s*Math.sin(i);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",r)}}};var xe=[];function Ae(t,e,s){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=s,s.matteElement=q("g"),s.matteElement.appendChild(s.layerElement),s.matteElement.appendChild(s.transformedElement),s.baseElement=s.matteElement}function De(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var s=q("feGaussianBlur");t.appendChild(s),this.feGaussianBlur=s}Ae.prototype.findSymbol=function(t){for(var e=0,s=xe.length;e<s;){if(xe[e]===t)return xe[e];e+=1}return null},Ae.prototype.replaceInParent=function(t,e){var s=t.layerElement.parentNode;if(s){for(var i,a=s.children,r=0,n=a.length;r<n&&a[r]!==t.layerElement;)r+=1;r<=n-2&&(i=a[r+1]);var o=q("use");o.setAttribute("href","#"+e),i?s.insertBefore(o,i):s.appendChild(o)}},Ae.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var s=I(),i=q("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),xe.push(e);var a=t.globalData.defs;a.appendChild(i);var r=q("symbol");r.setAttribute("id",s),this.replaceInParent(e,s),r.appendChild(e.layerElement),a.appendChild(r);var n=q("use");n.setAttribute("href","#"+s),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},Ae.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,s=0,i=e.length;s<i;)e[s]&&e[s].data.ind===t&&this.setElementAsMask(this.elem,e[s]),s+=1;this.initialized=!0},Ae.prototype.renderFrame=function(){this.initialized||this.initialize()},De.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=3==s?0:e,a=2==s?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+a);var r=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",r)}};var we={};function Se(t){var e,s,a=t.data.ef?t.data.ef.length:0,r=I(),n=ge.createFilter(r,!0),o=0;for(this.filters=[],e=0;e<a;e+=1){s=null;var h=t.data.ef[e].ty;if(we[h])s=new(0,we[h].effect)(n,t.effectsManager.effectElements[e],t),we[h].countsAsEffect&&(o+=1);20===t.data.ef[e].ty?(o+=1,s=new ve(n,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(o+=1,s=new be(n,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?s=new _e(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(o+=1,s=new Pe(n,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(o+=1,s=new ke(n,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(o+=1,s=new Ce(n,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?s=new Ae(n,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(o+=1,s=new De(n,t.effectsManager.effectElements[e])),s&&this.filters.push(s)}o&&(t.globalData.defs.appendChild(n),t.layerElement.setAttribute("filter","url("+i()+"#"+r+")")),this.filters.length&&t.addRenderableComponent(this)}function Me(){}function Fe(){}function Te(){}function Ee(t,e,s){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function Ie(t,e){this.elem=t,this.pos=e}function Le(){}Se.prototype.renderFrame=function(t){var e,s=this.filters.length;for(e=0;e<s;e+=1)this.filters[e].renderFrame(t)},Me.prototype={initRendererElement:function(){this.layerElement=q("g")},createContainerElements:function(){this.matteElement=q("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,s,a=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var r=q("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),r.appendChild(this.layerElement),a=r,this.globalData.defs.appendChild(r),ye.maskType||1!=this.data.td||(r.setAttribute("mask-type","luminance"),t=I(),e=ge.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(ge.createAlphaToLuminanceFilter()),(s=q("g")).appendChild(this.layerElement),a=s,r.appendChild(s),s.setAttribute("filter","url("+i()+"#"+t+")"))}else if(2==this.data.td){var n=q("mask");n.setAttribute("id",this.layerId),n.setAttribute("mask-type","alpha");var o=q("g");n.appendChild(o),t=I(),e=ge.createFilter(t);var h=q("feComponentTransfer");h.setAttribute("in","SourceGraphic"),e.appendChild(h);var l=q("feFuncA");l.setAttribute("type","table"),l.setAttribute("tableValues","1.0 0.0"),h.appendChild(l),this.globalData.defs.appendChild(e);var p=q("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),o.setAttribute("filter","url("+i()+"#"+t+")"),o.appendChild(p),o.appendChild(this.layerElement),a=o,ye.maskType||(n.setAttribute("mask-type","luminance"),e.appendChild(ge.createAlphaToLuminanceFilter()),s=q("g"),o.appendChild(p),s.appendChild(this.layerElement),a=s,o.appendChild(s)),this.globalData.defs.appendChild(n)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),a=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var f=q("clipPath"),c=q("path");c.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=I();if(f.setAttribute("id",m),f.appendChild(c),this.globalData.defs.appendChild(f),this.checkMasks()){var d=q("g");d.setAttribute("clip-path","url("+i()+"#"+m+")"),d.appendChild(this.layerElement),this.transformedElement=d,a?a.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+i()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new ue(this.data,this,this.globalData),this.renderableEffectsManager=new Se(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+i()+"#"+t+")")}},Fe.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},r([Ot,o({initElement:function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],Te),r([ne,de,Me,Fe,oe,Te],Ee),Ee.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=q("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},Ee.prototype.sourceRectAtTime=function(){return this.sourceRect},Le.prototype={addShapeToModifiers:function(t){var e,s=this.shapeModifiers.length;for(e=0;e<s;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,s=0,i=e.length;s<i;){if(e[s].elem===t)return e[s].pos;s+=1}return 0},addProcessedElement:function(t,e){for(var s=this.processedElements,i=s.length;i;)if(s[i-=1].elem===t)return void(s[i].pos=e);s.push(new Ie(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var Re={1:"butt",2:"round",3:"square"},Oe={1:"miter",2:"round",3:"bevel"};function Ve(t,e,s){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e,this._isAnimated=!!s.k;for(var i=0,a=t.length;i<a;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function ze(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=q("path"),this.msElem=null}function Ne(t,e,s,i){var a;this.elem=t,this.frameId=-1,this.dataProps=p(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=l("float32",e.length?e.length-1:0),this.dashoffset=l("float32",1),this.initDynamicPropertyContainer(i);var r,n=e.length||0;for(a=0;a<n;a+=1)r=nt.getProp(t,e[a].v,0,0,this),this.k=r.k||this.k,this.dataProps[a]={n:e[a].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}function Ge(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=nt.getProp(t,e.o,0,.01,this),this.w=nt.getProp(t,e.w,0,null,this),this.d=new Ne(t,e.d||{},"svg",this),this.c=nt.getProp(t,e.c,1,255,this),this.style=s,this._isAnimated=!!this._isAnimated}function Be(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=nt.getProp(t,e.o,0,.01,this),this.c=nt.getProp(t,e.c,1,255,this),this.style=s}function je(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=s}function qe(t,e,s){this.data=e,this.c=l("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=l("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=nt.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function We(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,s)}function Ye(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=nt.getProp(t,e.w,0,null,this),this.d=new Ne(t,e.d||{},"svg",this),this.initGradientData(t,e,s),this._isAnimated=!!this._isAnimated}function Xe(){this.it=[],this.prevViewData=[],this.gr=q("g")}function He(t,e,s){this.transform={mProps:t,op:e,container:s},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}Ve.prototype.setAsAnimated=function(){this._isAnimated=!0},ze.prototype.reset=function(){this.d="",this._mdf=!1},Ne.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,s=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<s;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},r([ot],Ne),r([ot],Ge),r([ot],Be),r([ot],je),qe.prototype.comparePoints=function(t,e){for(var s=0,i=this.o.length/2;s<i;){if(Math.abs(t[4*s]-t[4*e+2*s])>.01)return!1;s+=1}return!0},qe.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},qe.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,s,i,a=4*this.data.p;for(e=0;e<a;e+=1)s=e%4==0?100:255,i=Math.round(this.prop.v[e]*s),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)s=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},r([ot],qe),We.prototype.initGradientData=function(t,e,s){this.o=nt.getProp(t,e.o,0,.01,this),this.s=nt.getProp(t,e.s,1,null,this),this.e=nt.getProp(t,e.e,1,null,this),this.h=nt.getProp(t,e.h||{k:0},0,.01,this),this.a=nt.getProp(t,e.a||{k:0},0,k,this),this.g=new qe(t,e.g,this),this.style=s,this.stops=[],this.setGradientData(s.pElem,e),this.setGradientOpacity(e,s),this._isAnimated=!!this._isAnimated},We.prototype.setGradientData=function(t,e){var s=I(),a=q(1===e.t?"linearGradient":"radialGradient");a.setAttribute("id",s),a.setAttribute("spreadMethod","pad"),a.setAttribute("gradientUnits","userSpaceOnUse");var r,n,o,h=[];for(o=4*e.g.p,n=0;n<o;n+=4)r=q("stop"),a.appendChild(r),h.push(r);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+i()+"#"+s+")"),this.gf=a,this.cst=h},We.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var s,a,r,n=q("mask"),o=q("path");n.appendChild(o);var h=I(),l=I();n.setAttribute("id",l);var p=q(1===t.t?"linearGradient":"radialGradient");p.setAttribute("id",h),p.setAttribute("spreadMethod","pad"),p.setAttribute("gradientUnits","userSpaceOnUse"),r=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var f=this.stops;for(a=4*t.g.p;a<r;a+=2)(s=q("stop")).setAttribute("stop-color","rgb(255,255,255)"),p.appendChild(s),f.push(s);o.setAttribute("gf"===t.ty?"fill":"stroke","url("+i()+"#"+h+")"),"gs"===t.ty&&(o.setAttribute("stroke-linecap",Re[t.lc||2]),o.setAttribute("stroke-linejoin",Oe[t.lj||2]),1===t.lj&&o.setAttribute("stroke-miterlimit",t.ml)),this.of=p,this.ms=n,this.ost=f,this.maskId=l,e.msElem=o}},r([ot],We),r([We,ot],Ye);var Ke=function(t,e,s,i){if(0===e)return"";var a,r=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(a=1;a<e;a+=1)h+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[a][0],n[a][1])+" "+i.applyToPointStringified(o[a][0],o[a][1]);return s&&e&&(h+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},Je=function(){var t=new bt,e=new bt;function s(t,e,s){(s||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(s||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(){}function a(s,i,a){var r,n,o,h,l,p,f,c,m,d,u,g=i.styles.length,y=i.lvl;for(p=0;p<g;p+=1){if(h=i.sh._mdf||a,i.styles[p].lvl<y){for(c=e.reset(),d=y-i.styles[p].lvl,u=i.transformers.length-1;!h&&d>0;)h=i.transformers[u].mProps._mdf||h,d-=1,u-=1;if(h)for(d=y-i.styles[p].lvl,u=i.transformers.length-1;d>0;)m=i.transformers[u].mProps.v.props,c.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),d-=1,u-=1}else c=t;if(n=(f=i.sh.paths)._length,h){for(o="",r=0;r<n;r+=1)(l=f.shapes[r])&&l._length&&(o+=Ke(l,l._length,l.c,c));i.caches[p]=o}else o=i.caches[p];i.styles[p].d+=!0===s.hd?"":o,i.styles[p]._mdf=h||i.styles[p]._mdf}}function r(t,e,s){var i=e.style;(e.c._mdf||s)&&i.pElem.setAttribute("fill","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,s){o(t,e,s),h(t,e,s)}function o(t,e,s){var i,a,r,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||s){var c="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(c,e.o.v)}if(e.s._mdf||s){var m=1===t.t?"x1":"cx",d="x1"===m?"y1":"cy";h.setAttribute(m,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(m,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||s){i=e.cst;var u=e.g.c;for(r=i.length,a=0;a<r;a+=1)(n=i[a]).setAttribute("offset",u[4*a]+"%"),n.setAttribute("stop-color","rgb("+u[4*a+1]+","+u[4*a+2]+","+u[4*a+3]+")")}if(l&&(e.g._omdf||s)){var g=e.g.o;for(r=(i=e.g._collapsable?e.cst:e.ost).length,a=0;a<r;a+=1)n=i[a],e.g._collapsable||n.setAttribute("offset",g[2*a]+"%"),n.setAttribute("stop-opacity",g[2*a+1])}if(1===t.t)(e.e._mdf||s)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||s)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||s){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var y=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,_=Math.cos(y+e.a.v)*b+p[0],P=Math.sin(y+e.a.v)*b+p[1];h.setAttribute("fx",_),h.setAttribute("fy",P),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",P))}}function h(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||s)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||s)&&i.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||s)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return r;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return a;case"tr":return s;case"no":return i;default:return null}}}}();function Ue(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}function Ze(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function Qe(t,e){this._frameId=s,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}r([ne,de,Me,Le,Fe,oe,Te],Ue),Ue.prototype.initSecondaryElement=function(){},Ue.prototype.identityMatrix=new bt,Ue.prototype.buildExpressionInterface=function(){},Ue.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Ue.prototype.filterUniqueShapes=function(){var t,e,s,i,a=this.shapes.length,r=this.stylesList.length,n=[],o=!1;for(s=0;s<r;s+=1){for(i=this.stylesList[s],o=!1,n.length=0,t=0;t<a;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},Ue.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].setAsAnimated()},Ue.prototype.createStyleElement=function(t,e){var s,a=new ze(t,e),r=a.pElem;if("st"===t.ty)s=new Ge(this,t,a);else if("fl"===t.ty)s=new Be(this,t,a);else if("gf"===t.ty||"gs"===t.ty){s=new("gf"===t.ty?We:Ye)(this,t,a),this.globalData.defs.appendChild(s.gf),s.maskId&&(this.globalData.defs.appendChild(s.ms),this.globalData.defs.appendChild(s.of),r.setAttribute("mask","url("+i()+"#"+s.maskId+")"))}else"no"===t.ty&&(s=new je(this,t,a));return"st"!==t.ty&&"gs"!==t.ty||(r.setAttribute("stroke-linecap",Re[t.lc||2]),r.setAttribute("stroke-linejoin",Oe[t.lj||2]),r.setAttribute("fill-opacity","0"),1===t.lj&&r.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&r.setAttribute("id",t.ln),t.cl&&r.setAttribute("class",t.cl),t.bm&&(r.style["mix-blend-mode"]=Jt(t.bm)),this.stylesList.push(a),this.addToAnimatedContents(t,s),s},Ue.prototype.createGroupElement=function(t){var e=new Xe;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=Jt(t.bm)),e},Ue.prototype.createTransformElement=function(t,e){var s=Tt.getTransformProperty(this,t,this),i=new He(s,s.o,e);return this.addToAnimatedContents(t,i),i},Ue.prototype.createShapeElement=function(t,e,s){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=new Ve(e,s,vt.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},Ue.prototype.addToAnimatedContents=function(t,e){for(var s=0,i=this.animatedContents.length;s<i;){if(this.animatedContents[s].element===e)return;s+=1}this.animatedContents.push({fn:Je.createRenderFunction(t),element:e,data:t})},Ue.prototype.setElementStyles=function(t){var e,s=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||s.push(this.stylesList[e])},Ue.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},Ue.prototype.searchShapes=function(t,e,s,i,a,r,n){var o,h,l,p,f,c,m=[].concat(r),d=t.length-1,u=[],g=[];for(o=d;o>=0;o-=1){if((c=this.searchProcessedElement(t[o]))?e[o]=s[c-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)c?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(c)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,a+1,m,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(c||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,m.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(c||(e[o]=this.createShapeElement(t[o],m,a)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(c?(f=e[o]).closed=!1:((f=wt.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===t[o].ty&&(c?(f=e[o]).closed=!0:(f=wt.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),g.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=g.length,o=0;o<d;o+=1)g[o].closed=!0},Ue.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},Ue.prototype.renderShape=function(){var t,e,s=this.animatedContents.length;for(t=0;t<s;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},Ue.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},Ze.prototype.update=function(t,e,s,i,a,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==s&&(this.sc=s,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==a&&(this.m=a,this._mdf.m=!0,n=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,this._mdf.p=!0,n=!0),n},Qe.prototype.defaultBoxWidth=[0,0],Qe.prototype.copyData=function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Qe.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},Qe.prototype.searchProperty=function(){return this.searchKeyframes()},Qe.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},Qe.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},Qe.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,s=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(i=0;i<a;i+=1)r=s!==this.keysIndex?this.effectsSequence[i](r,r.t):this.effectsSequence[i](this.currentData,r.t);e!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},Qe.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,s=0,i=t.length;s<=i-1&&!(s===i-1||t[s+1].t>e);)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},Qe.prototype.buildFinalText=function(t){for(var e,s,i=[],a=0,r=t.length,n=!1;a<r;)e=t.charCodeAt(a),Rt.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(a):e>=55296&&e<=56319?(s=t.charCodeAt(a+1))>=56320&&s<=57343?(n||Rt.isModifier(e,s)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):e>56319?(s=t.charCodeAt(a+1),Rt.isZeroWidthJoiner(e,s)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):Rt.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},Qe.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,c=l.m.g,m=0,d=0,u=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,P=Lt(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),s=t.finalText.length,t.finalLineHeight=t.lh;var k,C=t.tr/1e3*t.finalSize;if(t.sz)for(var x,A,D=!0,w=t.sz[0],S=t.sz[1];D;){x=0,y=0,s=(A=this.buildFinalText(t.t)).length,C=t.tr/1e3*t.finalSize;var M=-1;for(e=0;e<s;e+=1)k=A[e].charCodeAt(0),i=!1," "===A[e]?M=e:13!==k&&3!==k||(y=0,i=!0,x+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(A[e],b.fStyle,b.fFamily),_=i?0:o.w*t.finalSize/100):_=h.measureText(A[e],t.f,t.finalSize),y+_>w&&" "!==A[e]?(-1===M?s+=1:e=M,x+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,M===e?1:0,"\r"),M=-1,y=0):(y+=_,y+=C);x+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&S<x?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,s=t.finalText.length,D=!1)}y=-C,_=0;var F,T=0;for(e=0;e<s;e+=1)if(i=!1,13===(k=(F=t.finalText[e]).charCodeAt(0))||3===k?(T=0,g.push(y),v=y>v?y:v,y=-2*C,a="",i=!0,u+=1):a=F,h.chars?(o=h.getCharData(F,b.fStyle,h.getFontByName(t.f).fFamily),_=i?0:o.w*t.finalSize/100):_=h.measureText(a,t.f,t.finalSize)," "===F?T+=_+C:(y+=_+C+T,T=0),p.push({l:_,an:_,add:m,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==c){if(m+=_,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(m-=_);d<=e;)p[d].an=m,p[d].ind=f,p[d].extra=_,d+=1;f+=1,m=0}}else if(3==c){if(m+=_,""===a||e===s-1){for(""===a&&(m-=_);d<=e;)p[d].an=m,p[d].ind=f,p[d].extra=_,d+=1;m=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var E,I,L,R,O=l.a;n=O.length;var V=[];for(r=0;r<n;r+=1){for((E=O[r]).a.sc&&(t.strokeColorAnim=!0),E.a.sw&&(t.strokeWidthAnim=!0),(E.a.fc||E.a.fh||E.a.fs||E.a.fb)&&(t.fillColorAnim=!0),R=0,L=E.s.b,e=0;e<s;e+=1)(I=p[e]).anIndexes[r]=R,(1==L&&""!==I.val||2==L&&""!==I.val&&" "!==I.val||3==L&&(I.n||" "==I.val||e==s-1)||4==L&&(I.n||e==s-1))&&(1===E.s.rn&&V.push(R),R+=1);l.a[r].s.totalChars=R;var z,N=-1;if(1===E.s.rn)for(e=0;e<s;e+=1)N!=(I=p[e]).anIndexes[r]&&(N=I.anIndexes[r],z=V.splice(Math.floor(Math.random()*V.length),1)[0]),I.anIndexes[r]=z}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},Qe.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var s=this.copyData({},this.data.d.k[e].s);s=this.copyData(s,t),this.data.d.k[e].s=s,this.recalculate(e),this.elem.addDynamicProperty(this)},Qe.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},Qe.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},Qe.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var $e=function(){var t=Math.max,e=Math.min,s=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=nt.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?nt.getProp(t,e.e,0,0,this):{v:100},this.o=nt.getProp(t,e.o||{k:0},0,0,this),this.xe=nt.getProp(t,e.xe||{k:0},0,0,this),this.ne=nt.getProp(t,e.ne||{k:0},0,0,this),this.sm=nt.getProp(t,e.sm||{k:100},0,0,this),this.a=nt.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var a=0,r=0,n=1,o=1;this.ne.v>0?a=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=tt.getBezierEasing(a,r,n,o).get,l=0,p=this.finalS,f=this.finalE,c=this.data.sh;if(2===c)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===c)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===c)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===c){if(f===p)l=0;else{var m=f-p,d=-m/2+(i=e(t(0,i+.5-p),f-p)),u=m/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===c?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=s(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;l<y?l=0:(l=(l-y)/g)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,s=this.o.v/e,i=this.s.v/e+s,a=this.e.v/e+s;if(i>a){var r=i;i=a,a=r}this.finalS=i,this.finalE=a}},r([ot],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}();function ts(t,e,s){var i={propType:!1},a=nt.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,k,s):i,rx:r.rx?a(t,r.rx,0,k,s):i,ry:r.ry?a(t,r.ry,0,k,s):i,sk:r.sk?a(t,r.sk,0,k,s):i,sa:r.sa?a(t,r.sa,0,k,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=$e.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function es(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=p(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function ss(){}es.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=nt.getProp;for(t=0;t<s;t+=1)e=this._textData.a[t],this._animatorsData[t]=new ts(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},es.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var s,i,a,r,n,o,h,l,p,f,c,m,d,u,g,y,v,b,_,P=this._moreOptions.alignment.v,k=this._animatorsData,C=this._textData,x=this.mHelper,A=this._renderType,D=this.renderedLetters.length,w=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var S,M=_.v;for(this._pathData.r.v&&(M=M.reverse()),n={tLength:0,segments:[]},r=M._length-1,y=0,a=0;a<r;a+=1)S=rt.buildBezierData(M.v[a],M.v[a+1],[M.o[a][0]-M.v[a][0],M.o[a][1]-M.v[a][1]],[M.i[a+1][0]-M.v[a+1][0],M.i[a+1][1]-M.v[a+1][1]]),n.tLength+=S.segmentLength,n.segments.push(S),y+=S.segmentLength;a=r,_.v.c&&(S=rt.buildBezierData(M.v[a],M.v[0],[M.o[a][0]-M.v[a][0],M.o[a][1]-M.v[a][1]],[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]),n.tLength+=S.segmentLength,n.segments.push(S),y+=S.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,c=0,f=1,l=0,p=!0,u=n.segments,o<0&&_.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[c=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[c-=1].points).length-1);m=(d=u[c].points)[f-1],g=(h=d[f]).partialLength}r=w.length,s=0,i=0;var F,T,E,I,L,R=1.2*t.finalSize*.714,N=!0;E=k.length;var G,B,j,q,W,Y,X,H,K,J,U,Z,Q=-1,$=o,tt=c,et=f,st=-1,it="",at=this.defaultPropsArray;if(2===t.j||1===t.j){var nt=0,ot=0,ht=2===t.j?-.5:-1,lt=0,pt=!0;for(a=0;a<r;a+=1)if(w[a].n){for(nt&&(nt+=ot);lt<a;)w[lt].animatorJustifyOffset=nt,lt+=1;nt=0,pt=!0}else{for(T=0;T<E;T+=1)(F=k[T].a).t.propType&&(pt&&2===t.j&&(ot+=F.t.v*ht),(L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars)).length?nt+=F.t.v*L[0]*ht:nt+=F.t.v*L*ht);pt=!1}for(nt&&(nt+=ot);lt<a;)w[lt].animatorJustifyOffset=nt,lt+=1}for(a=0;a<r;a+=1){if(x.reset(),q=1,w[a].n)s=0,i+=t.yOffset,i+=N?1:0,o=$,N=!1,this._hasMaskedPath&&(f=et,m=(d=u[c=tt].points)[f-1],g=(h=d[f]).partialLength,l=0),it="",U="",K="",Z="",at=this.defaultPropsArray;else{if(this._hasMaskedPath){if(st!==w[a].line){switch(t.j){case 1:o+=y-t.lineWidths[w[a].line];break;case 2:o+=(y-t.lineWidths[w[a].line])/2}st=w[a].line}Q!==w[a].ind&&(w[Q]&&(o+=w[Q].extra),o+=w[a].an/2,Q=w[a].ind),o+=P[0]*w[a].an*.005;var ft=0;for(T=0;T<E;T+=1)(F=k[T].a).p.propType&&((L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars)).length?ft+=F.p.v[0]*L[0]:ft+=F.p.v[0]*L),F.a.propType&&((L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars)).length?ft+=F.a.v[0]*L[0]:ft+=F.a.v[0]*L);for(p=!0,this._pathData.a.v&&(o=.5*w[0].an+(y-this._pathData.f.v-.5*w[0].an-.5*w[w.length-1].an)*Q/(r-1),o+=this._pathData.f.v);p;)l+g>=o+ft||!d?(v=(o+ft-l)/h.partialLength,B=m.point[0]+(h.point[0]-m.point[0])*v,j=m.point[1]+(h.point[1]-m.point[1])*v,x.translate(-P[0]*w[a].an*.005,-P[1]*R*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[c+=1]?d=u[c].points:_.v.c?(f=0,d=u[c=0].points):(l-=h.partialLength,d=null)),d&&(m=h,g=(h=d[f]).partialLength));G=w[a].an/2-w[a].add,x.translate(-G,0,0)}else G=w[a].an/2-w[a].add,x.translate(-G,0,0),x.translate(-P[0]*w[a].an*.005,-P[1]*R*.01,0);for(T=0;T<E;T+=1)(F=k[T].a).t.propType&&(L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars),0===s&&0===t.j||(this._hasMaskedPath?L.length?o+=F.t.v*L[0]:o+=F.t.v*L:L.length?s+=F.t.v*L[0]:s+=F.t.v*L));for(t.strokeWidthAnim&&(Y=t.sw||0),t.strokeColorAnim&&(W=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(X=[t.fc[0],t.fc[1],t.fc[2]]),T=0;T<E;T+=1)(F=k[T].a).a.propType&&((L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars)).length?x.translate(-F.a.v[0]*L[0],-F.a.v[1]*L[1],F.a.v[2]*L[2]):x.translate(-F.a.v[0]*L,-F.a.v[1]*L,F.a.v[2]*L));for(T=0;T<E;T+=1)(F=k[T].a).s.propType&&((L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars)).length?x.scale(1+(F.s.v[0]-1)*L[0],1+(F.s.v[1]-1)*L[1],1):x.scale(1+(F.s.v[0]-1)*L,1+(F.s.v[1]-1)*L,1));for(T=0;T<E;T+=1){if(F=k[T].a,L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars),F.sk.propType&&(L.length?x.skewFromAxis(-F.sk.v*L[0],F.sa.v*L[1]):x.skewFromAxis(-F.sk.v*L,F.sa.v*L)),F.r.propType&&(L.length?x.rotateZ(-F.r.v*L[2]):x.rotateZ(-F.r.v*L)),F.ry.propType&&(L.length?x.rotateY(F.ry.v*L[1]):x.rotateY(F.ry.v*L)),F.rx.propType&&(L.length?x.rotateX(F.rx.v*L[0]):x.rotateX(F.rx.v*L)),F.o.propType&&(L.length?q+=(F.o.v*L[0]-q)*L[0]:q+=(F.o.v*L-q)*L),t.strokeWidthAnim&&F.sw.propType&&(L.length?Y+=F.sw.v*L[0]:Y+=F.sw.v*L),t.strokeColorAnim&&F.sc.propType)for(H=0;H<3;H+=1)L.length?W[H]+=(F.sc.v[H]-W[H])*L[0]:W[H]+=(F.sc.v[H]-W[H])*L;if(t.fillColorAnim&&t.fc){if(F.fc.propType)for(H=0;H<3;H+=1)L.length?X[H]+=(F.fc.v[H]-X[H])*L[0]:X[H]+=(F.fc.v[H]-X[H])*L;F.fh.propType&&(X=L.length?z(X,F.fh.v*L[0]):z(X,F.fh.v*L)),F.fs.propType&&(X=L.length?O(X,F.fs.v*L[0]):O(X,F.fs.v*L)),F.fb.propType&&(X=L.length?V(X,F.fb.v*L[0]):V(X,F.fb.v*L))}}for(T=0;T<E;T+=1)(F=k[T].a).p.propType&&(L=k[T].s.getMult(w[a].anIndexes[T],C.a[T].s.totalChars),this._hasMaskedPath?L.length?x.translate(0,F.p.v[1]*L[0],-F.p.v[2]*L[1]):x.translate(0,F.p.v[1]*L,-F.p.v[2]*L):L.length?x.translate(F.p.v[0]*L[0],F.p.v[1]*L[1],-F.p.v[2]*L[2]):x.translate(F.p.v[0]*L,F.p.v[1]*L,-F.p.v[2]*L));if(t.strokeWidthAnim&&(K=Y<0?0:Y),t.strokeColorAnim&&(J="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),t.fillColorAnim&&t.fc&&(U="rgb("+Math.round(255*X[0])+","+Math.round(255*X[1])+","+Math.round(255*X[2])+")"),this._hasMaskedPath){if(x.translate(0,-t.ls),x.translate(0,P[1]*R*.01+i,0),this._pathData.p.v){b=(h.point[1]-m.point[1])/(h.point[0]-m.point[0]);var ct=180*Math.atan(b)/Math.PI;h.point[0]<m.point[0]&&(ct+=180),x.rotate(-ct*Math.PI/180)}x.translate(B,j,0),o-=P[0]*w[a].an*.005,w[a+1]&&Q!==w[a+1].ind&&(o+=w[a].an/2,o+=.001*t.tr*t.finalSize)}else{switch(x.translate(s,i,0),t.ps&&x.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:x.translate(w[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[w[a].line]),0,0);break;case 2:x.translate(w[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[w[a].line])/2,0,0)}x.translate(0,-t.ls),x.translate(G,0,0),x.translate(P[0]*w[a].an*.005,P[1]*R*.01,0),s+=w[a].l+.001*t.tr*t.finalSize}"html"===A?it=x.toCSS():"svg"===A?it=x.to2dCSS():at=[x.props[0],x.props[1],x.props[2],x.props[3],x.props[4],x.props[5],x.props[6],x.props[7],x.props[8],x.props[9],x.props[10],x.props[11],x.props[12],x.props[13],x.props[14],x.props[15]],Z=q}D<=a?(I=new Ze(Z,K,J,U,it,at),this.renderedLetters.push(I),D+=1,this.lettersChangedFlag=!0):(I=this.renderedLetters[a],this.lettersChangedFlag=I.update(Z,K,J,U,it,at)||this.lettersChangedFlag)}}},es.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},es.prototype.mHelper=new bt,es.prototype.defaultPropsArray=[],r([ot],es),ss.prototype.initElement=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new Qe(this,t.t,this.dynamicProperties),this.textAnimator=new es(t.t,this.renderType,this),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ss.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ss.prototype.createPathShape=function(t,e){var s,i,a=e.length,r="";for(s=0;s<a;s+=1)"sh"===e[s].ty&&(i=e[s].ks.k,r+=Ke(i,i.i.length,!0,t));return r},ss.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ss.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ss.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ss.prototype.applyTextPropertiesToMatrix=function(t,e,s,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s])/2,0,0)}e.translate(i,a,0)},ss.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ss.prototype.emptyProp=new Ze,ss.prototype.destroy=function(){};var is,as={shapes:[]};function rs(t,e,s){this.textSpans=[],this.renderType="svg",this.initElement(t,e,s)}function ns(t,e,s){this.initElement(t,e,s)}function os(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function hs(){}function ls(){}function ps(t,e,s){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?p(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?nt.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function fs(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=q("svg");var s="";if(e&&e.title){var i=q("title"),a=I();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),s+=a}if(e&&e.description){var r=q("desc"),n=I();r.setAttribute("id",n),r.textContent=e.description,this.svgElement.appendChild(r),s+=" "+n}s&&this.svgElement.setAttribute("aria-labelledby",s);var o=q("defs");this.svgElement.appendChild(o);var h=q("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function cs(){var t;this.saved=[],this.cArrPos=0,this.cTr=new bt,this.cO=1;for(this.savedOp=l("float32",15),t=0;t<15;t+=1)this.saved[t]=l("float32",16);this._length=15}function ms(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function ds(){}function us(t,e){var s;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=p(this.masksProperties.length);var i=this.masksProperties.length,a=!1;for(s=0;s<i;s+=1)"n"!==this.masksProperties[s].mode&&(a=!0),this.viewData[s]=vt.getShapeProp(this.element,this.masksProperties[s],3);this.hasMasks=a,a&&this.element.addRenderableComponent(this)}function gs(){}function ys(t,e,s,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var a,r=4;"rc"===e.ty?r=5:"el"===e.ty?r=6:"sr"===e.ty&&(r=7),this.sh=vt.getShapeProp(t,e,r,t);var n,o=s.length;for(a=0;a<o;a+=1)s[a].closed||(n={transforms:i.addTransformSequence(s[a].transforms),trNodes:[]},this.styledShapes.push(n),s[a].elements.push(n))}function vs(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ms,this.initElement(t,e,s)}function bs(t,e,s){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,s)}function _s(t,e,s){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,s)}function Ps(t,e,s){this.initElement(t,e,s)}function ks(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new cs,this.elements=[],this.pendingElements=[],this.transformMat=new bt,this.completeLayers=!1,this.rendererType="canvas"}function Cs(t,e,s){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=p(this.layers.length),this.initElement(t,e,s),this.tm=t.tm?nt.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function xs(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new cs,this.elements=[],this.pendingElements=[],this.transformMat=new bt,this.completeLayers=!1,this.rendererType="canvas"}return r([ne,de,Me,Fe,oe,Te,ss],rs),rs.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=q("text"))},rs.prototype.buildTextContents=function(t){for(var e=0,s=t.length,i=[],a="";e<s;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(a),a=""):a+=t[e],e+=1;return i.push(a),i},rs.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var s=this.textProperty.currentData;this.renderedLetters=p(s?s.l.length:0),s.fc?this.layerElement.setAttribute("fill",this.buildColor(s.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(s.sc)),this.layerElement.setAttribute("stroke-width",s.sw)),this.layerElement.setAttribute("font-size",s.finalSize);var i=this.globalData.fontManager.getFontByName(s.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var a=s.fWeight,r=s.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",s.t);var n,o=s.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,f=this.data.singleShape,c=0,m=0,d=!0,u=.001*s.tr*s.finalSize;if(!f||h||s.sz){var g,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!f||0===t){if(n=y>t?this.textSpans[t].span:q(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var v=q("g");n.appendChild(v),this.textSpans[t].childSpan=v}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(s.finalSize/100,s.finalSize/100),f&&(o[t].n&&(c=-u,m+=s.yOffset,m+=d?1:0,d=!1),this.applyTextPropertiesToMatrix(s,l,o[t].line,c,m),c+=o[t].l||0,c+=u),h){var b;if(1===(g=this.globalData.fontManager.getCharData(s.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily)).t)b=new ps(g.data,this.globalData,this);else{var _=as;g.data&&g.data.shapes&&(_=g.data),b=new Ue(_,this.globalData,this)}this.textSpans[t].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[t].childSpan.appendChild(b.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+s.finalSize/100+","+s.finalSize/100+")")}else f&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&n&&n.setAttribute("d","")}else{var P=this.textContainer,k="start";switch(s.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}P.setAttribute("text-anchor",k),P.setAttribute("letter-spacing",u);var C=this.buildTextContents(s.finalText);for(e=C.length,m=s.ps?s.ps[1]+s.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||q("tspan")).textContent=C[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",P.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=s.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},rs.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},rs.prototype.getValue=function(){var t,e,s=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<s;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},rs.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var s,i,a,r=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(s=r[t],i=this.textSpans[t].span,(a=this.textSpans[t].glyph)&&a.renderFrame(),s._mdf.m&&i.setAttribute("transform",s.m),s._mdf.o&&i.setAttribute("opacity",s.o),s._mdf.sw&&i.setAttribute("stroke-width",s.sw),s._mdf.sc&&i.setAttribute("stroke",s.sc),s._mdf.fc&&i.setAttribute("fill",s.fc))}},r([Ee],ns),ns.prototype.createContent=function(){var t=q("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},os.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},os.prototype.renderFrame=function(){},os.prototype.getBaseElement=function(){return null},os.prototype.destroy=function(){},os.prototype.sourceRectAtTime=function(){},os.prototype.hide=function(){},r([ne,de,Fe,oe],os),r([me],hs),hs.prototype.createNull=function(t){return new os(t,this.globalData,this)},hs.prototype.createShape=function(t){return new Ue(t,this.globalData,this)},hs.prototype.createText=function(t){return new rs(t,this.globalData,this)},hs.prototype.createImage=function(t){return new Ee(t,this.globalData,this)},hs.prototype.createSolid=function(t){return new ns(t,this.globalData,this)},hs.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var s=q("clipPath"),a=q("rect");a.setAttribute("width",t.w),a.setAttribute("height",t.h),a.setAttribute("x",0),a.setAttribute("y",0);var r=I();s.setAttribute("id",r),s.appendChild(a),this.layerElement.setAttribute("clip-path","url("+i()+"#"+r+")"),e.appendChild(s),this.layers=t.layers,this.elements=p(t.layers.length)},hs.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},hs.prototype.updateContainerSize=function(){},hs.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var s=this.createItem(this.layers[t]);e[t]=s,G()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(s),s.initExpressions()),this.appendElementInPos(s,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?s.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(s)))}},hs.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,s=this.elements.length;e<s;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},hs.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var s=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=s-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<s;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},hs.prototype.appendElementInPos=function(t,e){var s=t.getBaseElement();if(s){for(var i,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(s,i):this.layerElement.appendChild(s)}},hs.prototype.hide=function(){this.layerElement.style.display="none"},hs.prototype.show=function(){this.layerElement.style.display="block"},r([ne,de,Fe,oe,Te],ls),ls.prototype.initElement=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ls.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var s,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),s=i-1;s>=0;s-=1)(this.completeLayers||this.elements[s])&&(this.elements[s].prepareFrame(this.renderedFrame-this.layers[s].st),this.elements[s]._mdf&&(this._mdf=!0))}},ls.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ls.prototype.setElements=function(t){this.elements=t},ls.prototype.getElements=function(){return this.elements},ls.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ls.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},r([hs,ls,Me],ps),ps.prototype.createComp=function(t){return new ps(t,this.globalData,this)},r([hs],fs),fs.prototype.createComp=function(t){return new ps(t,this.globalData,this)},cs.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=l("float32",t),this.savedOp.set(e);var s=0;for(s=this._length;s<t;s+=1)this.saved[s]=l("float32",16);this._length=t},cs.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ms.prototype={addTransformSequence:function(t){var e,s=t.length,i="_";for(e=0;e<s;e+=1)i+=t[e].transform.key+"_";var a=this.sequences[i];return a||(a={transforms:[].concat(t),finalTransform:new bt,_mdf:!1},this.sequences[i]=a,this.sequenceList.push(a)),a},processSequence:function(t,e){for(var s,i=0,a=t.transforms.length,r=e;i<a&&!e;){if(t.transforms[i].transform.mProps._mdf){r=!0;break}i+=1}if(r)for(t.finalTransform.reset(),i=a-1;i>=0;i-=1)s=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11],s[12],s[13],s[14],s[15]);t._mdf=r},processSequences:function(t){var e,s=this.sequenceList.length;for(e=0;e<s;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},ds.prototype.renderFrame=function(){},us.prototype.renderFrame=function(){if(this.hasMasks){var t,e,s,i,a=this.element.finalTransform.mat,r=this.element.canvasContext,n=this.masksProperties.length;for(r.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(r.moveTo(0,0),r.lineTo(this.element.globalData.compSize.w,0),r.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r.lineTo(0,this.element.globalData.compSize.h),r.lineTo(0,0)),i=this.viewData[t].v,e=a.applyToPointArray(i.v[0][0],i.v[0][1],0),r.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)s=a.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),r.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);s=a.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),r.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}this.element.globalData.renderer.save(!0),r.clip()}},us.prototype.getMaskProperty=ue.prototype.getMaskProperty,us.prototype.destroy=function(){this.element=null},gs.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new ds(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=Jt(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new us(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new bt},gs.prototype.hide=gs.prototype.hideElement,gs.prototype.show=gs.prototype.showElement,ys.prototype.setAsAnimated=Ve.prototype.setAsAnimated,r([ne,de,gs,Le,Fe,oe,Ot],vs),vs.prototype.initElement=Te.prototype.initElement,vs.prototype.transformHelper={opacity:1,_opMdf:!1},vs.prototype.dashResetter=[],vs.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},vs.prototype.createStyleElement=function(t,e){var s={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=nt.getProp(this,t.c,1,255,this),i.c.k||(s.co="rgb("+v(i.c.v[0])+","+v(i.c.v[1])+","+v(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=nt.getProp(this,t.s,1,null,this),i.e=nt.getProp(this,t.e,1,null,this),i.h=nt.getProp(this,t.h||{k:0},0,.01,this),i.a=nt.getProp(this,t.a||{k:0},0,k,this),i.g=new qe(this,t.g,this)),i.o=nt.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(s.lc=Re[t.lc||2],s.lj=Oe[t.lj||2],1==t.lj&&(s.ml=t.ml),i.w=nt.getProp(this,t.w,0,null,this),i.w.k||(s.wi=i.w.v),t.d){var a=new Ne(this,t.d,"canvas",this);i.d=a,i.d.k||(s.da=i.d.dashArray,s.do=i.d.dashoffset[0])}}else s.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(s),i.style=s,i},vs.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},vs.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:nt.getProp(this,t.o,0,.01,this),mProps:Tt.getTransformProperty(this,t,this)}}},vs.prototype.createShapeElement=function(t){var e=new ys(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},vs.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},vs.prototype.addTransformToStyleList=function(t){var e,s=this.stylesList.length;for(e=0;e<s;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},vs.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},vs.prototype.closeStyles=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].closed=!0},vs.prototype.searchShapes=function(t,e,s,i,a){var r,n,o,h,l,p,f=t.length-1,c=[],m=[],d=[].concat(a);for(r=f;r>=0;r-=1){if((h=this.searchProcessedElement(t[r]))?e[r]=s[h-1]:t[r]._shouldRender=i,"fl"===t[r].ty||"st"===t[r].ty||"gf"===t[r].ty||"gs"===t[r].ty)h?e[r].style.closed=!1:e[r]=this.createStyleElement(t[r],d),c.push(e[r].style);else if("gr"===t[r].ty){if(h)for(o=e[r].it.length,n=0;n<o;n+=1)e[r].prevViewData[n]=e[r].it[n];else e[r]=this.createGroupElement(t[r]);this.searchShapes(t[r].it,e[r].it,e[r].prevViewData,i,d)}else"tr"===t[r].ty?(h||(p=this.createTransformElement(t[r]),e[r]=p),d.push(e[r]),this.addTransformToStyleList(e[r])):"sh"===t[r].ty||"rc"===t[r].ty||"el"===t[r].ty||"sr"===t[r].ty?h||(e[r]=this.createShapeElement(t[r])):"tm"===t[r].ty||"rd"===t[r].ty||"pb"===t[r].ty?(h?(l=e[r]).closed=!1:((l=wt.getModifier(t[r].ty)).init(this,t[r]),e[r]=l,this.shapeModifiers.push(l)),m.push(l)):"rp"===t[r].ty&&(h?(l=e[r]).closed=!0:(l=wt.getModifier(t[r].ty),e[r]=l,l.init(this,t,r,e),this.shapeModifiers.push(l),i=!1),m.push(l));this.addProcessedElement(t[r],r+1)}for(this.removeTransformFromStyleList(),this.closeStyles(c),f=m.length,r=0;r<f;r+=1)m[r].closed=!0},vs.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},vs.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},vs.prototype.drawLayer=function(){var t,e,s,i,a,r,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),r=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),s=r.length,e=0;e<s;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),a=(n=r[e].trNodes).length,i=0;i<a;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},vs.prototype.renderShape=function(t,e,s,i){var a,r;for(r=t,a=e.length-1;a>=0;a-=1)"tr"===e[a].ty?(r=s[a].transform,this.renderShapeTransform(t,r)):"sh"===e[a].ty||"el"===e[a].ty||"rc"===e[a].ty||"sr"===e[a].ty?this.renderPath(e[a],s[a]):"fl"===e[a].ty?this.renderFill(e[a],s[a],r):"st"===e[a].ty?this.renderStroke(e[a],s[a],r):"gf"===e[a].ty||"gs"===e[a].ty?this.renderGradientFill(e[a],s[a],r):"gr"===e[a].ty?this.renderShape(r,e[a].it,s[a].it):e[a].ty;i&&this.drawLayer()},vs.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var s,i,a,r=t.trNodes,n=e.paths,o=n._length;r.length=0;var h=t.transforms.finalTransform;for(a=0;a<o;a+=1){var l=n.shapes[a];if(l&&l.v){for(i=l._length,s=1;s<i;s+=1)1===s&&r.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),r.push({t:"c",pts:h.applyToTriplePoints(l.o[s-1],l.i[s],l.v[s])});1===i&&r.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(r.push({t:"c",pts:h.applyToTriplePoints(l.o[s-1],l.i[0],l.v[0])}),r.push({t:"z"}))}}t.trNodes=r}},vs.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var s,i=e.styledShapes.length;for(s=0;s<i;s+=1)this.renderStyledShape(e.styledShapes[s],e.sh)}},vs.prototype.renderFill=function(t,e,s){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity)},vs.prototype.renderGradientFill=function(t,e,s){var i,a=e.style;if(!a.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var r,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;f>=1?f=.99:f<=-1&&(f=-.99);var c=l*f,m=Math.cos(p+e.a.v)*c+o[0],d=Math.sin(p+e.a.v)*c+o[1];i=n.createRadialGradient(m,d,0,o[0],o[1],l)}var u=t.g.p,g=e.g.c,y=1;for(r=0;r<u;r+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*r+1]),i.addColorStop(g[4*r]/100,"rgba("+g[4*r+1]+","+g[4*r+2]+","+g[4*r+3]+","+y+")");a.grd=i}a.coOp=e.o.v*s.opacity},vs.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||this._isFirstFrame)&&(i.da=a.dashArray,i.do=a.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},vs.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},r([ne,de,gs,Fe,oe,Ot,ss],bs),bs.prototype.tHelper=a("canvas").getContext("2d"),bs.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=p(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,a,r,n,o,h,l,f,c,m,d,u,g=this.globalData.fontManager.getFontByName(t.f),y=t.l,v=this.mHelper;this.stroke=s,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.finalText.length;var b=this.data.singleShape,_=.001*t.tr*t.finalSize,P=0,k=0,C=!0,x=0;for(i=0;i<a;i+=1){n=(r=this.globalData.fontManager.getCharData(t.finalText[i],g.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&r.data||{},v.reset(),b&&y[i].n&&(P=-_,k+=t.yOffset,k+=C?1:0,C=!1),c=(l=n.shapes?n.shapes[0].it:[]).length,v.scale(t.finalSize/100,t.finalSize/100),b&&this.applyTextPropertiesToMatrix(t,v,y[i].line,P,k),d=p(c-1);var A=0;for(f=0;f<c;f+=1)if("sh"===l[f].ty){for(h=l[f].ks.k.i.length,m=l[f].ks.k,u=[],o=1;o<h;o+=1)1===o&&u.push(v.applyToX(m.v[0][0],m.v[0][1],0),v.applyToY(m.v[0][0],m.v[0][1],0)),u.push(v.applyToX(m.o[o-1][0],m.o[o-1][1],0),v.applyToY(m.o[o-1][0],m.o[o-1][1],0),v.applyToX(m.i[o][0],m.i[o][1],0),v.applyToY(m.i[o][0],m.i[o][1],0),v.applyToX(m.v[o][0],m.v[o][1],0),v.applyToY(m.v[o][0],m.v[o][1],0));u.push(v.applyToX(m.o[o-1][0],m.o[o-1][1],0),v.applyToY(m.o[o-1][0],m.o[o-1][1],0),v.applyToX(m.i[0][0],m.i[0][1],0),v.applyToY(m.i[0][0],m.i[0][1],0),v.applyToX(m.v[0][0],m.v[0][1],0),v.applyToY(m.v[0][0],m.v[0][1],0)),d[A]=u,A+=1}b&&(P+=y[i].l,P+=_),this.textSpans[x]?this.textSpans[x].elem=d:this.textSpans[x]={elem:d},x+=1}},bs.prototype.renderInnerContent=function(){var t,e,s,i,a,r,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,f,c=null,m=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?c!==o.fc&&(c=o.fc,n.fillStyle=o.fc):c!==this.values.fill&&(c=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),s=0;s<i;s+=1)for(r=(f=p[s]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),a=2;a<r;a+=6)this.globalData.canvasContext.bezierCurveTo(f[a],f[a+1],f[a+2],f[a+3],f[a+4],f[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?m!==o.sc&&(m=o.sc,n.strokeStyle=o.sc):m!==this.values.stroke&&(m=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),s=0;s<i;s+=1)for(r=(f=p[s]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),a=2;a<r;a+=6)this.globalData.canvasContext.bezierCurveTo(f[a],f[a+1],f[a+2],f[a+3],f[a+4],f[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},r([ne,de,gs,Fe,oe,Ot],_s),_s.prototype.initElement=Ue.prototype.initElement,_s.prototype.prepareFrame=Ee.prototype.prepareFrame,_s.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=a("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,s,i=t.getContext("2d"),r=this.img.width,n=this.img.height,o=r/n,h=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o>h&&"xMidYMid slice"===l||o<h&&"xMidYMid slice"!==l?e=(s=n)*h:s=(e=r)/h,i.drawImage(this.img,(r-e)/2,(n-s)/2,e,s,0,0,this.assetData.w,this.assetData.h),this.img=t}},_s.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},_s.prototype.destroy=function(){this.img=null},r([ne,de,gs,Fe,oe,Ot],Ps),Ps.prototype.initElement=Ue.prototype.initElement,Ps.prototype.prepareFrame=Ee.prototype.prepareFrame,Ps.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},r([me],ks),ks.prototype.createShape=function(t){return new vs(t,this.globalData,this)},ks.prototype.createText=function(t){return new bs(t,this.globalData,this)},ks.prototype.createImage=function(t){return new _s(t,this.globalData,this)},ks.prototype.createSolid=function(t){return new Ps(t,this.globalData,this)},ks.prototype.createNull=fs.prototype.createNull,ks.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var s=this.contextData.cTr.props;this.canvasContext.setTransform(s[0],s[1],s[4],s[5],s[12],s[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},ks.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},ks.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},ks.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,s=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=s[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},ks.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,s=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[4],s[5],s[12],s[13]),s=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=s,this.globalData.currentGlobalAlpha!==s&&(this.canvasContext.globalAlpha=s,this.globalData.currentGlobalAlpha=s)}else this.canvasContext.restore()},ks.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=a("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var s="0px 0px 0px";e.transformOrigin=s,e.mozTransformOrigin=s,e.webkitTransformOrigin=s,e["-webkit-transform"]=s,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=p(t.layers.length),this.updateContainerSize()},ks.prototype.updateContainerSize=function(){var t,e,s,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var a=this.renderConfig.preserveAspectRatio.split(" "),r=a[1]||"meet",n=a[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);s=t/e,(i=this.transformCanvas.w/this.transformCanvas.h)>s&&"meet"===r||i<s&&"slice"===r?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<s&&"meet"===r||i>s&&"slice"===r)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<s&&"meet"===r||i>s&&"slice"===r)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>s&&"meet"===r||i<s&&"slice"===r)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(i>s&&"meet"===r||i<s&&"slice"===r)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},ks.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},ks.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var s;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),s=0;s<i;s+=1)(this.completeLayers||this.elements[s])&&this.elements[s].prepareFrame(t-this.layers[s].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),s=i-1;s>=0;s-=1)(this.completeLayers||this.elements[s])&&this.elements[s].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},ks.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var s=this.createItem(this.layers[t],this,this.globalData);e[t]=s,s.initExpressions()}},ks.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},ks.prototype.hide=function(){this.animationItem.container.style.display="none"},ks.prototype.show=function(){this.animationItem.container.style.display="block"},r([ks,ls,gs],Cs),Cs.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},Cs.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},Cs.prototype.createComp=function(t){return new Cs(t,this.globalData,this)},r([ks],xs),xs.prototype.createComp=function(t){return new Cs(t,this.globalData,this)},is=xs,U["canvas"]=is,wt.registerModifier("tm",Mt),wt.registerModifier("pb",Ft),wt.registerModifier("rp",Et),wt.registerModifier("rd",It),kt}));
diff --git a/build/player/lottie_light_html.js b/build/player/lottie_light_html.js
index c76529c..4038e48 100644
--- a/build/player/lottie_light_html.js
+++ b/build/player/lottie_light_html.js
@@ -1,1911 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* global svgNS */
-/* exported createNS */
-
-function createNS(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElementNS(svgNS, type);
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$4(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1913,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$3(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6774,5580 +1620,13511 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$2(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global extendPrototype, BaseRenderer, SVGRenderer, SVGShapeElement, HShapeElement, SVGTextLottieElement,
-HTextElement, HCameraElement, IImageElement, HImageElement, SVGCompElement, HCompElement, ISolidElement,
-HSolidElement, styleDiv, createTag, createNS */
-
-function HybridRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.renderConfig = {
-    className: (config && config.className) || '',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    hideOnTransparent: !(config && config.hideOnTransparent === false),
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '400%',
-      height: (config && config.filterSize && config.filterSize.height) || '400%',
-      x: (config && config.filterSize && config.filterSize.x) || '-100%',
-      y: (config && config.filterSize && config.filterSize.y) || '-100%',
-    },
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    renderConfig: this.renderConfig,
+
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
+
+    if (expressionsPlugin) {
+      expressionsPlugin.initExpressions(this);
+    }
+
+    this.loadNextSegment();
   };
-  this.pendingElements = [];
-  this.elements = [];
-  this.threeDElements = [];
-  this.destroyed = false;
-  this.camera = null;
-  this.supports3d = true;
-  this.rendererType = 'html';
-}
 
-extendPrototype([BaseRenderer], HybridRenderer);
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
 
-HybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;
-
-HybridRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-HybridRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newDOMElement = element.getBaseElement();
-  if (!newDOMElement) {
-    return;
-  }
-  var layer = this.layers[pos];
-  if (!layer.ddd || !this.supports3d) {
-    if (this.threeDElements) {
-      this.addTo3dContainer(newDOMElement, pos);
-    } else {
-      var i = 0;
-      var nextDOMElement;
-      var nextLayer;
-      var tmpDOMElement;
-      while (i < pos) {
-        if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
-          nextLayer = this.elements[i];
-          tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
-          nextDOMElement = tmpDOMElement || nextDOMElement;
-        }
-        i += 1;
-      }
-      if (nextDOMElement) {
-        if (!layer.ddd || !this.supports3d) {
-          this.layerElement.insertBefore(newDOMElement, nextDOMElement);
-        }
-      } else if (!layer.ddd || !this.supports3d) {
-        this.layerElement.appendChild(newDOMElement);
-      }
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-  } else {
-    this.addTo3dContainer(newDOMElement, pos);
-  }
-};
 
-HybridRenderer.prototype.createShape = function (data) {
-  if (!this.supports3d) {
-    return new SVGShapeElement(data, this.globalData, this);
-  }
-  return new HShapeElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createText = function (data) {
-  if (!this.supports3d) {
-    return new SVGTextLottieElement(data, this.globalData, this);
-  }
-  return new HTextElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createCamera = function (data) {
-  this.camera = new HCameraElement(data, this.globalData, this);
-  return this.camera;
-};
-
-HybridRenderer.prototype.createImage = function (data) {
-  if (!this.supports3d) {
-    return new IImageElement(data, this.globalData, this);
-  }
-  return new HImageElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createComp = function (data) {
-  if (!this.supports3d) {
-    return new SVGCompElement(data, this.globalData, this);
-  }
-  return new HCompElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createSolid = function (data) {
-  if (!this.supports3d) {
-    return new ISolidElement(data, this.globalData, this);
-  }
-  return new HSolidElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-HybridRenderer.prototype.getThreeDContainerByPos = function (pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
-      return this.threeDElements[i].perspectiveElem;
-    }
-    i += 1;
-  }
-  return null;
-};
-
-HybridRenderer.prototype.createThreeDContainer = function (pos, type) {
-  var perspectiveElem = createTag('div');
-  var style;
-  var containerStyle;
-  styleDiv(perspectiveElem);
-  var container = createTag('div');
-  styleDiv(container);
-  if (type === '3d') {
-    style = perspectiveElem.style;
-    style.width = this.globalData.compSize.w + 'px';
-    style.height = this.globalData.compSize.h + 'px';
-    var center = '50% 50%';
-    style.webkitTransformOrigin = center;
-    style.mozTransformOrigin = center;
-    style.transformOrigin = center;
-    containerStyle = container.style;
-    var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-    containerStyle.transform = matrix;
-    containerStyle.webkitTransform = matrix;
-  }
-
-  perspectiveElem.appendChild(container);
-  // this.resizerElem.appendChild(perspectiveElem);
-  var threeDContainerData = {
-    container: container,
-    perspectiveElem: perspectiveElem,
-    startPos: pos,
-    endPos: pos,
-    type: type,
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
   };
-  this.threeDElements.push(threeDContainerData);
-  return threeDContainerData;
-};
 
-HybridRenderer.prototype.build3dContainers = function () {
-  var i;
-  var len = this.layers.length;
-  var lastThreeDContainerData;
-  var currentContainer = '';
-  for (i = 0; i < len; i += 1) {
-    if (this.layers[i].ddd && this.layers[i].ty !== 3) {
-      if (currentContainer !== '3d') {
-        currentContainer = '3d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '3d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
-    } else {
-      if (currentContainer !== '2d') {
-        currentContainer = '2d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '2d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
-  }
-  len = this.threeDElements.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
-  }
-};
 
-HybridRenderer.prototype.addTo3dContainer = function (elem, pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (pos <= this.threeDElements[i].endPos) {
-      var j = this.threeDElements[i].startPos;
-      var nextElement;
-      while (j < pos) {
-        if (this.elements[j] && this.elements[j].getBaseElement) {
-          nextElement = this.elements[j].getBaseElement();
-        }
-        j += 1;
-      }
-      if (nextElement) {
-        this.threeDElements[i].container.insertBefore(elem, nextElement);
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
+
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
+
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
+    }
+
+    try {
+      this.animationData = animData;
+
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        this.threeDElements[i].container.appendChild(elem);
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
       }
-      break;
+
+      this.renderer.configAnimation(animData);
+
+      if (!animData.assets) {
+        animData.assets = [];
+      }
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
+      }
+    } catch (error) {
+      this.triggerConfigError(error);
     }
-    i += 1;
-  }
-};
+  };
 
-HybridRenderer.prototype.configAnimation = function (animData) {
-  var resizerElem = createTag('div');
-  var wrapper = this.animationItem.wrapper;
-  var style = resizerElem.style;
-  style.width = animData.w + 'px';
-  style.height = animData.h + 'px';
-  this.resizerElem = resizerElem;
-  styleDiv(resizerElem);
-  style.transformStyle = 'flat';
-  style.mozTransformStyle = 'flat';
-  style.webkitTransformStyle = 'flat';
-  if (this.renderConfig.className) {
-    resizerElem.setAttribute('class', this.renderConfig.className);
-  }
-  wrapper.appendChild(resizerElem);
-
-  style.overflow = 'hidden';
-  var svg = createNS('svg');
-  svg.setAttribute('width', '1');
-  svg.setAttribute('height', '1');
-  styleDiv(svg);
-  this.resizerElem.appendChild(svg);
-  var defs = createNS('defs');
-  svg.appendChild(defs);
-  this.data = animData;
-  // Mask animation
-  this.setupGlobalData(animData, svg);
-  this.globalData.defs = defs;
-  this.layers = animData.layers;
-  this.layerElement = this.resizerElem;
-  this.build3dContainers();
-  this.updateContainerSize();
-};
-
-HybridRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.animationItem.container = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    this.elements[i].destroy();
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
-
-HybridRenderer.prototype.updateContainerSize = function () {
-  var elementWidth = this.animationItem.wrapper.offsetWidth;
-  var elementHeight = this.animationItem.wrapper.offsetHeight;
-  var elementRel = elementWidth / elementHeight;
-  var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
-  var sx;
-  var sy;
-  var tx;
-  var ty;
-  if (animationRel > elementRel) {
-    sx = elementWidth / (this.globalData.compSize.w);
-    sy = elementWidth / (this.globalData.compSize.w);
-    tx = 0;
-    ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2);
-  } else {
-    sx = elementHeight / (this.globalData.compSize.h);
-    sy = elementHeight / (this.globalData.compSize.h);
-    tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
-    ty = 0;
-  }
-  var style = this.resizerElem.style;
-  style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
-  style.transform = style.webkitTransform;
-};
-
-HybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
-
-HybridRenderer.prototype.hide = function () {
-  this.resizerElem.style.display = 'none';
-};
-
-HybridRenderer.prototype.show = function () {
-  this.resizerElem.style.display = 'block';
-};
-
-HybridRenderer.prototype.initItems = function () {
-  this.buildAllItems();
-  if (this.camera) {
-    this.camera.setup();
-  } else {
-    var cWidth = this.globalData.compSize.w;
-    var cHeight = this.globalData.compSize.h;
-    var i;
-    var len = this.threeDElements.length;
-    for (i = 0; i < len; i += 1) {
-      var style = this.threeDElements[i].perspectiveElem.style;
-      style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
-      style.perspective = style.webkitPerspective;
-    }
-  }
-};
-
-HybridRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  var floatingContainer = createTag('div');
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
-    }
-  }
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
     }
 
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
     } else {
-      rect = null;
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
+      }
+    }
+  };
+
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
+
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
+
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
+
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
     }
 
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
+    }
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
+      }
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
     } else {
-      count += 1;
+      this.pause();
+    }
+  };
 
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
 
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      } else {
-        feMorph = null;
-        x = null;
-      }
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
 
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
 
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
-      }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
-      }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
       }
     }
-  }
 
-  this.maskElement = createNS(maskType);
+    return null;
+  };
 
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
-
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
     }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
-    }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
       }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
         } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
+      if (!this.checkSegments(nextValue % this.totalFrames)) {
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
           }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
+      }
+    } else {
+      this.setCurrentRawFrameValue(nextValue);
+    }
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$2(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
         }
       }
     }
-  }
-};
 
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
+    function freeze() {
+      _isFrozen = true;
+    }
 
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
 
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
+    function setVolume(val, animation) {
+      var i;
 
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
       }
-      viewData.elem.setAttribute('d', pathShapeValue);
     }
-    viewData.lastPath = pathString;
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
   }
-};
 
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
+  var bez = bezFunction();
 
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
 
-function HierarchyElement() {}
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
 
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-  },
-};
 
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
 
-function FrameElement() {}
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
 
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
           this._mdf = true;
         }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
+      } else {
+        var i = 0;
+        var len = this.v.length;
 
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
         while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
           }
+
           i += 1;
         }
       }
+    }
 
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
         return;
       }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
       }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
       this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-/* global createNS */
-
-function SVGStyleData(data, level) {
-  this.data = data;
-  this.type = data.ty;
-  this.d = '';
-  this.lvl = level;
-  this._mdf = false;
-  this.closed = data.hd === true;
-  this.pElem = createNS('path');
-  this.msElem = null;
-}
-
-SVGStyleData.prototype.reset = function () {
-  this.d = '';
-  this._mdf = false;
-};
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-}
 
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
 
-/* exported SVGTransformData */
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
 
-function SVGTransformData(mProps, op, container) {
-  this.transform = {
-    mProps: mProps,
-    op: op,
-    container: container,
-  };
-  this.elements = [];
-  this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
-}
-
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-  this._isAnimated = !!this._isAnimated;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
-
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
-
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
-
-function SVGGradientFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.initGradientData(elem, data, styleOb);
-}
-
-SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
-  this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);
-  this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);
-  this.g = new GradientProperty(elem, data.g, this);
-  this.style = styleOb;
-  this.stops = [];
-  this.setGradientData(styleOb.pElem, data);
-  this.setGradientOpacity(data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-};
-
-SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
-  var gradientId = createElementID();
-  var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-  gfill.setAttribute('id', gradientId);
-  gfill.setAttribute('spreadMethod', 'pad');
-  gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
-  var stops = [];
-  var stop;
-  var j;
-  var jLen;
-  jLen = data.g.p * 4;
-  for (j = 0; j < jLen; j += 4) {
-    stop = createNS('stop');
-    gfill.appendChild(stop);
-    stops.push(stop);
-  }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
-  this.gf = gfill;
-  this.cst = stops;
-};
-
-SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
-  if (this.g._hasOpacity && !this.g._collapsable) {
-    var stop;
-    var j;
-    var jLen;
-    var mask = createNS('mask');
-    var maskElement = createNS('path');
-    mask.appendChild(maskElement);
-    var opacityId = createElementID();
-    var maskId = createElementID();
-    mask.setAttribute('id', maskId);
-    var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-    opFill.setAttribute('id', opacityId);
-    opFill.setAttribute('spreadMethod', 'pad');
-    opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
-    jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
-    var stops = this.stops;
-    for (j = data.g.p * 4; j < jLen; j += 2) {
-      stop = createNS('stop');
-      stop.setAttribute('stop-color', 'rgb(255,255,255)');
-      opFill.appendChild(stop);
-      stops.push(stop);
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
-    if (data.ty === 'gs') {
-      maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-      maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-      if (data.lj === 1) {
-        maskElement.setAttribute('stroke-miterlimit', data.ml);
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
       }
     }
-    this.of = opFill;
-    this.ms = mask;
-    this.ost = stops;
-    this.maskId = maskId;
-    styleOb.msElem = maskElement;
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
   }
-};
 
-extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
 
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
 
-function SVGGradientStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.initGradientData(elem, data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-}
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
 
-extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
 
-/* global createNS */
-/* exported ShapeGroupData */
+    return animationManager.loadAnimation(params);
+  }
 
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
 
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
 
-var SVGElementsRenderer = (function () {
-  var _identityMatrix = new Matrix();
-  var _matrixHelper = new Matrix();
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
 
-  var ob = {
-    createRenderFunction: createRenderFunction,
-  };
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
 
-  function createRenderFunction(data) {
-    switch (data.ty) {
-      case 'fl':
-        return renderFill;
-      case 'gf':
-        return renderGradient;
-      case 'gs':
-        return renderGradientStroke;
-      case 'st':
-        return renderStroke;
-      case 'sh':
-      case 'el':
-      case 'rc':
-      case 'sr':
-        return renderPath;
-      case 'tr':
-        return renderContentTransform;
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
       default:
         return null;
     }
   }
 
-  function renderContentTransform(styleData, itemData, isFirstFrame) {
-    if (isFirstFrame || itemData.transform.op._mdf) {
-      itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
-    }
-    if (isFirstFrame || itemData.transform.mProps._mdf) {
-      itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
+
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
+
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
     }
   }
 
-  function renderPath(styleData, itemData, isFirstFrame) {
-    var j;
-    var jLen;
-    var pathStringTransformed;
-    var redraw;
-    var pathNodes;
-    var l;
-    var lLen = itemData.styles.length;
-    var lvl = itemData.lvl;
-    var paths;
-    var mat;
-    var props;
-    var iterations;
-    var k;
-    for (l = 0; l < lLen; l += 1) {
-      redraw = itemData.sh._mdf || isFirstFrame;
-      if (itemData.styles[l].lvl < lvl) {
-        mat = _matrixHelper.reset();
-        iterations = lvl - itemData.styles[l].lvl;
-        k = itemData.transformers.length - 1;
-        while (!redraw && iterations > 0) {
-          redraw = itemData.transformers[k].mProps._mdf || redraw;
-          iterations -= 1;
-          k -= 1;
-        }
-        if (redraw) {
-          iterations = lvl - itemData.styles[l].lvl;
-          k = itemData.transformers.length - 1;
-          while (iterations > 0) {
-            props = itemData.transformers[k].mProps.v.props;
-            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]);
-            iterations -= 1;
-            k -= 1;
-          }
-        }
-      } else {
-        mat = _identityMatrix;
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
+
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
+
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
       }
-      paths = itemData.sh.paths;
-      jLen = paths._length;
-      if (redraw) {
-        pathStringTransformed = '';
-        for (j = 0; j < jLen; j += 1) {
-          pathNodes = paths.shapes[j];
-          if (pathNodes && pathNodes._length) {
-            pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
-          }
-        }
-        itemData.caches[l] = pathStringTransformed;
-      } else {
-        pathStringTransformed = itemData.caches[l];
-      }
-      itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
-      itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
     }
+
+    return null;
   }
 
-  function renderFill(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
+  var queryString;
 
-    if (itemData.c._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
-    }
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
   }
 
-  function renderGradientStroke(styleData, itemData, isFirstFrame) {
-    renderGradient(styleData, itemData, isFirstFrame);
-    renderStroke(styleData, itemData, isFirstFrame);
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$1(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
+    }
+  } catch (err) {//
   }
 
-  function renderGradient(styleData, itemData, isFirstFrame) {
-    var gfill = itemData.gf;
-    var hasOpacity = itemData.g._hasOpacity;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
 
-    if (itemData.o._mdf || isFirstFrame) {
-      var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
-      itemData.style.pElem.setAttribute(attr, itemData.o.v);
-    }
-    if (itemData.s._mdf || isFirstFrame) {
-      var attr1 = styleData.t === 1 ? 'x1' : 'cx';
-      var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
-      gfill.setAttribute(attr1, pt1[0]);
-      gfill.setAttribute(attr2, pt1[1]);
-      if (hasOpacity && !itemData.g._collapsable) {
-        itemData.of.setAttribute(attr1, pt1[0]);
-        itemData.of.setAttribute(attr2, pt1[1]);
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
       }
     }
-    var stops;
-    var i;
-    var len;
-    var stop;
-    if (itemData.g._cmdf || isFirstFrame) {
-      stops = itemData.cst;
-      var cValues = itemData.g.c;
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        stop.setAttribute('offset', cValues[i * 4] + '%');
-        stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
-      }
-    }
-    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
-      var oValues = itemData.g.o;
-      if (itemData.g._collapsable) {
-        stops = itemData.cst;
-      } else {
-        stops = itemData.ost;
-      }
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        if (!itemData.g._collapsable) {
-          stop.setAttribute('offset', oValues[i * 2] + '%');
-        }
-        stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
-      }
-    }
-    if (styleData.t === 1) {
-      if (itemData.e._mdf || isFirstFrame) {
-        gfill.setAttribute('x2', pt2[0]);
-        gfill.setAttribute('y2', pt2[1]);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('x2', pt2[0]);
-          itemData.of.setAttribute('y2', pt2[1]);
-        }
-      }
-    } else {
-      var rad;
-      if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
-        rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        gfill.setAttribute('r', rad);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('r', rad);
-        }
-      }
-      if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
-        if (!rad) {
-          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        }
-        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
 
-        var percent = itemData.h.v;
-        if (percent >= 1) {
-          percent = 0.99;
-        } else if (percent <= -1) {
-          percent = -0.99;
-        }
-        var dist = rad * percent;
-        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-        gfill.setAttribute('fx', x);
-        gfill.setAttribute('fy', y);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('fx', x);
-          itemData.of.setAttribute('fy', y);
-        }
-      }
-      // gfill.setAttribute('fy','200');
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
     }
-  }
 
-  function renderStroke(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
-    var d = itemData.d;
-    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
-      styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
-      styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
-    }
-    if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
-      styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
-    }
-    if (itemData.w._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
-      if (styleElem.msElem) {
-        styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
-      }
-    }
-  }
+    return ob;
+  }();
 
-  return ob;
-}());
+  function ShapeModifier() {}
 
-/* global Matrix */
+  ShapeModifier.prototype.initModifierProperties = function () {};
 
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
+  ShapeModifier.prototype.addShapeToModifier = function () {};
 
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
       };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
       }
     }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
+  };
 
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
 
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
+    if (this.dynamicProperties.length) {
+      this.k = true;
     } else {
-      this.baseElement = this.layerElement;
+      this.getValue(true);
     }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
+  };
 
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
       return;
     }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
 
-/* global ProcessedElement */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-function IShapeElement() {
-}
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
     var i;
-    var len = this.shapeModifiers.length;
+    var len = segments.length;
+    var segmentOb;
+
     for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
       }
     }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
     }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
     var i;
     var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
     for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
     }
 
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
         break;
       }
-    }
-  },
 
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
       }
-      i += 1;
     }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
         return;
       }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
 
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
 
-function ITextElement() {
-}
+      this.iterateDynamicProperties();
 
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
 
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
 
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
 
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
 
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
 
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
 
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
             }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
         }
-    }
-}; */
 
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
-
-function SVGCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = true;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
-
-function SVGTextLottieElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.renderType = 'svg';
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
-
-SVGTextLottieElement.prototype.createContent = function () {
-  if (this.data.singleShape && !this.globalData.fontManager.chars) {
-    this.textContainer = createNS('text');
-  }
-};
-
-SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
-  var i = 0;
-  var len = textArray.length;
-  var textContents = [];
-  var currentTextContent = '';
-  while (i < len) {
-    if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
-      textContents.push(currentTextContent);
-      currentTextContent = '';
-    } else {
-      currentTextContent += textArray[i];
-    }
-    i += 1;
-  }
-  textContents.push(currentTextContent);
-  return textContents;
-};
-
-SVGTextLottieElement.prototype.buildNewText = function () {
-  var i;
-  var len;
-
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
-  if (documentData.fc) {
-    this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
-  } else {
-    this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
-  }
-  if (documentData.sc) {
-    this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
-    this.layerElement.setAttribute('stroke-width', documentData.sw);
-  }
-  this.layerElement.setAttribute('font-size', documentData.finalSize);
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (fontData.fClass) {
-    this.layerElement.setAttribute('class', fontData.fClass);
-  } else {
-    this.layerElement.setAttribute('font-family', fontData.fFamily);
-    var fWeight = documentData.fWeight;
-    var fStyle = documentData.fStyle;
-    this.layerElement.setAttribute('font-style', fStyle);
-    this.layerElement.setAttribute('font-weight', fWeight);
-  }
-  this.layerElement.setAttribute('aria-label', documentData.t);
-
-  var letters = documentData.l || [];
-  var usesGlyphs = !!this.globalData.fontManager.chars;
-  len = letters.length;
-
-  var tSpan;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var singleShape = this.data.singleShape;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  if (singleShape && !usesGlyphs && !documentData.sz) {
-    var tElement = this.textContainer;
-    var justify = 'start';
-    switch (documentData.j) {
-      case 1:
-        justify = 'end';
-        break;
-      case 2:
-        justify = 'middle';
-        break;
-      default:
-        justify = 'start';
-        break;
-    }
-    tElement.setAttribute('text-anchor', justify);
-    tElement.setAttribute('letter-spacing', trackingOffset);
-    var textContent = this.buildTextContents(documentData.finalText);
-    len = textContent.length;
-    yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
-    for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
-      tSpan.textContent = textContent[i];
-      tSpan.setAttribute('x', 0);
-      tSpan.setAttribute('y', yPos);
-      tSpan.style.display = 'inherit';
-      tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
-      yPos += documentData.finalLineHeight;
-    }
-
-    this.layerElement.appendChild(tElement);
-  } else {
-    var cachedSpansLength = this.textSpans.length;
-    var shapeData;
-    var charData;
-    for (i = 0; i < len; i += 1) {
-      if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
-        if (cachedSpansLength <= i) {
-          tSpan.setAttribute('stroke-linecap', 'butt');
-          tSpan.setAttribute('stroke-linejoin', 'round');
-          tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
-          this.layerElement.appendChild(tSpan);
-        }
-        tSpan.style.display = 'inherit';
-      }
-
-      matrixHelper.reset();
-      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-      if (singleShape) {
-        if (letters[i].n) {
-          xPos = -trackingOffset;
-          yPos += documentData.yOffset;
-          yPos += firstLine ? 1 : 0;
-          firstLine = false;
-        }
-        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-        xPos += letters[i].l || 0;
-        // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-        xPos += trackingOffset;
-      }
-      if (usesGlyphs) {
-        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
         } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
         }
       } else {
-        if (singleShape) {
-          tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
-        }
-        tSpan.textContent = letters[i].val;
-        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
       }
-      //
-    }
-    if (singleShape && tSpan) {
-      tSpan.setAttribute('d', shapeStr);
-    }
-  }
-  while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
-    i += 1;
-  }
 
-  this._sizeChanged = true;
-};
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
 
-SVGTextLottieElement.prototype.sourceRectAtTime = function () {
-  this.prepareFrame(this.comp.renderedFrame - this.data.st);
-  this.renderInnerContent();
-  if (this._sizeChanged) {
-    this._sizeChanged = false;
-    var textBox = this.layerElement.getBBox();
-    this.bbox = {
-      top: textBox.y,
-      left: textBox.x,
-      width: textBox.width,
-      height: textBox.height,
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
     };
   }
-  return this.bbox;
-};
 
-SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-    if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
-      this._sizeChanged = true;
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
       var i;
-      var len;
-      var renderedLetters = this.textAnimator.renderedLetters;
+      var len = familyArray.length;
+      var enabledFamilies = [];
 
-      var letters = this.textProperty.currentData.l;
-
-      len = letters.length;
-      var renderedLetter;
-      var textSpan;
       for (i = 0; i < len; i += 1) {
-        if (!letters[i].n) {
-          renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
-          if (renderedLetter._mdf.m) {
-            textSpan.setAttribute('transform', renderedLetter.m);
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
           }
-          if (renderedLetter._mdf.o) {
-            textSpan.setAttribute('opacity', renderedLetter.o);
-          }
-          if (renderedLetter._mdf.sw) {
-            textSpan.setAttribute('stroke-width', renderedLetter.sw);
-          }
-          if (renderedLetter._mdf.sc) {
-            textSpan.setAttribute('stroke', renderedLetter.sc);
-          }
-          if (renderedLetter._mdf.fc) {
-            textSpan.setAttribute('fill', renderedLetter.fc);
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
           }
         }
       }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
     }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
+    return function pathInterfaceFactory(shape, view, propertyGroup) {
+      var prop = view.sh;
+
+      function interfaceFunction(val) {
+        if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
+          return interfaceFunction.path;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        path: {
+          get: function get() {
+            if (prop.k) {
+              prop.getValue();
+            }
+
+            return prop;
+          }
+        },
+        shape: {
+          get: function get() {
+            if (prop.k) {
+              prop.getValue();
+            }
+
+            return prop;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
+      });
+      return interfaceFunction;
+    };
+  }();
+
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
+
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
+        }
+      }
+
+      return arr;
+    }
+
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
+
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
+          // Not necessary for now. Keeping them here in case a new case appears
+          // case 'ADBE Vector Transform Group':
+          // case 3:
+
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
+    }
+
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        type: {
+          get: function get() {
+            return 'a';
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
+    }
+
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
+      }
+
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      }
+
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
+          }
+
+          return _sourceText;
+        }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
   }
-};
 
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
 
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
 
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-SVGShapeElement.prototype.identityMatrix = new Matrix();
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
 
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
+  function NoValueEffect() {
+    this.p = {};
+  }
 
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
     for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
       }
     }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
+        i += 1;
+      }
+
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
     }
-  }
-};
+  };
 
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
 
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
 
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
   }
 
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
   }
 
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
 
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
     } else {
-      itemsData[i] = prevViewData[processedPos - 1];
+      this._currentTime = num / this.data.sr;
     }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
       }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
+    var i;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
         }
       }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
         }
       }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
         }
       }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
       }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
       }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
+        rect = null;
       }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
       } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
-      ownModifiers.push(modifier);
     }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
 
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
 
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
       }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
     }
   }
-};
 
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
+      });
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
+      }
+
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
+        }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
     }
   }
-};
 
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
 
-/* global createNS */
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
 
-function SVGTintFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  feColorMatrix.setAttribute('result', 'f2');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-  if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
     var feMerge = createNS('feMerge');
     filter.appendChild(feMerge);
     var feMergeNode;
     feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'SourceGraphic');
     feMerge.appendChild(feMergeNode);
     feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'f2');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
     feMerge.appendChild(feMergeNode);
   }
-}
 
-SVGTintFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var colorBlack = this.filterManager.effectElements[0].p.v;
-    var colorWhite = this.filterManager.effectElements[1].p.v;
-    var opacity = this.filterManager.effectElements[2].p.v / 100;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGFillFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-}
-SVGFillFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color = this.filterManager.effectElements[2].p.v;
-    var opacity = this.filterManager.effectElements[6].p.v;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGGaussianBlurEffect(filter, filterManager) {
-  // Outset the filter region by 100% on all sides to accommodate blur expansion.
-  filter.setAttribute('x', '-100%');
-  filter.setAttribute('y', '-100%');
-  filter.setAttribute('width', '300%');
-  filter.setAttribute('height', '300%');
-
-  this.filterManager = filterManager;
-  var feGaussianBlur = createNS('feGaussianBlur');
-  filter.appendChild(feGaussianBlur);
-  this.feGaussianBlur = feGaussianBlur;
-}
-
-SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    // Empirical value, matching AE's blur appearance.
-    var kBlurrinessToSigma = 0.3;
-    var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
-
-    // Dimensions mapping:
-    //
-    //   1 -> horizontal & vertical
-    //   2 -> horizontal only
-    //   3 -> vertical only
-    //
-    var dimensions = this.filterManager.effectElements[1].p.v;
-    var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq
-    var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq
-
-    this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);
-
-    // Repeat edges mapping:
-    //
-    //   0 -> off -> duplicate
-    //   1 -> on  -> wrap
-    var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
-    this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
-  }
-};
-
-/* global createNS, createElementID, locationHref, bmFloor */
-
-function SVGStrokeEffect(elem, filterManager) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.elem = elem;
-  this.paths = [];
-}
-
-SVGStrokeEffect.prototype.initialize = function () {
-  var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-  var path;
-  var groupPath;
-  var i;
-  var len;
-  if (this.filterManager.effectElements[1].p.v === 1) {
-    len = this.elem.maskManager.masksProperties.length;
-    i = 0;
-  } else {
-    i = this.filterManager.effectElements[0].p.v - 1;
-    len = i + 1;
-  }
-  groupPath = createNS('g');
-  groupPath.setAttribute('fill', 'none');
-  groupPath.setAttribute('stroke-linecap', 'round');
-  groupPath.setAttribute('stroke-dashoffset', 1);
-  for (i; i < len; i += 1) {
-    path = createNS('path');
-    groupPath.appendChild(path);
-    this.paths.push({ p: path, m: i });
-  }
-  if (this.filterManager.effectElements[10].p.v === 3) {
-    var mask = createNS('mask');
-    var id = createElementID();
-    mask.setAttribute('id', id);
-    mask.setAttribute('mask-type', 'alpha');
-    mask.appendChild(groupPath);
-    this.elem.globalData.defs.appendChild(mask);
-    var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-    while (elemChildren[0]) {
-      g.appendChild(elemChildren[0]);
-    }
-    this.elem.layerElement.appendChild(g);
-    this.masker = mask;
-    groupPath.setAttribute('stroke', '#fff');
-  } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (this.filterManager.effectElements[10].p.v === 2) {
-      elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-      while (elemChildren.length) {
-        this.elem.layerElement.removeChild(elemChildren[0]);
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
       }
-    }
-    this.elem.layerElement.appendChild(groupPath);
-    this.elem.layerElement.removeAttribute('mask');
-    groupPath.setAttribute('stroke', '#fff');
-  }
-  this.initialized = true;
-  this.pathMasker = groupPath;
-};
 
-SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
-  if (!this.initialized) {
-    this.initialize();
-  }
-  var i;
-  var len = this.paths.length;
-  var mask;
-  var path;
-  for (i = 0; i < len; i += 1) {
-    if (this.paths[i].m !== -1) {
-      mask = this.elem.maskManager.viewData[this.paths[i].m];
-      path = this.paths[i].p;
-      if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
-        path.setAttribute('d', mask.lastPath);
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
       }
-      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) {
-        var dasharrayValue;
-        if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
-          var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var l = path.getTotalLength();
-          dasharrayValue = '0 0 0 ' + l * s + ' ';
-          var lineLength = l * (e - s);
-          var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-          var units = Math.floor(lineLength / segment);
-          var j;
-          for (j = 0; j < units; j += 1) {
-            dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
-          }
-          dasharrayValue += '0 ' + l * 10 + ' 0 0';
-        } else {
-          dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-        }
-        path.setAttribute('stroke-dasharray', dasharrayValue);
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
       }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
     }
-  }
-  if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-    this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
   }
 
-  if (forceRender || this.filterManager.effectElements[6].p._mdf) {
-    this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
-  }
-  if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (forceRender || this.filterManager.effectElements[3].p._mdf) {
-      var color = this.filterManager.effectElements[3].p.v;
-      this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
-    }
-  }
-};
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
 
-/* global createNS */
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
 
-function SVGTritoneFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  var feComponentTransfer = createNS('feComponentTransfer');
-  feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-  filter.appendChild(feComponentTransfer);
-  this.matrixFilter = feComponentTransfer;
-  var feFuncR = createNS('feFuncR');
-  feFuncR.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncR);
-  this.feFuncR = feFuncR;
-  var feFuncG = createNS('feFuncG');
-  feFuncG.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncG);
-  this.feFuncG = feFuncG;
-  var feFuncB = createNS('feFuncB');
-  feFuncB.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncB);
-  this.feFuncB = feFuncB;
-}
-
-SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color1 = this.filterManager.effectElements[0].p.v;
-    var color2 = this.filterManager.effectElements[1].p.v;
-    var color3 = this.filterManager.effectElements[2].p.v;
-    var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
-    var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
-    var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
-    this.feFuncR.setAttribute('tableValues', tableR);
-    this.feFuncG.setAttribute('tableValues', tableG);
-    this.feFuncB.setAttribute('tableValues', tableB);
-    // var opacity = this.filterManager.effectElements[2].p.v/100;
-    // 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');
-  }
-};
-
-/* global createNS */
-
-function SVGProLevelsFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var effectElements = this.filterManager.effectElements;
-  var feComponentTransfer = createNS('feComponentTransfer');
-
-  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) {
-    this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
-  }
-  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) {
-    this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
-  }
-  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) {
-    this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-  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) {
-    this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
-  }
-
-  if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    feComponentTransfer = createNS('feComponentTransfer');
-  }
-
-  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) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
-    this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
-    this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-}
-
-SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
-  var feFunc = createNS(type);
-  feFunc.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFunc);
-  return feFunc;
-};
-
-SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
-  var cnt = 0;
-  var segments = 256;
-  var perc;
-  var min = Math.min(inputBlack, inputWhite);
-  var max = Math.max(inputBlack, inputWhite);
-  var table = Array.call(null, { length: segments });
-  var colorValue;
-  var pos = 0;
-  var outputDelta = outputWhite - outputBlack;
-  var inputDelta = inputWhite - inputBlack;
-  while (cnt <= 256) {
-    perc = cnt / 256;
-    if (perc <= min) {
-      colorValue = inputDelta < 0 ? outputWhite : outputBlack;
-    } else if (perc >= max) {
-      colorValue = inputDelta < 0 ? outputBlack : outputWhite;
-    } else {
-      colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
-    }
-    table[pos] = colorValue;
-    pos += 1;
-    cnt += 256 / (segments - 1);
-  }
-  return table.join(' ');
-};
-
-SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var val;
-    var effectElements = this.filterManager.effectElements;
-    if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
-      val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
-      this.feFuncRComposed.setAttribute('tableValues', val);
-      this.feFuncGComposed.setAttribute('tableValues', val);
-      this.feFuncBComposed.setAttribute('tableValues', val);
+      i += 1;
     }
 
-    if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
-      val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
-      this.feFuncR.setAttribute('tableValues', val);
-    }
+    return null;
+  };
 
-    if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
-      val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
-      this.feFuncG.setAttribute('tableValues', val);
-    }
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
 
-    if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
-      val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
-      this.feFuncB.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
-      val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
-      this.feFuncA.setAttribute('tableValues', val);
-    }
-  }
-};
-
-/* global createNS, rgbToHex, degToRads */
-
-function SVGDropShadowEffect(filter, filterManager) {
-  var filterSize = filterManager.container.globalData.renderConfig.filterSize;
-  filter.setAttribute('x', filterSize.x);
-  filter.setAttribute('y', filterSize.y);
-  filter.setAttribute('width', filterSize.width);
-  filter.setAttribute('height', filterSize.height);
-  this.filterManager = filterManager;
-
-  var feGaussianBlur = createNS('feGaussianBlur');
-  feGaussianBlur.setAttribute('in', 'SourceAlpha');
-  feGaussianBlur.setAttribute('result', 'drop_shadow_1');
-  feGaussianBlur.setAttribute('stdDeviation', '0');
-  this.feGaussianBlur = feGaussianBlur;
-  filter.appendChild(feGaussianBlur);
-
-  var feOffset = createNS('feOffset');
-  feOffset.setAttribute('dx', '25');
-  feOffset.setAttribute('dy', '0');
-  feOffset.setAttribute('in', 'drop_shadow_1');
-  feOffset.setAttribute('result', 'drop_shadow_2');
-  this.feOffset = feOffset;
-  filter.appendChild(feOffset);
-  var feFlood = createNS('feFlood');
-  feFlood.setAttribute('flood-color', '#00ff00');
-  feFlood.setAttribute('flood-opacity', '1');
-  feFlood.setAttribute('result', 'drop_shadow_3');
-  this.feFlood = feFlood;
-  filter.appendChild(feFlood);
-
-  var feComposite = createNS('feComposite');
-  feComposite.setAttribute('in', 'drop_shadow_3');
-  feComposite.setAttribute('in2', 'drop_shadow_2');
-  feComposite.setAttribute('operator', 'in');
-  feComposite.setAttribute('result', 'drop_shadow_4');
-  filter.appendChild(feComposite);
-
-  var feMerge = createNS('feMerge');
-  filter.appendChild(feMerge);
-  var feMergeNode;
-  feMergeNode = createNS('feMergeNode');
-  feMerge.appendChild(feMergeNode);
-  feMergeNode = createNS('feMergeNode');
-  feMergeNode.setAttribute('in', 'SourceGraphic');
-  this.feMergeNode = feMergeNode;
-  this.feMerge = feMerge;
-  this.originalNodeAdded = false;
-  feMerge.appendChild(feMergeNode);
-}
-
-SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-      this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
-    }
-    if (forceRender || this.filterManager.effectElements[0].p._mdf) {
-      var col = this.filterManager.effectElements[0].p.v;
-      this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
-    }
-    if (forceRender || this.filterManager.effectElements[1].p._mdf) {
-      this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
-    }
-    if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
-      var distance = this.filterManager.effectElements[3].p.v;
-      var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
-      var x = distance * Math.cos(angle);
-      var y = distance * Math.sin(angle);
-      this.feOffset.setAttribute('dx', x);
-      this.feOffset.setAttribute('dy', y);
-    }
-    /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
-            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
-                this.feMerge.removeChild(this.feMergeNode);
-                this.originalNodeAdded = false;
-            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
-                this.feMerge.appendChild(this.feMergeNode);
-                this.originalNodeAdded = true;
-            }
-        } */
-  }
-};
-
-/* global createElementID, createNS */
-
-var _svgMatteSymbols = [];
-
-function SVGMatte3Effect(filterElem, filterManager, elem) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.filterElem = filterElem;
-  this.elem = elem;
-  elem.matteElement = createNS('g');
-  elem.matteElement.appendChild(elem.layerElement);
-  elem.matteElement.appendChild(elem.transformedElement);
-  elem.baseElement = elem.matteElement;
-}
-
-SVGMatte3Effect.prototype.findSymbol = function (mask) {
-  var i = 0;
-  var len = _svgMatteSymbols.length;
-  while (i < len) {
-    if (_svgMatteSymbols[i] === mask) {
-      return _svgMatteSymbols[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
-  var parentNode = mask.layerElement.parentNode;
-  if (!parentNode) {
-    return;
-  }
-  var children = parentNode.children;
-  var i = 0;
-  var len = children.length;
-  while (i < len) {
-    if (children[i] === mask.layerElement) {
-      break;
-    }
-    i += 1;
-  }
-  var nextChild;
-  if (i <= len - 2) {
-    nextChild = children[i + 1];
-  }
-  var useElem = createNS('use');
-  useElem.setAttribute('href', '#' + symbolId);
-  if (nextChild) {
-    parentNode.insertBefore(useElem, nextChild);
-  } else {
-    parentNode.appendChild(useElem);
-  }
-};
-
-SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
-  if (!this.findSymbol(mask)) {
-    var symbolId = createElementID();
-    var masker = createNS('mask');
-    masker.setAttribute('id', mask.layerId);
-    masker.setAttribute('mask-type', 'alpha');
-    _svgMatteSymbols.push(mask);
-    var defs = elem.globalData.defs;
-    defs.appendChild(masker);
-    var symbol = createNS('symbol');
-    symbol.setAttribute('id', symbolId);
-    this.replaceInParent(mask, symbolId);
-    symbol.appendChild(mask.layerElement);
-    defs.appendChild(symbol);
-    var useElem = createNS('use');
-    useElem.setAttribute('href', '#' + symbolId);
-    masker.appendChild(useElem);
-    mask.data.hd = false;
-    mask.show();
-  }
-  elem.setMatte(mask.layerId);
-};
-
-SVGMatte3Effect.prototype.initialize = function () {
-  var ind = this.filterManager.effectElements[0].p.v;
-  var elements = this.elem.comp.elements;
-  var i = 0;
-  var len = elements.length;
-  while (i < len) {
-    if (elements[i] && elements[i].data.ind === ind) {
-      this.setElementAsMask(this.elem, elements[i]);
-    }
-    i += 1;
-  }
-  this.initialized = true;
-};
-
-SVGMatte3Effect.prototype.renderFrame = function () {
-  if (!this.initialized) {
-    this.initialize();
-  }
-};
-
-/* exported SVGEffects */
-
-function SVGEffects() {}
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, createNS, styleDiv, CVEffects, MaskElement, SVGBaseElement, HybridRenderer */
-
-function HBaseElement() {}
-HBaseElement.prototype = {
-  checkBlendMode: function () {},
-  initRendererElement: function () {
-    this.baseElement = createTag(this.data.tg || 'div');
-    if (this.data.hasMask) {
-      this.svgElement = createNS('svg');
-      this.layerElement = createNS('g');
-      this.maskedElement = this.layerElement;
-      this.svgElement.appendChild(this.layerElement);
-      this.baseElement.appendChild(this.svgElement);
-    } else {
-      this.layerElement = this.baseElement;
-    }
-    styleDiv(this.baseElement);
-  },
-  createContainerElements: function () {
-    this.renderableEffectsManager = new CVEffects(this);
-    this.transformedElement = this.baseElement;
-    this.maskedElement = this.layerElement;
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
-    if (this.finalTransform._matMdf) {
-      var matrixValue = this.finalTransform.mat.toCSS();
-      transformedElementStyle.transform = matrixValue;
-      transformedElementStyle.webkitTransform = matrixValue;
-    }
-    if (this.finalTransform._opMdf) {
-      transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
-    }
-  },
-  renderFrame: function () {
-    // If it is exported as hidden (data.hd === true) no need to render
-    // If it is not visible no need to render
-    if (this.data.hd || this.hidden) {
+    if (!parentNode) {
       return;
     }
-    this.renderTransform();
-    this.renderRenderable();
-    this.renderElement();
-    this.renderInnerContent();
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
     }
-  },
-  destroy: function () {
-    this.layerElement = null;
-    this.transformedElement = null;
-    if (this.matteElement) {
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
       this.matteElement = null;
-    }
-    if (this.maskManager) {
       this.maskManager.destroy();
-      this.maskManager = null;
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
     }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-  },
-  addEffects: function () {
-  },
-  setMatte: function () {},
-};
-HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
-HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
-HBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;
+  };
 
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, createNS, createTag */
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
 
-function HSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
 
-HSolidElement.prototype.createContent = function () {
-  var rect;
-  if (this.data.hasMask) {
-    rect = createNS('rect');
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
+        i += 1;
+      }
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
+  };
+
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
+  };
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
+
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
+
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
+  }
+
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
+    this.elem = elem;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
+    if (this.kf) {
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
+    } else {
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
+    }
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
+  };
+
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
+  }
+
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
+  }
+
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
+
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
+
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
+
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
+      case 1:
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
+        break;
+
+      case 2:
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
+        break;
+
+      default:
+        break;
+    }
+
+    matrixHelper.translate(xPos, yPos, 0);
+  };
+
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
     rect.setAttribute('width', this.data.sw);
     rect.setAttribute('height', this.data.sh);
     rect.setAttribute('fill', this.data.sc);
-    this.svgElement.setAttribute('width', this.data.sw);
-    this.svgElement.setAttribute('height', this.data.sh);
-  } else {
-    rect = createTag('div');
-    rect.style.width = this.data.sw + 'px';
-    rect.style.height = this.data.sh + 'px';
-    rect.style.backgroundColor = this.data.sc;
-  }
-  this.layerElement.appendChild(rect);
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, HybridRenderer, ICompElement, HBaseElement */
-
-function HCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = !data.hasMask;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);
-HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
-
-HCompElement.prototype.createContainerElements = function () {
-  this._createBaseContainerElements();
-  // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
-  if (this.data.hasMask) {
-    this.svgElement.setAttribute('width', this.data.w);
-    this.svgElement.setAttribute('height', this.data.h);
-    this.transformedElement = this.baseElement;
-  } else {
-    this.transformedElement = this.layerElement;
-  }
-};
-
-HCompElement.prototype.addTo3dContainer = function (elem, pos) {
-  var j = 0;
-  var nextElement;
-  while (j < pos) {
-    if (this.elements[j] && this.elements[j].getBaseElement) {
-      nextElement = this.elements[j].getBaseElement();
-    }
-    j += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(elem, nextElement);
-  } else {
-    this.layerElement.appendChild(elem);
-  }
-};
-
-/* global createNS, extendPrototype, BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement,
-HierarchyElement, FrameElement, RenderableElement, createNS, bmMin, bmSqrt, bmMin, bmMax, bmPow */
-
-function HShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.shapesContainer = createNS('g');
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  this.currentBBox = {
-    x: 999999,
-    y: -999999,
-    h: 0,
-    w: 0,
+    this.layerElement.appendChild(rect);
   };
-}
-extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
-HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
 
-HShapeElement.prototype.createContent = function () {
-  var cont;
-  this.baseElement.style.fontSize = 0;
-  if (this.data.hasMask) {
-    this.layerElement.appendChild(this.shapesContainer);
-    cont = this.svgElement;
-  } else {
-    cont = createNS('svg');
-    var size = this.comp.data ? this.comp.data : this.globalData.compSize;
-    cont.setAttribute('width', size.w);
-    cont.setAttribute('height', size.h);
-    cont.appendChild(this.shapesContainer);
-    this.layerElement.appendChild(cont);
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
   }
 
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
-  this.filterUniqueShapes();
-  this.shapeCont = cont;
-};
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
 
-HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
-  var i;
-  var len = transformers.length;
-  for (i = 0; i < len; i += 1) {
-    point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
-  }
-  return point;
-};
+  NullElement.prototype.renderFrame = function () {};
 
-HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
-  var shape = item.sh.v;
-  var transformers = item.transformers;
-  var i;
-  var len = shape._length;
-  var vPoint;
-  var oPoint;
-  var nextIPoint;
-  var nextVPoint;
-  if (len <= 1) {
-    return;
-  }
-  for (i = 0; i < len - 1; i += 1) {
-    vPoint = this.getTransformedPoint(transformers, shape.v[i]);
-    oPoint = this.getTransformedPoint(transformers, shape.o[i]);
-    nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
-    nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
-    this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
-  }
-  if (shape.c) {
-    vPoint = this.getTransformedPoint(transformers, shape.v[i]);
-    oPoint = this.getTransformedPoint(transformers, shape.o[i]);
-    nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
-    nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
-    this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
-  }
-};
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
 
-HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
-  this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
-  var bounds = this.shapeBoundingBox;
-  boundingBox.x = bmMin(bounds.left, boundingBox.x);
-  boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
-  boundingBox.y = bmMin(bounds.top, boundingBox.y);
-  boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
-};
+  NullElement.prototype.destroy = function () {};
 
-HShapeElement.prototype.shapeBoundingBox = {
-  left: 0,
-  right: 0,
-  top: 0,
-  bottom: 0,
-};
+  NullElement.prototype.sourceRectAtTime = function () {};
 
-HShapeElement.prototype.tempBoundingBox = {
-  x: 0,
-  xMax: 0,
-  y: 0,
-  yMax: 0,
-  width: 0,
-  height: 0,
-};
+  NullElement.prototype.hide = function () {};
 
-HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
-  var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
 
-  for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) { // eslint-disable-line no-plusplus
-    b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
-    a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
-    c = 3 * p1[i] - 3 * p0[i];
+  function SVGRendererBase() {}
 
-    b |= 0; // eslint-disable-line no-bitwise
-    a |= 0; // eslint-disable-line no-bitwise
-    c |= 0; // eslint-disable-line no-bitwise
+  extendPrototype([BaseRenderer], SVGRendererBase);
 
-    if (a === 0 && b === 0) {
-      //
-    } else if (a === 0) {
-      t = -c / b;
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
 
-      if (t > 0 && t < 1) {
-        bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
-      }
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
     } else {
-      b2ac = b * b - 4 * c * a;
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
 
-      if (b2ac >= 0) {
-        t1 = (-b + bmSqrt(b2ac)) / (2 * a);
-        if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
-        t2 = (-b - bmSqrt(b2ac)) / (2 * a);
-        if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
       }
     }
-  }
 
-  this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
-  this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
-  this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
-  this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
-};
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
 
-HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
-  return bmPow(1 - t, 3) * p0[i]
-        + 3 * bmPow(1 - t, 2) * t * p1[i]
-        + 3 * (1 - t) * bmPow(t, 2) * p2[i]
-        + bmPow(t, 3) * p3[i];
-};
+  SVGRendererBase.prototype.updateContainerSize = function () {};
 
-HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
-  var i;
-  var len = itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    if (itemsData[i] && itemsData[i].sh) {
-      this.calculateShapeBoundingBox(itemsData[i], boundingBox);
-    } else if (itemsData[i] && itemsData[i].it) {
-      this.calculateBoundingBox(itemsData[i].it, boundingBox);
-    }
-  }
-};
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
 
-HShapeElement.prototype.currentBoxContains = function (box) {
-  return this.currentBBox.x <= box.x
-    && this.currentBBox.y <= box.y
-    && this.currentBBox.width + this.currentBBox.x >= box.x + box.width
-    && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
-};
-
-HShapeElement.prototype.renderInnerContent = function () {
-  this._renderShapeFrame();
-
-  if (!this.hidden && (this._isFirstFrame || this._mdf)) {
-    var tempBoundingBox = this.tempBoundingBox;
-    var max = 999999;
-    tempBoundingBox.x = max;
-    tempBoundingBox.xMax = -max;
-    tempBoundingBox.y = max;
-    tempBoundingBox.yMax = -max;
-    this.calculateBoundingBox(this.itemsData, tempBoundingBox);
-    tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
-    tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y;
-    // var tempBoundingBox = this.shapeCont.getBBox();
-    if (this.currentBoxContains(tempBoundingBox)) {
+    if (elements[pos] || this.layers[pos].ty === 99) {
       return;
     }
-    var changed = false;
-    if (this.currentBBox.w !== tempBoundingBox.width) {
-      this.currentBBox.w = tempBoundingBox.width;
-      this.shapeCont.setAttribute('width', tempBoundingBox.width);
-      changed = true;
-    }
-    if (this.currentBBox.h !== tempBoundingBox.height) {
-      this.currentBBox.h = tempBoundingBox.height;
-      this.shapeCont.setAttribute('height', tempBoundingBox.height);
-      changed = true;
-    }
-    if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
-      this.currentBBox.w = tempBoundingBox.width;
-      this.currentBBox.h = tempBoundingBox.height;
-      this.currentBBox.x = tempBoundingBox.x;
-      this.currentBBox.y = tempBoundingBox.y;
 
-      this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
-      var shapeStyle = this.shapeCont.style;
-      var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
-      shapeStyle.transform = shapeTransform;
-      shapeStyle.webkitTransform = shapeTransform;
-    }
-  }
-};
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
 
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createTag, styleDiv, createNS, lineJoinEnum, lineCapEnum */
-
-function HTextElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.textPaths = [];
-  this.currentBBox = {
-    x: 999999,
-    y: -999999,
-    h: 0,
-    w: 0,
-  };
-  this.renderType = 'svg';
-  this.isMasked = false;
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
-
-HTextElement.prototype.createContent = function () {
-  this.isMasked = this.checkMasks();
-  if (this.isMasked) {
-    this.renderType = 'svg';
-    this.compW = this.comp.data.w;
-    this.compH = this.comp.data.h;
-    this.svgElement.setAttribute('width', this.compW);
-    this.svgElement.setAttribute('height', this.compH);
-    var g = createNS('g');
-    this.maskedElement.appendChild(g);
-    this.innerElem = g;
-  } else {
-    this.renderType = 'html';
-    this.innerElem = this.layerElement;
-  }
-
-  this.checkParenting();
-};
-
-HTextElement.prototype.buildNewText = function () {
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
-  var innerElemStyle = this.innerElem.style;
-  var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
-  innerElemStyle.fill = textColor;
-  innerElemStyle.color = textColor;
-  if (documentData.sc) {
-    innerElemStyle.stroke = this.buildColor(documentData.sc);
-    innerElemStyle.strokeWidth = documentData.sw + 'px';
-  }
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (!this.globalData.fontManager.chars) {
-    innerElemStyle.fontSize = documentData.finalSize + 'px';
-    innerElemStyle.lineHeight = documentData.finalSize + 'px';
-    if (fontData.fClass) {
-      this.innerElem.className = fontData.fClass;
-    } else {
-      innerElemStyle.fontFamily = fontData.fFamily;
-      var fWeight = documentData.fWeight;
-      var fStyle = documentData.fStyle;
-      innerElemStyle.fontStyle = fStyle;
-      innerElemStyle.fontWeight = fWeight;
-    }
-  }
-  var i;
-  var len;
-
-  var letters = documentData.l;
-  len = letters.length;
-  var tSpan;
-  var tParent;
-  var tCont;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var cnt = 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.globalData.fontManager.chars) {
-      if (!this.textPaths[cnt]) {
-        tSpan = createNS('path');
-        tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
-        tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
-        tSpan.setAttribute('stroke-miterlimit', '4');
-      } else {
-        tSpan = this.textPaths[cnt];
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
       }
-      if (!this.isMasked) {
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function HBaseElement() {}
+
+  HBaseElement.prototype = {
+    checkBlendMode: function checkBlendMode() {},
+    initRendererElement: function initRendererElement() {
+      this.baseElement = createTag(this.data.tg || 'div');
+
+      if (this.data.hasMask) {
+        this.svgElement = createNS('svg');
+        this.layerElement = createNS('g');
+        this.maskedElement = this.layerElement;
+        this.svgElement.appendChild(this.layerElement);
+        this.baseElement.appendChild(this.svgElement);
+      } else {
+        this.layerElement = this.baseElement;
+      }
+
+      styleDiv(this.baseElement);
+    },
+    createContainerElements: function createContainerElements() {
+      this.renderableEffectsManager = new CVEffects(this);
+      this.transformedElement = this.baseElement;
+      this.maskedElement = this.layerElement;
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
+
+      if (this.finalTransform._matMdf) {
+        var matrixValue = this.finalTransform.mat.toCSS();
+        transformedElementStyle.transform = matrixValue;
+        transformedElementStyle.webkitTransform = matrixValue;
+      }
+
+      if (this.finalTransform._opMdf) {
+        transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
+      }
+    },
+    renderFrame: function renderFrame() {
+      // If it is exported as hidden (data.hd === true) no need to render
+      // If it is not visible no need to render
+      if (this.data.hd || this.hidden) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.renderElement();
+      this.renderInnerContent();
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.layerElement = null;
+      this.transformedElement = null;
+
+      if (this.matteElement) {
+        this.matteElement = null;
+      }
+
+      if (this.maskManager) {
+        this.maskManager.destroy();
+        this.maskManager = null;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+    },
+    addEffects: function addEffects() {},
+    setMatte: function setMatte() {}
+  };
+  HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
+  HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
+  HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;
+
+  function HSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
+
+  HSolidElement.prototype.createContent = function () {
+    var rect;
+
+    if (this.data.hasMask) {
+      rect = createNS('rect');
+      rect.setAttribute('width', this.data.sw);
+      rect.setAttribute('height', this.data.sh);
+      rect.setAttribute('fill', this.data.sc);
+      this.svgElement.setAttribute('width', this.data.sw);
+      this.svgElement.setAttribute('height', this.data.sh);
+    } else {
+      rect = createTag('div');
+      rect.style.width = this.data.sw + 'px';
+      rect.style.height = this.data.sh + 'px';
+      rect.style.backgroundColor = this.data.sc;
+    }
+
+    this.layerElement.appendChild(rect);
+  };
+
+  function HShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.shapesContainer = createNS('g');
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
+  HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
+
+  HShapeElement.prototype.createContent = function () {
+    var cont;
+    this.baseElement.style.fontSize = 0;
+
+    if (this.data.hasMask) {
+      this.layerElement.appendChild(this.shapesContainer);
+      cont = this.svgElement;
+    } else {
+      cont = createNS('svg');
+      var size = this.comp.data ? this.comp.data : this.globalData.compSize;
+      cont.setAttribute('width', size.w);
+      cont.setAttribute('height', size.h);
+      cont.appendChild(this.shapesContainer);
+      this.layerElement.appendChild(cont);
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
+    this.filterUniqueShapes();
+    this.shapeCont = cont;
+  };
+
+  HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
+    var i;
+    var len = transformers.length;
+
+    for (i = 0; i < len; i += 1) {
+      point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
+    }
+
+    return point;
+  };
+
+  HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
+    var shape = item.sh.v;
+    var transformers = item.transformers;
+    var i;
+    var len = shape._length;
+    var vPoint;
+    var oPoint;
+    var nextIPoint;
+    var nextVPoint;
+
+    if (len <= 1) {
+      return;
+    }
+
+    for (i = 0; i < len - 1; i += 1) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+
+    if (shape.c) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+  };
+
+  HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
+    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
+    var bounds = this.shapeBoundingBox;
+    boundingBox.x = bmMin(bounds.left, boundingBox.x);
+    boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
+    boundingBox.y = bmMin(bounds.top, boundingBox.y);
+    boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
+  };
+
+  HShapeElement.prototype.shapeBoundingBox = {
+    left: 0,
+    right: 0,
+    top: 0,
+    bottom: 0
+  };
+  HShapeElement.prototype.tempBoundingBox = {
+    x: 0,
+    xMax: 0,
+    y: 0,
+    yMax: 0,
+    width: 0,
+    height: 0
+  };
+
+  HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
+    var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
+
+    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {
+      // eslint-disable-line no-plusplus
+      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
+      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
+      c = 3 * p1[i] - 3 * p0[i];
+      b |= 0; // eslint-disable-line no-bitwise
+
+      a |= 0; // eslint-disable-line no-bitwise
+
+      c |= 0; // eslint-disable-line no-bitwise
+
+      if (a === 0 && b === 0) {//
+      } else if (a === 0) {
+        t = -c / b;
+
+        if (t > 0 && t < 1) {
+          bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
+        }
+      } else {
+        b2ac = b * b - 4 * c * a;
+
+        if (b2ac >= 0) {
+          t1 = (-b + bmSqrt(b2ac)) / (2 * a);
+          if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
+          t2 = (-b - bmSqrt(b2ac)) / (2 * a);
+          if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
+        }
+      }
+    }
+
+    this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
+    this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
+    this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
+    this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
+  };
+
+  HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
+    return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];
+  };
+
+  HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
+    var i;
+    var len = itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (itemsData[i] && itemsData[i].sh) {
+        this.calculateShapeBoundingBox(itemsData[i], boundingBox);
+      } else if (itemsData[i] && itemsData[i].it) {
+        this.calculateBoundingBox(itemsData[i].it, boundingBox);
+      }
+    }
+  };
+
+  HShapeElement.prototype.currentBoxContains = function (box) {
+    return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
+  };
+
+  HShapeElement.prototype.renderInnerContent = function () {
+    this._renderShapeFrame();
+
+    if (!this.hidden && (this._isFirstFrame || this._mdf)) {
+      var tempBoundingBox = this.tempBoundingBox;
+      var max = 999999;
+      tempBoundingBox.x = max;
+      tempBoundingBox.xMax = -max;
+      tempBoundingBox.y = max;
+      tempBoundingBox.yMax = -max;
+      this.calculateBoundingBox(this.itemsData, tempBoundingBox);
+      tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
+      tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();
+
+      if (this.currentBoxContains(tempBoundingBox)) {
+        return;
+      }
+
+      var changed = false;
+
+      if (this.currentBBox.w !== tempBoundingBox.width) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.shapeCont.setAttribute('width', tempBoundingBox.width);
+        changed = true;
+      }
+
+      if (this.currentBBox.h !== tempBoundingBox.height) {
+        this.currentBBox.h = tempBoundingBox.height;
+        this.shapeCont.setAttribute('height', tempBoundingBox.height);
+        changed = true;
+      }
+
+      if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.currentBBox.h = tempBoundingBox.height;
+        this.currentBBox.x = tempBoundingBox.x;
+        this.currentBBox.y = tempBoundingBox.y;
+        this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        var shapeStyle = this.shapeCont.style;
+        var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        shapeStyle.transform = shapeTransform;
+        shapeStyle.webkitTransform = shapeTransform;
+      }
+    }
+  };
+
+  function HTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.textPaths = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+    this.renderType = 'svg';
+    this.isMasked = false;
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
+
+  HTextElement.prototype.createContent = function () {
+    this.isMasked = this.checkMasks();
+
+    if (this.isMasked) {
+      this.renderType = 'svg';
+      this.compW = this.comp.data.w;
+      this.compH = this.comp.data.h;
+      this.svgElement.setAttribute('width', this.compW);
+      this.svgElement.setAttribute('height', this.compH);
+      var g = createNS('g');
+      this.maskedElement.appendChild(g);
+      this.innerElem = g;
+    } else {
+      this.renderType = 'html';
+      this.innerElem = this.layerElement;
+    }
+
+    this.checkParenting();
+  };
+
+  HTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var innerElemStyle = this.innerElem.style;
+    var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
+    innerElemStyle.fill = textColor;
+    innerElemStyle.color = textColor;
+
+    if (documentData.sc) {
+      innerElemStyle.stroke = this.buildColor(documentData.sc);
+      innerElemStyle.strokeWidth = documentData.sw + 'px';
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (!this.globalData.fontManager.chars) {
+      innerElemStyle.fontSize = documentData.finalSize + 'px';
+      innerElemStyle.lineHeight = documentData.finalSize + 'px';
+
+      if (fontData.fClass) {
+        this.innerElem.className = fontData.fClass;
+      } else {
+        innerElemStyle.fontFamily = fontData.fFamily;
+        var fWeight = documentData.fWeight;
+        var fStyle = documentData.fStyle;
+        innerElemStyle.fontStyle = fStyle;
+        innerElemStyle.fontWeight = fWeight;
+      }
+    }
+
+    var i;
+    var len;
+    var letters = documentData.l;
+    len = letters.length;
+    var tSpan;
+    var tParent;
+    var tCont;
+    var matrixHelper = this.mHelper;
+    var shapes;
+    var shapeStr = '';
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.globalData.fontManager.chars) {
+        if (!this.textPaths[cnt]) {
+          tSpan = createNS('path');
+          tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
+          tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
+          tSpan.setAttribute('stroke-miterlimit', '4');
+        } else {
+          tSpan = this.textPaths[cnt];
+        }
+
+        if (!this.isMasked) {
+          if (this.textSpans[cnt]) {
+            tParent = this.textSpans[cnt];
+            tCont = tParent.children[0];
+          } else {
+            tParent = createTag('div');
+            tParent.style.lineHeight = 0;
+            tCont = createNS('svg');
+            tCont.appendChild(tSpan);
+            styleDiv(tParent);
+          }
+        }
+      } else if (!this.isMasked) {
         if (this.textSpans[cnt]) {
           tParent = this.textSpans[cnt];
-          tCont = tParent.children[0];
+          tSpan = this.textPaths[cnt];
         } else {
-          tParent = createTag('div');
-          tParent.style.lineHeight = 0;
-          tCont = createNS('svg');
-          tCont.appendChild(tSpan);
+          tParent = createTag('span');
           styleDiv(tParent);
+          tSpan = createTag('span');
+          styleDiv(tSpan);
+          tParent.appendChild(tSpan);
         }
-      }
-    } else if (!this.isMasked) {
-      if (this.textSpans[cnt]) {
-        tParent = this.textSpans[cnt];
-        tSpan = this.textPaths[cnt];
       } else {
-        tParent = createTag('span');
-        styleDiv(tParent);
-        tSpan = createTag('span');
-        styleDiv(tSpan);
-        tParent.appendChild(tSpan);
-      }
-    } else {
-      tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
-    }
-    // tSpan.setAttribute('visibility', 'hidden');
-    if (this.globalData.fontManager.chars) {
-      var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-      var shapeData;
-      if (charData) {
-        shapeData = charData.data;
-      } else {
-        shapeData = null;
-      }
-      matrixHelper.reset();
-      if (shapeData && shapeData.shapes) {
-        shapes = shapeData.shapes[0].it;
-        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-        shapeStr = this.createPathShape(matrixHelper, shapes);
-        tSpan.setAttribute('d', shapeStr);
-      }
-      if (!this.isMasked) {
-        this.innerElem.appendChild(tParent);
-        if (shapeData && shapeData.shapes) {
-          // document.body.appendChild is needed to get exact measure of shape
-          document.body.appendChild(tCont);
-          var boundingBox = tCont.getBBox();
-          tCont.setAttribute('width', boundingBox.width + 2);
-          tCont.setAttribute('height', boundingBox.height + 2);
-          tCont.setAttribute('viewBox', (boundingBox.x - 1) + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
-          var tContStyle = tCont.style;
-          var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
-          tContStyle.transform = tContTranslation;
-          tContStyle.webkitTransform = tContTranslation;
+        tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
+      } // tSpan.setAttribute('visibility', 'hidden');
 
-          letters[i].yOffset = boundingBox.y - 1;
+
+      if (this.globalData.fontManager.chars) {
+        var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+        var shapeData;
+
+        if (charData) {
+          shapeData = charData.data;
         } else {
-          tCont.setAttribute('width', 1);
-          tCont.setAttribute('height', 1);
+          shapeData = null;
         }
-        tParent.appendChild(tCont);
-      } else {
-        this.innerElem.appendChild(tSpan);
-      }
-    } else {
-      tSpan.textContent = letters[i].val;
-      tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      if (!this.isMasked) {
-        this.innerElem.appendChild(tParent);
-        //
-        var tStyle = tSpan.style;
-        var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
-        tStyle.transform = tSpanTranslation;
-        tStyle.webkitTransform = tSpanTranslation;
-      } else {
-        this.innerElem.appendChild(tSpan);
-      }
-    }
-    //
-    if (!this.isMasked) {
-      this.textSpans[cnt] = tParent;
-    } else {
-      this.textSpans[cnt] = tSpan;
-    }
-    this.textSpans[cnt].style.display = 'block';
-    this.textPaths[cnt] = tSpan;
-    cnt += 1;
-  }
-  while (cnt < this.textSpans.length) {
-    this.textSpans[cnt].style.display = 'none';
-    cnt += 1;
-  }
-};
 
-HTextElement.prototype.renderInnerContent = function () {
-  var svgStyle;
-  if (this.data.singleShape) {
-    if (!this._isFirstFrame && !this.lettersChangedFlag) {
-      return;
-    } if (this.isMasked && this.finalTransform._matMdf) {
-      // Todo Benchmark if using this is better than getBBox
-      this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
-      svgStyle = this.svgElement.style;
-      var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
-      svgStyle.transform = translation;
-      svgStyle.webkitTransform = translation;
-    }
-  }
+        matrixHelper.reset();
 
-  this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-  if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
-    return;
-  }
-  var i;
-  var len;
-  var count = 0;
-  var renderedLetters = this.textAnimator.renderedLetters;
+        if (shapeData && shapeData.shapes && shapeData.shapes.length) {
+          shapes = shapeData.shapes[0].it;
+          matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+          shapeStr = this.createPathShape(matrixHelper, shapes);
+          tSpan.setAttribute('d', shapeStr);
+        }
 
-  var letters = this.textProperty.currentData.l;
-
-  len = letters.length;
-  var renderedLetter;
-  var textSpan;
-  var textPath;
-  for (i = 0; i < len; i += 1) {
-    if (letters[i].n) {
-      count += 1;
-    } else {
-      textSpan = this.textSpans[i];
-      textPath = this.textPaths[i];
-      renderedLetter = renderedLetters[count];
-      count += 1;
-      if (renderedLetter._mdf.m) {
         if (!this.isMasked) {
-          textSpan.style.webkitTransform = renderedLetter.m;
-          textSpan.style.transform = renderedLetter.m;
+          this.innerElem.appendChild(tParent);
+
+          if (shapeData && shapeData.shapes) {
+            // document.body.appendChild is needed to get exact measure of shape
+            document.body.appendChild(tCont);
+            var boundingBox = tCont.getBBox();
+            tCont.setAttribute('width', boundingBox.width + 2);
+            tCont.setAttribute('height', boundingBox.height + 2);
+            tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
+            var tContStyle = tCont.style;
+            var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
+            tContStyle.transform = tContTranslation;
+            tContStyle.webkitTransform = tContTranslation;
+            letters[i].yOffset = boundingBox.y - 1;
+          } else {
+            tCont.setAttribute('width', 1);
+            tCont.setAttribute('height', 1);
+          }
+
+          tParent.appendChild(tCont);
         } else {
-          textSpan.setAttribute('transform', renderedLetter.m);
+          this.innerElem.appendChild(tSpan);
+        }
+      } else {
+        tSpan.textContent = letters[i].val;
+        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent); //
+
+          var tStyle = tSpan.style;
+          var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
+          tStyle.transform = tSpanTranslation;
+          tStyle.webkitTransform = tSpanTranslation;
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } //
+
+
+      if (!this.isMasked) {
+        this.textSpans[cnt] = tParent;
+      } else {
+        this.textSpans[cnt] = tSpan;
+      }
+
+      this.textSpans[cnt].style.display = 'block';
+      this.textPaths[cnt] = tSpan;
+      cnt += 1;
+    }
+
+    while (cnt < this.textSpans.length) {
+      this.textSpans[cnt].style.display = 'none';
+      cnt += 1;
+    }
+  };
+
+  HTextElement.prototype.renderInnerContent = function () {
+    var svgStyle;
+
+    if (this.data.singleShape) {
+      if (!this._isFirstFrame && !this.lettersChangedFlag) {
+        return;
+      }
+
+      if (this.isMasked && this.finalTransform._matMdf) {
+        // Todo Benchmark if using this is better than getBBox
+        this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
+        svgStyle = this.svgElement.style;
+        var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
+        svgStyle.transform = translation;
+        svgStyle.webkitTransform = translation;
+      }
+    }
+
+    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+    if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
+      return;
+    }
+
+    var i;
+    var len;
+    var count = 0;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var textSpan;
+    var textPath;
+
+    for (i = 0; i < len; i += 1) {
+      if (letters[i].n) {
+        count += 1;
+      } else {
+        textSpan = this.textSpans[i];
+        textPath = this.textPaths[i];
+        renderedLetter = renderedLetters[count];
+        count += 1;
+
+        if (renderedLetter._mdf.m) {
+          if (!this.isMasked) {
+            textSpan.style.webkitTransform = renderedLetter.m;
+            textSpan.style.transform = renderedLetter.m;
+          } else {
+            textSpan.setAttribute('transform', renderedLetter.m);
+          }
+        } /// /textSpan.setAttribute('opacity',renderedLetter.o);
+
+
+        textSpan.style.opacity = renderedLetter.o;
+
+        if (renderedLetter.sw && renderedLetter._mdf.sw) {
+          textPath.setAttribute('stroke-width', renderedLetter.sw);
+        }
+
+        if (renderedLetter.sc && renderedLetter._mdf.sc) {
+          textPath.setAttribute('stroke', renderedLetter.sc);
+        }
+
+        if (renderedLetter.fc && renderedLetter._mdf.fc) {
+          textPath.setAttribute('fill', renderedLetter.fc);
+          textPath.style.color = renderedLetter.fc;
         }
       }
-      /// /textSpan.setAttribute('opacity',renderedLetter.o);
-      textSpan.style.opacity = renderedLetter.o;
-      if (renderedLetter.sw && renderedLetter._mdf.sw) {
-        textPath.setAttribute('stroke-width', renderedLetter.sw);
+    }
+
+    if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
+      var boundingBox = this.innerElem.getBBox();
+
+      if (this.currentBBox.w !== boundingBox.width) {
+        this.currentBBox.w = boundingBox.width;
+        this.svgElement.setAttribute('width', boundingBox.width);
       }
-      if (renderedLetter.sc && renderedLetter._mdf.sc) {
-        textPath.setAttribute('stroke', renderedLetter.sc);
+
+      if (this.currentBBox.h !== boundingBox.height) {
+        this.currentBBox.h = boundingBox.height;
+        this.svgElement.setAttribute('height', boundingBox.height);
       }
-      if (renderedLetter.fc && renderedLetter._mdf.fc) {
-        textPath.setAttribute('fill', renderedLetter.fc);
-        textPath.style.color = renderedLetter.fc;
+
+      var margin = 1;
+
+      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) {
+        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;
+        this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        svgStyle = this.svgElement.style;
+        var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        svgStyle.transform = svgTransform;
+        svgStyle.webkitTransform = svgTransform;
       }
     }
-  }
-
-  if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
-    var boundingBox = this.innerElem.getBBox();
-
-    if (this.currentBBox.w !== boundingBox.width) {
-      this.currentBBox.w = boundingBox.width;
-      this.svgElement.setAttribute('width', boundingBox.width);
-    }
-    if (this.currentBBox.h !== boundingBox.height) {
-      this.currentBBox.h = boundingBox.height;
-      this.svgElement.setAttribute('height', boundingBox.height);
-    }
-
-    var margin = 1;
-    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)) {
-      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;
-
-      this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
-      svgStyle = this.svgElement.style;
-      var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
-      svgStyle.transform = svgTransform;
-      svgStyle.webkitTransform = svgTransform;
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement,
-FrameElement, RenderableElement, createNS */
-
-function HImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
-
-HImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  var img = new Image();
-
-  if (this.data.hasMask) {
-    this.imageElem = createNS('image');
-    this.imageElem.setAttribute('width', this.assetData.w + 'px');
-    this.imageElem.setAttribute('height', this.assetData.h + 'px');
-    this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-    this.layerElement.appendChild(this.imageElem);
-    this.baseElement.setAttribute('width', this.assetData.w);
-    this.baseElement.setAttribute('height', this.assetData.h);
-  } else {
-    this.layerElement.appendChild(img);
-  }
-  img.crossOrigin = 'anonymous';
-  img.src = assetPath;
-  if (this.data.ln) {
-    this.baseElement.setAttribute('id', this.data.ln);
-  }
-};
-
-/* global PropertyFactory, degToRads, Matrix, extendPrototype, BaseElement, FrameElement, HierarchyElement */
-
-function HCameraElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initHierarchy();
-  var getProp = PropertyFactory.getProp;
-  this.pe = getProp(this, data.pe, 0, 0, this);
-  if (data.ks.p.s) {
-    this.px = getProp(this, data.ks.p.x, 1, 0, this);
-    this.py = getProp(this, data.ks.p.y, 1, 0, this);
-    this.pz = getProp(this, data.ks.p.z, 1, 0, this);
-  } else {
-    this.p = getProp(this, data.ks.p, 1, 0, this);
-  }
-  if (data.ks.a) {
-    this.a = getProp(this, data.ks.a, 1, 0, this);
-  }
-  if (data.ks.or.k.length && data.ks.or.k[0].to) {
-    var i;
-    var len = data.ks.or.k.length;
-    for (i = 0; i < len; i += 1) {
-      data.ks.or.k[i].to = null;
-      data.ks.or.k[i].ti = null;
-    }
-  }
-  this.or = getProp(this, data.ks.or, 1, degToRads, this);
-  this.or.sh = true;
-  this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
-  this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
-  this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
-  this.mat = new Matrix();
-  this._prevMat = new Matrix();
-  this._isFirstFrame = true;
-
-  // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
-  this.finalTransform = {
-    mProp: this,
   };
-}
-extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
 
-HCameraElement.prototype.setup = function () {
-  var i;
-  var len = this.comp.threeDElements.length;
-  var comp;
-  var perspectiveStyle;
-  var containerStyle;
-  for (i = 0; i < len; i += 1) {
-    // [perspectiveElem,container]
-    comp = this.comp.threeDElements[i];
-    if (comp.type === '3d') {
-      perspectiveStyle = comp.perspectiveElem.style;
-      containerStyle = comp.container.style;
-      var perspective = this.pe.v + 'px';
-      var origin = '0px 0px 0px';
-      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-      perspectiveStyle.perspective = perspective;
-      perspectiveStyle.webkitPerspective = perspective;
-      containerStyle.transformOrigin = origin;
-      containerStyle.mozTransformOrigin = origin;
-      containerStyle.webkitTransformOrigin = origin;
-      perspectiveStyle.transform = matrix;
-      perspectiveStyle.webkitTransform = matrix;
+  function HCameraElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initHierarchy();
+    var getProp = PropertyFactory.getProp;
+    this.pe = getProp(this, data.pe, 0, 0, this);
+
+    if (data.ks.p.s) {
+      this.px = getProp(this, data.ks.p.x, 1, 0, this);
+      this.py = getProp(this, data.ks.p.y, 1, 0, this);
+      this.pz = getProp(this, data.ks.p.z, 1, 0, this);
+    } else {
+      this.p = getProp(this, data.ks.p, 1, 0, this);
     }
+
+    if (data.ks.a) {
+      this.a = getProp(this, data.ks.a, 1, 0, this);
+    }
+
+    if (data.ks.or.k.length && data.ks.or.k[0].to) {
+      var i;
+      var len = data.ks.or.k.length;
+
+      for (i = 0; i < len; i += 1) {
+        data.ks.or.k[i].to = null;
+        data.ks.or.k[i].ti = null;
+      }
+    }
+
+    this.or = getProp(this, data.ks.or, 1, degToRads, this);
+    this.or.sh = true;
+    this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
+    this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
+    this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
+    this.mat = new Matrix();
+    this._prevMat = new Matrix();
+    this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
+
+    this.finalTransform = {
+      mProp: this
+    };
   }
-};
 
-HCameraElement.prototype.createElements = function () {
-};
+  extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
 
-HCameraElement.prototype.hide = function () {
-};
+  HCameraElement.prototype.setup = function () {
+    var i;
+    var len = this.comp.threeDElements.length;
+    var comp;
+    var perspectiveStyle;
+    var containerStyle;
 
-HCameraElement.prototype.renderFrame = function () {
-  var _mdf = this._isFirstFrame;
-  var i;
-  var len;
-  if (this.hierarchy) {
-    len = this.hierarchy.length;
     for (i = 0; i < len; i += 1) {
-      _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
+      // [perspectiveElem,container]
+      comp = this.comp.threeDElements[i];
+
+      if (comp.type === '3d') {
+        perspectiveStyle = comp.perspectiveElem.style;
+        containerStyle = comp.container.style;
+        var perspective = this.pe.v + 'px';
+        var origin = '0px 0px 0px';
+        var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+        perspectiveStyle.perspective = perspective;
+        perspectiveStyle.webkitPerspective = perspective;
+        containerStyle.transformOrigin = origin;
+        containerStyle.mozTransformOrigin = origin;
+        containerStyle.webkitTransformOrigin = origin;
+        perspectiveStyle.transform = matrix;
+        perspectiveStyle.webkitTransform = matrix;
+      }
     }
-  }
-  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)) {
-    this.mat.reset();
+  };
+
+  HCameraElement.prototype.createElements = function () {};
+
+  HCameraElement.prototype.hide = function () {};
+
+  HCameraElement.prototype.renderFrame = function () {
+    var _mdf = this._isFirstFrame;
+    var i;
+    var len;
 
     if (this.hierarchy) {
-      len = this.hierarchy.length - 1;
-      for (i = len; i >= 0; i -= 1) {
-        var mTransf = this.hierarchy[i].finalTransform.mProp;
-        this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
-        this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
-        this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
-        this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
-        this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
-      }
-    }
-    if (this.p) {
-      this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
-    } else {
-      this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
-    }
-    if (this.a) {
-      var diffVector;
-      if (this.p) {
-        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]];
-      } else {
-        diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
-      }
-      var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2));
-      // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
-      var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
-      var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
-      var mRotationX = (Math.atan2(lookDir[1], lookLengthOnXZ));
-      var mRotationY = (Math.atan2(lookDir[0], -lookDir[2]));
-      this.mat.rotateY(mRotationY).rotateX(-mRotationX);
-    }
-    this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
-    this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
-    this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
-    this.mat.translate(0, 0, this.pe.v);
+      len = this.hierarchy.length;
 
-    var hasMatrixChanged = !this._prevMat.equals(this.mat);
-    if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
-      len = this.comp.threeDElements.length;
-      var comp;
-      var perspectiveStyle;
-      var containerStyle;
       for (i = 0; i < len; i += 1) {
-        comp = this.comp.threeDElements[i];
-        if (comp.type === '3d') {
-          if (hasMatrixChanged) {
-            var matValue = this.mat.toCSS();
-            containerStyle = comp.container.style;
-            containerStyle.transform = matValue;
-            containerStyle.webkitTransform = matValue;
-          }
-          if (this.pe._mdf) {
-            perspectiveStyle = comp.perspectiveElem.style;
-            perspectiveStyle.perspective = this.pe.v + 'px';
-            perspectiveStyle.webkitPerspective = this.pe.v + 'px';
-          }
+        _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
+      }
+    }
+
+    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) {
+      this.mat.reset();
+
+      if (this.hierarchy) {
+        len = this.hierarchy.length - 1;
+
+        for (i = len; i >= 0; i -= 1) {
+          var mTransf = this.hierarchy[i].finalTransform.mProp;
+          this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
+          this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
+          this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
+          this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
+          this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
         }
       }
-      this.mat.clone(this._prevMat);
-    }
-  }
-  this._isFirstFrame = false;
-};
 
-HCameraElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-HCameraElement.prototype.destroy = function () {
-};
-HCameraElement.prototype.getBaseElement = function () { return null; };
-
-function HEffects() {
-}
-HEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
-
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
-    if (expressionsPlugin) {
-      expressionsPlugin.initExpressions(this);
-    }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
-    }
-  }
-};
-
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
-
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
-
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
-    }
-  }
-};
-
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
-
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
-
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
-
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
-    }
-  }
-  return null;
-};
-
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
-
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
+      if (this.p) {
+        this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
       } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
+        this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
       }
-    }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
 
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
-      }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
-      if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
-      }
-    } else {
-      this.setCurrentRawFrameValue(nextValue);
-    }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
+      if (this.a) {
+        var diffVector;
+
+        if (this.p) {
+          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]];
         } else {
-          this.trigger('loopComplete');
+          diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
         }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
+
+        var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
+
+        var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
+        var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
+        var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);
+        var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);
+        this.mat.rotateY(mRotationY).rotateX(-mRotationX);
+      }
+
+      this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
+      this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
+      this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
+      this.mat.translate(0, 0, this.pe.v);
+      var hasMatrixChanged = !this._prevMat.equals(this.mat);
+
+      if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
+        len = this.comp.threeDElements.length;
+        var comp;
+        var perspectiveStyle;
+        var containerStyle;
+
+        for (i = 0; i < len; i += 1) {
+          comp = this.comp.threeDElements[i];
+
+          if (comp.type === '3d') {
+            if (hasMatrixChanged) {
+              var matValue = this.mat.toCSS();
+              containerStyle = comp.container.style;
+              containerStyle.transform = matValue;
+              containerStyle.webkitTransform = matValue;
+            }
+
+            if (this.pe._mdf) {
+              perspectiveStyle = comp.perspectiveElem.style;
+              perspectiveStyle.perspective = this.pe.v + 'px';
+              perspectiveStyle.webkitPerspective = this.pe.v + 'px';
+            }
+          }
+        }
+
+        this.mat.clone(this._prevMat);
       }
     }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
 
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
-      }
-    }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
-      }
-    }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
-    }
-  }
-
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
-
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
-
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* exported EffectsManager */
-
-function EffectsManager() {
-  this.effectElements = [];
-}
-
-
-var lottie = {};
-
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
-    }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
-
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
-
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
-
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
-
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
-
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
-
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
-    }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+    this._isFirstFrame = false;
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
 
-return lottie;
-}));
\ No newline at end of file
+  HCameraElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  HCameraElement.prototype.destroy = function () {};
+
+  HCameraElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  function HImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
+
+  HImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    var img = new Image();
+
+    if (this.data.hasMask) {
+      this.imageElem = createNS('image');
+      this.imageElem.setAttribute('width', this.assetData.w + 'px');
+      this.imageElem.setAttribute('height', this.assetData.h + 'px');
+      this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+      this.layerElement.appendChild(this.imageElem);
+      this.baseElement.setAttribute('width', this.assetData.w);
+      this.baseElement.setAttribute('height', this.assetData.h);
+    } else {
+      this.layerElement.appendChild(img);
+    }
+
+    img.crossOrigin = 'anonymous';
+    img.src = assetPath;
+
+    if (this.data.ln) {
+      this.baseElement.setAttribute('id', this.data.ln);
+    }
+  };
+
+  function HybridRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([BaseRenderer], HybridRendererBase);
+  HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;
+
+  HybridRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  HybridRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newDOMElement = element.getBaseElement();
+
+    if (!newDOMElement) {
+      return;
+    }
+
+    var layer = this.layers[pos];
+
+    if (!layer.ddd || !this.supports3d) {
+      if (this.threeDElements) {
+        this.addTo3dContainer(newDOMElement, pos);
+      } else {
+        var i = 0;
+        var nextDOMElement;
+        var nextLayer;
+        var tmpDOMElement;
+
+        while (i < pos) {
+          if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
+            nextLayer = this.elements[i];
+            tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+            nextDOMElement = tmpDOMElement || nextDOMElement;
+          }
+
+          i += 1;
+        }
+
+        if (nextDOMElement) {
+          if (!layer.ddd || !this.supports3d) {
+            this.layerElement.insertBefore(newDOMElement, nextDOMElement);
+          }
+        } else if (!layer.ddd || !this.supports3d) {
+          this.layerElement.appendChild(newDOMElement);
+        }
+      }
+    } else {
+      this.addTo3dContainer(newDOMElement, pos);
+    }
+  };
+
+  HybridRendererBase.prototype.createShape = function (data) {
+    if (!this.supports3d) {
+      return new SVGShapeElement(data, this.globalData, this);
+    }
+
+    return new HShapeElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createText = function (data) {
+    if (!this.supports3d) {
+      return new SVGTextLottieElement(data, this.globalData, this);
+    }
+
+    return new HTextElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createCamera = function (data) {
+    this.camera = new HCameraElement(data, this.globalData, this);
+    return this.camera;
+  };
+
+  HybridRendererBase.prototype.createImage = function (data) {
+    if (!this.supports3d) {
+      return new IImageElement(data, this.globalData, this);
+    }
+
+    return new HImageElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createSolid = function (data) {
+    if (!this.supports3d) {
+      return new ISolidElement(data, this.globalData, this);
+    }
+
+    return new HSolidElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
+        return this.threeDElements[i].perspectiveElem;
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {
+    var perspectiveElem = createTag('div');
+    var style;
+    var containerStyle;
+    styleDiv(perspectiveElem);
+    var container = createTag('div');
+    styleDiv(container);
+
+    if (type === '3d') {
+      style = perspectiveElem.style;
+      style.width = this.globalData.compSize.w + 'px';
+      style.height = this.globalData.compSize.h + 'px';
+      var center = '50% 50%';
+      style.webkitTransformOrigin = center;
+      style.mozTransformOrigin = center;
+      style.transformOrigin = center;
+      containerStyle = container.style;
+      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+      containerStyle.transform = matrix;
+      containerStyle.webkitTransform = matrix;
+    }
+
+    perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);
+
+    var threeDContainerData = {
+      container: container,
+      perspectiveElem: perspectiveElem,
+      startPos: pos,
+      endPos: pos,
+      type: type
+    };
+    this.threeDElements.push(threeDContainerData);
+    return threeDContainerData;
+  };
+
+  HybridRendererBase.prototype.build3dContainers = function () {
+    var i;
+    var len = this.layers.length;
+    var lastThreeDContainerData;
+    var currentContainer = '';
+
+    for (i = 0; i < len; i += 1) {
+      if (this.layers[i].ddd && this.layers[i].ty !== 3) {
+        if (currentContainer !== '3d') {
+          currentContainer = '3d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '3d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      } else {
+        if (currentContainer !== '2d') {
+          currentContainer = '2d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '2d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      }
+    }
+
+    len = this.threeDElements.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
+    }
+  };
+
+  HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (pos <= this.threeDElements[i].endPos) {
+        var j = this.threeDElements[i].startPos;
+        var nextElement;
+
+        while (j < pos) {
+          if (this.elements[j] && this.elements[j].getBaseElement) {
+            nextElement = this.elements[j].getBaseElement();
+          }
+
+          j += 1;
+        }
+
+        if (nextElement) {
+          this.threeDElements[i].container.insertBefore(elem, nextElement);
+        } else {
+          this.threeDElements[i].container.appendChild(elem);
+        }
+
+        break;
+      }
+
+      i += 1;
+    }
+  };
+
+  HybridRendererBase.prototype.configAnimation = function (animData) {
+    var resizerElem = createTag('div');
+    var wrapper = this.animationItem.wrapper;
+    var style = resizerElem.style;
+    style.width = animData.w + 'px';
+    style.height = animData.h + 'px';
+    this.resizerElem = resizerElem;
+    styleDiv(resizerElem);
+    style.transformStyle = 'flat';
+    style.mozTransformStyle = 'flat';
+    style.webkitTransformStyle = 'flat';
+
+    if (this.renderConfig.className) {
+      resizerElem.setAttribute('class', this.renderConfig.className);
+    }
+
+    wrapper.appendChild(resizerElem);
+    style.overflow = 'hidden';
+    var svg = createNS('svg');
+    svg.setAttribute('width', '1');
+    svg.setAttribute('height', '1');
+    styleDiv(svg);
+    this.resizerElem.appendChild(svg);
+    var defs = createNS('defs');
+    svg.appendChild(defs);
+    this.data = animData; // Mask animation
+
+    this.setupGlobalData(animData, svg);
+    this.globalData.defs = defs;
+    this.layers = animData.layers;
+    this.layerElement = this.resizerElem;
+    this.build3dContainers();
+    this.updateContainerSize();
+  };
+
+  HybridRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.animationItem.container = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      this.elements[i].destroy();
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  HybridRendererBase.prototype.updateContainerSize = function () {
+    var elementWidth = this.animationItem.wrapper.offsetWidth;
+    var elementHeight = this.animationItem.wrapper.offsetHeight;
+    var elementRel = elementWidth / elementHeight;
+    var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
+    var sx;
+    var sy;
+    var tx;
+    var ty;
+
+    if (animationRel > elementRel) {
+      sx = elementWidth / this.globalData.compSize.w;
+      sy = elementWidth / this.globalData.compSize.w;
+      tx = 0;
+      ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;
+    } else {
+      sx = elementHeight / this.globalData.compSize.h;
+      sy = elementHeight / this.globalData.compSize.h;
+      tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
+      ty = 0;
+    }
+
+    var style = this.resizerElem.style;
+    style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
+    style.transform = style.webkitTransform;
+  };
+
+  HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
+
+  HybridRendererBase.prototype.hide = function () {
+    this.resizerElem.style.display = 'none';
+  };
+
+  HybridRendererBase.prototype.show = function () {
+    this.resizerElem.style.display = 'block';
+  };
+
+  HybridRendererBase.prototype.initItems = function () {
+    this.buildAllItems();
+
+    if (this.camera) {
+      this.camera.setup();
+    } else {
+      var cWidth = this.globalData.compSize.w;
+      var cHeight = this.globalData.compSize.h;
+      var i;
+      var len = this.threeDElements.length;
+
+      for (i = 0; i < len; i += 1) {
+        var style = this.threeDElements[i].perspectiveElem.style;
+        style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
+        style.perspective = style.webkitPerspective;
+      }
+    }
+  };
+
+  HybridRendererBase.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+    var floatingContainer = createTag('div');
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  function HCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = !data.hasMask;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);
+  HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
+
+  HCompElement.prototype.createContainerElements = function () {
+    this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
+
+
+    if (this.data.hasMask) {
+      this.svgElement.setAttribute('width', this.data.w);
+      this.svgElement.setAttribute('height', this.data.h);
+      this.transformedElement = this.baseElement;
+    } else {
+      this.transformedElement = this.layerElement;
+    }
+  };
+
+  HCompElement.prototype.addTo3dContainer = function (elem, pos) {
+    var j = 0;
+    var nextElement;
+
+    while (j < pos) {
+      if (this.elements[j] && this.elements[j].getBaseElement) {
+        nextElement = this.elements[j].getBaseElement();
+      }
+
+      j += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(elem, nextElement);
+    } else {
+      this.layerElement.appendChild(elem);
+    }
+  };
+
+  HCompElement.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  function HybridRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([HybridRendererBase], HybridRenderer);
+
+  HybridRenderer.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  registerRenderer('html', HybridRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie_light_html.min.js b/build/player/lottie_light_html.min.js
index cf186b3..e44fd91 100644
--- a/build/player/lottie_light_html.min.js
+++ b/build/player/lottie_light_html.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var i,e="http://www.w3.org/2000/svg",x="",s=-999999,p=!1,a=!0,r="",n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_=Math.pow,k=Math.sqrt,f=Math.floor,d=Math.max,c=Math.min,h={};!function(){var t,e=["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"],s=e.length;for(t=0;t<s;t+=1)h[e[t]]=Math[e[t]]}(),h.random=Math.random,h.abs=function(t){if("object"===typeof t&&t.length){var e,s=F(t.length),i=t.length;for(e=0;e<i;e+=1)s[e]=Math.abs(t[e]);return s}return Math.abs(t)};var w=150,j=Math.PI/180,v=.5519;function o(t){t?Math.round:function(t){return t}}function A(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function l(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}function m(t,e){this.type=t,this.direction=e<0?-1:1}function u(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}function g(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}function y(t,e){this.type=t,this.target=e}function b(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function P(t){this.type="configError",this.nativeError=t}o(!1);var t,D=(t=0,function(){return r+"__lottie_element_"+(t+=1)});function C(t,e,s){var i,a,r,n,h,o,l,p;switch(o=s*(1-e),l=s*(1-(h=6*t-(n=Math.floor(6*t)))*e),p=s*(1-(1-h)*e),n%6){case 0:i=s,a=p,r=o;break;case 1:i=l,a=s,r=o;break;case 2:i=o,a=s,r=p;break;case 3:i=o,a=l,r=s;break;case 4:i=p,a=o,r=s;break;case 5:i=s,a=o,r=l}return[i,a,r]}function S(t,e,s){var i,a=Math.max(t,e,s),r=Math.min(t,e,s),n=a-r,h=0===a?0:n/a,o=a/255;switch(a){case r:i=0;break;case t:i=e-s+n*(e<s?6:0),i/=6*n;break;case e:i=s-t+2*n,i/=6*n;break;case s:i=t-e+4*n,i/=6*n}return[i,h,o]}function lt(t,e){var s=S(255*t[0],255*t[1],255*t[2]);return s[1]+=e,1<s[1]?s[1]=1:s[1]<=0&&(s[1]=0),C(s[0],s[1],s[2])}function pt(t,e){var s=S(255*t[0],255*t[1],255*t[2]);return s[2]+=e,1<s[2]?s[2]=1:s[2]<0&&(s[2]=0),C(s[0],s[1],s[2])}function ft(t,e){var s=S(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,1<s[0]?s[0]-=1:s[0]<0&&(s[0]+=1),C(s[0],s[1],s[2])}!function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1===e.length?"0"+e:e}();function E(){}E.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t],i=0;i<s.length;i+=1)s[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var W=function(){function s(t,e){var s,i=0,a=[];switch(t){case"int16":case"uint8c":s=1;break;default:s=1.1}for(i=0;i<e;i+=1)a.push(s);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):s(t,e)}:s}();function F(t){return Array.apply(null,{length:t})}function T(t){return document.createElementNS(e,t)}function M(t){return document.createElement(t)}function I(){}I.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var L,B=(L={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return L[t]||""}),z={1:"butt",2:"round",3:"square"},V={1:"miter",2:"round",3:"bevel"},R=function(){var a=Math.cos,r=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function s(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=a(t),s=r(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var s=a(e),i=r(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}function m(t,e,s){return s||0===s||(s=1),1===t&&1===e&&1===s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function d(t,e,s,i,a,r,n,h,o,l,p,f,m,d,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this.props[6]=n,this.props[7]=h,this.props[8]=o,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=d,this.props[14]=c,this.props[15]=u,this}function c(t,e,s){return s=s||0,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function u(t,e,s,i,a,r,n,h,o,l,p,f,m,d,c,u){var g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===a&&1===r&&0===n&&0===h&&0===o&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*m,g[13]=g[13]*r+g[15]*d,g[14]=g[14]*p+g[15]*c,g[15]*=u,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],_=g[3],k=g[4],x=g[5],w=g[6],A=g[7],P=g[8],D=g[9],C=g[10],S=g[11],E=g[12],T=g[13],M=g[14],F=g[15];return g[0]=y*t+v*a+b*o+_*m,g[1]=y*e+v*r+b*l+_*d,g[2]=y*s+v*n+b*p+_*c,g[3]=y*i+v*h+b*f+_*u,g[4]=k*t+x*a+w*o+A*m,g[5]=k*e+x*r+w*l+A*d,g[6]=k*s+x*n+w*p+A*c,g[7]=k*i+x*h+w*f+A*u,g[8]=P*t+D*a+C*o+S*m,g[9]=P*e+D*r+C*l+S*d,g[10]=P*s+D*n+C*p+S*c,g[11]=P*i+D*h+C*f+S*u,g[12]=E*t+T*a+M*o+F*m,g[13]=E*e+T*r+M*l+F*d,g[14]=E*s+T*n+M*p+F*c,g[15]=E*i+T*h+M*f+F*u,this._identityCalculated=!1,this}function g(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function y(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function _(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function k(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function x(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function w(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function A(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,s=-this.props[1]/t,i=-this.props[4]/t,a=this.props[0]/t,r=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,h=new R;return h.props[0]=e,h.props[1]=s,h.props[4]=i,h.props[5]=a,h.props[12]=r,h.props[13]=n,h}function P(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function D(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=P(t[e]);return i}function C(t,e,s){var i=W("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=s[0],i[5]=s[1];else{var a=this.props[0],r=this.props[1],n=this.props[4],h=this.props[5],o=this.props[12],l=this.props[13];i[0]=t[0]*a+t[1]*n+o,i[1]=t[0]*r+t[1]*h+l,i[2]=e[0]*a+e[1]*n+o,i[3]=e[0]*r+e[1]*h+l,i[4]=s[0]*a+s[1]*n+o,i[5]=s[0]*r+s[1]*h+l}return i}function S(t,e,s){return this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function E(t,e){if(this.isIdentity())return t+","+e;var s=this.props;return Math.round(100*(t*s[0]+e*s[4]+s[12]))/100+","+Math.round(100*(t*s[1]+e*s[5]+s[13]))/100}function T(){for(var t=0,e=this.props,s="matrix3d(";t<16;)s+=i(1e4*e[t])/1e4,s+=15===t?")":",",t+=1;return s}function M(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function F(){var t=this.props;return"matrix("+M(t[0])+","+M(t[1])+","+M(t[4])+","+M(t[5])+","+M(t[12])+","+M(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=s,this.rotateY=h,this.rotateZ=o,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=d,this.translate=c,this.transform=u,this.applyToPoint=_,this.applyToX=k,this.applyToY=x,this.applyToZ=w,this.applyToPointArray=S,this.applyToTriplePoints=C,this.applyToPointStringified=E,this.toCSS=T,this.to2dCSS=F,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=D,this.inversePoint=P,this.getInverseMatrix=A,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=W("float32",16),this.reset()}}();!function(h,o){var l,p=this,f=256,m=6,d="random",c=o.pow(f,m),u=o.pow(2,52),g=2*u,y=f-1;function v(t){var e,s=t.length,n=this,i=0,a=n.i=n.j=0,r=n.S=[];for(s||(t=[s++]);i<f;)r[i]=i++;for(i=0;i<f;i++)r[i]=r[a=y&a+t[i%s]+(e=r[i])],r[a]=e;n.g=function(t){for(var e,s=0,i=n.i,a=n.j,r=n.S;t--;)e=r[i=y&i+1],s=s*f+r[y&(r[i]=r[a=y&a+e])+(r[a]=e)];return n.i=i,n.j=a,s}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function _(t,e){for(var s,i=t+"",a=0;a<i.length;)e[y&a]=y&(s^=19*e[y&a])+i.charCodeAt(a++);return k(e)}function k(t){return String.fromCharCode.apply(0,t)}o["seed"+d]=function(t,e,s){var i=[],a=_(function t(e,s){var i,a=[],r=typeof e;if(s&&"object"==r)for(i in e)try{a.push(t(e[i],s-1))}catch(t){}return a.length?a:"string"==r?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,k(h)]:null===t?function(){try{if(l)return k(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),k(t)}catch(t){var e=p.navigator,s=e&&e.plugins;return[+new Date,p,s,p.screen,k(h)]}}():t,3),i),r=new v(i),n=function(){for(var t=r.g(m),e=c,s=0;t<u;)t=(t+s)*f,e*=f,s=r.g(1);for(;g<=t;)t/=2,e/=2,s>>>=1;return(t+s)/e};return n.int32=function(){return 0|r.g(4)},n.quick=function(){return r.g(4)/4294967296},n.double=n,_(k(r.S),h),(e.pass||s||function(t,e,s,i){return i&&(i.S&&b(i,r),t.state=function(){return b(r,{})}),s?(o[d]=t,e):t})(n,a,"global"in e?e.global:this==o,e.state)},_(o.random(),h)}([],h);var H=function(){var t={getBezierEasing:function(t,e,s,i,a){var r=a||("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p");if(h[r])return h[r];var n=new o([t,e,s,i]);return h[r]=n}},h={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function r(t){return 3*t}function f(t,e,s){return((i(e,s)*t+a(e,s))*t+r(e))*t}function m(t,e,s){return 3*i(e,s)*t*t+2*a(e,s)*t+r(e)}function o(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return o.prototype={get:function(t){var e=this._p[0],s=this._p[1],i=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===s&&i===a?t:0===t?0:1===t?1:f(this._getTForX(t),s,a)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&s===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<l;++s)this._mSampleValues[s]=f(s*p,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],i=this._mSampleValues,a=0,r=1,n=l-1;r!==n&&i[r]<=t;++r)a+=p;var h=a+(t-i[--r])/(i[r+1]-i[r])*p,o=m(h,e,s);return.001<=o?function(t,e,s,i){for(var a=0;a<4;++a){var r=m(e,s,i);if(0===r)return e;e-=(f(e,s,i)-t)/r}return e}(t,h,e,s):0===o?h:function(t,e,s,i,a){for(var r,n,h=0;0<(r=f(n=e+(s-e)/2,i,a)-t)?s=n:e=n,1e-7<Math.abs(r)&&++h<10;);return n}(t,a,a+p,e,s)}},t}();function N(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1)for(var r in i=t[s].prototype)Object.prototype.hasOwnProperty.call(i,r)&&(e.prototype[r]=i[r])}!function(){for(var a=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),s=Math.max(0,16-(e-a)),i=setTimeout(function(){t(e+s)},s);return a=e+s,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var mt=function(){var E=Math;function g(t,e,s,i,a,r){var n=t*i+e*a+s*r-a*i-r*t-s*e;return-.001<n&&n<.001}var p=function(t,e,s,i){var a,r,n,h,o,l,p=w,f=0,m=[],d=[],c=Lt.newElement();for(n=s.length,a=0;a<p;a+=1){for(o=a/(p-1),r=l=0;r<n;r+=1)h=_(1-o,3)*t[r]+3*_(1-o,2)*o*s[r]+3*(1-o)*_(o,2)*i[r]+_(o,3)*e[r],m[r]=h,null!==d[r]&&(l+=_(m[r]-d[r],2)),d[r]=m[r];l&&(f+=l=k(l)),c.percents[a]=o,c.lengths[a]=f}return c.addedLength=f,c};function y(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,s,i){var a=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+s[0]+"_"+s[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[a]){var r,n,h,o,l,p,f,m=w,d=0,c=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&g(t[0],t[1],e[0],e[1],t[0]+s[0],t[1]+s[1])&&g(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(m=2);var u=new y(m);for(h=s.length,r=0;r<m;r+=1){for(f=F(h),l=r/(m-1),n=p=0;n<h;n+=1)o=_(1-l,3)*t[n]+3*_(1-l,2)*l*(t[n]+s[n])+3*(1-l)*_(l,2)*(e[n]+i[n])+_(l,3)*e[n],f[n]=o,null!==c&&(p+=_(f[n]-c[n],2));d+=p=k(p),u.points[r]=new v(p,f),c=f}u.segmentLength=d,b[a]=u}return b[a]});function T(t,e){var s=e.percents,i=e.lengths,a=s.length,r=f((a-1)*t),n=t*e.addedLength,h=0;if(r===a-1||0===r||n===i[r])return s[r];for(var o=i[r]>n?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(h=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=o,r<0||a-1<=r){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*h}var M=W("float32",8);return{getSegmentsLength:function(t){var e,s=It.newElement(),i=t.c,a=t.v,r=t.o,n=t.i,h=t._length,o=s.lengths,l=0;for(e=0;e<h-1;e+=1)o[e]=p(a[e],a[e+1],r[e],n[e+1]),l+=o[e].addedLength;return i&&h&&(o[e]=p(a[e],a[0],r[e],n[0]),l+=o[e].addedLength),s.totalLength=l,s},getNewSegment:function(t,e,s,i,a,r,n){a<0?a=0:1<a&&(a=1);var h,o=T(a,n),l=T(r=1<r?1:r,n),p=t.length,f=1-o,m=1-l,d=f*f*f,c=o*f*f*3,u=o*o*f*3,g=o*o*o,y=f*f*m,v=o*f*m+f*o*m+f*f*l,b=o*o*m+f*o*l+o*f*l,_=o*o*l,k=f*m*m,x=o*m*m+f*l*m+f*m*l,w=o*l*m+f*l*l+o*m*l,A=o*l*l,P=m*m*m,D=l*m*m+m*l*m+m*m*l,C=l*l*m+m*l*l+l*m*l,S=l*l*l;for(h=0;h<p;h+=1)M[4*h]=E.round(1e3*(d*t[h]+c*s[h]+u*i[h]+g*e[h]))/1e3,M[4*h+1]=E.round(1e3*(y*t[h]+v*s[h]+b*i[h]+_*e[h]))/1e3,M[4*h+2]=E.round(1e3*(k*t[h]+x*s[h]+w*i[h]+A*e[h]))/1e3,M[4*h+3]=E.round(1e3*(P*t[h]+D*s[h]+C*i[h]+S*e[h]))/1e3;return M},getPointInSegment:function(t,e,s,i,a,r){var n=T(a,r),h=1-n;return[E.round(1e3*(h*h*h*t[0]+(n*h*h+h*n*h+h*h*n)*s[0]+(n*n*h+h*n*n+n*h*n)*i[0]+n*n*n*e[0]))/1e3,E.round(1e3*(h*h*h*t[1]+(n*h*h+h*n*h+h*h*n)*s[1]+(n*n*h+h*n*n+n*h*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:g,pointOnLine3D:function(t,e,s,i,a,r,n,h,o){if(0===s&&0===r&&0===o)return g(t,e,i,a,n,h);var l,p=E.sqrt(E.pow(i-t,2)+E.pow(a-e,2)+E.pow(r-s,2)),f=E.sqrt(E.pow(n-t,2)+E.pow(h-e,2)+E.pow(o-s,2)),m=E.sqrt(E.pow(n-i,2)+E.pow(h-a,2)+E.pow(o-r,2));return-1e-4<(l=f<p?m<p?p-f-m:m-f-p:f<m?m-f-p:f-p-m)&&l<1e-4}}}(),O=function(){var i,a,r=1,n=[],h={onmessage:function(){},postMessage:function(t){i({data:t})}},s={postMessage:function(t){h.onmessage({data:t})}};function o(){a||((a=function(t){if(window.Worker&&window.Blob&&p){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),s=URL.createObjectURL(e);return new Worker(s)}return i=t,h}(function(e){if(s.dataManager||(s.dataManager=function(){function f(t,e){var s,i,a,r,n,h,o,l=t.length;for(i=0;i<l;i+=1)if("ks"in(s=t[i])&&!s.completed){if(s.completed=!0,s.tt&&(t[i-1].td=s.tt),s.hasMask){var p=s.masksProperties;for(r=p.length,a=0;a<r;a+=1)if(p[a].pt.k.i)c(p[a].pt.k);else for(h=p[a].pt.k.length,n=0;n<h;n+=1)p[a].pt.k[n].s&&c(p[a].pt.k[n].s[0]),p[a].pt.k[n].e&&c(p[a].pt.k[n].e[0])}0===s.ty?(s.layers=m(s.refId,e),f(s.layers,e)):4===s.ty?d(s.shapes):5===s.ty&&(0!==(o=s).t.a.length||"m"in o.t.p||(o.singleShape=!0))}}function m(t,e){for(var s=0,i=e.length;s<i;){if(e[s].id===t)return e[s].layers.__used?JSON.parse(JSON.stringify(e[s].layers)):(e[s].layers.__used=!0,e[s].layers);s+=1}return null}function d(t){var e,s,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)c(t[e].ks.k);else for(i=t[e].ks.k.length,s=0;s<i;s+=1)t[e].ks.k[s].s&&c(t[e].ks.k[s].s[0]),t[e].ks.k[s].e&&c(t[e].ks.k[s].e[0]);else"gr"===t[e].ty&&d(t[e].it)}function c(t){var e,s=t.i.length;for(e=0;e<s;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function h(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}var o,e=function(){var i=[4,4,14];function a(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(s=t[e],i=s.t.d,s.t.d={k:[{s:i,t:0}]})}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),s=(o=[4,7,99],function(t){if(t.chars&&!h(o,t.v)){var e,s,i,a,r,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(r=t.chars[e].data.shapes[0].it).length,s=0;s<i;s+=1)(a=r[s].ks.k).__converted||(c(r[s].ks.k),a.__converted=!0)}}),i=function(){var i=[5,7,15];function a(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(s=t[e],i=void 0,"number"==typeof(i=s.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),a=function(){var i=[4,1,9];function r(t){var e,s,i,a=t.length;for(e=0;e<a;e+=1)if("gr"===t[e].ty)r(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,s=0;s<i;s+=1)t[e].c.k[s].s&&(t[e].c.k[s].s[0]/=255,t[e].c.k[s].s[1]/=255,t[e].c.k[s].s[2]/=255,t[e].c.k[s].s[3]/=255),t[e].c.k[s].e&&(t[e].c.k[s].e[0]/=255,t[e].c.k[s].e[1]/=255,t[e].c.k[s].e[2]/=255,t[e].c.k[s].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function a(t){var e,s=t.length;for(e=0;e<s;e+=1)4===t[e].ty&&r(t[e].shapes)}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}(),r=function(){var i=[4,4,18];function l(t){var e,s,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,s=0;s<i;s+=1)t[e].ks.k[s].s&&(t[e].ks.k[s].s[0].c=t[e].closed),t[e].ks.k[s].e&&(t[e].ks.k[s].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function a(t){var e,s,i,a,r,n,h=t.length;for(s=0;s<h;s+=1){if((e=t[s]).hasMask){var o=e.masksProperties;for(a=o.length,i=0;i<a;i+=1)if(o[i].pt.k.i)o[i].pt.k.c=o[i].cl;else for(n=o[i].pt.k.length,r=0;r<n;r+=1)o[i].pt.k[r].s&&(o[i].pt.k[r].s[0].c=o[i].cl),o[i].pt.k[r].e&&(o[i].pt.k[r].e[0].c=o[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(h(i,t.v)&&(a(t.layers),t.assets)){var e,s=t.assets.length;for(e=0;e<s;e+=1)t.assets[e].layers&&a(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(a(t),e(t),s(t),i(t),r(t),f(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=a,t.checkChars=s,t.checkPathProperties=i,t.checkShapes=r,t.completeLayers=f,t}()),s.assetLoader||(s.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,s,t,i){var a,r=new XMLHttpRequest;try{r.responseType="json"}catch(t){}r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)a=n(r),t(a);else try{a=n(r),t(a)}catch(t){i&&i(t)}};try{r.open("GET",e,!0)}catch(t){r.open("GET",s+"/"+e,!0)}r.send()}}}()),"loadAnimation"===e.data.type)s.assetLoader.load(e.data.path,e.data.fullPath,function(t){s.dataManager.completeData(t),s.postMessage({id:e.data.id,payload:t,status:"success"})},function(){s.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;s.dataManager.completeData(t),s.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&s.assetLoader.load(e.data.path,e.data.fullPath,function(t){s.postMessage({id:e.data.id,payload:t,status:"success"})},function(){s.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,s=e.id,i=n[s];n[s]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var s="processId_"+(r+=1);return n[s]={onComplete:t,onError:e},s}return{loadAnimation:function(t,e,s){o();var i=l(e,s);a.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,s){o();var i=l(e,s);a.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,s){o();var i=l(e,s);a.postMessage({type:"complete",animation:t,id:i})}}}();function q(t){for(var e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",a=e.length,r=0;r<a;r+=1)switch(e[r].toLowerCase()){case"italic":i="italic";break;case"bold":s="700";break;case"black":s="900";break;case"medium":s="500";break;case"regular":case"normal":s="400";break;case"light":case"thin":s="200"}return{style:i,weight:t.fWeight||s}}var X=function(){var r={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],s=[65039,8205];function m(t,e){var s=M("span");s.setAttribute("aria-hidden",!0),s.style.fontFamily=e;var i=M("span");i.innerText="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=function(t){var e,s=t.split(","),i=s.length,a=[];for(e=0;e<i;e+=1)"sans-serif"!==s[e]&&"monospace"!==s[e]&&a.push(s[e]);return a.join(",")}(t)+", "+e,{node:i,w:a,parent:s}}function d(t,e){var s=T("text");s.style.fontSize="100px";var i=q(e);return s.setAttribute("font-family",e.fFamily),s.setAttribute("font-style",i.style),s.setAttribute("font-weight",i.weight),s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.setAttribute("class",e.fClass)):s.style.fontFamily=e.fFamily,t.appendChild(s),M("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,s}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var s=t.toString(16)+e.toString(16);return-1!==i.indexOf(s)},t.isZeroWidthJoiner=function(t,e){return e?t===s[0]&&e===s[1]:t===s[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var s,i,a=t.length,r=this.chars.length;for(e=0;e<a;e+=1){for(s=0,i=!1;s<r;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(i=!0),s+=1;i||(this.chars.push(t[e]),r+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var s,i=t.list,a=i.length,r=a;for(s=0;s<a;s+=1){var n,h,o=!0;if(i[s].loaded=!1,i[s].monoCase=m(i[s].fFamily,"monospace"),i[s].sansCase=m(i[s].fFamily,"sans-serif"),i[s].fPath){if("p"===i[s].fOrigin||3===i[s].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[s].fFamily+'"], style[f-origin="3"][f-family="'+i[s].fFamily+'"]')).length&&(o=!1),o){var l=M("style");l.setAttribute("f-forigin",i[s].fOrigin),l.setAttribute("f-origin",i[s].origin),l.setAttribute("f-family",i[s].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[s].fFamily+"; font-style: normal; src: url('"+i[s].fPath+"');}",e.appendChild(l)}}else if("g"===i[s].fOrigin||1===i[s].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),h=0;h<n.length;h+=1)-1!==n[h].href.indexOf(i[s].fPath)&&(o=!1);if(o){var p=M("link");p.setAttribute("f-forigin",i[s].fOrigin),p.setAttribute("f-origin",i[s].origin),p.type="text/css",p.rel="stylesheet",p.href=i[s].fPath,document.body.appendChild(p)}}else if("t"===i[s].fOrigin||2===i[s].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),h=0;h<n.length;h+=1)i[s].fPath===n[h].src&&(o=!1);if(o){var f=M("link");f.setAttribute("f-forigin",i[s].fOrigin),f.setAttribute("f-origin",i[s].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[s].fPath),e.appendChild(f)}}}else i[s].loaded=!0,r-=1;i[s].helper=d(e,i[s]),i[s].cache={},this.fonts.push(i[s])}0===r?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,s){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,s)),r},getFontByName:function(t){for(var e=0,s=this.fonts.length;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,s){var i=this.getFontByName(e),a=t.charCodeAt(0);if(!i.cache[a+1]){var r=i.helper;if(" "===t){r.textContent="|"+t+"|";var n=r.getComputedTextLength();r.textContent="||";var h=r.getComputedTextLength();i.cache[a+1]=(n-h)/100}else r.textContent=t,i.cache[a+1]=r.getComputedTextLength()/100}return i.cache[a+1]*s},checkLoadedFonts:function(){var t,e,s,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,e.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,e.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),Y=function(){var f=s,a=Math.abs;function m(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=W("float32",this.pv.length));for(var a,r,n,h,o,l,p,f,m,d=e.lastIndex,c=d,u=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[c],r=this.keyframes[c+1],c===u-1&&t>=r.t-i){a.h&&(a=r),d=0;break}if(r.t-i>t){d=c;break}c<u-1?c+=1:(d=0,g=!1)}n=this.keyframesMetadata[c]||{};var y,v,b,_,k,x,w,A,P,D,C=r.t-i,S=a.t-i;if(a.to){n.bezierData||(n.bezierData=mt.buildBezierData(a.s,r.s||a.e,a.to,a.ti));var E=n.bezierData;if(C<=t||t<S){var T=C<=t?E.points.length-1:0;for(o=E.points[T].point.length,h=0;h<o;h+=1)s[h]=E.points[T].point[h]}else{n.__fnct?m=n.__fnct:(m=H.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,n.__fnct=m),l=m((t-S)/(C-S));var M,F=E.segmentLength*l,I=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastPoint:0,g=!0,p=E.points.length;g;){if(I+=E.points[f].partialLength,0===F||0===l||f===E.points.length-1){for(o=E.points[f].point.length,h=0;h<o;h+=1)s[h]=E.points[f].point[h];break}if(I<=F&&F<I+E.points[f+1].partialLength){for(M=(F-I)/E.points[f+1].partialLength,o=E.points[f].point.length,h=0;h<o;h+=1)s[h]=E.points[f].point[h]+(E.points[f+1].point[h]-E.points[f].point[h])*M;break}f<p-1?f+=1:g=!1}e._lastPoint=f,e._lastAddedLength=I-E.points[f].partialLength,e._lastKeyframeIndex=c}}else{var L,B,z,V,R;if(u=a.s.length,y=r.s||a.e,this.sh&&1!==a.h)if(C<=t)s[0]=y[0],s[1]=y[1],s[2]=y[2];else if(t<=S)s[0]=a.s[0],s[1]=a.s[1],s[2]=a.s[2];else{var N=q(a.s),O=q(y);v=s,b=function(t,e,s){var i,a,r,n,h,o=[],l=t[0],p=t[1],f=t[2],m=t[3],d=e[0],c=e[1],u=e[2],g=e[3];(a=l*d+p*c+f*u+m*g)<0&&(a=-a,d=-d,c=-c,u=-u,g=-g);h=1e-6<1-a?(i=Math.acos(a),r=Math.sin(i),n=Math.sin((1-s)*i)/r,Math.sin(s*i)/r):(n=1-s,s);return o[0]=n*l+h*d,o[1]=n*p+h*c,o[2]=n*f+h*u,o[3]=n*m+h*g,o}(N,O,(t-S)/(C-S)),_=b[0],k=b[1],x=b[2],w=b[3],A=Math.atan2(2*k*w-2*_*x,1-2*k*k-2*x*x),P=Math.asin(2*_*k+2*x*w),D=Math.atan2(2*_*w-2*k*x,1-2*_*_-2*x*x),v[0]=A/j,v[1]=P/j,v[2]=D/j}else for(c=0;c<u;c+=1)1!==a.h&&(l=C<=t?1:t<S?0:(a.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[c]?m=n.__fnct[c]:(L=void 0===a.o.x[c]?a.o.x[0]:a.o.x[c],B=void 0===a.o.y[c]?a.o.y[0]:a.o.y[c],z=void 0===a.i.x[c]?a.i.x[0]:a.i.x[c],V=void 0===a.i.y[c]?a.i.y[0]:a.i.y[c],m=H.getBezierEasing(L,B,z,V).get,n.__fnct[c]=m)):n.__fnct?m=n.__fnct:(L=a.o.x,B=a.o.y,z=a.i.x,V=a.i.y,m=H.getBezierEasing(L,B,z,V).get,a.keyframeMetadata=m),m((t-S)/(C-S)))),y=r.s||a.e,R=1===a.h?a.s[c]:a.s[c]+(y[c]-a.s[c])*l,"multidimensional"===this.propType?s[c]=R:s=R}return e.lastIndex=d,s}function q(t){var e=t[0]*j,s=t[1]*j,i=t[2]*j,a=Math.cos(e/2),r=Math.cos(s/2),n=Math.cos(i/2),h=Math.sin(e/2),o=Math.sin(s/2),l=Math.sin(i/2);return[h*o*n+a*r*l,h*r*n+a*o*l,a*o*n-h*r*l,a*r*n-h*o*l]}function d(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=s&&s<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function c(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<a(this.v-e)&&(this.v=e,this._mdf=!0);else for(var s=0,i=this.v.length;s<i;)e=t[s]*this.mult,1e-5<a(this.v[s]-e)&&(this.v[s]=e,this._mdf=!0),s+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)s=this.effectsSequence[t](s);this.setVValue(s),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function g(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,s,i){this.propType="unidimensional",this.mult=s||1,this.data=e,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=c,this.addEffect=g}function h(t,e,s,i){var a;this.propType="multidimensional",this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r=e.k.length;for(this.v=W("float32",r),this.pv=W("float32",r),this.vel=W("float32",r),a=0;a<r;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=c,this.addEffect=g}function o(t,e,s,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=c,this.interpolateValue=m,this.effectsSequence=[d.bind(this)],this.addEffect=g}function l(t,e,s,i){var a;this.propType="multidimensional";var r,n,h,o,l=e.k.length;for(a=0;a<l-1;a+=1)e.k[a].to&&e.k[a].s&&e.k[a+1]&&e.k[a+1].s&&(r=e.k[a].s,n=e.k[a+1].s,h=e.k[a].to,o=e.k[a].ti,(2===r.length&&(r[0]!==n[0]||r[1]!==n[1])&&mt.pointOnLine2D(r[0],r[1],n[0],n[1],r[0]+h[0],r[1]+h[1])&&mt.pointOnLine2D(r[0],r[1],n[0],n[1],n[0]+o[0],n[1]+o[1])||3===r.length&&(r[0]!==n[0]||r[1]!==n[1]||r[2]!==n[2])&&mt.pointOnLine3D(r[0],r[1],r[2],n[0],n[1],n[2],r[0]+h[0],r[1]+h[1],r[2]+h[2])&&mt.pointOnLine3D(r[0],r[1],r[2],n[0],n[1],n[2],n[0]+o[0],n[1]+o[1],n[2]+o[2]))&&(e.k[a].to=null,e.k[a].ti=null),r[0]===n[0]&&r[1]===n[1]&&0===h[0]&&0===h[1]&&0===o[0]&&0===o[1]&&(2===r.length||r[2]===n[2]&&0===h[2]&&0===o[2])&&(e.k[a].to=null,e.k[a].ti=null));this.effectsSequence=[d.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=c,this.interpolateValue=m,this.frameId=-1;var p=e.k[0].s.length;for(this.v=W("float32",p),this.pv=W("float32",p),a=0;a<p;a+=1)this.v[a]=f,this.pv[a]=f;this._caching={lastFrame:f,lastIndex:0,value:W("float32",p)},this.addEffect=g}return{getProp:function(t,e,s,i,a){var r;if(e.k.length)if("number"==typeof e.k[0])r=new h(t,e,i,a);else switch(s){case 0:r=new o(t,e,i,a);break;case 1:r=new l(t,e,i,a)}else r=new n(t,e,i,a);return r.effectsSequence.length&&a.addDynamicProperty(r),r}}}(),G=function(){var n=[0,0];function i(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new R,this.pre=new R,this.appliedTransformations=0,this.initDynamicPropertyContainer(s||t),e.p&&e.p.s?(this.px=Y.getProp(t,e.p.x,0,0,this),this.py=Y.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=Y.getProp(t,e.p.z,0,0,this))):this.p=Y.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=Y.getProp(t,e.rx,0,j,this),this.ry=Y.getProp(t,e.ry,0,j,this),this.rz=Y.getProp(t,e.rz,0,j,this),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=Y.getProp(t,e.or,1,j,this),this.or.sh=!0}else this.r=Y.getProp(t,e.r||{k:0},0,j,this);e.sk&&(this.sk=Y.getProp(t,e.sk,0,j,this),this.sa=Y.getProp(t,e.sa,0,j,this)),this.a=Y.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=Y.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=Y.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var s,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(s=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(s=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],i=[];var a=this.px,r=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(s[0]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),s[1]=r.getValueAtTime((r.keyframes[0].t+.01)/e,0),i[0]=a.getValueAtTime(a.keyframes[0].t/e,0),i[1]=r.getValueAtTime(r.keyframes[0].t/e,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(s[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),s[1]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/e,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0),i[1]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/e,0)):(s=[a.pv,r.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime),i[1]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/e,r.offsetTime))}else s=i=n;this.v.rotate(-Math.atan2(s[1]-i[1],s[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},N([I],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=I.prototype.addDynamicProperty,{getTransformProperty:function(t,e,s){return new i(t,e,s)}}}();function J(){this.c=!1,this._length=0,this._maxLength=8,this.v=F(this._maxLength),this.o=F(this._maxLength),this.i=F(this._maxLength)}J.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=Tt.newElement(),this.o[s]=Tt.newElement(),this.i[s]=Tt.newElement(),s+=1},J.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},J.prototype.doubleArrayLength=function(){this.v=this.v.concat(F(this._maxLength)),this.i=this.i.concat(F(this._maxLength)),this.o=this.o.concat(F(this._maxLength)),this._maxLength*=2},J.prototype.setXYAt=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[i]||r[i]&&!a)&&(r[i]=Tt.newElement()),r[i][0]=t,r[i][1]=e},J.prototype.setTripleAt=function(t,e,s,i,a,r,n,h){this.setXYAt(t,e,"v",n,h),this.setXYAt(s,i,"o",n,h),this.setXYAt(a,r,"i",n,h)},J.prototype.reverse=function(){var t=new J;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),a=1);var r,n=this._length-1,h=this._length;for(r=a;r<h;r+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],s[n][0],s[n][1],r,!1),n-=1;return t};var Z,U,K=function(){var a=-999999;function t(t,e,s){var i,a,r,n,h,o,l,p,f,m=s.lastIndex,d=this.keyframes;if(t<d[0].t-this.offsetTime)i=d[0].s[0],r=!0,m=0;else if(t>=d[d.length-1].t-this.offsetTime)i=d[d.length-1].s?d[d.length-1].s[0]:d[d.length-2].e[0],r=!0;else{for(var c,u,g,y=m,v=d.length-1,b=!0;b&&(c=d[y],!((u=d[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},m=y,!(r=1===c.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<c.t-this.offsetTime)p=0;else{var _;g.__fnct?_=g.__fnct:(_=H.getBezierEasing(c.o.x,c.o.y,c.i.x,c.i.y).get,g.__fnct=_),p=_((t-(c.t-this.offsetTime))/(u.t-this.offsetTime-(c.t-this.offsetTime)))}a=u.s?u.s[0]:c.e[0]}i=c.s[0]}for(o=e._length,l=i.i[0].length,s.lastIndex=m,n=0;n<o;n+=1)for(h=0;h<l;h+=1)f=r?i.i[n][h]:i.i[n][h]+(a.i[n][h]-i.i[n][h])*p,e.i[n][h]=f,f=r?i.o[n][h]:i.o[n][h]+(a.o[n][h]-i.o[n][h])*p,e.o[n][h]=f,f=r?i.v[n][h]:i.v[n][h]+(a.v[n][h]-i.v[n][h])*p,e.v[n][h]=f}function r(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var s,i=t._length;for(s=0;s<i;s+=1)if(t.v[s][0]!==e.v[s][0]||t.v[s][1]!==e.v[s][1]||t.o[s][0]!==e.o[s][0]||t.o[s][1]!==e.o[s][1]||t.i[s][0]!==e.i[s][0]||t.i[s][1]!==e.i[s][1])return!1;return!0})(this.v,t)||(this.v=Mt.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var s=this.effectsSequence.length;for(e=0;e<s;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,s){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===s?e.pt.k:e.ks.k;this.v=Mt.clone(i),this.pv=Mt.clone(this.v),this.localShapeCollection=Ft.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(t,e,s){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===s?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=Mt.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=Mt.clone(this.v),this.localShapeCollection=Ft.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=a,this.reset=r,this._caching={lastFrame:a,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==a&&(i<e&&t<e||s<i&&s<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=s,n.prototype.setVValue=e,n.prototype.addEffect=i,h.prototype.getValue=s,h.prototype.interpolateShape=t,h.prototype.setVValue=e,h.prototype.addEffect=i;var o=function(){var n=v;function t(t,e){this.v=Mt.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=Ft.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=Y.getProp(t,e.p,1,0,this),this.s=Y.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=3!==this.d,r=this.v;r.v[0][0]=t,r.v[0][1]=e-i,r.v[1][0]=a?t+s:t-s,r.v[1][1]=e,r.v[2][0]=t,r.v[2][1]=e+i,r.v[3][0]=a?t-s:t+s,r.v[3][1]=e,r.i[0][0]=a?t-s*n:t+s*n,r.i[0][1]=e-i,r.i[1][0]=a?t+s:t-s,r.i[1][1]=e-i*n,r.i[2][0]=a?t+s*n:t-s*n,r.i[2][1]=e+i,r.i[3][0]=a?t-s:t+s,r.i[3][1]=e+i*n,r.o[0][0]=a?t+s*n:t-s*n,r.o[0][1]=e-i,r.o[1][0]=a?t+s:t-s,r.o[1][1]=e+i*n,r.o[2][0]=a?t-s*n:t+s*n,r.o[2][1]=e+i,r.o[3][0]=a?t-s:t+s,r.o[3][1]=e-i*n}},N([I],t),t}(),l=function(){function t(t,e){this.v=Mt.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=Y.getProp(t,e.ir,0,0,this),this.is=Y.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=Y.getProp(t,e.pt,0,0,this),this.p=Y.getProp(t,e.p,1,0,this),this.r=Y.getProp(t,e.r,0,j,this),this.or=Y.getProp(t,e.or,0,0,this),this.os=Y.getProp(t,e.os,0,.01,this),this.localShapeCollection=Ft.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,s,i,a=2*Math.floor(this.pt.v),r=2*Math.PI/a,n=!0,h=this.or.v,o=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*h/(2*a),m=2*Math.PI*o/(2*a),d=-Math.PI/2;d+=this.r.v;var c=3===this.data.d?-1:1;for(t=this.v._length=0;t<a;t+=1){s=n?l:p,i=n?f:m;var u=(e=n?h:o)*Math.cos(d),g=e*Math.sin(d),y=0===u&&0===g?0:g/Math.sqrt(u*u+g*g),v=0===u&&0===g?0:-u/Math.sqrt(u*u+g*g);u+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(u,g,u-y*i*s*c,g-v*i*s*c,u+y*i*s*c,g+v*i*s*c,t,!0),n=!n,d+=r*c}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),s=2*Math.PI/e,i=this.or.v,a=this.os.v,r=2*Math.PI*i/(4*e),n=.5*-Math.PI,h=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var o=i*Math.cos(n),l=i*Math.sin(n),p=0===o&&0===l?0:l/Math.sqrt(o*o+l*l),f=0===o&&0===l?0:-o/Math.sqrt(o*o+l*l);o+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(o,l,o-p*r*a*h,l-f*r*a*h,o+p*r*a*h,l+f*r*a*h,t,!0),n+=s*h}this.paths.length=0,this.paths[0]=this.v}},N([I],t),t}(),p=function(){function t(t,e){this.v=Mt.newElement(),this.v.c=!0,this.localShapeCollection=Ft.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=Y.getProp(t,e.p,1,0,this),this.s=Y.getProp(t,e.s,1,0,this),this.r=Y.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=c(s,i,this.r.v),r=a*(1-v);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+a,t+s,e-i+r,0,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-r,t+s,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+s-a,e+i,t+s-a,e+i,t+s-r,e+i,2,!0),this.v.setTripleAt(t-s+a,e+i,t-s+r,e+i,t-s+a,e+i,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-a,t-s,e+i-r,4,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+r,t-s,e-i+a,5,!0),this.v.setTripleAt(t-s+a,e-i,t-s+a,e-i,t-s+r,e-i,6,!0),this.v.setTripleAt(t+s-a,e-i,t+s-r,e-i,t+s-a,e-i,7,!0)):(this.v.setTripleAt(t-s,e+i,t-s+r,e+i,t-s,e+i,2),this.v.setTripleAt(t-s,e-i,t-s,e-i+r,t-s,e-i,3))):(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+r,t+s,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+s-a,e-i,t+s-a,e-i,t+s-r,e-i,1,!0),this.v.setTripleAt(t-s+a,e-i,t-s+r,e-i,t-s+a,e-i,2,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+a,t-s,e-i+r,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-r,t-s,e+i-a,4,!0),this.v.setTripleAt(t-s+a,e+i,t-s+a,e+i,t-s+r,e+i,5,!0),this.v.setTripleAt(t+s-a,e+i,t+s-r,e+i,t+s-a,e+i,6,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-a,t+s,e+i-r,7,!0)):(this.v.setTripleAt(t-s,e-i,t-s+r,e-i,t-s,e-i,1,!0),this.v.setTripleAt(t-s,e+i,t-s,e+i-r,t-s,e+i,2,!0),this.v.setTripleAt(t+s,e+i,t+s-r,e+i,t+s,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},N([I],t),t}();var f={getShapeProp:function(t,e,s){var i;return 3===s||4===s?i=(3===s?e.pt:e.ks).k.length?new h(t,e,s):new n(t,e,s):5===s?i=new p(t,e):6===s?i=new o(t,e):7===s&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return h}};return f}(),Q=(U={},(Z={}).registerModifier=function(t,e){U[t]||(U[t]=e)},Z.getModifier=function(t,e,s){return new U[t](e,s)},Z);function $(){}function tt(){}function et(){}function st(){}function it(){}function at(){this._length=0,this._maxLength=4,this.shapes=F(this._maxLength)}function rt(t,e,s,i){var a;this.elem=t,this.frameId=-1,this.dataProps=F(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=W("float32",e.length?e.length-1:0),this.dashoffset=W("float32",1),this.initDynamicPropertyContainer(i);var r,n=e.length||0;for(a=0;a<n;a+=1)r=Y.getProp(t,e[a].v,0,0,this),this.k=r.k||this.k,this.dataProps[a]={n:e[a].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}function nt(t,e,s){this.data=e,this.c=W("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=W("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=Y.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}$.prototype.initModifierProperties=function(){},$.prototype.addShapeToModifier=function(){},$.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:Ft.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},$.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=s,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},$.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},N([I],$),N([$],tt),tt.prototype.initModifierProperties=function(t,e){this.s=Y.getProp(t,e.s,0,.01,this),this.e=Y.getProp(t,e.e,0,.01,this),this.o=Y.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},tt.prototype.addShapeToModifier=function(t){t.pathsData=[]},tt.prototype.calculateShapeEdges=function(t,e,s,i,a){var r=[];e<=1?r.push({s:t,e:e}):1<=t?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,h,o=[],l=r.length;for(n=0;n<l;n+=1){var p,f;if(!((h=r[n]).e*a<i||h.s*a>i+s))p=h.s*a<=i?0:(h.s*a-i)/s,f=h.e*a>=i+s?1:(h.e*a-i)/s,o.push([p,f])}return o.length||o.push([0,0]),o},tt.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)It.release(t[e]);return t.length=0,t},tt.prototype.processShapes=function(t){var e,s,i,a;if(this._mdf||t){var r=this.o.v%360/360;if(r<0&&(r+=1),e=1<this.s.v?1+r:this.s.v<0?0+r:this.s.v+r,(s=1<this.e.v?1+r:this.e.v<0?0+r:this.e.v+r)<e){var n=e;e=s,s=n}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var h,o,l,p,f,m=this.shapes.length,d=0;if(s===e)for(a=0;a<m;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===s&&0===e||0===s&&1===e){if(this._mdf)for(a=0;a<m;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var c,u,g=[];for(a=0;a<m;a+=1)if((c=this.shapes[a]).shape._mdf||this._mdf||t||2===this.m){if(o=(i=c.shape.paths)._length,f=0,!c.shape._mdf&&c.pathsData.length)f=c.totalShapeLength;else{for(l=this.releasePathsData(c.pathsData),h=0;h<o;h+=1)p=mt.getSegmentsLength(i.shapes[h]),l.push(p),f+=p.totalLength;c.totalShapeLength=f,c.pathsData=l}d+=f,c.shape._mdf=!0}else c.shape.paths=c.localShapeCollection;var y,v=e,b=s,_=0;for(a=m-1;0<=a;a-=1)if((c=this.shapes[a]).shape._mdf){for((u=c.localShapeCollection).releaseShapes(),2===this.m&&1<m?(y=this.calculateShapeEdges(e,s,c.totalShapeLength,_,d),_+=c.totalShapeLength):y=[[v,b]],o=y.length,h=0;h<o;h+=1){v=y[h][0],b=y[h][1],g.length=0,b<=1?g.push({s:c.totalShapeLength*v,e:c.totalShapeLength*b}):1<=v?g.push({s:c.totalShapeLength*(v-1),e:c.totalShapeLength*(b-1)}):(g.push({s:c.totalShapeLength*v,e:c.totalShapeLength}),g.push({s:0,e:c.totalShapeLength*(b-1)}));var k=this.addShapes(c,g[0]);if(g[0].s!==g[0].e){if(1<g.length)if(c.shape.paths.shapes[c.shape.paths._length-1].c){var x=k.pop();this.addPaths(k,u),k=this.addShapes(c,g[1],x)}else this.addPaths(k,u),k=this.addShapes(c,g[1]);this.addPaths(k,u)}}c.shape.paths=u}}},tt.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},tt.prototype.addSegment=function(t,e,s,i,a,r,n){a.setXYAt(e[0],e[1],"o",r),a.setXYAt(s[0],s[1],"i",r+1),n&&a.setXYAt(t[0],t[1],"v",r),a.setXYAt(i[0],i[1],"v",r+1)},tt.prototype.addSegmentFromArray=function(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)},tt.prototype.addShapes=function(t,e,s){var i,a,r,n,h,o,l,p,f=t.pathsData,m=t.shape.paths.shapes,d=t.shape.paths._length,c=0,u=[],g=!0;for(p=s?(h=s._length,s._length):(s=Mt.newElement(),h=0),u.push(s),i=0;i<d;i+=1){for(o=f[i].lengths,s.c=m[i].c,r=m[i].c?o.length:o.length+1,a=1;a<r;a+=1)if(c+(n=o[a-1]).addedLength<e.s)c+=n.addedLength,s.c=!1;else{if(c>e.e){s.c=!1;break}e.s<=c&&e.e>=c+n.addedLength?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[a],m[i].v[a],s,h,g),g=!1):(l=mt.getNewSegment(m[i].v[a-1],m[i].v[a],m[i].o[a-1],m[i].i[a],(e.s-c)/n.addedLength,(e.e-c)/n.addedLength,o[a-1]),this.addSegmentFromArray(l,s,h,g),g=!1,s.c=!1),c+=n.addedLength,h+=1}if(m[i].c&&o.length){if(n=o[a-1],c<=e.e){var y=o[a-1].addedLength;e.s<=c&&e.e>=c+y?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[0],m[i].v[0],s,h,g),g=!1):(l=mt.getNewSegment(m[i].v[a-1],m[i].v[0],m[i].o[a-1],m[i].i[0],(e.s-c)/y,(e.e-c)/y,o[a-1]),this.addSegmentFromArray(l,s,h,g),g=!1,s.c=!1)}else s.c=!1;c+=n.addedLength,h+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),c>e.e)break;i<d-1&&(s=Mt.newElement(),g=!0,u.push(s),h=0)}return u},Q.registerModifier("tm",tt),N([$],et),et.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=Y.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},et.prototype.processPath=function(t,e){var s,i=Mt.newElement();i.c=t.c;var a,r,n,h,o,l,p,f,m,d,c,u,g=t._length,y=0;for(s=0;s<g;s+=1)a=t.v[s],n=t.o[s],r=t.i[s],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==s&&s!==g-1||t.c?(h=0===s?t.v[g-1]:t.v[s-1],l=(o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)))?Math.min(o/2,e)/o:0,p=c=a[0]+(h[0]-a[0])*l,f=u=a[1]-(a[1]-h[1])*l,m=p-(p-a[0])*v,d=f-(f-a[1])*v,i.setTripleAt(p,f,m,d,c,u,y),y+=1,h=s===g-1?t.v[0]:t.v[s+1],l=(o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)))?Math.min(o/2,e)/o:0,p=m=a[0]+(h[0]-a[0])*l,f=d=a[1]+(h[1]-a[1])*l,c=p-(p-a[0])*v,u=f-(f-a[1])*v,i.setTripleAt(p,f,m,d,c,u,y)):i.setTripleAt(a[0],a[1],n[0],n[1],r[0],r[1],y):i.setTripleAt(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],y),y+=1;return i},et.prototype.processShapes=function(t){var e,s,i,a,r,n,h=this.shapes.length,o=this.rd.v;if(0!==o)for(s=0;s<h;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],o));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},Q.registerModifier("rd",et),N([$],st),st.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=Y.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},st.prototype.processPath=function(t,e){var s=e/100,i=[0,0],a=t._length,r=0;for(r=0;r<a;r+=1)i[0]+=t.v[r][0],i[1]+=t.v[r][1];i[0]/=a,i[1]/=a;var n,h,o,l,p,f,m=Mt.newElement();for(m.c=t.c,r=0;r<a;r+=1)n=t.v[r][0]+(i[0]-t.v[r][0])*s,h=t.v[r][1]+(i[1]-t.v[r][1])*s,o=t.o[r][0]+(i[0]-t.o[r][0])*-s,l=t.o[r][1]+(i[1]-t.o[r][1])*-s,p=t.i[r][0]+(i[0]-t.i[r][0])*-s,f=t.i[r][1]+(i[1]-t.i[r][1])*-s,m.setTripleAt(n,h,o,l,p,f,r);return m},st.prototype.processShapes=function(t){var e,s,i,a,r,n,h=this.shapes.length,o=this.amount.v;if(0!==o)for(s=0;s<h;s+=1){if(n=(r=this.shapes[s]).localShapeCollection,r.shape._mdf||this._mdf||t)for(n.releaseShapes(),r.shape._mdf=!0,e=r.shape.paths.shapes,a=r.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],o));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},Q.registerModifier("pb",st),N([$],it),it.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=Y.getProp(t,e.c,0,null,this),this.o=Y.getProp(t,e.o,0,null,this),this.tr=G.getTransformProperty(t,e.tr,this),this.so=Y.getProp(t,e.tr.so,0,.01,this),this.eo=Y.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new R,this.rMatrix=new R,this.sMatrix=new R,this.tMatrix=new R,this.matrix=new R},it.prototype.applyTransforms=function(t,e,s,i,a,r){var n=r?-1:1,h=i.s.v[0]+(1-i.s.v[0])*(1-a),o=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(r?1/h:h,r?1/o:o),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])},it.prototype.init=function(t,e,s,i){for(this.elem=t,this.arr=e,this.pos=s,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[s]);0<s;)s-=1,this._elements.unshift(e[s]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},it.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},it.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},it.prototype.changeGroupRender=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]._render=e,"gr"===t[s].ty&&this.changeGroupRender(t[s].it,e)},it.prototype.processShapes=function(t){var e,s,i,a,r,n=!1;if(this._mdf||t){var h,o=Math.ceil(this.c.v);if(this._groups.length<o){for(;this._groups.length<o;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=r=0;i<=this._groups.length-1;i+=1){if(h=r<o,this._groups[i]._render=h,this.changeGroupRender(this._groups[i].it,h),!h){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}r+=1}this._currentCopies=o;var m=this.o.v,d=m%1,c=0<m?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(0<m){for(;_<c;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,d,!1),_+=d)}else if(m<0){for(;c<_;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-d,!0),_-=d)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)s[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)s[v]=this.matrix.props[v];_+=1,r-=1,i+=a}}else for(r=this._currentCopies,i=0,a=1;r;)s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,r-=1,i+=a;return n},it.prototype.addShape=function(){},Q.registerModifier("rp",it),at.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(F(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},at.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)Mt.release(this.shapes[t]);this._length=0},rt.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,s=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<s;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},N([I],rt),nt.prototype.comparePoints=function(t,e){for(var s=0,i=this.o.length/2;s<i;){if(.01<Math.abs(t[4*s]-t[4*e+2*s]))return!1;s+=1}return!0},nt.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},nt.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,s,i,a=4*this.data.p;for(e=0;e<a;e+=1)s=e%4==0?100:255,i=Math.round(this.prop.v[e]*s),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)s=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},N([I],nt);var ht,ot,dt=function(t,e,s,i){if(0===e)return"";var a,r=t.o,n=t.i,h=t.v,o=" M"+i.applyToPointStringified(h[0][0],h[0][1]);for(a=1;a<e;a+=1)o+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[a][0],n[a][1])+" "+i.applyToPointStringified(h[a][0],h[a][1]);return s&&e&&(o+=" C"+i.applyToPointStringified(r[a-1][0],r[a-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(h[0][0],h[0][1]),o+="z"),o},ct=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ut=function(){var a=function(){var t=M("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(t,e,s){var i="";if(t.e)i=t.p;else if(e){var a=t.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),i=e+a}else i=s,i+=t.u?t.u:"",i+=t.p;return i}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,s=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(s)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},s=r(t,this.assetsPath,this.path);return O.loadData(s,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(t,e){var s;this.imagesLoadedCb=e;var i=t.length;for(s=0;s<i;s+=1)t[s].layers||(t[s].t&&"seq"!==t[s].t?3===t[s].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[s]))):(this.totalImages+=1,this.images.push(this._createImageData(t[s]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,s=this.images.length;e<s;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=r(t,this.assetsPath,this.path),s=M("img");s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){i.img=a,this._imageLoaded()}.bind(this),!1),s.src=e;var i={img:s,assetData:t};return i},createImageData:function(t){var e=r(t,this.assetsPath,this.path),s=T("image");n?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){i.img=a,this._imageLoaded()}.bind(this),!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(s):this._elementHelper.appendChild(s);var i={img:s,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},s}(),gt=(ht={maskType:!0},(/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))&&(ht.maskType=!1),ht),yt=((ot={}).createFilter=function(t,e){var s=T("filter");return s.setAttribute("id",t),!0!==e&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%")),s},ot.createAlphaToLuminanceFilter=function(){var t=T("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},ot);function vt(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=F(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function bt(t,e,s){var i={propType:!1},a=Y.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,j,s):i,rx:r.rx?a(t,r.rx,0,j,s):i,ry:r.ry?a(t,r.ry,0,j,s):i,sk:r.sk?a(t,r.sk,0,j,s):i,sa:r.sa?a(t,r.sa,0,j,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=Ct.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function _t(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function kt(t,e){this._frameId=s,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}vt.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=Y.getProp;for(t=0;t<s;t+=1)e=this._textData.a[t],this._animatorsData[t]=new bt(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},vt.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var s,i,a,r,n,h,o,l,p,f,m,d,c,u,g,y,v,b,_,k=this._moreOptions.alignment.v,x=this._animatorsData,w=this._textData,A=this.mHelper,P=this._renderType,D=this.renderedLetters.length,C=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var S,E=_.v;for(this._pathData.r.v&&(E=E.reverse()),n={tLength:0,segments:[]},r=E._length-1,a=y=0;a<r;a+=1)S=mt.buildBezierData(E.v[a],E.v[a+1],[E.o[a][0]-E.v[a][0],E.o[a][1]-E.v[a][1]],[E.i[a+1][0]-E.v[a+1][0],E.i[a+1][1]-E.v[a+1][1]]),n.tLength+=S.segmentLength,n.segments.push(S),y+=S.segmentLength;a=r,_.v.c&&(S=mt.buildBezierData(E.v[a],E.v[0],[E.o[a][0]-E.v[a][0],E.o[a][1]-E.v[a][1]],[E.i[0][0]-E.v[0][0],E.i[0][1]-E.v[0][1]]),n.tLength+=S.segmentLength,n.segments.push(S),y+=S.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,h=this._pathData.f.v,f=1,p=!(l=m=0),u=n.segments,h<0&&_.v.c)for(n.tLength<Math.abs(h)&&(h=-Math.abs(h)%n.tLength),f=(c=u[m=u.length-1].points).length-1;h<0;)h+=c[f].partialLength,(f-=1)<0&&(f=(c=u[m-=1].points).length-1);d=(c=u[m].points)[f-1],g=(o=c[f]).partialLength}r=C.length,i=s=0;var T,M,F,I,L,B=1.2*t.finalSize*.714,z=!0;F=x.length;var V,R,N,O,q,j,W,H,X,Y,G,J,Z=-1,U=h,K=m,Q=f,$=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var st=0,it=0,at=2===t.j?-.5:-1,rt=0,nt=!0;for(a=0;a<r;a+=1)if(C[a].n){for(st&&(st+=it);rt<a;)C[rt].animatorJustifyOffset=st,rt+=1;nt=!(st=0)}else{for(M=0;M<F;M+=1)(T=x[M].a).t.propType&&(nt&&2===t.j&&(it+=T.t.v*at),(L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars)).length?st+=T.t.v*L[0]*at:st+=T.t.v*L*at);nt=!1}for(st&&(st+=it);rt<a;)C[rt].animatorJustifyOffset=st,rt+=1}for(a=0;a<r;a+=1){if(A.reset(),O=1,C[a].n)s=0,i+=t.yOffset,i+=z?1:0,h=U,z=!1,this._hasMaskedPath&&(f=Q,d=(c=u[m=K].points)[f-1],g=(o=c[f]).partialLength,l=0),J=X=G=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if($!==C[a].line){switch(t.j){case 1:h+=y-t.lineWidths[C[a].line];break;case 2:h+=(y-t.lineWidths[C[a].line])/2}$=C[a].line}Z!==C[a].ind&&(C[Z]&&(h+=C[Z].extra),h+=C[a].an/2,Z=C[a].ind),h+=k[0]*C[a].an*.005;var ht=0;for(M=0;M<F;M+=1)(T=x[M].a).p.propType&&((L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars)).length?ht+=T.p.v[0]*L[0]:ht+=T.p.v[0]*L),T.a.propType&&((L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars)).length?ht+=T.a.v[0]*L[0]:ht+=T.a.v[0]*L);for(p=!0,this._pathData.a.v&&(h=.5*C[0].an+(y-this._pathData.f.v-.5*C[0].an-.5*C[C.length-1].an)*Z/(r-1),h+=this._pathData.f.v);p;)h+ht<=l+g||!c?(v=(h+ht-l)/o.partialLength,R=d.point[0]+(o.point[0]-d.point[0])*v,N=d.point[1]+(o.point[1]-d.point[1])*v,A.translate(-k[0]*C[a].an*.005,-k[1]*B*.01),p=!1):c&&(l+=o.partialLength,(f+=1)>=c.length&&(f=0,c=u[m+=1]?u[m].points:_.v.c?u[m=f=0].points:(l-=o.partialLength,null)),c&&(d=o,g=(o=c[f]).partialLength));V=C[a].an/2-C[a].add,A.translate(-V,0,0)}else V=C[a].an/2-C[a].add,A.translate(-V,0,0),A.translate(-k[0]*C[a].an*.005,-k[1]*B*.01,0);for(M=0;M<F;M+=1)(T=x[M].a).t.propType&&(L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars),0===s&&0===t.j||(this._hasMaskedPath?L.length?h+=T.t.v*L[0]:h+=T.t.v*L:L.length?s+=T.t.v*L[0]:s+=T.t.v*L));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(q=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),M=0;M<F;M+=1)(T=x[M].a).a.propType&&((L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars)).length?A.translate(-T.a.v[0]*L[0],-T.a.v[1]*L[1],T.a.v[2]*L[2]):A.translate(-T.a.v[0]*L,-T.a.v[1]*L,T.a.v[2]*L));for(M=0;M<F;M+=1)(T=x[M].a).s.propType&&((L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars)).length?A.scale(1+(T.s.v[0]-1)*L[0],1+(T.s.v[1]-1)*L[1],1):A.scale(1+(T.s.v[0]-1)*L,1+(T.s.v[1]-1)*L,1));for(M=0;M<F;M+=1){if(T=x[M].a,L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars),T.sk.propType&&(L.length?A.skewFromAxis(-T.sk.v*L[0],T.sa.v*L[1]):A.skewFromAxis(-T.sk.v*L,T.sa.v*L)),T.r.propType&&(L.length?A.rotateZ(-T.r.v*L[2]):A.rotateZ(-T.r.v*L)),T.ry.propType&&(L.length?A.rotateY(T.ry.v*L[1]):A.rotateY(T.ry.v*L)),T.rx.propType&&(L.length?A.rotateX(T.rx.v*L[0]):A.rotateX(T.rx.v*L)),T.o.propType&&(L.length?O+=(T.o.v*L[0]-O)*L[0]:O+=(T.o.v*L-O)*L),t.strokeWidthAnim&&T.sw.propType&&(L.length?j+=T.sw.v*L[0]:j+=T.sw.v*L),t.strokeColorAnim&&T.sc.propType)for(H=0;H<3;H+=1)L.length?q[H]+=(T.sc.v[H]-q[H])*L[0]:q[H]+=(T.sc.v[H]-q[H])*L;if(t.fillColorAnim&&t.fc){if(T.fc.propType)for(H=0;H<3;H+=1)L.length?W[H]+=(T.fc.v[H]-W[H])*L[0]:W[H]+=(T.fc.v[H]-W[H])*L;T.fh.propType&&(W=L.length?ft(W,T.fh.v*L[0]):ft(W,T.fh.v*L)),T.fs.propType&&(W=L.length?lt(W,T.fs.v*L[0]):lt(W,T.fs.v*L)),T.fb.propType&&(W=L.length?pt(W,T.fb.v*L[0]):pt(W,T.fb.v*L))}}for(M=0;M<F;M+=1)(T=x[M].a).p.propType&&(L=x[M].s.getMult(C[a].anIndexes[M],w.a[M].s.totalChars),this._hasMaskedPath?L.length?A.translate(0,T.p.v[1]*L[0],-T.p.v[2]*L[1]):A.translate(0,T.p.v[1]*L,-T.p.v[2]*L):L.length?A.translate(T.p.v[0]*L[0],T.p.v[1]*L[1],-T.p.v[2]*L[2]):A.translate(T.p.v[0]*L,T.p.v[1]*L,-T.p.v[2]*L));if(t.strokeWidthAnim&&(X=j<0?0:j),t.strokeColorAnim&&(Y="rgb("+Math.round(255*q[0])+","+Math.round(255*q[1])+","+Math.round(255*q[2])+")"),t.fillColorAnim&&t.fc&&(G="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(A.translate(0,-t.ls),A.translate(0,k[1]*B*.01+i,0),this._pathData.p.v){b=(o.point[1]-d.point[1])/(o.point[0]-d.point[0]);var ot=180*Math.atan(b)/Math.PI;o.point[0]<d.point[0]&&(ot+=180),A.rotate(-ot*Math.PI/180)}A.translate(R,N,0),h-=k[0]*C[a].an*.005,C[a+1]&&Z!==C[a+1].ind&&(h+=C[a].an/2,h+=.001*t.tr*t.finalSize)}else{switch(A.translate(s,i,0),t.ps&&A.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:A.translate(C[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[a].line]),0,0);break;case 2:A.translate(C[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[a].line])/2,0,0)}A.translate(0,-t.ls),A.translate(V,0,0),A.translate(k[0]*C[a].an*.005,k[1]*B*.01,0),s+=C[a].l+.001*t.tr*t.finalSize}"html"===P?tt=A.toCSS():"svg"===P?tt=A.to2dCSS():et=[A.props[0],A.props[1],A.props[2],A.props[3],A.props[4],A.props[5],A.props[6],A.props[7],A.props[8],A.props[9],A.props[10],A.props[11],A.props[12],A.props[13],A.props[14],A.props[15]],J=O}this.lettersChangedFlag=D<=a?(I=new _t(J,X,Y,G,tt,et),this.renderedLetters.push(I),D+=1,!0):(I=this.renderedLetters[a]).update(J,X,Y,G,tt,et)||this.lettersChangedFlag}}},vt.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},vt.prototype.mHelper=new R,vt.prototype.defaultPropsArray=[],N([I],vt),_t.prototype.update=function(t,e,s,i,a,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==s&&(this.sc=s,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==a&&(this.m=a,n=this._mdf.m=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,n=this._mdf.p=!0),n},kt.prototype.defaultBoxWidth=[0,0],kt.prototype.copyData=function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},kt.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},kt.prototype.searchProperty=function(){return this.searchKeyframes()},kt.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},kt.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},kt.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,s=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(i=0;i<a;i+=1)r=s!==this.keysIndex?this.effectsSequence[i](r,r.t):this.effectsSequence[i](this.currentData,r.t);e!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},kt.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,s=0,i=t.length;s<=i-1&&!(s===i-1||t[s+1].t>e);)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},kt.prototype.buildFinalText=function(t){for(var e,s,i=[],a=0,r=t.length,n=!1;a<r;)e=t.charCodeAt(a),X.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(a):55296<=e&&e<=56319?56320<=(s=t.charCodeAt(a+1))&&s<=57343?(n||X.isModifier(e,s)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):56319<e?(s=t.charCodeAt(a+1),X.isZeroWidthJoiner(e,s)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):X.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},kt.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,h,o=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,d=0,c=0,u=0,g=[],y=0,v=0,b=o.getFontByName(t.f),_=0,k=q(b);t.fWeight=k.weight,t.fStyle=k.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),s=t.finalText.length,t.finalLineHeight=t.lh;var x,w=t.tr/1e3*t.finalSize;if(t.sz)for(var A,P,D=!0,C=t.sz[0],S=t.sz[1];D;){y=A=0,s=(P=this.buildFinalText(t.t)).length,w=t.tr/1e3*t.finalSize;var E=-1;for(e=0;e<s;e+=1)x=P[e].charCodeAt(0),i=!1," "===P[e]?E=e:13!==x&&3!==x||(i=!(y=0),A+=t.finalLineHeight||1.2*t.finalSize),C<y+(_=o.chars?(h=o.getCharData(P[e],b.fStyle,b.fFamily),i?0:h.w*t.finalSize/100):o.measureText(P[e],t.f,t.finalSize))&&" "!==P[e]?(-1===E?s+=1:e=E,A+=t.finalLineHeight||1.2*t.finalSize,P.splice(e,E===e?1:0,"\r"),E=-1,y=0):(y+=_,y+=w);A+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&S<A?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=P,s=t.finalText.length,D=!1)}y=-w;var T,M=_=0;for(e=0;e<s;e+=1)if(i=!1,13===(x=(T=t.finalText[e]).charCodeAt(0))||3===x?(M=0,g.push(y),v=v<y?y:v,y=-2*w,i=!(a=""),u+=1):a=T,_=o.chars?(h=o.getCharData(T,b.fStyle,o.getFontByName(t.f).fFamily),i?0:h.w*t.finalSize/100):o.measureText(a,t.f,t.finalSize)," "===T?M+=_+w:(y+=_+w+M,M=0),p.push({l:_,an:_,add:d,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==m){if(d+=_,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(d-=_);c<=e;)p[c].an=d,p[c].ind=f,p[c].extra=_,c+=1;f+=1,d=0}}else if(3==m){if(d+=_,""===a||e===s-1){for(""===a&&(d-=_);c<=e;)p[c].an=d,p[c].ind=f,p[c].extra=_,c+=1;d=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<y?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var F,I,L,B,z=l.a;n=z.length;var V=[];for(r=0;r<n;r+=1){for((F=z[r]).a.sc&&(t.strokeColorAnim=!0),F.a.sw&&(t.strokeWidthAnim=!0),(F.a.fc||F.a.fh||F.a.fs||F.a.fb)&&(t.fillColorAnim=!0),B=0,L=F.s.b,e=0;e<s;e+=1)(I=p[e]).anIndexes[r]=B,(1==L&&""!==I.val||2==L&&""!==I.val&&" "!==I.val||3==L&&(I.n||" "==I.val||e==s-1)||4==L&&(I.n||e==s-1))&&(1===F.s.rn&&V.push(B),B+=1);l.a[r].s.totalChars=B;var R,N=-1;if(1===F.s.rn)for(e=0;e<s;e+=1)N!=(I=p[e]).anIndexes[r]&&(N=I.anIndexes[r],R=V.splice(Math.floor(Math.random()*V.length),1)[0]),I.anIndexes[r]=R}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},kt.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var s=this.copyData({},this.data.d.k[e].s);s=this.copyData(s,t),this.data.d.k[e].s=s,this.recalculate(e),this.elem.addDynamicProperty(this)},kt.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},kt.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},kt.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var xt,wt,At,Pt,Dt,Ct=function(){var u=Math.max,g=Math.min,y=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=Y.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?Y.getProp(t,e.e,0,0,this):{v:100},this.o=Y.getProp(t,e.o||{k:0},0,0,this),this.xe=Y.getProp(t,e.xe||{k:0},0,0,this),this.ne=Y.getProp(t,e.ne||{k:0},0,0,this),this.sm=Y.getProp(t,e.sm||{k:100},0,0,this),this.a=Y.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,s=0,i=1,a=1;0<this.ne.v?e=this.ne.v/100:s=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:a=1+this.xe.v/100;var r=H.getBezierEasing(e,s,i,a).get,n=0,h=this.finalS,o=this.finalE,l=this.data.sh;if(2===l)n=r(n=o===h?o<=t?1:0:u(0,g(.5/(o-h)+(t-h)/(o-h),1)));else if(3===l)n=r(n=o===h?o<=t?0:1:1-u(0,g(.5/(o-h)+(t-h)/(o-h),1)));else if(4===l)o===h?n=0:(n=u(0,g(.5/(o-h)+(t-h)/(o-h),1)))<.5?n*=2:n=1-2*(n-.5),n=r(n);else if(5===l){if(o===h)n=0;else{var p=o-h,f=-p/2+(t=g(u(0,t+.5-h),o-h)),m=p/2;n=Math.sqrt(1-f*f/(m*m))}n=r(n)}else n=6===l?r(n=o===h?0:(t=g(u(0,t+.5-h),o-h),(1+Math.cos(Math.PI+2*Math.PI*t/(o-h)))/2)):(t>=y(h)&&(n=u(0,g(t-h<0?g(o,1)-(h-t):o-t,1))),r(n));if(100!==this.sm.v){var d=.01*this.sm.v;0===d&&(d=1e-8);var c=.5-.5*d;n<c?n=0:1<(n=(n-c)/d)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,s=this.o.v/e,i=this.s.v/e+s,a=this.e.v/e+s;if(a<i){var r=i;i=a,a=r}this.finalS=i,this.finalE=a}},N([I],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}(),St=function(t,e,s){var i=0,a=t,r=F(a);return{newElement:function(){return i?r[i-=1]:e()},release:function(t){i===a&&(r=Et.double(r),a*=2),s&&s(t),r[i]=t,i+=1}}},Et={double:function(t){return t.concat(F(t.length))}},Tt=St(8,function(){return W("float32",2)}),Mt=((xt=St(4,function(){return new J},function(t){var e,s=t._length;for(e=0;e<s;e+=1)Tt.release(t.v[e]),Tt.release(t.i[e]),Tt.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})).clone=function(t){var e,s=xt.newElement(),i=void 0===t._length?t.v.length:t._length;for(s.setLength(i),s.c=t.c,e=0;e<i;e+=1)s.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return s},xt),Ft=(wt={newShapeCollection:function(){var t;t=At?Dt[At-=1]:new at;return t},release:function(t){var e,s=t._length;for(e=0;e<s;e+=1)Mt.release(t.shapes[e]);t._length=0,At===Pt&&(Dt=Et.double(Dt),Pt*=2);Dt[At]=t,At+=1}},At=0,Dt=F(Pt=4),wt),It=St(8,function(){return{lengths:[],totalLength:0}},function(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)Lt.release(t.lengths[e]);t.lengths.length=0}),Lt=St(8,function(){return{addedLength:0,percents:W("float32",w),lengths:W("float32",w)}}),Bt=function(){function r(t){for(var e,s=t.split("\r\n"),i={},a=0,r=0;r<s.length;r+=1)2===(e=s[r].split(":")).length&&(i[e[0]]=e[1].trim(),a+=1);if(0===a)throw new Error;return i}return function(e){for(var t=[],s=0;s<e.length;s+=1){var i=e[s],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(e[s].cm)}catch(t){try{a.payload=r(e[s].cm)}catch(t){a.payload={name:e[s]}}}t.push(a)}return t}}();function zt(){}function Vt(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=T("svg");var s="";if(e&&e.title){var i=T("title"),a=D();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),s+=a}if(e&&e.description){var r=T("desc"),n=D();r.setAttribute("id",n),r.textContent=e.description,this.svgElement.appendChild(r),s+=" "+n}s&&this.svgElement.setAttribute("aria-labelledby",s);var h=T("defs");this.svgElement.appendChild(h);var o=T("g");this.svgElement.appendChild(o),this.layerElement=o,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:h,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function Rt(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function Nt(t,e,s){this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,a,r=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=F(n),this.solidPath="";var h,o,l,p,f,m,d=this.masksProperties,c=0,u=[],g=D(),y="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==d[i].mode&&"n"!==d[i].mode||d[i].inv||100!==d[i].o.k||d[i].o.x)&&(v=y="mask"),"s"!==d[i].mode&&"i"!==d[i].mode||0!==c?l=null:((l=T("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),a=T("path"),"n"===d[i].mode)this.viewData[i]={op:Y.getProp(this.element,d[i].o,0,.01,this.element),prop:K.getShapeProp(this.element,d[i],3),elem:a,lastPath:""},r.appendChild(a);else{var b;if(c+=1,a.setAttribute("fill","s"===d[i].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==d[i].x.k?(v=y="mask",m=Y.getProp(this.element,d[i].x,0,null,this.element),b=D(),(p=T("filter")).setAttribute("id",b),(f=T("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),r.appendChild(p),a.setAttribute("stroke","s"===d[i].mode?"#000000":"#ffffff")):m=f=null,this.storedData[i]={elem:a,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===d[i].mode){o=u.length;var _=T("g");for(h=0;h<o;h+=1)_.appendChild(u[h]);var k=T("mask");k.setAttribute("mask-type","alpha"),k.setAttribute("id",g+"_"+c),k.appendChild(a),r.appendChild(k),_.setAttribute("mask","url("+x+"#"+g+"_"+c+")"),u.length=0,u.push(_)}else u.push(a);d[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",op:Y.getProp(this.element,d[i].o,0,.01,this.element),prop:K.getShapeProp(this.element,d[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(d[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=T(y),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<c&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+x+"#"+g+")"),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function Ot(){}function qt(){}function jt(){}function Wt(){}function Ht(){}function Xt(t,e){this.elem=t,this.pos=e}function Yt(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=T("path"),this.msElem=null}function Gt(t,e,s){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e,this._isAnimated=!!s.k;for(var i=0,a=t.length;i<a;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function Jt(t,e,s){this.transform={mProps:t,op:e,container:s},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function Zt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=Y.getProp(t,e.o,0,.01,this),this.w=Y.getProp(t,e.w,0,null,this),this.d=new rt(t,e.d||{},"svg",this),this.c=Y.getProp(t,e.c,1,255,this),this.style=s,this._isAnimated=!!this._isAnimated}function Ut(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=Y.getProp(t,e.o,0,.01,this),this.c=Y.getProp(t,e.c,1,255,this),this.style=s}function Kt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,s)}function Qt(t,e,s){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=Y.getProp(t,e.w,0,null,this),this.d=new rt(t,e.d||{},"svg",this),this.initGradientData(t,e,s),this._isAnimated=!!this._isAnimated}function $t(){this.it=[],this.prevViewData=[],this.gr=T("g")}zt.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(s=this.layers[e]).ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},zt.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},zt.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},zt.prototype.createAudio=function(t){return new le(t,this.globalData,this)},zt.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},zt.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},zt.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var s,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(s=0;s<a;){if(this.layers[s].id===t[e].id){this.layers[s]=t[e];break}s+=1}},zt.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},zt.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},zt.prototype.buildElementParenting=function(t,e,s){for(var i=this.elements,a=this.layers,r=0,n=a.length;r<n;)a[r].ind==e&&(i[r]&&!0!==i[r]?(s.push(i[r]),i[r].setAsParent(),void 0!==a[r].parent?this.buildElementParenting(t,a[r].parent,s):t.setHierarchy(s)):(this.buildItem(r),this.addPendingElement(t))),r+=1},zt.prototype.addPendingElement=function(t){this.pendingElements.push(t)},zt.prototype.searchExtraCompositions=function(t){var e,s=t.length;for(e=0;e<s;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},zt.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new X,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},N([zt],Vt),Vt.prototype.createNull=function(t){return new se(t,this.globalData,this)},Vt.prototype.createShape=function(t){return new me(t,this.globalData,this)},Vt.prototype.createText=function(t){return new fe(t,this.globalData,this)},Vt.prototype.createImage=function(t){return new he(t,this.globalData,this)},Vt.prototype.createComp=function(t){return new pe(t,this.globalData,this)},Vt.prototype.createSolid=function(t){return new oe(t,this.globalData,this)},Vt.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var s=T("clipPath"),i=T("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a=D();s.setAttribute("id",a),s.appendChild(i),this.layerElement.setAttribute("clip-path","url("+x+"#"+a+")"),e.appendChild(s),this.layers=t.layers,this.elements=F(t.layers.length)},Vt.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},Vt.prototype.updateContainerSize=function(){},Vt.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var s=this.createItem(this.layers[t]);e[t]=s,i&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(s),s.initExpressions()),this.appendElementInPos(s,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?s.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(s)))}},Vt.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,s=this.elements.length;e<s;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},Vt.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var s=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=s-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<s;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},Vt.prototype.appendElementInPos=function(t,e){var s=t.getBaseElement();if(s){for(var i,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(s,i):this.layerElement.appendChild(s)}},Vt.prototype.hide=function(){this.layerElement.style.display="none"},Vt.prototype.show=function(){this.layerElement.style.display="block"},N([zt],Rt),Rt.prototype.buildItem=Vt.prototype.buildItem,Rt.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},Rt.prototype.appendElementInPos=function(t,e){var s=t.getBaseElement();if(s){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(s,e);else if(this.threeDElements)this.addTo3dContainer(s,e);else{for(var a,r,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(r=this.elements[n],a=(this.layers[n].ddd?this.getThreeDContainerByPos(n):r.getBaseElement())||a),n+=1;a?i.ddd&&this.supports3d||this.layerElement.insertBefore(s,a):i.ddd&&this.supports3d||this.layerElement.appendChild(s)}}},Rt.prototype.createShape=function(t){return this.supports3d?new be(t,this.globalData,this):new me(t,this.globalData,this)},Rt.prototype.createText=function(t){return this.supports3d?new _e(t,this.globalData,this):new fe(t,this.globalData,this)},Rt.prototype.createCamera=function(t){return this.camera=new xe(t,this.globalData,this),this.camera},Rt.prototype.createImage=function(t){return this.supports3d?new ke(t,this.globalData,this):new he(t,this.globalData,this)},Rt.prototype.createComp=function(t){return this.supports3d?new ve(t,this.globalData,this):new pe(t,this.globalData,this)},Rt.prototype.createSolid=function(t){return this.supports3d?new ye(t,this.globalData,this):new oe(t,this.globalData,this)},Rt.prototype.createNull=Vt.prototype.createNull,Rt.prototype.getThreeDContainerByPos=function(t){for(var e=0,s=this.threeDElements.length;e<s;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},Rt.prototype.createThreeDContainer=function(t,e){var s,i,a=M("div");A(a);var r=M("div");if(A(r),"3d"===e){(s=a.style).width=this.globalData.compSize.w+"px",s.height=this.globalData.compSize.h+"px";var n="50% 50%";s.webkitTransformOrigin=n,s.mozTransformOrigin=n,s.transformOrigin=n;var h="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=r.style).transform=h,i.webkitTransform=h}a.appendChild(r);var o={container:r,perspectiveElem:a,startPos:t,endPos:t,type:e};return this.threeDElements.push(o),o},Rt.prototype.build3dContainers=function(){var t,e,s=this.layers.length,i="";for(t=0;t<s;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?"3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")):"2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t);for(t=(s=this.threeDElements.length)-1;0<=t;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},Rt.prototype.addTo3dContainer=function(t,e){for(var s=0,i=this.threeDElements.length;s<i;){if(e<=this.threeDElements[s].endPos){for(var a,r=this.threeDElements[s].startPos;r<e;)this.elements[r]&&this.elements[r].getBaseElement&&(a=this.elements[r].getBaseElement()),r+=1;a?this.threeDElements[s].container.insertBefore(t,a):this.threeDElements[s].container.appendChild(t);break}s+=1}},Rt.prototype.configAnimation=function(t){var e=M("div"),s=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",A(this.resizerElem=e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),s.appendChild(e),i.overflow="hidden";var a=T("svg");a.setAttribute("width","1"),a.setAttribute("height","1"),A(a),this.resizerElem.appendChild(a);var r=T("defs");a.appendChild(r),this.data=t,this.setupGlobalData(t,a),this.globalData.defs=r,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},Rt.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},Rt.prototype.updateContainerSize=function(){var t,e,s,i,a=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight;i=a/r<this.globalData.compSize.w/this.globalData.compSize.h?(t=a/this.globalData.compSize.w,e=a/this.globalData.compSize.w,s=0,(r-this.globalData.compSize.h*(a/this.globalData.compSize.w))/2):(t=r/this.globalData.compSize.h,e=r/this.globalData.compSize.h,s=(a-this.globalData.compSize.w*(r/this.globalData.compSize.h))/2,0);var n=this.resizerElem.style;n.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+s+","+i+",0,1)",n.transform=n.webkitTransform},Rt.prototype.renderFrame=Vt.prototype.renderFrame,Rt.prototype.hide=function(){this.resizerElem.style.display="none"},Rt.prototype.show=function(){this.resizerElem.style.display="block"},Rt.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,s=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var a=this.threeDElements[t].perspectiveElem.style;a.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(s,2))+"px",a.perspective=a.webkitPerspective}}},Rt.prototype.searchExtraCompositions=function(t){var e,s=t.length,i=M("div");for(e=0;e<s;e+=1)if(t[e].xt){var a=this.createComp(t[e],i,this.globalData.comp,null);a.initExpressions(),this.globalData.projectInterface.registerComposition(a)}},Nt.prototype.getMaskProperty=function(t){return this.viewData[t].prop},Nt.prototype.renderFrame=function(t){var e,s=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",s.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+x+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},Nt.prototype.getMaskelement=function(){return this.maskElement},Nt.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},Nt.prototype.drawPath=function(t,e,s){var i,a,r=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<a&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},Nt.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},Ot.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},qt.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var s,i=this.dynamicProperties.length;for(s=0;s<i;s+=1)(e||this._isParent&&"transform"===this.dynamicProperties[s].propType)&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},jt.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?G.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new R},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,s=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<i;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),s=0;s<i;s+=1)t=this.hierarchy[s].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var s,i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&e.splice(0,0,a.finalTransform),a=a.comp):i=!1;var r,n=e.length;for(s=0;s<n;s+=1)r=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new R},Wt.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},N([Wt,function(t){function e(){}return e.prototype=t,e}({initElement:function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],Ht),Yt.prototype.reset=function(){this.d="",this._mdf=!1},Gt.prototype.setAsAnimated=function(){this._isAnimated=!0},N([I],Zt),N([I],Ut),Kt.prototype.initGradientData=function(t,e,s){this.o=Y.getProp(t,e.o,0,.01,this),this.s=Y.getProp(t,e.s,1,null,this),this.e=Y.getProp(t,e.e,1,null,this),this.h=Y.getProp(t,e.h||{k:0},0,.01,this),this.a=Y.getProp(t,e.a||{k:0},0,j,this),this.g=new nt(t,e.g,this),this.style=s,this.stops=[],this.setGradientData(s.pElem,e),this.setGradientOpacity(e,s),this._isAnimated=!!this._isAnimated},Kt.prototype.setGradientData=function(t,e){var s=D(),i=T(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",s),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var a,r,n,h=[];for(n=4*e.g.p,r=0;r<n;r+=4)a=T("stop"),i.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+x+"#"+s+")"),this.gf=i,this.cst=h},Kt.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var s,i,a,r=T("mask"),n=T("path");r.appendChild(n);var h=D(),o=D();r.setAttribute("id",o);var l=T(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",h),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<a;i+=2)(s=T("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(s),p.push(s);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+x+"#"+h+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",z[t.lc||2]),n.setAttribute("stroke-linejoin",V[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=r,this.ost=p,this.maskId=o,e.msElem=n}},N([I],Kt),N([Kt,I],Qt);var te=function(){var g=new R,y=new R;function e(t,e,s){(s||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(s||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function s(t,e,s){var i,a,r,n,h,o,l,p,f,m,d,c=e.styles.length,u=e.lvl;for(o=0;o<c;o+=1){if(n=e.sh._mdf||s,e.styles[o].lvl<u){for(p=y.reset(),m=u-e.styles[o].lvl,d=e.transformers.length-1;!n&&0<m;)n=e.transformers[d].mProps._mdf||n,m-=1,d-=1;if(n)for(m=u-e.styles[o].lvl,d=e.transformers.length-1;0<m;)f=e.transformers[d].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m-=1,d-=1}else p=g;if(a=(l=e.sh.paths)._length,n){for(r="",i=0;i<a;i+=1)(h=l.shapes[i])&&h._length&&(r+=dt(h,h._length,h.c,p));e.caches[o]=r}else r=e.caches[o];e.styles[o].d+=!0===t.hd?"":r,e.styles[o]._mdf=n||e.styles[o]._mdf}}function i(t,e,s){var i=e.style;(e.c._mdf||s)&&i.pElem.setAttribute("fill","rgb("+f(e.c.v[0])+","+f(e.c.v[1])+","+f(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function a(t,e,s){r(t,e,s),n(t,e,s)}function r(t,e,s){var i,a,r,n,h,o=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||s){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||s){var d=1===t.t?"x1":"cx",c="x1"===d?"y1":"cy";o.setAttribute(d,p[0]),o.setAttribute(c,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(d,p[0]),e.of.setAttribute(c,p[1]))}if(e.g._cmdf||s){i=e.cst;var u=e.g.c;for(r=i.length,a=0;a<r;a+=1)(n=i[a]).setAttribute("offset",u[4*a]+"%"),n.setAttribute("stop-color","rgb("+u[4*a+1]+","+u[4*a+2]+","+u[4*a+3]+")")}if(l&&(e.g._omdf||s)){var g=e.g.o;for(r=(i=e.g._collapsable?e.cst:e.ost).length,a=0;a<r;a+=1)n=i[a],e.g._collapsable||n.setAttribute("offset",g[2*a]+"%"),n.setAttribute("stop-opacity",g[2*a+1])}if(1===t.t)(e.e._mdf||s)&&(o.setAttribute("x2",f[0]),o.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||s)&&(h=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),o.setAttribute("r",h),l&&!e.g._collapsable&&e.of.setAttribute("r",h)),e.e._mdf||e.h._mdf||e.a._mdf||s){h||(h=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var y=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=h*v,_=Math.cos(y+e.a.v)*b+p[0],k=Math.sin(y+e.a.v)*b+p[1];o.setAttribute("fx",_),o.setAttribute("fy",k),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",k))}}function n(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||s)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||s)&&i.pElem.setAttribute("stroke","rgb("+f(e.c.v[0])+","+f(e.c.v[1])+","+f(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||s)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return i;case"gf":return r;case"gs":return a;case"st":return n;case"sh":case"el":case"rc":case"sr":return s;case"tr":return e;default:return null}}}}();function ee(){}function se(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function ie(){}function ae(){}function re(){}function ne(){}function he(t,e,s){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function oe(t,e,s){this.initElement(t,e,s)}function le(t,e,s){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,s),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?Y.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function pe(t,e,s){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?F(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?Y.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function fe(t,e,s){this.textSpans=[],this.renderType="svg",this.initElement(t,e,s)}function me(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}ee.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=B(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId=D(),this.data.sr||(this.data.sr=1),this.effectsManager=new Pe(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},se.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},se.prototype.renderFrame=function(){},se.prototype.getBaseElement=function(){return null},se.prototype.destroy=function(){},se.prototype.sourceRectAtTime=function(){},se.prototype.hide=function(){},N([ee,jt,Ot,qt],se),ie.prototype={initRendererElement:function(){this.layerElement=T("g")},createContainerElements:function(){this.matteElement=T("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,s,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=T("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),i=a,this.globalData.defs.appendChild(a),gt.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=D(),e=yt.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(yt.createAlphaToLuminanceFilter()),(s=T("g")).appendChild(this.layerElement),i=s,a.appendChild(s),s.setAttribute("filter","url("+x+"#"+t+")"))}else if(2==this.data.td){var r=T("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type","alpha");var n=T("g");r.appendChild(n),t=D(),e=yt.createFilter(t);var h=T("feComponentTransfer");h.setAttribute("in","SourceGraphic"),e.appendChild(h);var o=T("feFuncA");o.setAttribute("type","table"),o.setAttribute("tableValues","1.0 0.0"),h.appendChild(o),this.globalData.defs.appendChild(e);var l=T("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+x+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,gt.maskType||(r.setAttribute("mask-type","luminance"),e.appendChild(yt.createAlphaToLuminanceFilter()),s=T("g"),n.appendChild(l),s.appendChild(this.layerElement),i=s,n.appendChild(s)),this.globalData.defs.appendChild(r)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=T("clipPath"),f=T("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=D();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var d=T("g");d.setAttribute("clip-path","url("+x+"#"+m+")"),d.appendChild(this.layerElement),this.transformedElement=d,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+x+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new Nt(this.data,this,this.globalData),this.renderableEffectsManager=new ce(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+x+"#"+t+")")}},ae.prototype={addShapeToModifiers:function(t){var e,s=this.shapeModifiers.length;for(e=0;e<s;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,s=0,i=e.length;s<i;){if(e[s].elem===t)return e[s].pos;s+=1}return 0},addProcessedElement:function(t,e){for(var s=this.processedElements,i=s.length;i;)if(s[i-=1].elem===t)return void(s[i].pos=e);s.push(new Xt(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},re.prototype.initElement=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new kt(this,t.t,this.dynamicProperties),this.textAnimator=new vt(t.t,this.renderType,this),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},re.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},re.prototype.createPathShape=function(t,e){var s,i,a=e.length,r="";for(s=0;s<a;s+=1)i=e[s].ks.k,r+=dt(i,i.i.length,!0,t);return r},re.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},re.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},re.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},re.prototype.applyTextPropertiesToMatrix=function(t,e,s,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s])/2,0,0)}e.translate(i,a,0)},re.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},re.prototype.emptyProp=new _t,re.prototype.destroy=function(){},N([ee,jt,Ot,qt,Ht],ne),ne.prototype.initElement=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ne.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var s,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),s=i-1;0<=s;s-=1)(this.completeLayers||this.elements[s])&&(this.elements[s].prepareFrame(this.renderedFrame-this.layers[s].st),this.elements[s]._mdf&&(this._mdf=!0))}},ne.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ne.prototype.setElements=function(t){this.elements=t},ne.prototype.getElements=function(){return this.elements},ne.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ne.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},N([ee,jt,ie,Ot,qt,Ht],he),he.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=T("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},he.prototype.sourceRectAtTime=function(){return this.sourceRect},N([he],oe),oe.prototype.createContent=function(){var t=T("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},le.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},N([Wt,ee,qt],le),le.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},le.prototype.show=function(){},le.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},le.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},le.prototype.resume=function(){this._canPlay=!0},le.prototype.setRate=function(t){this.audio.rate(t)},le.prototype.volume=function(t){this.audio.volume(t)},le.prototype.getBaseElement=function(){return null},le.prototype.destroy=function(){},le.prototype.sourceRectAtTime=function(){},le.prototype.initExpressions=function(){},N([Vt,ne,ie],pe),N([ee,jt,ie,Ot,qt,Ht,re],fe),fe.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=T("text"))},fe.prototype.buildTextContents=function(t){for(var e=0,s=t.length,i=[],a="";e<s;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(a),a=""):a+=t[e],e+=1;return i.push(a),i},fe.prototype.buildNewText=function(){var t,e,s=this.textProperty.currentData;this.renderedLetters=F(s?s.l.length:0),s.fc?this.layerElement.setAttribute("fill",this.buildColor(s.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(s.sc)),this.layerElement.setAttribute("stroke-width",s.sw)),this.layerElement.setAttribute("font-size",s.finalSize);var i=this.globalData.fontManager.getFontByName(s.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var a=s.fWeight,r=s.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",s.t);var n,h=s.l||[],o=!!this.globalData.fontManager.chars;e=h.length;var l,p=this.mHelper,f="",m=this.data.singleShape,d=0,c=0,u=!0,g=.001*s.tr*s.finalSize;if(!m||o||s.sz){var y,v,b=this.textSpans.length;for(t=0;t<e;t+=1)o&&m&&0!==t||(n=t<b?this.textSpans[t]:T(o?"path":"text"),b<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(s.finalSize/100,s.finalSize/100),m&&(h[t].n&&(d=-g,c+=s.yOffset,c+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(s,p,h[t].line,d,c),d+=h[t].l||0,d+=g),o?(l=(y=(v=this.globalData.fontManager.getCharData(s.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily))&&v.data||{}).shapes?y.shapes[0].it:[],m?f+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(m&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=h[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));m&&n&&n.setAttribute("d",f)}else{var _=this.textContainer,k="start";switch(s.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}_.setAttribute("text-anchor",k),_.setAttribute("letter-spacing",g);var x=this.buildTextContents(s.finalText);for(e=x.length,c=s.ps?s.ps[1]+s.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||T("tspan")).textContent=x[t],n.setAttribute("x",0),n.setAttribute("y",c),n.style.display="inherit",_.appendChild(n),this.textSpans[t]=n,c+=s.finalLineHeight;this.layerElement.appendChild(_)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},fe.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},fe.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var s,i,a=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;for(e=r.length,t=0;t<e;t+=1)r[t].n||(s=a[t],i=this.textSpans[t],s._mdf.m&&i.setAttribute("transform",s.m),s._mdf.o&&i.setAttribute("opacity",s.o),s._mdf.sw&&i.setAttribute("stroke-width",s.sw),s._mdf.sc&&i.setAttribute("stroke",s.sc),s._mdf.fc&&i.setAttribute("fill",s.fc))}},N([ee,jt,ie,ae,Ot,qt,Ht],me),me.prototype.initSecondaryElement=function(){},me.prototype.identityMatrix=new R,me.prototype.buildExpressionInterface=function(){},me.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},me.prototype.filterUniqueShapes=function(){var t,e,s,i,a=this.shapes.length,r=this.stylesList.length,n=[],h=!1;for(s=0;s<r;s+=1){for(i=this.stylesList[s],h=!1,t=n.length=0;t<a;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),h=e._isAnimated||h);1<n.length&&h&&this.setShapesAsAnimated(n)}},me.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].setAsAnimated()},me.prototype.createStyleElement=function(t,e){var s,i=new Yt(t,e),a=i.pElem;if("st"===t.ty)s=new Zt(this,t,i);else if("fl"===t.ty)s=new Ut(this,t,i);else if("gf"===t.ty||"gs"===t.ty){s=new("gf"===t.ty?Kt:Qt)(this,t,i),this.globalData.defs.appendChild(s.gf),s.maskId&&(this.globalData.defs.appendChild(s.ms),this.globalData.defs.appendChild(s.of),a.setAttribute("mask","url("+x+"#"+s.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",z[t.lc||2]),a.setAttribute("stroke-linejoin",V[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=B(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,s),s},me.prototype.createGroupElement=function(t){var e=new $t;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=B(t.bm)),e},me.prototype.createTransformElement=function(t,e){var s=G.getTransformProperty(this,t,this),i=new Jt(s,s.o,e);return this.addToAnimatedContents(t,i),i},me.prototype.createShapeElement=function(t,e,s){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=new Gt(e,s,K.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},me.prototype.addToAnimatedContents=function(t,e){for(var s=0,i=this.animatedContents.length;s<i;){if(this.animatedContents[s].element===e)return;s+=1}this.animatedContents.push({fn:te.createRenderFunction(t),element:e,data:t})},me.prototype.setElementStyles=function(t){var e,s=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||s.push(this.stylesList[e])},me.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},me.prototype.searchShapes=function(t,e,s,i,a,r,n){var h,o,l,p,f,m,d=[].concat(r),c=t.length-1,u=[],g=[];for(h=c;0<=h;h-=1){if((m=this.searchProcessedElement(t[h]))?e[h]=s[m-1]:t[h]._render=n,"fl"===t[h].ty||"st"===t[h].ty||"gf"===t[h].ty||"gs"===t[h].ty)m?e[h].style.closed=!1:e[h]=this.createStyleElement(t[h],a),t[h]._render&&e[h].style.pElem.parentNode!==i&&i.appendChild(e[h].style.pElem),u.push(e[h].style);else if("gr"===t[h].ty){if(m)for(l=e[h].it.length,o=0;o<l;o+=1)e[h].prevViewData[o]=e[h].it[o];else e[h]=this.createGroupElement(t[h]);this.searchShapes(t[h].it,e[h].it,e[h].prevViewData,e[h].gr,a+1,d,n),t[h]._render&&e[h].gr.parentNode!==i&&i.appendChild(e[h].gr)}else"tr"===t[h].ty?(m||(e[h]=this.createTransformElement(t[h],i)),p=e[h].transform,d.push(p)):"sh"===t[h].ty||"rc"===t[h].ty||"el"===t[h].ty||"sr"===t[h].ty?(m||(e[h]=this.createShapeElement(t[h],d,a)),this.setElementStyles(e[h])):"tm"===t[h].ty||"rd"===t[h].ty||"ms"===t[h].ty||"pb"===t[h].ty?(m?(f=e[h]).closed=!1:((f=Q.getModifier(t[h].ty)).init(this,t[h]),e[h]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===t[h].ty&&(m?(f=e[h]).closed=!0:(f=Q.getModifier(t[h].ty),(e[h]=f).init(this,t,h,e),this.shapeModifiers.push(f),n=!1),g.push(f));this.addProcessedElement(t[h],h+1)}for(c=u.length,h=0;h<c;h+=1)u[h].closed=!0;for(c=g.length,h=0;h<c;h+=1)g[h].closed=!0},me.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},me.prototype.renderShape=function(){var t,e,s=this.animatedContents.length;for(t=0;t<s;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},me.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};var de=[];function ce(){}function ue(){}function ge(){}function ye(t,e,s){this.initElement(t,e,s)}function ve(t,e,s){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?F(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?Y.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function be(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=T("g"),this.initElement(t,e,s),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function _e(t,e,s){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,s)}function ke(t,e,s){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s)}function xe(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initHierarchy();var i=Y.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var a,r=t.ks.or.k.length;for(a=0;a<r;a+=1)t.ks.or.k[a].to=null,t.ks.or.k[a].ti=null}this.or=i(this,t.ks.or,1,j,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,j,this),this.ry=i(this,t.ks.ry,0,j,this),this.rz=i(this,t.ks.rz,0,j,this),this.mat=new R,this._prevMat=new R,this._isFirstFrame=!0,this.finalTransform={mProp:this}}ue.prototype.renderFrame=function(){},(ge.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=M(this.data.tg||"div"),this.data.hasMask?(this.svgElement=T("svg"),this.layerElement=T("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,A(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new ue(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new Nt(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}}).getBaseElement=ie.prototype.getBaseElement,ge.prototype.destroyBaseElement=ge.prototype.destroy,ge.prototype.buildElementParenting=Rt.prototype.buildElementParenting,N([ee,jt,ge,Ot,qt,Ht],ye),ye.prototype.createContent=function(){var t;this.data.hasMask?((t=T("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=M("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},N([Rt,ne,ge],ve),ve.prototype._createBaseContainerElements=ve.prototype.createContainerElements,ve.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},ve.prototype.addTo3dContainer=function(t,e){for(var s,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(s=this.elements[i].getBaseElement()),i+=1;s?this.layerElement.insertBefore(t,s):this.layerElement.appendChild(t)},N([ee,jt,ye,me,ge,Ot,qt,Wt],be),be.prototype._renderShapeFrame=be.prototype.renderInnerContent,be.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=T("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},be.prototype.getTransformedPoint=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e=t[s].mProps.v.applyToPointArray(e[0],e[1],0);return e},be.prototype.calculateShapeBoundingBox=function(t,e){var s,i,a,r,n,h=t.sh.v,o=t.transformers,l=h._length;if(!(l<=1)){for(s=0;s<l-1;s+=1)i=this.getTransformedPoint(o,h.v[s]),a=this.getTransformedPoint(o,h.o[s]),r=this.getTransformedPoint(o,h.i[s+1]),n=this.getTransformedPoint(o,h.v[s+1]),this.checkBounds(i,a,r,n,e);h.c&&(i=this.getTransformedPoint(o,h.v[s]),a=this.getTransformedPoint(o,h.o[s]),r=this.getTransformedPoint(o,h.i[0]),n=this.getTransformedPoint(o,h.v[0]),this.checkBounds(i,a,r,n,e))}},be.prototype.checkBounds=function(t,e,s,i,a){this.getBoundsOfCurve(t,e,s,i);var r=this.shapeBoundingBox;a.x=c(r.left,a.x),a.xMax=d(r.right,a.xMax),a.y=c(r.top,a.y),a.yMax=d(r.bottom,a.yMax)},be.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},be.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},be.prototype.getBoundsOfCurve=function(t,e,s,i){for(var a,r,n,h,o,l,p,f=[[t[0],i[0]],[t[1],i[1]]],m=0;m<2;++m)r=6*t[m]-12*e[m]+6*s[m],a=-3*t[m]+9*e[m]-9*s[m]+3*i[m],n=3*e[m]-3*t[m],r|=0,n|=0,0===(a|=0)&&0===r||(0===a?0<(h=-n/r)&&h<1&&f[m].push(this.calculateF(h,t,e,s,i,m)):0<=(o=r*r-4*n*a)&&(0<(l=(-r+k(o))/(2*a))&&l<1&&f[m].push(this.calculateF(l,t,e,s,i,m)),0<(p=(-r-k(o))/(2*a))&&p<1&&f[m].push(this.calculateF(p,t,e,s,i,m))));this.shapeBoundingBox.left=c.apply(null,f[0]),this.shapeBoundingBox.top=c.apply(null,f[1]),this.shapeBoundingBox.right=d.apply(null,f[0]),this.shapeBoundingBox.bottom=d.apply(null,f[1])},be.prototype.calculateF=function(t,e,s,i,a,r){return _(1-t,3)*e[r]+3*_(1-t,2)*t*s[r]+3*(1-t)*_(t,2)*i[r]+_(t,3)*a[r]},be.prototype.calculateBoundingBox=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]&&t[s].sh?this.calculateShapeBoundingBox(t[s],e):t[s]&&t[s].it&&this.calculateBoundingBox(t[s].it,e)},be.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},be.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var s=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),s=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),s=!0),s||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,a="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=a,i.webkitTransform=a}}},N([ee,jt,ge,Ot,qt,Ht,re],_e),_e.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=T("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},_e.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=F(t.l?t.l.length:0);var e=this.innerElem.style,s=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=s,e.color=s,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,a,r=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",r.fClass)this.innerElem.className=r.fClass;else{e.fontFamily=r.fFamily;var n=t.fWeight,h=t.fStyle;e.fontStyle=h,e.fontWeight=n}var o,l,p,f=t.l;a=f.length;var m,d=this.mHelper,c="",u=0;for(i=0;i<a;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?o=this.textPaths[u]:((o=T("path")).setAttribute("stroke-linecap",z[1]),o.setAttribute("stroke-linejoin",V[2]),o.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=M("div")).style.lineHeight=0,(p=T("svg")).appendChild(o),A(l)))):this.isMasked?o=this.textPaths[u]?this.textPaths[u]:T("text"):this.textSpans[u]?(l=this.textSpans[u],o=this.textPaths[u]):(A(l=M("span")),A(o=M("span")),l.appendChild(o)),this.globalData.fontManager.chars){var g,y=this.globalData.fontManager.getCharData(t.finalText[i],r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(g=y?y.data:null,d.reset(),g&&g.shapes&&(m=g.shapes[0].it,d.scale(t.finalSize/100,t.finalSize/100),c=this.createPathShape(d,m),o.setAttribute("d",c)),this.isMasked)this.innerElem.appendChild(o);else{if(this.innerElem.appendChild(l),g&&g.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,_="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=_,b.webkitTransform=_,f[i].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(o.textContent=f[i].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(o);else{this.innerElem.appendChild(l);var k=o.style,x="translate3d(0,"+-t.finalSize/1.2+"px,0)";k.transform=x,k.webkitTransform=x}this.isMasked?this.textSpans[u]=o:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=o,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},_e.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var s,i,a,r,n,h=0,o=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(i=l.length,s=0;s<i;s+=1)l[s].n?h+=1:(r=this.textSpans[s],n=this.textPaths[s],a=o[h],h+=1,a._mdf.m&&(this.isMasked?r.setAttribute("transform",a.m):(r.style.webkitTransform=a.m,r.style.transform=a.m)),r.style.opacity=a.o,a.sw&&a._mdf.sw&&n.setAttribute("stroke-width",a.sw),a.sc&&a._mdf.sc&&n.setAttribute("stroke",a.sc),a.fc&&a._mdf.fc&&(n.setAttribute("fill",a.fc),n.style.color=a.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},N([ee,jt,ge,ye,Ot,qt,Wt],ke),ke.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=T("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},N([ee,qt,Ot],xe),xe.prototype.setup=function(){var t,e,s,i,a=this.comp.threeDElements.length;for(t=0;t<a;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){s=e.perspectiveElem.style,i=e.container.style;var r=this.pe.v+"px",n="0px 0px 0px",h="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.perspective=r,s.webkitPerspective=r,i.transformOrigin=n,i.mozTransformOrigin=n,i.webkitTransformOrigin=n,s.transform=h,s.webkitTransform=h}},xe.prototype.createElements=function(){},xe.prototype.hide=function(){},xe.prototype.renderFrame=function(){var t,e,s=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)s=this.hierarchy[t].finalTransform.mProp._mdf||s;if(s||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;0<=t;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var a;a=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var r=Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)),n=[a[0]/r,a[1]/r,a[2]/r],h=Math.sqrt(n[2]*n[2]+n[0]*n[0]),o=Math.atan2(n[1],h),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-o)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,d;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var c=this.mat.toCSS();(d=f.container.style).transform=c,d.webkitTransform=c}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},xe.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},xe.prototype.destroy=function(){},xe.prototype.getBaseElement=function(){return null};var we=function(){var t={},a=[],i=0,r=0,n=0,h=!0,o=!1;function s(t){for(var e=0,s=t.target;e<r;)a[e].animation===s&&(a.splice(e,1),e-=1,r-=1,s.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var s=0;s<r;){if(a[s].elem===t&&null!==a[s].elem)return a[s].animation;s+=1}var i=new Ae;return m(i,t),i.setData(t,e),i}function p(){n+=1,c()}function f(){n-=1}function m(t,e){t.addEventListener("destroy",s),t.addEventListener("_active",p),t.addEventListener("_idle",f),a.push({elem:e,animation:t}),r+=1}function d(t){var e,s=t-i;for(e=0;e<r;e+=1)a[e].animation.advanceTime(s);i=t,n&&!o?window.requestAnimationFrame(d):h=!0}function e(t){i=t,window.requestAnimationFrame(d)}function c(){!o&&n&&h&&(window.requestAnimationFrame(e),h=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new Ae;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setSpeed(t,e)},t.setDirection=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.togglePause(t)},t.searchAnimations=function(t,e,s){var i,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),r=a.length;for(i=0;i<r;i+=1)s&&a[i].setAttribute("data-bm-type",s),l(a[i],t);if(e&&0===r){s||(s="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var h=M("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",s),n.appendChild(h),l(h,t)}},t.resize=function(){var t;for(t=0;t<r;t+=1)a[t].animation.resize()},t.goToAndStop=function(t,e,s){var i;for(i=0;i<r;i+=1)a[i].animation.goToAndStop(t,e,s)},t.destroy=function(t){var e;for(e=r-1;0<=e;e-=1)a[e].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,c()},t.setVolume=function(t,e){var s;for(s=0;s<r;s+=1)a[s].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<r;e+=1)a[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=a.length,s=[];for(t=0;t<e;t+=1)s.push(a[t].animation);return s},t}(),Ae=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=D(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=a,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface={},this.imagePreloader=new ut,this.audioController=ct(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};function Pe(){this.effectElements=[]}N([E],Ae),Ae.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new Vt(this,t.rendererSettings);break;default:this.renderer=new Rt(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),O.loadAnimation(t.path,this.configAnimation,this.onSetupError))},Ae.prototype.onSetupError=function(){this.trigger("data_failed")},Ae.prototype.setupAnimation=function(t){O.completeAnimation(t,this.configAnimation)},Ae.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var s={wrapper:t,animationData:e},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===a?s.loop=!1:"true"===a?s.loop=!0:""!==a&&(s.loop=parseInt(a,10));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;s.autoplay="false"!==r,s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(s.prerender=!1),this.setParams(s)},Ae.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;s<n;s+=1)for(e=0;e<a;){if(i[e].id===r[s].id){i[e]=r[s];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,O.completeAnimation(this.animationData,this.onSegmentComplete)},Ae.prototype.onSegmentComplete=function(t){this.animationData=t,i&&i.initExpressions(this),this.loadNextSegment()},Ae.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,O.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},Ae.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Ae.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},Ae.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},Ae.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=Bt(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},Ae.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},Ae.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,i&&i.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},Ae.prototype.resize=function(){this.renderer.updateContainerSize()},Ae.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},Ae.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Ae.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},Ae.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Ae.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Ae.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},Ae.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Ae.prototype.getMarkerData=function(t){for(var e,s=0;s<this.markers.length;s+=1)if((e=this.markers[s]).payload&&e.payload.name===t)return e;return null},Ae.prototype.goToAndStop=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},Ae.prototype.goToAndPlay=function(t,e,s){if(!s||this.name===s){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(i,e,s);this.play()}},Ae.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(s=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},Ae.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},Ae.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)},Ae.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},Ae.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},Ae.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},Ae.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},Ae.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},Ae.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},Ae.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},Ae.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},Ae.prototype.getVolume=function(){return this.audioController.getVolume()},Ae.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},Ae.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},Ae.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},Ae.prototype.getPath=function(){return this.path},Ae.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},Ae.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},Ae.prototype.hide=function(){this.renderer.hide()},Ae.prototype.show=function(){this.renderer.show()},Ae.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},Ae.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new l(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new u(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new m(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new g(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new y(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new l(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new u(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new m(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new g(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new y(t,this))},Ae.prototype.triggerRenderFrameError=function(t){var e=new b(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},Ae.prototype.triggerConfigError=function(t){var e=new P(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var lottie={};function De(){!0===Se?we.searchAnimations(Ee,Se,Te):we.searchAnimations()}lottie.play=we.play,lottie.pause=we.pause,lottie.setLocationHref=function(t){x=t},lottie.togglePause=we.togglePause,lottie.setSpeed=we.setSpeed,lottie.setDirection=we.setDirection,lottie.stop=we.stop,lottie.searchAnimations=De,lottie.registerAnimation=we.registerAnimation,lottie.loadAnimation=function(t){return!0===Se&&(t.animationData=JSON.parse(Ee)),we.loadAnimation(t)},lottie.setSubframeRendering=function(t){a=t},lottie.resize=we.resize,lottie.goToAndStop=we.goToAndStop,lottie.destroy=we.destroy,lottie.setQuality=function(t){if("string"==typeof t)switch(t){case"high":w=200;break;default:case"medium":w=50;break;case"low":w=10}else!isNaN(t)&&1<t&&(w=t);o(!(50<=w))},lottie.inBrowser=function(){return"undefined"!=typeof navigator},lottie.installPlugin=function(t,e){"expressions"===t&&(i=e)},lottie.freeze=we.freeze,lottie.unfreeze=we.unfreeze,lottie.setVolume=we.setVolume,lottie.mute=we.mute,lottie.unmute=we.unmute,lottie.getRegisteredAnimations=we.getRegisteredAnimations,lottie.useWebWorker=function(t){p=t},lottie.setIDPrefix=function(t){r=t},lottie.__getFactory=function(t){switch(t){case"propertyFactory":return Y;case"shapePropertyFactory":return K;case"matrix":return R;default:return null}},lottie.version="5.8.1";var Ce,Se="__[STANDALONE]__",Ee="__[ANIMATIONDATA]__",Te="";if(Se){var Me=document.getElementsByTagName("script"),Fe=Me[Me.length-1]||{src:""};Ce=Fe.src.replace(/^[^\?]+\??/,""),Te=function(t){for(var e=Ce.split("&"),s=0;s<e.length;s+=1){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}("renderer")}var Ie=setInterval(function(){"complete"===document.readyState&&(clearInterval(Ie),De())},100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var t="",e=!1,i=-999999,s=function(){return t};function r(t){return document.createElement(t)}function a(t,e){var i,s,r=t.length;for(i=0;i<r;i+=1)for(var a in s=t[i].prototype)Object.prototype.hasOwnProperty.call(s,a)&&(e.prototype[a]=s[a])}function n(t,e){return Object.getOwnPropertyDescriptor(t,e)}function o(t){function e(){}return e.prototype=t,e}var h=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,i=this.audios.length;for(e=0;e<i;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),l=function(){function t(t,e){var i,s=0,r=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(s=0;s<e;s+=1)r.push(i);return r}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,i){return"float32"===e?new Float32Array(i):"int16"===e?new Int16Array(i):"uint8c"===e?new Uint8ClampedArray(i):t(e,i)}:t}();function p(t){return Array.apply(null,{length:t})}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}var m=!0,d=null,u="",c=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),g=Math.pow,y=Math.sqrt,v=Math.floor,b=Math.max,_=Math.min,k={};!function(){var t,e=["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"],i=e.length;for(t=0;t<i;t+=1)k[e[t]]=Math[e[t]]}(),k.random=Math.random,k.abs=function(t){if("object"===f(t)&&t.length){var e,i=p(t.length),s=t.length;for(e=0;e<s;e+=1)i[e]=Math.abs(t[e]);return i}return Math.abs(t)};var x=150,P=Math.PI/180,A=.5519;function w(t){!!t}function E(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function C(t,e,i,s){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=s<0?-1:1}function D(t,e){this.type=t,this.direction=e<0?-1:1}function S(t,e,i,s){this.type=t,this.currentLoop=i,this.totalLoops=e,this.direction=s<0?-1:1}function M(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function F(t,e){this.type=t,this.target=e}function T(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function I(t){this.type="configError",this.nativeError=t}var B,L=(B=0,function(){return u+"__lottie_element_"+(B+=1)});function z(t,e,i){var s,r,a,n,o,h,l,p;switch(h=i*(1-e),l=i*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=i*(1-(1-o)*e),n%6){case 0:s=i,r=p,a=h;break;case 1:s=l,r=i,a=h;break;case 2:s=h,r=i,a=p;break;case 3:s=h,r=l,a=i;break;case 4:s=p,r=h,a=i;break;case 5:s=i,r=h,a=l}return[s,r,a]}function R(t,e,i){var s,r=Math.max(t,e,i),a=Math.min(t,e,i),n=r-a,o=0===r?0:n/r,h=r/255;switch(r){case a:s=0;break;case t:s=e-i+n*(e<i?6:0),s/=6*n;break;case e:s=i-t+2*n,s/=6*n;break;case i:s=t-e+4*n,s/=6*n}return[s,o,h]}function V(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[1]+=e,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),z(i[0],i[1],i[2])}function O(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),z(i[0],i[1],i[2])}function N(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),z(i[0],i[1],i[2])}var G=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,s){return t<0&&(t=0),e<0&&(e=0),s<0&&(s=0),"#"+i[t]+i[e]+i[s]}}(),j=function(){return d},q=function(t){x=t},W=function(){return x};function H(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}var Y=function(){var t,i,s=1,r=[],a={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){a.onmessage({data:t})}};function o(i){if(window.Worker&&window.Blob&&e){var s=new Blob(["var _workerSelf = self; self.onmessage = ",i.toString()],{type:"text/javascript"}),r=URL.createObjectURL(s);return new Worker(r)}return t=i,a}function h(){i||(i=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(r,a){var n,o,h,l,p,m,d=r.length;for(o=0;o<d;o+=1)if("ks"in(n=r[o])&&!n.completed){if(n.completed=!0,n.tt&&(r[o-1].td=n.tt),n.hasMask){var u=n.masksProperties;for(l=u.length,h=0;h<l;h+=1)if(u[h].pt.k.i)s(u[h].pt.k);else for(m=u[h].pt.k.length,p=0;p<m;p+=1)u[h].pt.k[p].s&&s(u[h].pt.k[p].s[0]),u[h].pt.k[p].e&&s(u[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,a),t(n.layers,a)):4===n.ty?i(n.shapes):5===n.ty&&f(n)}}function e(t,e){var i=function(t,e){for(var i=0,s=e.length;i<s;){if(e[i].id===t)return e[i];i+=1}return null}(t,e);return i?i.layers.__used?JSON.parse(JSON.stringify(i.layers)):(i.layers.__used=!0,i.layers):null}function i(t){var e,r,a;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)s(t[e].ks.k);else for(a=t[e].ks.k.length,r=0;r<a;r+=1)t[e].ks.k[r].s&&s(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&s(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&i(t[e].it)}function s(t){var e,i=t.i.length;for(e=0;e<i;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function r(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,i,s,r=t.length;for(e=0;e<r;e+=1)5===t[e].ty&&(s=void 0,s=(i=t[e]).t.d,i.t.d={k:[{s:s,t:0}]})}return function(i){if(r(t,i.v)&&(e(i.layers),i.assets)){var s,a=i.assets.length;for(s=0;s<a;s+=1)i.assets[s].layers&&e(i.assets[s].layers)}}}(),o=(a=[4,7,99],function(t){if(t.chars&&!r(a,t.v)){var e,s=t.chars.length;for(e=0;e<s;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(i(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=void 0,"number"==typeof(i=t[e].t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(i){if(r(t,i.v)&&(e(i.layers),i.assets)){var s,a=i.assets.length;for(s=0;s<a;s+=1)i.assets[s].layers&&e(i.assets[s].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var i,s,r,a=t.length;for(i=0;i<a;i+=1)if("gr"===t[i].ty)e(t[i].it);else if("fl"===t[i].ty||"st"===t[i].ty)if(t[i].c.k&&t[i].c.k[0].i)for(r=t[i].c.k.length,s=0;s<r;s+=1)t[i].c.k[s].s&&(t[i].c.k[s].s[0]/=255,t[i].c.k[s].s[1]/=255,t[i].c.k[s].s[2]/=255,t[i].c.k[s].s[3]/=255),t[i].c.k[s].e&&(t[i].c.k[s].e[0]/=255,t[i].c.k[s].e[1]/=255,t[i].c.k[s].e[2]/=255,t[i].c.k[s].e[3]/=255);else t[i].c.k[0]/=255,t[i].c.k[1]/=255,t[i].c.k[2]/=255,t[i].c.k[3]/=255}function i(t){var i,s=t.length;for(i=0;i<s;i+=1)4===t[i].ty&&e(t[i].shapes)}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var s,a=e.assets.length;for(s=0;s<a;s+=1)e.assets[s].layers&&i(e.assets[s].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var i,s,r;for(i=t.length-1;i>=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(r=t[i].ks.k.length,s=0;s<r;s+=1)t[i].ks.k[s].s&&(t[i].ks.k[s].s[0].c=t[i].closed),t[i].ks.k[s].e&&(t[i].ks.k[s].e[0].c=t[i].closed);else"gr"===t[i].ty&&e(t[i].it)}function i(t){var i,s,r,a,n,o,h=t.length;for(s=0;s<h;s+=1){if((i=t[s]).hasMask){var l=i.masksProperties;for(a=l.length,r=0;r<a;r+=1)if(l[r].pt.k.i)l[r].pt.k.c=l[r].cl;else for(o=l[r].pt.k.length,n=0;n<o;n+=1)l[r].pt.k[n].s&&(l[r].pt.k[n].s[0].c=l[r].cl),l[r].pt.k[n].e&&(l[r].pt.k[n].e[0].c=l[r].cl)}4===i.ty&&e(i.shapes)}}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var s,a=e.assets.length;for(s=0;s<a;s+=1)e.assets[s].layers&&i(e.assets[s].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var m={completeData:function(i){i.__complete||(l(i),n(i),o(i),h(i),p(i),t(i.layers,i.assets),function(i,s){if(i){var r=0,a=i.length;for(r=0;r<a;r+=1)1===i[r].t&&(i[r].data.layers=e(i[r].data.refId,s),t(i[r].data.layers,s))}}(i.chars,i.assets),i.__complete=!0)}};return m.checkColors=l,m.checkChars=o,m.checkPathProperties=h,m.checkShapes=p,m.completeLayers=t,m}()),n.assetLoader||(n.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===X(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,i,s,r){var a,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)a=t(n),s(a);else try{a=t(n),s(a)}catch(t){r&&r(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",i+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)n.assetLoader.load(t.data.path,t.data.fullPath,(function(e){n.dataManager.completeData(e),n.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){n.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;n.dataManager.completeData(e),n.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&n.assetLoader.load(t.data.path,t.data.fullPath,(function(e){n.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){n.postMessage({id:t.data.id,status:"error"})}))})),i.onmessage=function(t){var e=t.data,i=e.id,s=r[i];r[i]=null,"success"===e.status?s.onComplete(e.payload):s.onError&&s.onError()})}function l(t,e){var i="processId_"+(s+=1);return r[i]={onComplete:t,onError:e},i}return{loadAnimation:function(t,e,s){h();var r=l(e,s);i.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},loadData:function(t,e,s){h();var r=l(e,s);i.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},completeAnimation:function(t,e,s){h();var r=l(e,s);i.postMessage({type:"complete",animation:t,id:r})}}}(),Z=function(){var t=function(){var t=r("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(t,e,i){var s="";if(t.e)s=t.p;else if(e){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),s=e+r}else s=i,s+=t.u?t.u:"",s+=t.p;return s}function a(t){var e=0,i=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},i=s(t,this.assetsPath,this.path);return Y.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var s=t.length;for(i=0;i<s;i+=1)t[i].layers||(t[i].t&&"seq"!==t[i].t?3===t[i].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[i]))):(this.totalImages+=1,this.images.push(this._createImageData(t[i]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,i=this.images.length;e<i;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var i=s(e,this.assetsPath,this.path),a=r("img");a.crossOrigin="anonymous",a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){n.img=t,this._imageLoaded()}.bind(this),!1),a.src=i;var n={img:a,assetData:e};return n},createImageData:function(e){var i=s(e,this.assetsPath,this.path),r=H("image");c?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",i),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var a={img:r,assetData:e};return a},imageLoaded:e,footageLoaded:i,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},o}();function K(){}K.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var i=this._cbs[t],s=0;s<i.length;s+=1)i[s](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var i=0,s=this._cbs[t].length;i<s;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,s-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var J=function(){function t(t){for(var e,i=t.split("\r\n"),s={},r=0,a=0;a<i.length;a+=1)2===(e=i[a].split(":")).length&&(s[e[0]]=e[1].trim(),r+=1);if(0===r)throw new Error;return s}return function(e){for(var i=[],s=0;s<e.length;s+=1){var r=e[s],a={time:r.tm,duration:r.dr};try{a.payload=JSON.parse(e[s].cm)}catch(i){try{a.payload=t(e[s].cm)}catch(t){a.payload={name:e[s]}}}i.push(a)}return i}}(),U=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,i=this.compositions.length;e<i;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),Q={};function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}var tt=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=L(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=m,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=U(),this.imagePreloader=new Z,this.audioController=h(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};a([K],tt),tt.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var i=Q[e];this.renderer=new i(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),Y.loadAnimation(t.path,this.configAnimation,this.onSetupError))},tt.prototype.onSetupError=function(){this.trigger("data_failed")},tt.prototype.setupAnimation=function(t){Y.completeAnimation(t,this.configAnimation)},tt.prototype.setData=function(t,e){e&&"object"!==$(e)&&(e=JSON.parse(e));var i={wrapper:t,animationData:e},s=t.attributes;i.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",i.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:"canvas";var r=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";"false"===r?i.loop=!1:"true"===r?i.loop=!0:""!==r&&(i.loop=parseInt(r,10));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:!s.getNamedItem("bm-autoplay")||s.getNamedItem("bm-autoplay").value;i.autoplay="false"!==a,i.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"","false"===(s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"")&&(i.prerender=!1),this.setParams(i)},tt.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,s=this.animationData.layers,r=s.length,a=t.layers,n=a.length;for(i=0;i<n;i+=1)for(e=0;e<r;){if(s[e].id===a[i].id){s[e]=a[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(r=t.assets.length,e=0;e<r;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,Y.completeAnimation(this.animationData,this.onSegmentComplete)},tt.prototype.onSegmentComplete=function(t){this.animationData=t;var e=j();e&&e.initExpressions(this),this.loadNextSegment()},tt.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,Y.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},tt.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},tt.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},tt.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},tt.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=J(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},tt.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},tt.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=j();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},tt.prototype.resize=function(){this.renderer.updateContainerSize()},tt.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},tt.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},tt.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},tt.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},tt.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},tt.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},tt.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},tt.prototype.getMarkerData=function(t){for(var e,i=0;i<this.markers.length;i+=1)if((e=this.markers[i]).payload&&e.payload.name===t)return e;return null},tt.prototype.goToAndStop=function(t,e,i){if(!i||this.name===i){var s=Number(t);if(isNaN(s)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},tt.prototype.goToAndPlay=function(t,e,i){if(!i||this.name===i){var s=Number(t);if(isNaN(s)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0))}else this.goToAndStop(s,e,i);this.play()}},tt.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},tt.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},tt.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?i=t:this.currentRawFrame+this.firstFrame>e&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},tt.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===$(t[0])){var i,s=t.length;for(i=0;i<s;i+=1)this.segments.push(t[i])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},tt.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},tt.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},tt.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},tt.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},tt.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},tt.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},tt.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},tt.prototype.getVolume=function(){return this.audioController.getVolume()},tt.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},tt.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},tt.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},tt.prototype.getPath=function(){return this.path},tt.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var i=t.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},tt.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;e<i;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},tt.prototype.hide=function(){this.renderer.hide()},tt.prototype.show=function(){this.renderer.show()},tt.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},tt.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new C(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new S(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new D(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new M(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new F(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new C(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new S(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new D(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new M(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new F(t,this))},tt.prototype.triggerRenderFrameError=function(t){var e=new T(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},tt.prototype.triggerConfigError=function(t){var e=new I(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var et=function(){var t={},e=[],i=0,s=0,a=0,n=!0,o=!1;function h(t){for(var i=0,r=t.target;i<s;)e[i].animation===r&&(e.splice(i,1),i-=1,s-=1,r.isPaused||f()),i+=1}function l(t,i){if(!t)return null;for(var r=0;r<s;){if(e[r].elem===t&&null!==e[r].elem)return e[r].animation;r+=1}var a=new tt;return m(a,t),a.setData(t,i),a}function p(){a+=1,c()}function f(){a-=1}function m(t,i){t.addEventListener("destroy",h),t.addEventListener("_active",p),t.addEventListener("_idle",f),e.push({elem:i,animation:t}),s+=1}function d(t){var r,h=t-i;for(r=0;r<s;r+=1)e[r].animation.advanceTime(h);i=t,a&&!o?window.requestAnimationFrame(d):n=!0}function u(t){i=t,window.requestAnimationFrame(d)}function c(){!o&&a&&n&&(window.requestAnimationFrame(u),n=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new tt;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,i){var r;for(r=0;r<s;r+=1)e[r].animation.setSpeed(t,i)},t.setDirection=function(t,i){var r;for(r=0;r<s;r+=1)e[r].animation.setDirection(t,i)},t.play=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.play(t)},t.pause=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.pause(t)},t.stop=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.stop(t)},t.togglePause=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.togglePause(t)},t.searchAnimations=function(t,e,i){var s,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=a.length;for(s=0;s<n;s+=1)i&&a[s].setAttribute("data-bm-type",i),l(a[s],t);if(e&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerText="";var h=r("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),l(h,t)}},t.resize=function(){var t;for(t=0;t<s;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,i,r){var a;for(a=0;a<s;a+=1)e[a].animation.goToAndStop(t,i,r)},t.destroy=function(t){var i;for(i=s-1;i>=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,c()},t.setVolume=function(t,i){var r;for(r=0;r<s;r+=1)e[r].animation.setVolume(t,i)},t.mute=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.mute(t)},t.unmute=function(t){var i;for(i=0;i<s;i+=1)e[i].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,i=e.length,s=[];for(t=0;t<i;t+=1)s.push(e[t].animation);return s},t}(),it=function(){var t={getBezierEasing:function(t,i,s,r,a){var n=a||("bez_"+t+"_"+i+"_"+s+"_"+r).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,i,s,r]);return e[n]=o,o}},e={};var i=.1,s="function"==typeof Float32Array;function r(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,i){return((r(e,i)*t+a(e,i))*t+n(e))*t}function h(t,e,i){return 3*r(e,i)*t*t+2*a(e,i)*t+n(e)}function l(t){this._p=t,this._mSampleValues=s?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],i=this._p[1],s=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===i&&s===r?t:0===t?0:1===t?1:o(this._getTForX(t),i,r)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],s=this._p[3];this._precomputed=!0,t===e&&i===s||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<11;++s)this._mSampleValues[s]=o(s*i,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],r=this._mSampleValues,a=0,n=1;10!==n&&r[n]<=t;++n)a+=i;var l=a+(t-r[--n])/(r[n+1]-r[n])*i,p=h(l,e,s);return p>=.001?function(t,e,i,s){for(var r=0;r<4;++r){var a=h(e,i,s);if(0===a)return e;e-=(o(e,i,s)-t)/a}return e}(t,l,e,s):0===p?l:function(t,e,i,s,r){var a,n,h=0;do{(a=o(n=e+(i-e)/2,s,r)-t)>0?i=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+i,e,s)}},t}(),st={double:function(t){return t.concat(p(t.length))}},rt=function(t,e,i){var s=0,r=t,a=p(r);return{newElement:function(){return s?a[s-=1]:e()},release:function(t){s===r&&(a=st.double(a),r*=2),i&&i(t),a[s]=t,s+=1}}},at=rt(8,(function(){return{addedLength:0,percents:l("float32",W()),lengths:l("float32",W())}})),nt=rt(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,i=t.lengths.length;for(e=0;e<i;e+=1)at.release(t.lengths[e]);t.lengths.length=0}));var ot=function(){var t=Math;function e(t,e,i,s,r,a){var n=t*s+e*r+i*a-r*s-a*t-i*e;return n>-.001&&n<.001}var i=function(t,e,i,s){var r,a,n,o,h,l,p=W(),f=0,m=[],d=[],u=at.newElement();for(n=i.length,r=0;r<p;r+=1){for(h=r/(p-1),l=0,a=0;a<n;a+=1)o=g(1-h,3)*t[a]+3*g(1-h,2)*h*i[a]+3*(1-h)*g(h,2)*s[a]+g(h,3)*e[a],m[a]=o,null!==d[a]&&(l+=g(m[a]-d[a],2)),d[a]=m[a];l&&(f+=l=y(l)),u.percents[r]=h,u.lengths[r]=f}return u.addedLength=f,u};function s(t){this.segmentLength=0,this.points=new Array(t)}function r(t,e){this.partialLength=t,this.point=e}var a,n=(a={},function(t,i,n,o){var h=(t[0]+"_"+t[1]+"_"+i[0]+"_"+i[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!a[h]){var l,f,m,d,u,c,v,b=W(),_=0,k=null;2===t.length&&(t[0]!==i[0]||t[1]!==i[1])&&e(t[0],t[1],i[0],i[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],i[0],i[1],i[0]+o[0],i[1]+o[1])&&(b=2);var x=new s(b);for(m=n.length,l=0;l<b;l+=1){for(v=p(m),u=l/(b-1),c=0,f=0;f<m;f+=1)d=g(1-u,3)*t[f]+3*g(1-u,2)*u*(t[f]+n[f])+3*(1-u)*g(u,2)*(i[f]+o[f])+g(u,3)*i[f],v[f]=d,null!==k&&(c+=g(v[f]-k[f],2));_+=c=y(c),x.points[l]=new r(c,v),k=v}x.segmentLength=_,a[h]=x}return a[h]});function o(t,e){var i=e.percents,s=e.lengths,r=i.length,a=v((r-1)*t),n=t*e.addedLength,o=0;if(a===r-1||0===a||n===s[a])return i[a];for(var h=s[a]>n?-1:1,l=!0;l;)if(s[a]<=n&&s[a+1]>n?(o=(n-s[a])/(s[a+1]-s[a]),l=!1):a+=h,a<0||a>=r-1){if(a===r-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var h=l("float32",8);return{getSegmentsLength:function(t){var e,s=nt.newElement(),r=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=s.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=i(a[e],a[e+1],n[e],o[e+1]),p+=l[e].addedLength;return r&&h&&(l[e]=i(a[e],a[0],n[e],o[0]),p+=l[e].addedLength),s.totalLength=p,s},getNewSegment:function(e,i,s,r,a,n,l){a<0?a=0:a>1&&(a=1);var p,f=o(a,l),m=o(n=n>1?1:n,l),d=e.length,u=1-f,c=1-m,g=u*u*u,y=f*u*u*3,v=f*f*u*3,b=f*f*f,_=u*u*c,k=f*u*c+u*f*c+u*u*m,x=f*f*c+u*f*m+f*u*m,P=f*f*m,A=u*c*c,w=f*c*c+u*m*c+u*c*m,E=f*m*c+u*m*m+f*c*m,C=f*m*m,D=c*c*c,S=m*c*c+c*m*c+c*c*m,M=m*m*c+c*m*m+m*c*m,F=m*m*m;for(p=0;p<d;p+=1)h[4*p]=t.round(1e3*(g*e[p]+y*s[p]+v*r[p]+b*i[p]))/1e3,h[4*p+1]=t.round(1e3*(_*e[p]+k*s[p]+x*r[p]+P*i[p]))/1e3,h[4*p+2]=t.round(1e3*(A*e[p]+w*s[p]+E*r[p]+C*i[p]))/1e3,h[4*p+3]=t.round(1e3*(D*e[p]+S*s[p]+M*r[p]+F*i[p]))/1e3;return h},getPointInSegment:function(e,i,s,r,a,n){var h=o(a,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*s[0]+(h*h*l+l*h*h+h*l*h)*r[0]+h*h*h*i[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*s[1]+(h*h*l+l*h*h+h*l*h)*r[1]+h*h*h*i[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(i,s,r,a,n,o,h,l,p){if(0===r&&0===o&&0===p)return e(i,s,a,n,h,l);var f,m=t.sqrt(t.pow(a-i,2)+t.pow(n-s,2)+t.pow(o-r,2)),d=t.sqrt(t.pow(h-i,2)+t.pow(l-s,2)+t.pow(p-r,2)),u=t.sqrt(t.pow(h-a,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=m>d?m>u?m-d-u:u-d-m:u>d?u-d-m:d-m-u)>-1e-4&&f<1e-4}}}(),ht=function(){var t=i,e=Math.abs;function s(t,e){var i,s=this.offsetTime;"multidimensional"===this.propType&&(i=l("float32",this.pv.length));for(var a,n,o,h,p,f,m,d,u,c=e.lastIndex,g=c,y=this.keyframes.length-1,v=!0;v;){if(a=this.keyframes[g],n=this.keyframes[g+1],g===y-1&&t>=n.t-s){a.h&&(a=n),c=0;break}if(n.t-s>t){c=g;break}g<y-1?g+=1:(c=0,v=!1)}o=this.keyframesMetadata[g]||{};var b,_,k,x,A,w,E,C,D,S,M=n.t-s,F=a.t-s;if(a.to){o.bezierData||(o.bezierData=ot.buildBezierData(a.s,n.s||a.e,a.to,a.ti));var T=o.bezierData;if(t>=M||t<F){var I=t>=M?T.points.length-1:0;for(p=T.points[I].point.length,h=0;h<p;h+=1)i[h]=T.points[I].point[h]}else{o.__fnct?u=o.__fnct:(u=it.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,o.__fnct=u),f=u((t-F)/(M-F));var B,L=T.segmentLength*f,z=e.lastFrame<t&&e._lastKeyframeIndex===g?e._lastAddedLength:0;for(d=e.lastFrame<t&&e._lastKeyframeIndex===g?e._lastPoint:0,v=!0,m=T.points.length;v;){if(z+=T.points[d].partialLength,0===L||0===f||d===T.points.length-1){for(p=T.points[d].point.length,h=0;h<p;h+=1)i[h]=T.points[d].point[h];break}if(L>=z&&L<z+T.points[d+1].partialLength){for(B=(L-z)/T.points[d+1].partialLength,p=T.points[d].point.length,h=0;h<p;h+=1)i[h]=T.points[d].point[h]+(T.points[d+1].point[h]-T.points[d].point[h])*B;break}d<m-1?d+=1:v=!1}e._lastPoint=d,e._lastAddedLength=z-T.points[d].partialLength,e._lastKeyframeIndex=g}}else{var R,V,O,N,G;if(y=a.s.length,b=n.s||a.e,this.sh&&1!==a.h)if(t>=M)i[0]=b[0],i[1]=b[1],i[2]=b[2];else if(t<=F)i[0]=a.s[0],i[1]=a.s[1],i[2]=a.s[2];else{var j=r(a.s),q=r(b);_=i,k=function(t,e,i){var s,r,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],d=e[0],u=e[1],c=e[2],g=e[3];return(r=l*d+p*u+f*c+m*g)<0&&(r=-r,d=-d,u=-u,c=-c,g=-g),1-r>1e-6?(s=Math.acos(r),a=Math.sin(s),n=Math.sin((1-i)*s)/a,o=Math.sin(i*s)/a):(n=1-i,o=i),h[0]=n*l+o*d,h[1]=n*p+o*u,h[2]=n*f+o*c,h[3]=n*m+o*g,h}(j,q,(t-F)/(M-F)),x=k[0],A=k[1],w=k[2],E=k[3],C=Math.atan2(2*A*E-2*x*w,1-2*A*A-2*w*w),D=Math.asin(2*x*A+2*w*E),S=Math.atan2(2*x*E-2*A*w,1-2*x*x-2*w*w),_[0]=C/P,_[1]=D/P,_[2]=S/P}else for(g=0;g<y;g+=1)1!==a.h&&(t>=M?f=1:t<F?f=0:(a.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[g]?u=o.__fnct[g]:(R=void 0===a.o.x[g]?a.o.x[0]:a.o.x[g],V=void 0===a.o.y[g]?a.o.y[0]:a.o.y[g],O=void 0===a.i.x[g]?a.i.x[0]:a.i.x[g],N=void 0===a.i.y[g]?a.i.y[0]:a.i.y[g],u=it.getBezierEasing(R,V,O,N).get,o.__fnct[g]=u)):o.__fnct?u=o.__fnct:(R=a.o.x,V=a.o.y,O=a.i.x,N=a.i.y,u=it.getBezierEasing(R,V,O,N).get,a.keyframeMetadata=u),f=u((t-F)/(M-F)))),b=n.s||a.e,G=1===a.h?a.s[g]:a.s[g]+(b[g]-a.s[g])*f,"multidimensional"===this.propType?i[g]=G:i=G}return e.lastIndex=c,i}function r(t){var e=t[0]*P,i=t[1]*P,s=t[2]*P,r=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(s/2),o=Math.sin(e/2),h=Math.sin(i/2),l=Math.sin(s/2);return[o*h*n+r*a*l,o*a*n+r*h*l,r*h*n-o*a*l,r*a*n-o*h*l]}function a(){var e=this.comp.renderedFrame-this.offsetTime,i=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=s&&e>=s||this._caching.lastFrame<i&&e<i))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function n(t){var i;if("unidimensional"===this.propType)i=t*this.mult,e(this.v-i)>1e-5&&(this.v=i,this._mdf=!0);else for(var s=0,r=this.v.length;s<r;)i=t[s]*this.mult,e(this.v[s]-i)>1e-5&&(this.v[s]=i,this._mdf=!0),s+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)i=this.effectsSequence[t](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function h(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function p(t,e,i,s){this.propType="unidimensional",this.mult=i||1,this.data=e,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=s,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=o,this.setVValue=n,this.addEffect=h}function f(t,e,i,s){var r;this.propType="multidimensional",this.mult=i||1,this.data=e,this._mdf=!1,this.elem=t,this.container=s,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=l("float32",a),this.pv=l("float32",a),this.vel=l("float32",a),r=0;r<a;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=o,this.setVValue=n,this.addEffect=h}function m(e,i,r,l){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=r||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=o,this.setVValue=n,this.interpolateValue=s,this.effectsSequence=[a.bind(this)],this.addEffect=h}function d(e,i,r,p){var f;this.propType="multidimensional";var m,d,u,c,g=i.k.length;for(f=0;f<g-1;f+=1)i.k[f].to&&i.k[f].s&&i.k[f+1]&&i.k[f+1].s&&(m=i.k[f].s,d=i.k[f+1].s,u=i.k[f].to,c=i.k[f].ti,(2===m.length&&(m[0]!==d[0]||m[1]!==d[1])&&ot.pointOnLine2D(m[0],m[1],d[0],d[1],m[0]+u[0],m[1]+u[1])&&ot.pointOnLine2D(m[0],m[1],d[0],d[1],d[0]+c[0],d[1]+c[1])||3===m.length&&(m[0]!==d[0]||m[1]!==d[1]||m[2]!==d[2])&&ot.pointOnLine3D(m[0],m[1],m[2],d[0],d[1],d[2],m[0]+u[0],m[1]+u[1],m[2]+u[2])&&ot.pointOnLine3D(m[0],m[1],m[2],d[0],d[1],d[2],d[0]+c[0],d[1]+c[1],d[2]+c[2]))&&(i.k[f].to=null,i.k[f].ti=null),m[0]===d[0]&&m[1]===d[1]&&0===u[0]&&0===u[1]&&0===c[0]&&0===c[1]&&(2===m.length||m[2]===d[2]&&0===u[2]&&0===c[2])&&(i.k[f].to=null,i.k[f].ti=null));this.effectsSequence=[a.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=p,this.comp=e.comp,this.getValue=o,this.setVValue=n,this.interpolateValue=s,this.frameId=-1;var y=i.k[0].s.length;for(this.v=l("float32",y),this.pv=l("float32",y),f=0;f<y;f+=1)this.v[f]=t,this.pv[f]=t;this._caching={lastFrame:t,lastIndex:0,value:l("float32",y)},this.addEffect=h}return{getProp:function(t,e,i,s,r){var a;if(e.k.length)if("number"==typeof e.k[0])a=new f(t,e,s,r);else switch(i){case 0:a=new m(t,e,s,r);break;case 1:a=new d(t,e,s,r)}else a=new p(t,e,s,r);return a.effectsSequence.length&&r.addDynamicProperty(a),a}}}();function lt(){}lt.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pt=rt(8,(function(){return l("float32",2)}));function ft(){this.c=!1,this._length=0,this._maxLength=8,this.v=p(this._maxLength),this.o=p(this._maxLength),this.i=p(this._maxLength)}ft.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var i=0;i<e;)this.v[i]=pt.newElement(),this.o[i]=pt.newElement(),this.i[i]=pt.newElement(),i+=1},ft.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ft.prototype.doubleArrayLength=function(){this.v=this.v.concat(p(this._maxLength)),this.i=this.i.concat(p(this._maxLength)),this.o=this.o.concat(p(this._maxLength)),this._maxLength*=2},ft.prototype.setXYAt=function(t,e,i,s,r){var a;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[s]||a[s]&&!r)&&(a[s]=pt.newElement()),a[s][0]=t,a[s][1]=e},ft.prototype.setTripleAt=function(t,e,i,s,r,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,s,"o",n,o),this.setXYAt(r,a,"i",n,o)},ft.prototype.reverse=function(){var t=new ft;t.setPathData(this.c,this._length);var e=this.v,i=this.o,s=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],i[0][0],i[0][1],0,!1),r=1);var a,n=this._length-1,o=this._length;for(a=r;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],s[n][0],s[n][1],i[n][0],i[n][1],a,!1),n-=1;return t};var mt,dt=((mt=rt(4,(function(){return new ft}),(function(t){var e,i=t._length;for(e=0;e<i;e+=1)pt.release(t.v[e]),pt.release(t.i[e]),pt.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}))).clone=function(t){var e,i=mt.newElement(),s=void 0===t._length?t.v.length:t._length;for(i.setLength(s),i.c=t.c,e=0;e<s;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i},mt);function ut(){this._length=0,this._maxLength=4,this.shapes=p(this._maxLength)}ut.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(p(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ut.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)dt.release(this.shapes[t]);this._length=0};var ct,gt,yt,vt,bt=(ct={newShapeCollection:function(){return gt?vt[gt-=1]:new ut},release:function(t){var e,i=t._length;for(e=0;e<i;e+=1)dt.release(t.shapes[e]);t._length=0,gt===yt&&(vt=st.double(vt),yt*=2),vt[gt]=t,gt+=1}},gt=0,vt=p(yt=4),ct),_t=function(){var t=-999999;function e(t,e,i){var s,r,a,n,o,h,l,p,f,m=i.lastIndex,d=this.keyframes;if(t<d[0].t-this.offsetTime)s=d[0].s[0],a=!0,m=0;else if(t>=d[d.length-1].t-this.offsetTime)s=d[d.length-1].s?d[d.length-1].s[0]:d[d.length-2].e[0],a=!0;else{for(var u,c,g,y=m,v=d.length-1,b=!0;b&&(u=d[y],!((c=d[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},m=y,!(a=1===u.h)){if(t>=c.t-this.offsetTime)p=1;else if(t<u.t-this.offsetTime)p=0;else{var _;g.__fnct?_=g.__fnct:(_=it.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,g.__fnct=_),p=_((t-(u.t-this.offsetTime))/(c.t-this.offsetTime-(u.t-this.offsetTime)))}r=c.s?c.s[0]:u.e[0]}s=u.s[0]}for(h=e._length,l=s.i[0].length,i.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?s.i[n][o]:s.i[n][o]+(r.i[n][o]-s.i[n][o])*p,e.i[n][o]=f,f=a?s.o[n][o]:s.o[n][o]+(r.o[n][o]-s.o[n][o])*p,e.o[n][o]=f,f=a?s.v[n][o]:s.v[n][o]+(r.v[n][o]-s.v[n][o])*p,e.v[n][o]=f}function i(){var e=this.comp.renderedFrame-this.offsetTime,i=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==t&&(r<i&&e<i||r>s&&e>s)||(this._caching.lastIndex=r<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function s(){this.paths=this.localShapeCollection}function r(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,s=t._length;for(i=0;i<s;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0})(this.v,t)||(this.v=dt.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var i=this.effectsSequence.length;for(e=0;e<i;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function o(t,e,i){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===i?e.pt.k:e.ks.k;this.v=dt.clone(r),this.pv=dt.clone(this.v),this.localShapeCollection=bt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=s,this.effectsSequence=[]}function h(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(e,r,a){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===a?r.pt.k:r.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=dt.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=dt.clone(this.v),this.localShapeCollection=bt.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=s,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[i.bind(this)]}o.prototype.interpolateShape=e,o.prototype.getValue=n,o.prototype.setVValue=r,o.prototype.addEffect=h,l.prototype.getValue=n,l.prototype.interpolateShape=e,l.prototype.setVValue=r,l.prototype.addEffect=h;var p=function(){var t=A;function e(t,e){this.v=dt.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=bt.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=ht.getProp(t,e.p,1,0,this),this.s=ht.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],i=this.p.v[1],s=this.s.v[0]/2,r=this.s.v[1]/2,a=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=i-r,n.v[1][0]=a?e+s:e-s,n.v[1][1]=i,n.v[2][0]=e,n.v[2][1]=i+r,n.v[3][0]=a?e-s:e+s,n.v[3][1]=i,n.i[0][0]=a?e-s*t:e+s*t,n.i[0][1]=i-r,n.i[1][0]=a?e+s:e-s,n.i[1][1]=i-r*t,n.i[2][0]=a?e+s*t:e-s*t,n.i[2][1]=i+r,n.i[3][0]=a?e-s:e+s,n.i[3][1]=i+r*t,n.o[0][0]=a?e+s*t:e-s*t,n.o[0][1]=i-r,n.o[1][0]=a?e+s:e-s,n.o[1][1]=i+r*t,n.o[2][0]=a?e-s*t:e+s*t,n.o[2][1]=i+r,n.o[3][0]=a?e-s:e+s,n.o[3][1]=i-r*t}},a([lt],e),e}(),f=function(){function t(t,e){this.v=dt.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=ht.getProp(t,e.ir,0,0,this),this.is=ht.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=ht.getProp(t,e.pt,0,0,this),this.p=ht.getProp(t,e.p,1,0,this),this.r=ht.getProp(t,e.r,0,P,this),this.or=ht.getProp(t,e.or,0,0,this),this.os=ht.getProp(t,e.os,0,.01,this),this.localShapeCollection=bt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,i,s,r=2*Math.floor(this.pt.v),a=2*Math.PI/r,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*r),m=2*Math.PI*h/(2*r),d=-Math.PI/2;d+=this.r.v;var u=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<r;t+=1){i=n?l:p,s=n?f:m;var c=(e=n?o:h)*Math.cos(d),g=e*Math.sin(d),y=0===c&&0===g?0:g/Math.sqrt(c*c+g*g),v=0===c&&0===g?0:-c/Math.sqrt(c*c+g*g);c+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(c,g,c-y*s*i*u,g-v*s*i*u,c+y*s*i*u,g+v*s*i*u,t,!0),n=!n,d+=a*u}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,s=this.or.v,r=this.os.v,a=2*Math.PI*s/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=s*Math.cos(n),l=s*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*r*o,l-f*a*r*o,h+p*a*r*o,l+f*a*r*o,t,!0),n+=i*o}this.paths.length=0,this.paths[0]=this.v}},a([lt],t),t}(),m=function(){function t(t,e){this.v=dt.newElement(),this.v.c=!0,this.localShapeCollection=bt.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=ht.getProp(t,e.p,1,0,this),this.s=ht.getProp(t,e.s,1,0,this),this.r=ht.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,r=_(i,s,this.r.v),a=r*(1-A);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-s+r,t+i,e-s+r,t+i,e-s+a,0,!0),this.v.setTripleAt(t+i,e+s-r,t+i,e+s-a,t+i,e+s-r,1,!0),0!==r?(this.v.setTripleAt(t+i-r,e+s,t+i-r,e+s,t+i-a,e+s,2,!0),this.v.setTripleAt(t-i+r,e+s,t-i+a,e+s,t-i+r,e+s,3,!0),this.v.setTripleAt(t-i,e+s-r,t-i,e+s-r,t-i,e+s-a,4,!0),this.v.setTripleAt(t-i,e-s+r,t-i,e-s+a,t-i,e-s+r,5,!0),this.v.setTripleAt(t-i+r,e-s,t-i+r,e-s,t-i+a,e-s,6,!0),this.v.setTripleAt(t+i-r,e-s,t+i-a,e-s,t+i-r,e-s,7,!0)):(this.v.setTripleAt(t-i,e+s,t-i+a,e+s,t-i,e+s,2),this.v.setTripleAt(t-i,e-s,t-i,e-s+a,t-i,e-s,3))):(this.v.setTripleAt(t+i,e-s+r,t+i,e-s+a,t+i,e-s+r,0,!0),0!==r?(this.v.setTripleAt(t+i-r,e-s,t+i-r,e-s,t+i-a,e-s,1,!0),this.v.setTripleAt(t-i+r,e-s,t-i+a,e-s,t-i+r,e-s,2,!0),this.v.setTripleAt(t-i,e-s+r,t-i,e-s+r,t-i,e-s+a,3,!0),this.v.setTripleAt(t-i,e+s-r,t-i,e+s-a,t-i,e+s-r,4,!0),this.v.setTripleAt(t-i+r,e+s,t-i+r,e+s,t-i+a,e+s,5,!0),this.v.setTripleAt(t+i-r,e+s,t+i-a,e+s,t+i-r,e+s,6,!0),this.v.setTripleAt(t+i,e+s-r,t+i,e+s-r,t+i,e+s-a,7,!0)):(this.v.setTripleAt(t-i,e-s,t-i+a,e-s,t-i,e-s,1,!0),this.v.setTripleAt(t-i,e+s,t-i,e+s-a,t-i,e+s,2,!0),this.v.setTripleAt(t+i,e+s,t+i-a,e+s,t+i,e+s,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:s},a([lt],t),t}();var d={getShapeProp:function(t,e,i){var s;return 3===i||4===i?s=(3===i?e.pt:e.ks).k.length?new l(t,e,i):new o(t,e,i):5===i?s=new m(t,e):6===i?s=new p(t,e):7===i&&(s=new f(t,e)),s.k&&t.addDynamicProperty(s),s},getConstructorFunction:function(){return o},getKeyframedConstructorFunction:function(){return l}};return d}(),kt=function(){var t=Math.cos,e=Math.sin,i=Math.tan,s=Math.round;function r(){return 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,this}function a(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(s,-r,0,0,r,s,0,0,0,0,1,0,0,0,0,1)}function n(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(1,0,0,0,0,s,-r,0,0,r,s,0,0,0,0,1)}function o(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(s,0,r,0,0,1,0,0,-r,0,s,0,0,0,0,1)}function h(i){if(0===i)return this;var s=t(i),r=e(i);return this._t(s,-r,0,0,r,s,0,0,0,0,1,0,0,0,0,1)}function p(t,e){return this._t(1,e,t,1,0,0)}function f(t,e){return this.shear(i(t),i(e))}function m(s,r){var a=t(r),n=e(r);return this._t(a,n,0,0,-n,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(s),1,0,0,0,0,1,0,0,0,0,1)._t(a,-n,0,0,n,a,0,0,0,0,1,0,0,0,0,1)}function d(t,e,i){return i||0===i||(i=1),1===t&&1===e&&1===i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function u(t,e,i,s,r,a,n,o,h,l,p,f,m,d,u,c){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=s,this.props[4]=r,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=d,this.props[14]=u,this.props[15]=c,this}function c(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function g(t,e,i,s,r,a,n,o,h,l,p,f,m,d,u,c){var g=this.props;if(1===t&&0===e&&0===i&&0===s&&0===r&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*m,g[13]=g[13]*a+g[15]*d,g[14]=g[14]*p+g[15]*u,g[15]*=c,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],_=g[3],k=g[4],x=g[5],P=g[6],A=g[7],w=g[8],E=g[9],C=g[10],D=g[11],S=g[12],M=g[13],F=g[14],T=g[15];return g[0]=y*t+v*r+b*h+_*m,g[1]=y*e+v*a+b*l+_*d,g[2]=y*i+v*n+b*p+_*u,g[3]=y*s+v*o+b*f+_*c,g[4]=k*t+x*r+P*h+A*m,g[5]=k*e+x*a+P*l+A*d,g[6]=k*i+x*n+P*p+A*u,g[7]=k*s+x*o+P*f+A*c,g[8]=w*t+E*r+C*h+D*m,g[9]=w*e+E*a+C*l+D*d,g[10]=w*i+E*n+C*p+D*u,g[11]=w*s+E*o+C*f+D*c,g[12]=S*t+M*r+F*h+T*m,g[13]=S*e+M*a+F*l+T*d,g[14]=S*i+M*n+F*p+T*u,g[15]=S*s+M*o+F*f+T*c,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function b(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function _(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function k(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function x(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function P(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function A(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function w(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,i=-this.props[1]/t,s=-this.props[4]/t,r=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new kt;return o.props[0]=e,o.props[1]=i,o.props[4]=s,o.props[5]=r,o.props[12]=a,o.props[13]=n,o}function E(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function C(t){var e,i=t.length,s=[];for(e=0;e<i;e+=1)s[e]=E(t[e]);return s}function D(t,e,i){var s=l("float32",6);if(this.isIdentity())s[0]=t[0],s[1]=t[1],s[2]=e[0],s[3]=e[1],s[4]=i[0],s[5]=i[1];else{var r=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],p=this.props[13];s[0]=t[0]*r+t[1]*n+h,s[1]=t[0]*a+t[1]*o+p,s[2]=e[0]*r+e[1]*n+h,s[3]=e[0]*a+e[1]*o+p,s[4]=i[0]*r+i[1]*n+h,s[5]=i[0]*a+i[1]*o+p}return s}function S(t,e,i){return this.isIdentity()?[t,e,i]:[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function M(t,e){if(this.isIdentity())return t+","+e;var i=this.props;return Math.round(100*(t*i[0]+e*i[4]+i[12]))/100+","+Math.round(100*(t*i[1]+e*i[5]+i[13]))/100}function F(){for(var t=0,e=this.props,i="matrix3d(";t<16;)i+=s(1e4*e[t])/1e4,i+=15===t?")":",",t+=1;return i}function T(t){return t<1e-6&&t>0||t>-1e-6&&t<0?s(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+T(t[0])+","+T(t[1])+","+T(t[4])+","+T(t[5])+","+T(t[12])+","+T(t[13])+")"}return function(){this.reset=r,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=f,this.skewFromAxis=m,this.shear=p,this.scale=d,this.setTransform=u,this.translate=c,this.transform=g,this.applyToPoint=k,this.applyToX=x,this.applyToY=P,this.applyToZ=A,this.applyToPointArray=S,this.applyToTriplePoints=D,this.applyToPointStringified=M,this.toCSS=F,this.to2dCSS=I,this.clone=b,this.cloneFromProps=_,this.equals=v,this.inversePoints=C,this.inversePoint=E,this.getInverseMatrix=w,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=l("float32",16),this.reset()}}();function xt(t){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(t)}var Pt,At={};function wt(){et.searchAnimations()}At.play=et.play,At.pause=et.pause,At.setLocationHref=function(e){t=e},At.togglePause=et.togglePause,At.setSpeed=et.setSpeed,At.setDirection=et.setDirection,At.stop=et.stop,At.searchAnimations=wt,At.registerAnimation=et.registerAnimation,At.loadAnimation=function(t){return et.loadAnimation(t)},At.setSubframeRendering=function(t){!function(t){m=!!t}(t)},At.resize=et.resize,At.goToAndStop=et.goToAndStop,At.destroy=et.destroy,At.setQuality=function(t){if("string"==typeof t)switch(t){case"high":q(200);break;default:case"medium":q(50);break;case"low":q(10)}else!isNaN(t)&&t>1&&q(t);W()>=50?w(!1):w(!0)},At.inBrowser=function(){return"undefined"!=typeof navigator},At.installPlugin=function(t,e){"expressions"===t&&(d=e)},At.freeze=et.freeze,At.unfreeze=et.unfreeze,At.setVolume=et.setVolume,At.mute=et.mute,At.unmute=et.unmute,At.getRegisteredAnimations=et.getRegisteredAnimations,At.useWebWorker=function(t){e=!!t},At.setIDPrefix=function(t){u=t},At.__getFactory=function(t){switch(t){case"propertyFactory":return ht;case"shapePropertyFactory":return _t;case"matrix":return kt;default:return null}},At.version="5.9.1";var Et=document.getElementsByTagName("script"),Ct=Et[Et.length-1]||{src:""};Pt=Ct.src.replace(/^[^\?]+\??/,""),function(t){for(var e=Pt.split("&"),i=0;i<e.length;i+=1){var s=e[i].split("=");if(decodeURIComponent(s[0])==t)return decodeURIComponent(s[1])}}("renderer");var Dt=setInterval((function(){"complete"===document.readyState&&(clearInterval(Dt),wt())}),100);try{"object"===("undefined"==typeof exports?"undefined":xt(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=At)}catch(t){}var St=function(){var t={},e={};return t.registerModifier=function(t,i){e[t]||(e[t]=i)},t.getModifier=function(t,i,s){return new e[t](i,s)},t}();function Mt(){}function Ft(){}function Tt(){}Mt.prototype.initModifierProperties=function(){},Mt.prototype.addShapeToModifier=function(){},Mt.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:bt.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},Mt.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=i,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Mt.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},a([lt],Mt),a([Mt],Ft),Ft.prototype.initModifierProperties=function(t,e){this.s=ht.getProp(t,e.s,0,.01,this),this.e=ht.getProp(t,e.e,0,.01,this),this.o=ht.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},Ft.prototype.addShapeToModifier=function(t){t.pathsData=[]},Ft.prototype.calculateShapeEdges=function(t,e,i,s,r){var a=[];e<=1?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*r<s||o.s*r>s+i))p=o.s*r<=s?0:(o.s*r-s)/i,f=o.e*r>=s+i?1:(o.e*r-s)/i,h.push([p,f])}return h.length||h.push([0,0]),h},Ft.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e<i;e+=1)nt.release(t[e]);return t.length=0,t},Ft.prototype.processShapes=function(t){var e,i,s,r;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=this.s.v>1?1+a:this.s.v<0?0+a:this.s.v+a)>(i=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,m=this.shapes.length,d=0;if(i===e)for(r=0;r<m;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape._mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection,this._mdf&&(this.shapes[r].pathsData.length=0);else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(r=0;r<m;r+=1)this.shapes[r].pathsData.length=0,this.shapes[r].shape._mdf=!0}else{var u,c,g=[];for(r=0;r<m;r+=1)if((u=this.shapes[r]).shape._mdf||this._mdf||t||2===this.m){if(h=(s=u.shape.paths)._length,f=0,!u.shape._mdf&&u.pathsData.length)f=u.totalShapeLength;else{for(l=this.releasePathsData(u.pathsData),o=0;o<h;o+=1)p=ot.getSegmentsLength(s.shapes[o]),l.push(p),f+=p.totalLength;u.totalShapeLength=f,u.pathsData=l}d+=f,u.shape._mdf=!0}else u.shape.paths=u.localShapeCollection;var y,v=e,b=i,_=0;for(r=m-1;r>=0;r-=1)if((u=this.shapes[r]).shape._mdf){for((c=u.localShapeCollection).releaseShapes(),2===this.m&&m>1?(y=this.calculateShapeEdges(e,i,u.totalShapeLength,_,d),_+=u.totalShapeLength):y=[[v,b]],h=y.length,o=0;o<h;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:u.totalShapeLength*v,e:u.totalShapeLength*b}):v>=1?g.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(b-1)}):(g.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),g.push({s:0,e:u.totalShapeLength*(b-1)}));var k=this.addShapes(u,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var x=k.pop();this.addPaths(k,c),k=this.addShapes(u,g[1],x)}else this.addPaths(k,c),k=this.addShapes(u,g[1]);this.addPaths(k,c)}}u.shape.paths=c}}},Ft.prototype.addPaths=function(t,e){var i,s=t.length;for(i=0;i<s;i+=1)e.addShape(t[i])},Ft.prototype.addSegment=function(t,e,i,s,r,a,n){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(i[0],i[1],"i",a+1),n&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(s[0],s[1],"v",a+1)},Ft.prototype.addSegmentFromArray=function(t,e,i,s){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),s&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},Ft.prototype.addShapes=function(t,e,i){var s,r,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,d=t.shape.paths._length,u=0,c=[],g=!0;for(i?(o=i._length,p=i._length):(i=dt.newElement(),o=0,p=0),c.push(i),s=0;s<d;s+=1){for(h=f[s].lengths,i.c=m[s].c,a=m[s].c?h.length:h.length+1,r=1;r<a;r+=1)if(u+(n=h[r-1]).addedLength<e.s)u+=n.addedLength,i.c=!1;else{if(u>e.e){i.c=!1;break}e.s<=u&&e.e>=u+n.addedLength?(this.addSegment(m[s].v[r-1],m[s].o[r-1],m[s].i[r],m[s].v[r],i,o,g),g=!1):(l=ot.getNewSegment(m[s].v[r-1],m[s].v[r],m[s].o[r-1],m[s].i[r],(e.s-u)/n.addedLength,(e.e-u)/n.addedLength,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1),u+=n.addedLength,o+=1}if(m[s].c&&h.length){if(n=h[r-1],u<=e.e){var y=h[r-1].addedLength;e.s<=u&&e.e>=u+y?(this.addSegment(m[s].v[r-1],m[s].o[r-1],m[s].i[0],m[s].v[0],i,o,g),g=!1):(l=ot.getNewSegment(m[s].v[r-1],m[s].v[0],m[s].o[r-1],m[s].i[0],(e.s-u)/y,(e.e-u)/y,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1)}else i.c=!1;u+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),u>e.e)break;s<d-1&&(i=dt.newElement(),g=!0,c.push(i),o=0)}return c},a([Mt],Tt),Tt.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=ht.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},Tt.prototype.processPath=function(t,e){var i=e/100,s=[0,0],r=t._length,a=0;for(a=0;a<r;a+=1)s[0]+=t.v[a][0],s[1]+=t.v[a][1];s[0]/=r,s[1]/=r;var n,o,h,l,p,f,m=dt.newElement();for(m.c=t.c,a=0;a<r;a+=1)n=t.v[a][0]+(s[0]-t.v[a][0])*i,o=t.v[a][1]+(s[1]-t.v[a][1])*i,h=t.o[a][0]+(s[0]-t.o[a][0])*-i,l=t.o[a][1]+(s[1]-t.o[a][1])*-i,p=t.i[a][0]+(s[0]-t.i[a][0])*-i,f=t.i[a][1]+(s[1]-t.i[a][1])*-i,m.setTripleAt(n,o,h,l,p,f,a);return m},Tt.prototype.processShapes=function(t){var e,i,s,r,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(i=0;i<o;i+=1){if(n=(a=this.shapes[i]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,s=0;s<r;s+=1)n.addShape(this.processPath(e[s],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var It=function(){var t=[0,0];function e(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new kt,this.pre=new kt,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||t),e.p&&e.p.s?(this.px=ht.getProp(t,e.p.x,0,0,this),this.py=ht.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=ht.getProp(t,e.p.z,0,0,this))):this.p=ht.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=ht.getProp(t,e.rx,0,P,this),this.ry=ht.getProp(t,e.ry,0,P,this),this.rz=ht.getProp(t,e.rz,0,P,this),e.or.k[0].ti){var s,r=e.or.k.length;for(s=0;s<r;s+=1)e.or.k[s].to=null,e.or.k[s].ti=null}this.or=ht.getProp(t,e.or,1,P,this),this.or.sh=!0}else this.r=ht.getProp(t,e.r||{k:0},0,P,this);e.sk&&(this.sk=ht.getProp(t,e.sk,0,P,this),this.sa=ht.getProp(t,e.sa,0,P,this)),this.a=ht.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=ht.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=ht.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var s,r;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(s=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),r=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(s=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],r=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(s[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),s[1]=n.getValueAtTime((n.keyframes[0].t+.01)/i,0),r[0]=a.getValueAtTime(a.keyframes[0].t/i,0),r[1]=n.getValueAtTime(n.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(s[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),s[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/i,0),r[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),r[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/i,0)):(s=[a.pv,n.pv],r[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),r[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/i,n.offsetTime))}else s=r=t;this.v.rotate(-Math.atan2(s[1]-r[1],s[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},a([lt],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=lt.prototype.addDynamicProperty,{getTransformProperty:function(t,i,s){return new e(t,i,s)}}}();function Bt(){}function Lt(){}function zt(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",s="normal",r=e.length,a=0;a<r;a+=1)switch(e[a].toLowerCase()){case"italic":s="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200"}return{style:s,weight:t.fWeight||i}}a([Mt],Bt),Bt.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=ht.getProp(t,e.c,0,null,this),this.o=ht.getProp(t,e.o,0,null,this),this.tr=It.getTransformProperty(t,e.tr,this),this.so=ht.getProp(t,e.tr.so,0,.01,this),this.eo=ht.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new kt,this.rMatrix=new kt,this.sMatrix=new kt,this.tMatrix=new kt,this.matrix=new kt},Bt.prototype.applyTransforms=function(t,e,i,s,r,a){var n=a?-1:1,o=s.s.v[0]+(1-s.s.v[0])*(1-r),h=s.s.v[1]+(1-s.s.v[1])*(1-r);t.translate(s.p.v[0]*n*r,s.p.v[1]*n*r,s.p.v[2]),e.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),e.rotate(-s.r.v*n*r),e.translate(s.a.v[0],s.a.v[1],s.a.v[2]),i.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),i.scale(a?1/o:o,a?1/h:h),i.translate(s.a.v[0],s.a.v[1],s.a.v[2])},Bt.prototype.init=function(t,e,i,s){for(this.elem=t,this.arr=e,this.pos=i,this.elemsData=s,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[i]);i>0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Bt.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},Bt.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},Bt.prototype.changeGroupRender=function(t,e){var i,s=t.length;for(i=0;i<s;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},Bt.prototype.processShapes=function(t){var e,i,s,r,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(a=0,s=0;s<=this._groups.length-1;s+=1){if(o=a<h,this._groups[s]._render=o,this.changeGroupRender(this._groups[s].it,o),!o){var p=this.elemsData[s].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,d=m%1,u=m>0?Math.floor(m):Math.ceil(m),c=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(m>0){for(;_<u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,d,!1),_+=d)}else if(m<0){for(;_>u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-d,!0),_-=d)}for(s=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(i=(e=this.elemsData[s].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),0!==_){for((0!==s&&1===r||s!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),v=0;v<b;v+=1)i[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)i[v]=this.matrix.props[v];_+=1,a-=1,s+=r}}else for(a=this._currentCopies,s=0,r=1;a;)i=(e=this.elemsData[s].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,s+=r;return n},Bt.prototype.addShape=function(){},a([Mt],Lt),Lt.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=ht.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},Lt.prototype.processPath=function(t,e){var i,s=dt.newElement();s.c=t.c;var r,a,n,o,h,l,p,f,m,d,u,c,g=t._length,y=0;for(i=0;i<g;i+=1)r=t.v[i],n=t.o[i],a=t.i[i],r[0]===n[0]&&r[1]===n[1]&&r[0]===a[0]&&r[1]===a[1]?0!==i&&i!==g-1||t.c?(o=0===i?t.v[g-1]:t.v[i-1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=u=r[0]+(o[0]-r[0])*l,f=c=r[1]-(r[1]-o[1])*l,m=p-(p-r[0])*A,d=f-(f-r[1])*A,s.setTripleAt(p,f,m,d,u,c,y),y+=1,o=i===g-1?t.v[0]:t.v[i+1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=r[0]+(o[0]-r[0])*l,f=d=r[1]+(o[1]-r[1])*l,u=p-(p-r[0])*A,c=f-(f-r[1])*A,s.setTripleAt(p,f,m,d,u,c,y),y+=1):(s.setTripleAt(r[0],r[1],n[0],n[1],a[0],a[1],y),y+=1):(s.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],y),y+=1);return s},Lt.prototype.processShapes=function(t){var e,i,s,r,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(i=0;i<o;i+=1){if(n=(a=this.shapes[i]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,s=0;s<r;s+=1)n.addShape(this.processPath(e[s],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var Rt=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],s=[65039,8205];function a(t,e){var i=r("span");i.setAttribute("aria-hidden",!0),i.style.fontFamily=e;var s=r("span");s.innerText="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(s),document.body.appendChild(i);var a=s.offsetWidth;return s.style.fontFamily=function(t){var e,i=t.split(","),s=i.length,r=[];for(e=0;e<s;e+=1)"sans-serif"!==i[e]&&"monospace"!==i[e]&&r.push(i[e]);return r.join(",")}(t)+", "+e,{node:s,w:a,parent:i}}function n(t,e){var i=H("text");i.style.fontSize="100px";var s=zt(e);return i.setAttribute("font-family",e.fFamily),i.setAttribute("font-style",s.style),i.setAttribute("font-weight",s.weight),i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.setAttribute("class",e.fClass)):i.style.fontFamily=e.fFamily,t.appendChild(i),r("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,i}var o=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};o.isModifier=function(t,e){var s=t.toString(16)+e.toString(16);return-1!==i.indexOf(s)},o.isZeroWidthJoiner=function(t,e){return e?t===s[0]&&e===s[1]:t===s[1]},o.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var h={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,s,r=t.length,a=this.chars.length;for(e=0;e<r;e+=1){for(i=0,s=!1;i<a;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(s=!0),i+=1;s||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var i,s=t.list,o=s.length,h=o;for(i=0;i<o;i+=1){var l,p,f=!0;if(s[i].loaded=!1,s[i].monoCase=a(s[i].fFamily,"monospace"),s[i].sansCase=a(s[i].fFamily,"sans-serif"),s[i].fPath){if("p"===s[i].fOrigin||3===s[i].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+s[i].fFamily+'"], style[f-origin="3"][f-family="'+s[i].fFamily+'"]')).length>0&&(f=!1),f){var m=r("style");m.setAttribute("f-forigin",s[i].fOrigin),m.setAttribute("f-origin",s[i].origin),m.setAttribute("f-family",s[i].fFamily),m.type="text/css",m.innerText="@font-face {font-family: "+s[i].fFamily+"; font-style: normal; src: url('"+s[i].fPath+"');}",e.appendChild(m)}}else if("g"===s[i].fOrigin||1===s[i].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;p<l.length;p+=1)-1!==l[p].href.indexOf(s[i].fPath)&&(f=!1);if(f){var d=r("link");d.setAttribute("f-forigin",s[i].fOrigin),d.setAttribute("f-origin",s[i].origin),d.type="text/css",d.rel="stylesheet",d.href=s[i].fPath,document.body.appendChild(d)}}else if("t"===s[i].fOrigin||2===s[i].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),p=0;p<l.length;p+=1)s[i].fPath===l[p].src&&(f=!1);if(f){var u=r("link");u.setAttribute("f-forigin",s[i].fOrigin),u.setAttribute("f-origin",s[i].origin),u.setAttribute("rel","stylesheet"),u.setAttribute("href",s[i].fPath),e.appendChild(u)}}}else s[i].loaded=!0,h-=1;s[i].helper=n(e,s[i]),s[i].cache={},this.fonts.push(s[i])}0===h?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,i,s){for(var r=0,a=this.chars.length;r<a;){if(this.chars[r].ch===e&&this.chars[r].style===i&&this.chars[r].fFamily===s)return this.chars[r];r+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,i,s)),t},getFontByName:function(t){for(var e=0,i=this.fonts.length;e<i;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,i){var s=this.getFontByName(e),r=t.charCodeAt(0);if(!s.cache[r+1]){var a=s.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();s.cache[r+1]=(n-o)/100}else a.textContent=t,s.cache[r+1]=a.getComputedTextLength()/100}return s.cache[r+1]*i},checkLoadedFonts:function(){var t,e,i,s=this.fonts.length,r=s;for(t=0;t<s;t+=1)this.fonts[t].loaded?r-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,e.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,e.offsetWidth!==i&&(r-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==r&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return o.prototype=h,o}();function Vt(){}Vt.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var Ot,Nt=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var i,s=p(e.viewData.length),r=e.viewData.length;for(i=0;i<r;i+=1)s[i]=new t(e.viewData[i],e.masksProperties[i]);return function(t){for(i=0;i<r;){if(e.masksProperties[i].nm===t)return s[i];i+=1}return null}}}(),Gt=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function i(t,e,i){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(s){if(!t.numKeys)return 0;var r="";r="s"in e.keyframes[s-1]?e.keyframes[s-1].s:"e"in e.keyframes[s-2]?e.keyframes[s-2].e:e.keyframes[s-2].s;var a="unidimensional"===i?new Number(r):Object.assign({},r);return a.time=e.keyframes[s-1].t/e.elem.comp.globalData.frameRate,a.value="unidimensional"===i?r[0]:r,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function s(){return t}return function(r){return r?"unidimensional"===r.propType?function(e){e&&"pv"in e||(e=t);var s=1/e.mult,r=e.pv*s,a=new Number(r);return a.value=r,i(a,e,"unidimensional"),function(){return e.k&&e.getValue(),r=e.v*s,a.value!==r&&((a=new Number(r)).value=r,i(a,e,"unidimensional")),a}}(r):function(t){t&&"pv"in t||(t=e);var s=1/t.mult,r=t.data&&t.data.l||t.pv.length,a=l("float32",r),n=l("float32",r);return a.value=n,i(a,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<r;e+=1)n[e]=t.v[e]*s,a[e]=n[e];return a}}(r):s}}(),jt=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var i,s,r,a;return Object.defineProperty(e,"rotation",{get:Gt(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:Gt(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:Gt(t.rx)}),Object.defineProperty(e,"yRotation",{get:Gt(t.ry)}),Object.defineProperty(e,"scale",{get:Gt(t.s)}),t.p?a=Gt(t.p):(i=Gt(t.px),s=Gt(t.py),t.pz&&(r=Gt(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[i(),s(),r?r():0]}}),Object.defineProperty(e,"xPosition",{get:Gt(t.px)}),Object.defineProperty(e,"yPosition",{get:Gt(t.py)}),Object.defineProperty(e,"zPosition",{get:Gt(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:Gt(t.a)}),Object.defineProperty(e,"opacity",{get:Gt(t.o)}),Object.defineProperty(e,"skew",{get:Gt(t.sk)}),Object.defineProperty(e,"skewAxis",{get:Gt(t.sa)}),Object.defineProperty(e,"orientation",{get:Gt(t.or)}),e},qt=function(){function t(t){var e=new kt;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.applyPoint(i,t)}function i(t,e){var i=this.getMatrix(e);return this.applyPoint(i,t)}function s(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.invertPoint(i,t)}function r(t,e){var i=this.getMatrix(e);return this.invertPoint(i,t)}function a(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,s=this._elem.hierarchy.length;for(i=0;i<s;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function o(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,s=this._elem.hierarchy.length;for(i=0;i<s;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function h(t){var e=new kt;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,s=this._elem.hierarchy.length;for(i=0;i<s;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function l(){return[1,1,1,1]}return function(p){var f;function m(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return m.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return f;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return m.effect;case"ADBE Text Properties":return m.textInterface;default:return null}}m.getMatrix=t,m.invertPoint=o,m.applyPoint=a,m.toWorld=i,m.toWorldVec=e,m.fromWorld=r,m.fromWorldVec=s,m.toComp=i,m.fromComp=h,m.sampleImage=l,m.sourceRectAtTime=p.sourceRectAtTime.bind(p),m._elem=p;var d=n(f=jt(p.finalTransform.mProp),"anchorPoint");return Object.defineProperties(m,{hasParent:{get:function(){return p.hierarchy.length}},parent:{get:function(){return p.hierarchy[0].layerInterface}},rotation:n(f,"rotation"),scale:n(f,"scale"),position:n(f,"position"),opacity:n(f,"opacity"),anchorPoint:d,anchor_point:d,transform:{get:function(){return f}},active:{get:function(){return p.isInRange}}}),m.startTime=p.data.st,m.index=p.data.ind,m.source=p.data.refId,m.height=0===p.data.ty?p.data.h:100,m.width=0===p.data.ty?p.data.w:100,m.inPoint=p.data.ip/p.comp.globalData.frameRate,m.outPoint=p.data.op/p.comp.globalData.frameRate,m._name=p.data.nm,m.registerMaskInterface=function(t){m.mask=new Nt(t,p)},m.registerEffectsInterface=function(t){m.effect=t},m}}(),Wt=function(t,e){return function(i){return(i=void 0===i?1:i)<=0?t:e(i-1)}},Ht=function(t,e){var i={_name:t};return function(t){return(t=void 0===t?1:t)<=0?i:e(t-1)}},Xt=function(){function t(i,s,r,a){function n(t){for(var e=i.ef,s=0,r=e.length;s<r;){if(t===e[s].nm||t===e[s].mn||t===e[s].ix)return 5===e[s].ty?l[s]:l[s]();s+=1}throw new Error}var o,h=Wt(n,r),l=[],p=i.ef.length;for(o=0;o<p;o+=1)5===i.ef[o].ty?l.push(t(i.ef[o],s.effectElements[o],s.effectElements[o].propertyGroup,a)):l.push(e(s.effectElements[o],i.ef[o].ty,a,h));return"ADBE Color Control"===i.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return i.np}},_name:{value:i.nm},propertyGroup:{value:h}}),n.enabled=0!==i.en,n.active=n.enabled,n}function e(t,e,i,s){var r=Gt(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(Ht("",s)),function(){return 10===e?i.comp.compInterface(t.p.v):r()}}return{createEffectsInterface:function(e,i){if(e.effectsManager){var s,r=[],a=e.data.ef,n=e.effectsManager.effectElements.length;for(s=0;s<n;s+=1)r.push(t(a[s],e.effectsManager.effectElements[s],i,e));var o=e.data.ef||[],h=function(t){for(s=0,n=o.length;s<n;){if(t===o[s].nm||t===o[s].mn||t===o[s].ix)return r[s];s+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),Yt=function(t){function e(e){for(var i=0,s=t.layers.length;i<s;){if(t.layers[i].nm===e||t.layers[i].ind===e)return t.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},Zt=function(t,e,i){var s=e.sh;function r(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?r.path:null}var a=Wt(r,i);return s.setGroupProperty(Ht("Path",a)),Object.defineProperties(r,{path:{get:function(){return s.k&&s.getValue(),s}},shape:{get:function(){return s.k&&s.getValue(),s}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:i}}),r},Kt=function(){function t(t,o,d){var u,c=[],g=t?t.length:0;for(u=0;u<g;u+=1)"gr"===t[u].ty?c.push(e(t[u],o[u],d)):"fl"===t[u].ty?c.push(i(t[u],o[u],d)):"st"===t[u].ty?c.push(a(t[u],o[u],d)):"tm"===t[u].ty?c.push(n(t[u],o[u],d)):"tr"===t[u].ty||("el"===t[u].ty?c.push(h(t[u],o[u],d)):"sr"===t[u].ty?c.push(l(t[u],o[u],d)):"sh"===t[u].ty?c.push(Zt(t[u],o[u],d)):"rc"===t[u].ty?c.push(p(t[u],o[u],d)):"rd"===t[u].ty?c.push(f(t[u],o[u],d)):"rp"===t[u].ty?c.push(m(t[u],o[u],d)):"gf"===t[u].ty?c.push(s(t[u],o[u],d)):c.push(r(t[u],o[u])));return c}function e(e,i,s){var r=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=Wt(r,s);var a=function(e,i,s){var r,a=function(t){for(var e=0,i=r.length;e<i;){if(r[e]._name===t||r[e].mn===t||r[e].propertyIndex===t||r[e].ix===t||r[e].ind===t)return r[e];e+=1}return"number"==typeof t?r[t-1]:null};a.propertyGroup=Wt(a,s),r=t(e.it,i.it,a.propertyGroup),a.numProperties=r.length;var n=o(e.it[e.it.length-1],i.it[i.it.length-1],a.propertyGroup);return a.transform=n,a.propertyIndex=e.cix,a._name=e.nm,a}(e,i,r.propertyGroup),n=o(e.it[e.it.length-1],i.it[i.it.length-1],r.propertyGroup);return r.content=a,r.transform=n,Object.defineProperty(r,"_name",{get:function(){return e.nm}}),r.numProperties=e.np,r.propertyIndex=e.ix,r.nm=e.nm,r.mn=e.mn,r}function i(t,e,i){function s(t){return"Color"===t||"color"===t?s.color:"Opacity"===t||"opacity"===t?s.opacity:null}return Object.defineProperties(s,{color:{get:Gt(e.c)},opacity:{get:Gt(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(Ht("Color",i)),e.o.setGroupProperty(Ht("Opacity",i)),s}function s(t,e,i){function s(t){return"Start Point"===t||"start point"===t?s.startPoint:"End Point"===t||"end point"===t?s.endPoint:"Opacity"===t||"opacity"===t?s.opacity:null}return Object.defineProperties(s,{startPoint:{get:Gt(e.s)},endPoint:{get:Gt(e.e)},opacity:{get:Gt(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(Ht("Start Point",i)),e.e.setGroupProperty(Ht("End Point",i)),e.o.setGroupProperty(Ht("Opacity",i)),s}function r(){return function(){return null}}function a(t,e,i){var s,r=Wt(l,i),a=Wt(h,r);function n(i){Object.defineProperty(h,t.d[i].nm,{get:Gt(e.d.dataProps[i].p)})}var o=t.d?t.d.length:0,h={};for(s=0;s<o;s+=1)n(s),e.d.dataProps[s].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:Gt(e.c)},opacity:{get:Gt(e.o)},strokeWidth:{get:Gt(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(Ht("Color",r)),e.o.setGroupProperty(Ht("Opacity",r)),e.w.setGroupProperty(Ht("Stroke Width",r)),l}function n(t,e,i){function s(e){return e===t.e.ix||"End"===e||"end"===e?s.end:e===t.s.ix?s.start:e===t.o.ix?s.offset:null}var r=Wt(s,i);return s.propertyIndex=t.ix,e.s.setGroupProperty(Ht("Start",r)),e.e.setGroupProperty(Ht("End",r)),e.o.setGroupProperty(Ht("Offset",r)),s.propertyIndex=t.ix,s.propertyGroup=i,Object.defineProperties(s,{start:{get:Gt(e.s)},end:{get:Gt(e.e)},offset:{get:Gt(e.o)},_name:{value:t.nm}}),s.mn=t.mn,s}function o(t,e,i){function s(e){return t.a.ix===e||"Anchor Point"===e?s.anchorPoint:t.o.ix===e||"Opacity"===e?s.opacity:t.p.ix===e||"Position"===e?s.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?s.rotation:t.s.ix===e||"Scale"===e?s.scale:t.sk&&t.sk.ix===e||"Skew"===e?s.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?s.skewAxis:null}var r=Wt(s,i);return e.transform.mProps.o.setGroupProperty(Ht("Opacity",r)),e.transform.mProps.p.setGroupProperty(Ht("Position",r)),e.transform.mProps.a.setGroupProperty(Ht("Anchor Point",r)),e.transform.mProps.s.setGroupProperty(Ht("Scale",r)),e.transform.mProps.r.setGroupProperty(Ht("Rotation",r)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(Ht("Skew",r)),e.transform.mProps.sa.setGroupProperty(Ht("Skew Angle",r))),e.transform.op.setGroupProperty(Ht("Opacity",r)),Object.defineProperties(s,{opacity:{get:Gt(e.transform.mProps.o)},position:{get:Gt(e.transform.mProps.p)},anchorPoint:{get:Gt(e.transform.mProps.a)},scale:{get:Gt(e.transform.mProps.s)},rotation:{get:Gt(e.transform.mProps.r)},skew:{get:Gt(e.transform.mProps.sk)},skewAxis:{get:Gt(e.transform.mProps.sa)},_name:{value:t.nm}}),s.ty="tr",s.mn=t.mn,s.propertyGroup=i,s}function h(t,e,i){function s(e){return t.p.ix===e?s.position:t.s.ix===e?s.size:null}var r=Wt(s,i);s.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(Ht("Size",r)),a.p.setGroupProperty(Ht("Position",r)),Object.defineProperties(s,{size:{get:Gt(a.s)},position:{get:Gt(a.p)},_name:{value:t.nm}}),s.mn=t.mn,s}function l(t,e,i){function s(e){return t.p.ix===e?s.position:t.r.ix===e?s.rotation:t.pt.ix===e?s.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?s.outerRadius:t.os.ix===e?s.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?s.innerRoundness:null:s.innerRadius}var r=Wt(s,i),a="tm"===e.sh.ty?e.sh.prop:e.sh;return s.propertyIndex=t.ix,a.or.setGroupProperty(Ht("Outer Radius",r)),a.os.setGroupProperty(Ht("Outer Roundness",r)),a.pt.setGroupProperty(Ht("Points",r)),a.p.setGroupProperty(Ht("Position",r)),a.r.setGroupProperty(Ht("Rotation",r)),t.ir&&(a.ir.setGroupProperty(Ht("Inner Radius",r)),a.is.setGroupProperty(Ht("Inner Roundness",r))),Object.defineProperties(s,{position:{get:Gt(a.p)},rotation:{get:Gt(a.r)},points:{get:Gt(a.pt)},outerRadius:{get:Gt(a.or)},outerRoundness:{get:Gt(a.os)},innerRadius:{get:Gt(a.ir)},innerRoundness:{get:Gt(a.is)},_name:{value:t.nm}}),s.mn=t.mn,s}function p(t,e,i){function s(e){return t.p.ix===e?s.position:t.r.ix===e?s.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?s.size:null}var r=Wt(s,i),a="tm"===e.sh.ty?e.sh.prop:e.sh;return s.propertyIndex=t.ix,a.p.setGroupProperty(Ht("Position",r)),a.s.setGroupProperty(Ht("Size",r)),a.r.setGroupProperty(Ht("Rotation",r)),Object.defineProperties(s,{position:{get:Gt(a.p)},roundness:{get:Gt(a.r)},size:{get:Gt(a.s)},_name:{value:t.nm}}),s.mn=t.mn,s}function f(t,e,i){function s(e){return t.r.ix===e||"Round Corners 1"===e?s.radius:null}var r=Wt(s,i),a=e;return s.propertyIndex=t.ix,a.rd.setGroupProperty(Ht("Radius",r)),Object.defineProperties(s,{radius:{get:Gt(a.rd)},_name:{value:t.nm}}),s.mn=t.mn,s}function m(t,e,i){function s(e){return t.c.ix===e||"Copies"===e?s.copies:t.o.ix===e||"Offset"===e?s.offset:null}var r=Wt(s,i),a=e;return s.propertyIndex=t.ix,a.c.setGroupProperty(Ht("Copies",r)),a.o.setGroupProperty(Ht("Offset",r)),Object.defineProperties(s,{copies:{get:Gt(a.c)},offset:{get:Gt(a.o)},_name:{value:t.nm}}),s.mn=t.mn,s}return function(e,i,s){var r;function a(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?s:r[t-1];for(var e=0,i=r.length;e<i;){if(r[e]._name===t)return r[e];e+=1}return null}return a.propertyGroup=Wt(a,(function(){return s})),r=t(e,i,a.propertyGroup),a.numProperties=r.length,a._name="Contents",a}}(),Jt=function(t){var e,i;function s(t){return"ADBE Text Document"===t?s.sourceText:null}return Object.defineProperty(s,"sourceText",{get:function(){t.textProperty.getValue();var s=t.textProperty.currentData.t;return s!==e&&(t.textProperty.currentData.t=e,(i=new String(s)).value=s||new String(s)),i}}),s},Ut=(Ot={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Ot[t]||""});function Qt(t,e,i){this.p=ht.getProp(e,t.v,0,0,i)}function $t(t,e,i){this.p=ht.getProp(e,t.v,0,0,i)}function te(t,e,i){this.p=ht.getProp(e,t.v,1,0,i)}function ee(t,e,i){this.p=ht.getProp(e,t.v,1,0,i)}function ie(t,e,i){this.p=ht.getProp(e,t.v,0,0,i)}function se(t,e,i){this.p=ht.getProp(e,t.v,0,0,i)}function re(t,e,i){this.p=ht.getProp(e,t.v,0,0,i)}function ae(){this.p={}}function ne(t,e){var i,s=t.ef||[];this.effectElements=[];var r,a=s.length;for(i=0;i<a;i+=1)r=new oe(s[i],e),this.effectElements.push(r)}function oe(t,e){this.init(t,e)}function he(){}function le(){}function pe(t){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pe(t)}a([lt],oe),oe.prototype.getValue=oe.prototype.iterateDynamicProperties,oe.prototype.init=function(t,e){var i;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var s,r=this.data.ef.length,a=this.data.ef;for(i=0;i<r;i+=1){switch(s=null,a[i].ty){case 0:s=new Qt(a[i],e,this);break;case 1:s=new $t(a[i],e,this);break;case 2:s=new te(a[i],e,this);break;case 3:s=new ee(a[i],e,this);break;case 4:case 7:s=new re(a[i],e,this);break;case 10:s=new ie(a[i],e,this);break;case 11:s=new se(a[i],e,this);break;case 5:s=new ne(a[i],e,this);break;default:s=new ae(a[i],e,this)}s&&this.effectElements.push(s)}},he.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=qt(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=Xt.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=Yt(this):4===this.data.ty?(this.layerInterface.shapeInterface=Kt(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=Jt(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=Ut(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId=L(),this.data.sr||(this.data.sr=1),this.effectsManager=new ne(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},le.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var i,s=this.dynamicProperties.length;for(i=0;i<s;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var fe,me=(fe=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",i=t.getFootageData();function s(t){if(i[t])return e=t,"object"===pe(i=i[t])?s:i;var r=t.indexOf(e);if(-1!==r){var a=parseInt(t.substr(r+e.length),10);return"object"===pe(i=i[a])?s:i}return""}return function(){return e="",i=t.getFootageData(),s}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=fe(t),e});function de(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,i)}function ue(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,i),this._isPlaying=!1,this._canPlay=!1;var s=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(s),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?ht.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function ce(){}function ge(){}function ye(t,e,i){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r,a,n=this.globalData.defs,o=this.masksProperties?this.masksProperties.length:0;this.viewData=p(o),this.solidPath="";var h,l,f,m,d,u,c=this.masksProperties,g=0,y=[],v=L(),b="clipPath",_="clip-path";for(r=0;r<o;r+=1)if(("a"!==c[r].mode&&"n"!==c[r].mode||c[r].inv||100!==c[r].o.k||c[r].o.x)&&(b="mask",_="mask"),"s"!==c[r].mode&&"i"!==c[r].mode||0!==g?f=null:((f=H("rect")).setAttribute("fill","#ffffff"),f.setAttribute("width",this.element.comp.data.w||0),f.setAttribute("height",this.element.comp.data.h||0),y.push(f)),a=H("path"),"n"===c[r].mode)this.viewData[r]={op:ht.getProp(this.element,c[r].o,0,.01,this.element),prop:_t.getShapeProp(this.element,c[r],3),elem:a,lastPath:""},n.appendChild(a);else{var k;if(g+=1,a.setAttribute("fill","s"===c[r].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==c[r].x.k?(b="mask",_="mask",u=ht.getProp(this.element,c[r].x,0,null,this.element),k=L(),(m=H("filter")).setAttribute("id",k),(d=H("feMorphology")).setAttribute("operator","erode"),d.setAttribute("in","SourceGraphic"),d.setAttribute("radius","0"),m.appendChild(d),n.appendChild(m),a.setAttribute("stroke","s"===c[r].mode?"#000000":"#ffffff")):(d=null,u=null),this.storedData[r]={elem:a,x:u,expan:d,lastPath:"",lastOperator:"",filterId:k,lastRadius:0},"i"===c[r].mode){l=y.length;var x=H("g");for(h=0;h<l;h+=1)x.appendChild(y[h]);var P=H("mask");P.setAttribute("mask-type","alpha"),P.setAttribute("id",v+"_"+g),P.appendChild(a),n.appendChild(P),x.setAttribute("mask","url("+s()+"#"+v+"_"+g+")"),y.length=0,y.push(x)}else y.push(a);c[r].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[r]={elem:a,lastPath:"",op:ht.getProp(this.element,c[r].o,0,.01,this.element),prop:_t.getShapeProp(this.element,c[r],3),invRect:f},this.viewData[r].prop.k||this.drawPath(c[r],this.viewData[r].prop.v,this.viewData[r])}for(this.maskElement=H(b),o=y.length,r=0;r<o;r+=1)this.maskElement.appendChild(y[r]);g>0&&(this.maskElement.setAttribute("id",v),this.element.maskedElement.setAttribute(_,"url("+s()+"#"+v+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}de.prototype.prepareFrame=function(){},a([Vt,he,le],de),de.prototype.getBaseElement=function(){return null},de.prototype.renderFrame=function(){},de.prototype.destroy=function(){},de.prototype.initExpressions=function(){this.layerInterface=me(this)},de.prototype.getFootageData=function(){return this.footageData},ue.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},a([Vt,he,le],ue),ue.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},ue.prototype.show=function(){},ue.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},ue.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},ue.prototype.resume=function(){this._canPlay=!0},ue.prototype.setRate=function(t){this.audio.rate(t)},ue.prototype.volume=function(t){this.audio.volume(t)},ue.prototype.getBaseElement=function(){return null},ue.prototype.destroy=function(){},ue.prototype.sourceRectAtTime=function(){},ue.prototype.initExpressions=function(){},ce.prototype.checkLayers=function(t){var e,i,s=this.layers.length;for(this.completeLayers=!0,e=s-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},ce.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},ce.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},ce.prototype.createAudio=function(t){return new ue(t,this.globalData,this)},ce.prototype.createFootage=function(t){return new de(t,this.globalData,this)},ce.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},ce.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var i,s=t.length,r=this.layers.length;for(e=0;e<s;e+=1)for(i=0;i<r;){if(this.layers[i].id===t[e].id){this.layers[i]=t[e];break}i+=1}},ce.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},ce.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},ce.prototype.buildElementParenting=function(t,e,i){for(var s=this.elements,r=this.layers,a=0,n=r.length;a<n;)r[a].ind==e&&(s[a]&&!0!==s[a]?(i.push(s[a]),s[a].setAsParent(),void 0!==r[a].parent?this.buildElementParenting(t,r[a].parent,i):t.setHierarchy(i)):(this.buildItem(a),this.addPendingElement(t))),a+=1},ce.prototype.addPendingElement=function(t){this.pendingElements.push(t)},ce.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;e<i;e+=1)if(t[e].xt){var s=this.createComp(t[e]);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},ce.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new Rt,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},ge.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?It.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new kt},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,s=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<s;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;i<s;i+=1)t=this.hierarchy[i].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i,s=!0,r=this.comp;s;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):s=!1;var a,n=e.length;for(i=0;i<n;i+=1)a=e[i].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new kt},ye.prototype.getMaskProperty=function(t){return this.viewData[t].prop},ye.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,r=this.masksProperties.length;for(e=0;e<r;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+s()+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},ye.prototype.getMaskelement=function(){return this.maskElement},ye.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},ye.prototype.drawPath=function(t,e,i){var s,r,a=" M"+e.v[0][0]+","+e.v[0][1];for(r=e._length,s=1;s<r;s+=1)a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[s][0]+","+e.i[s][1]+" "+e.v[s][0]+","+e.v[s][1];if(e.c&&r>1&&(a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},ye.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var ve=function(){var t={};return t.createFilter=function(t,e){var i=H("filter");i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},t.createAlphaToLuminanceFilter=function(){var t=H("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),be=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function _e(t,e){this.filterManager=e;var i=H("feColorMatrix");if(i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i),(i=H("feColorMatrix")).setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result","f2"),t.appendChild(i),this.matrixFilter=i,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var s,r=H("feMerge");t.appendChild(r),(s=H("feMergeNode")).setAttribute("in","SourceGraphic"),r.appendChild(s),(s=H("feMergeNode")).setAttribute("in","f2"),r.appendChild(s)}}function ke(t,e){this.filterManager=e;var i=H("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(i),this.matrixFilter=i}function xe(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function Pe(t,e){this.filterManager=e;var i=H("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i);var s=H("feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.matrixFilter=s;var r=H("feFuncR");r.setAttribute("type","table"),s.appendChild(r),this.feFuncR=r;var a=H("feFuncG");a.setAttribute("type","table"),s.appendChild(a),this.feFuncG=a;var n=H("feFuncB");n.setAttribute("type","table"),s.appendChild(n),this.feFuncB=n}function Ae(t,e){this.filterManager=e;var i=this.filterManager.effectElements,s=H("feComponentTransfer");(i[10].p.k||0!==i[10].p.v||i[11].p.k||1!==i[11].p.v||i[12].p.k||1!==i[12].p.v||i[13].p.k||0!==i[13].p.v||i[14].p.k||1!==i[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(i[17].p.k||0!==i[17].p.v||i[18].p.k||1!==i[18].p.v||i[19].p.k||1!==i[19].p.v||i[20].p.k||0!==i[20].p.v||i[21].p.k||1!==i[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(i[24].p.k||0!==i[24].p.v||i[25].p.k||1!==i[25].p.v||i[26].p.k||1!==i[26].p.v||i[27].p.k||0!==i[27].p.v||i[28].p.k||1!==i[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(i[31].p.k||0!==i[31].p.v||i[32].p.k||1!==i[32].p.v||i[33].p.k||1!==i[33].p.v||i[34].p.k||0!==i[34].p.v||i[35].p.k||1!==i[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),s=H("feComponentTransfer")),(i[3].p.k||0!==i[3].p.v||i[4].p.k||1!==i[4].p.v||i[5].p.k||1!==i[5].p.v||i[6].p.k||0!==i[6].p.v||i[7].p.k||1!==i[7].p.v)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function we(t,e){var i=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",i.x),t.setAttribute("y",i.y),t.setAttribute("width",i.width),t.setAttribute("height",i.height),this.filterManager=e;var s=H("feGaussianBlur");s.setAttribute("in","SourceAlpha"),s.setAttribute("result","drop_shadow_1"),s.setAttribute("stdDeviation","0"),this.feGaussianBlur=s,t.appendChild(s);var r=H("feOffset");r.setAttribute("dx","25"),r.setAttribute("dy","0"),r.setAttribute("in","drop_shadow_1"),r.setAttribute("result","drop_shadow_2"),this.feOffset=r,t.appendChild(r);var a=H("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=H("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=H("feMerge");t.appendChild(h),o=H("feMergeNode"),h.appendChild(o),(o=H("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}_e.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},ke.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},xe.prototype.initialize=function(){var t,e,i,r,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(r=this.elem.maskManager.masksProperties.length,i=0):r=(i=this.filterManager.effectElements[0].p.v-1)+1,(e=H("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);i<r;i+=1)t=H("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var n=H("mask"),o=L();n.setAttribute("id",o),n.setAttribute("mask-type","alpha"),n.appendChild(e),this.elem.globalData.defs.appendChild(n);var h=H("g");for(h.setAttribute("mask","url("+s()+"#"+o+")");a[0];)h.appendChild(a[0]);this.elem.layerElement.appendChild(h),this.masker=n,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},xe.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var i,s,r=this.paths.length;for(e=0;e<r;e+=1)if(-1!==this.paths[e].m&&(i=this.elem.maskManager.viewData[this.paths[e].m],s=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&s.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=s.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;s.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var d=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+v(255*d[0])+","+v(255*d[1])+","+v(255*d[2])+")")}},Pe.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v,r=s[0]+" "+i[0]+" "+e[0],a=s[1]+" "+i[1]+" "+e[1],n=s[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},Ae.prototype.createFeFunc=function(t,e){var i=H(t);return i.setAttribute("type","table"),e.appendChild(i),i},Ae.prototype.getTableValue=function(t,e,i,s,r){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=r-s,d=e-t;o<=256;)n=(a=o/256)<=h?d<0?r:s:a>=l?d<0?s:r:s+m*Math.pow((a-t)/d,1/i),p[f]=n,f+=1,o+=256/255;return p.join(" ")},Ae.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},we.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",G(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*P,r=i*Math.cos(s),a=i*Math.sin(s);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",a)}}};var Ee=[];function Ce(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=H("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function De(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var i=H("feGaussianBlur");t.appendChild(i),this.feGaussianBlur=i}Ce.prototype.findSymbol=function(t){for(var e=0,i=Ee.length;e<i;){if(Ee[e]===t)return Ee[e];e+=1}return null},Ce.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var s,r=i.children,a=0,n=r.length;a<n&&r[a]!==t.layerElement;)a+=1;a<=n-2&&(s=r[a+1]);var o=H("use");o.setAttribute("href","#"+e),s?i.insertBefore(o,s):i.appendChild(o)}},Ce.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i=L(),s=H("mask");s.setAttribute("id",e.layerId),s.setAttribute("mask-type","alpha"),Ee.push(e);var r=t.globalData.defs;r.appendChild(s);var a=H("symbol");a.setAttribute("id",i),this.replaceInParent(e,i),a.appendChild(e.layerElement),r.appendChild(a);var n=H("use");n.setAttribute("href","#"+i),s.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},Ce.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,i=0,s=e.length;i<s;)e[i]&&e[i].data.ind===t&&this.setElementAsMask(this.elem,e[i]),i+=1;this.initialized=!0},Ce.prototype.renderFrame=function(){this.initialized||this.initialize()},De.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=3==i?0:e,r=2==i?0:e;this.feGaussianBlur.setAttribute("stdDeviation",s+" "+r);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}};var Se={};function Me(t){var e,i,r=t.data.ef?t.data.ef.length:0,a=L(),n=ve.createFilter(a,!0),o=0;for(this.filters=[],e=0;e<r;e+=1){i=null;var h=t.data.ef[e].ty;if(Se[h])i=new(0,Se[h].effect)(n,t.effectsManager.effectElements[e],t),Se[h].countsAsEffect&&(o+=1);20===t.data.ef[e].ty?(o+=1,i=new _e(n,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(o+=1,i=new ke(n,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?i=new xe(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(o+=1,i=new Pe(n,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(o+=1,i=new Ae(n,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(o+=1,i=new we(n,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?i=new Ce(n,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(o+=1,i=new De(n,t.effectsManager.effectElements[e])),i&&this.filters.push(i)}o&&(t.globalData.defs.appendChild(n),t.layerElement.setAttribute("filter","url("+s()+"#"+a+")")),this.filters.length&&t.addRenderableComponent(this)}function Fe(){}function Te(){}function Ie(){}function Be(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function Le(t,e){this.elem=t,this.pos=e}function ze(){}Me.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)},Fe.prototype={initRendererElement:function(){this.layerElement=H("g")},createContainerElements:function(){this.matteElement=H("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,r=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=H("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),r=a,this.globalData.defs.appendChild(a),be.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=L(),e=ve.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(ve.createAlphaToLuminanceFilter()),(i=H("g")).appendChild(this.layerElement),r=i,a.appendChild(i),i.setAttribute("filter","url("+s()+"#"+t+")"))}else if(2==this.data.td){var n=H("mask");n.setAttribute("id",this.layerId),n.setAttribute("mask-type","alpha");var o=H("g");n.appendChild(o),t=L(),e=ve.createFilter(t);var h=H("feComponentTransfer");h.setAttribute("in","SourceGraphic"),e.appendChild(h);var l=H("feFuncA");l.setAttribute("type","table"),l.setAttribute("tableValues","1.0 0.0"),h.appendChild(l),this.globalData.defs.appendChild(e);var p=H("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),o.setAttribute("filter","url("+s()+"#"+t+")"),o.appendChild(p),o.appendChild(this.layerElement),r=o,be.maskType||(n.setAttribute("mask-type","luminance"),e.appendChild(ve.createAlphaToLuminanceFilter()),i=H("g"),o.appendChild(p),i.appendChild(this.layerElement),r=i,o.appendChild(i)),this.globalData.defs.appendChild(n)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var f=H("clipPath"),m=H("path");m.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var d=L();if(f.setAttribute("id",d),f.appendChild(m),this.globalData.defs.appendChild(f),this.checkMasks()){var u=H("g");u.setAttribute("clip-path","url("+s()+"#"+d+")"),u.appendChild(this.layerElement),this.transformedElement=u,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+s()+"#"+d+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new ye(this.data,this,this.globalData),this.renderableEffectsManager=new Me(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+s()+"#"+t+")")}},Te.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},a([Vt,o({initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],Ie),a([he,ge,Fe,Te,le,Ie],Be),Be.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=H("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},Be.prototype.sourceRectAtTime=function(){return this.sourceRect},ze.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;e<i;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,s=e.length;i<s;){if(e[i].elem===t)return e[i].pos;i+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements,s=i.length;s;)if(i[s-=1].elem===t)return void(i[s].pos=e);i.push(new Le(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var Re={1:"butt",2:"round",3:"square"},Ve={1:"miter",2:"round",3:"bevel"};function Oe(t,e,i){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=i,this.lvl=e,this._isAnimated=!!i.k;for(var s=0,r=t.length;s<r;){if(t[s].mProps.dynamicProperties.length){this._isAnimated=!0;break}s+=1}}function Ne(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=H("path"),this.msElem=null}function Ge(t,e,i,s){var r;this.elem=t,this.frameId=-1,this.dataProps=p(e.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=l("float32",e.length?e.length-1:0),this.dashoffset=l("float32",1),this.initDynamicPropertyContainer(s);var a,n=e.length||0;for(r=0;r<n;r+=1)a=ht.getProp(t,e[r].v,0,0,this),this.k=a.k||this.k,this.dataProps[r]={n:e[r].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function je(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=ht.getProp(t,e.o,0,.01,this),this.w=ht.getProp(t,e.w,0,null,this),this.d=new Ge(t,e.d||{},"svg",this),this.c=ht.getProp(t,e.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}function qe(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=ht.getProp(t,e.o,0,.01,this),this.c=ht.getProp(t,e.c,1,255,this),this.style=i}function We(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=i}function He(t,e,i){this.data=e,this.c=l("uint8c",4*e.p);var s=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=l("float32",s),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=s,this.initDynamicPropertyContainer(i),this.prop=ht.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function Xe(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,i)}function Ye(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=ht.getProp(t,e.w,0,null,this),this.d=new Ge(t,e.d||{},"svg",this),this.initGradientData(t,e,i),this._isAnimated=!!this._isAnimated}function Ze(){this.it=[],this.prevViewData=[],this.gr=H("g")}function Ke(t,e,i){this.transform={mProps:t,op:e,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}Oe.prototype.setAsAnimated=function(){this._isAnimated=!0},Ne.prototype.reset=function(){this.d="",this._mdf=!1},Ge.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,i=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<i;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},a([lt],Ge),a([lt],je),a([lt],qe),a([lt],We),He.prototype.comparePoints=function(t,e){for(var i=0,s=this.o.length/2;i<s;){if(Math.abs(t[4*i]-t[4*e+2*i])>.01)return!1;i+=1}return!0},He.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},He.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,s,r=4*this.data.p;for(e=0;e<r;e+=1)i=e%4==0?100:255,s=Math.round(this.prop.v[e]*i),this.c[e]!==s&&(this.c[e]=s,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=4*this.data.p;e<r;e+=1)i=e%2==0?100:1,s=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==s&&(this.o[e-4*this.data.p]=s,this._omdf=!t);this._mdf=!t}},a([lt],He),Xe.prototype.initGradientData=function(t,e,i){this.o=ht.getProp(t,e.o,0,.01,this),this.s=ht.getProp(t,e.s,1,null,this),this.e=ht.getProp(t,e.e,1,null,this),this.h=ht.getProp(t,e.h||{k:0},0,.01,this),this.a=ht.getProp(t,e.a||{k:0},0,P,this),this.g=new He(t,e.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i),this._isAnimated=!!this._isAnimated},Xe.prototype.setGradientData=function(t,e){var i=L(),r=H(1===e.t?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var a,n,o,h=[];for(o=4*e.g.p,n=0;n<o;n+=4)a=H("stop"),r.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+s()+"#"+i+")"),this.gf=r,this.cst=h},Xe.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,a,n=H("mask"),o=H("path");n.appendChild(o);var h=L(),l=L();n.setAttribute("id",l);var p=H(1===t.t?"linearGradient":"radialGradient");p.setAttribute("id",h),p.setAttribute("spreadMethod","pad"),p.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var f=this.stops;for(r=4*t.g.p;r<a;r+=2)(i=H("stop")).setAttribute("stop-color","rgb(255,255,255)"),p.appendChild(i),f.push(i);o.setAttribute("gf"===t.ty?"fill":"stroke","url("+s()+"#"+h+")"),"gs"===t.ty&&(o.setAttribute("stroke-linecap",Re[t.lc||2]),o.setAttribute("stroke-linejoin",Ve[t.lj||2]),1===t.lj&&o.setAttribute("stroke-miterlimit",t.ml)),this.of=p,this.ms=n,this.ost=f,this.maskId=l,e.msElem=o}},a([lt],Xe),a([Xe,lt],Ye);var Je=function(t,e,i,s){if(0===e)return"";var r,a=t.o,n=t.i,o=t.v,h=" M"+s.applyToPointStringified(o[0][0],o[0][1]);for(r=1;r<e;r+=1)h+=" C"+s.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+s.applyToPointStringified(n[r][0],n[r][1])+" "+s.applyToPointStringified(o[r][0],o[r][1]);return i&&e&&(h+=" C"+s.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+s.applyToPointStringified(n[0][0],n[0][1])+" "+s.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},Ue=function(){var t=new kt,e=new kt;function i(t,e,i){(i||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(i||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function s(){}function r(i,s,r){var a,n,o,h,l,p,f,m,d,u,c,g=s.styles.length,y=s.lvl;for(p=0;p<g;p+=1){if(h=s.sh._mdf||r,s.styles[p].lvl<y){for(m=e.reset(),u=y-s.styles[p].lvl,c=s.transformers.length-1;!h&&u>0;)h=s.transformers[c].mProps._mdf||h,u-=1,c-=1;if(h)for(u=y-s.styles[p].lvl,c=s.transformers.length-1;u>0;)d=s.transformers[c].mProps.v.props,m.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),u-=1,c-=1}else m=t;if(n=(f=s.sh.paths)._length,h){for(o="",a=0;a<n;a+=1)(l=f.shapes[a])&&l._length&&(o+=Je(l,l._length,l.c,m));s.caches[p]=o}else o=s.caches[p];s.styles[p].d+=!0===i.hd?"":o,s.styles[p]._mdf=h||s.styles[p]._mdf}}function a(t,e,i){var s=e.style;(e.c._mdf||i)&&s.pElem.setAttribute("fill","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||i)&&s.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,i){o(t,e,i),h(t,e,i)}function o(t,e,i){var s,r,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||i){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||i){var d=1===t.t?"x1":"cx",u="x1"===d?"y1":"cy";h.setAttribute(d,p[0]),h.setAttribute(u,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(d,p[0]),e.of.setAttribute(u,p[1]))}if(e.g._cmdf||i){s=e.cst;var c=e.g.c;for(a=s.length,r=0;r<a;r+=1)(n=s[r]).setAttribute("offset",c[4*r]+"%"),n.setAttribute("stop-color","rgb("+c[4*r+1]+","+c[4*r+2]+","+c[4*r+3]+")")}if(l&&(e.g._omdf||i)){var g=e.g.o;for(a=(s=e.g._collapsable?e.cst:e.ost).length,r=0;r<a;r+=1)n=s[r],e.g._collapsable||n.setAttribute("offset",g[2*r]+"%"),n.setAttribute("stop-opacity",g[2*r+1])}if(1===t.t)(e.e._mdf||i)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||i)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||i){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var y=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,_=Math.cos(y+e.a.v)*b+p[0],k=Math.sin(y+e.a.v)*b+p[1];h.setAttribute("fx",_),h.setAttribute("fy",k),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",k))}}function h(t,e,i){var s=e.style,r=e.d;r&&(r._mdf||i)&&r.dashStr&&(s.pElem.setAttribute("stroke-dasharray",r.dashStr),s.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||i)&&s.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||i)&&s.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(s.pElem.setAttribute("stroke-width",e.w.v),s.msElem&&s.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return r;case"tr":return i;case"no":return s;default:return null}}}}();function Qe(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function $e(t,e,i,s,r,a){this.o=t,this.sw=e,this.sc=i,this.fc=s,this.m=r,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!s,m:!0,p:!0}}function ti(t,e){this._frameId=i,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}a([he,ge,Fe,ze,Te,le,Ie],Qe),Qe.prototype.initSecondaryElement=function(){},Qe.prototype.identityMatrix=new kt,Qe.prototype.buildExpressionInterface=function(){},Qe.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Qe.prototype.filterUniqueShapes=function(){var t,e,i,s,r=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i<a;i+=1){for(s=this.stylesList[i],o=!1,n.length=0,t=0;t<r;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(s)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},Qe.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e].setAsAnimated()},Qe.prototype.createStyleElement=function(t,e){var i,r=new Ne(t,e),a=r.pElem;if("st"===t.ty)i=new je(this,t,r);else if("fl"===t.ty)i=new qe(this,t,r);else if("gf"===t.ty||"gs"===t.ty){i=new("gf"===t.ty?Xe:Ye)(this,t,r),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),a.setAttribute("mask","url("+s()+"#"+i.maskId+")"))}else"no"===t.ty&&(i=new We(this,t,r));return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",Re[t.lc||2]),a.setAttribute("stroke-linejoin",Ve[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=Ut(t.bm)),this.stylesList.push(r),this.addToAnimatedContents(t,i),i},Qe.prototype.createGroupElement=function(t){var e=new Ze;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=Ut(t.bm)),e},Qe.prototype.createTransformElement=function(t,e){var i=It.getTransformProperty(this,t,this),s=new Ke(i,i.o,e);return this.addToAnimatedContents(t,s),s},Qe.prototype.createShapeElement=function(t,e,i){var s=4;"rc"===t.ty?s=5:"el"===t.ty?s=6:"sr"===t.ty&&(s=7);var r=new Oe(e,i,_t.getShapeProp(this,t,s,this));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r},Qe.prototype.addToAnimatedContents=function(t,e){for(var i=0,s=this.animatedContents.length;i<s;){if(this.animatedContents[i].element===e)return;i+=1}this.animatedContents.push({fn:Ue.createRenderFunction(t),element:e,data:t})},Qe.prototype.setElementStyles=function(t){var e,i=t.styles,s=this.stylesList.length;for(e=0;e<s;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},Qe.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},Qe.prototype.searchShapes=function(t,e,i,s,r,a,n){var o,h,l,p,f,m,d=[].concat(a),u=t.length-1,c=[],g=[];for(o=u;o>=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=i[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],r),t[o]._render&&e[o].style.pElem.parentNode!==s&&s.appendChild(e[o].style.pElem),c.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,r+1,d,n),t[o]._render&&e[o].gr.parentNode!==s&&s.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],s)),p=e[o].transform,d.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],d,r)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=St.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=St.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),g.push(f));this.addProcessedElement(t[o],o+1)}for(u=c.length,o=0;o<u;o+=1)c[o].closed=!0;for(u=g.length,o=0;o<u;o+=1)g[o].closed=!0},Qe.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},Qe.prototype.renderShape=function(){var t,e,i=this.animatedContents.length;for(t=0;t<i;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},Qe.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},$e.prototype.update=function(t,e,i,s,r,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,n=!0),this.fc!==s&&(this.fc=s,this._mdf.fc=!0,n=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,n=!0),n},ti.prototype.defaultBoxWidth=[0,0],ti.prototype.copyData=function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ti.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},ti.prototype.searchProperty=function(){return this.searchKeyframes()},ti.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},ti.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},ti.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var s;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(s=0;s<r;s+=1)a=i!==this.keysIndex?this.effectsSequence[s](a,a.t):this.effectsSequence[s](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},ti.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,i=0,s=t.length;i<=s-1&&!(i===s-1||t[i+1].t>e);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},ti.prototype.buildFinalText=function(t){for(var e,i,s=[],r=0,a=t.length,n=!1;r<a;)e=t.charCodeAt(r),Rt.isCombinedCharacter(e)?s[s.length-1]+=t.charAt(r):e>=55296&&e<=56319?(i=t.charCodeAt(r+1))>=56320&&i<=57343?(n||Rt.isModifier(e,i)?(s[s.length-1]+=t.substr(r,2),n=!1):s.push(t.substr(r,2)),r+=1):s.push(t.charAt(r)):e>56319?(i=t.charCodeAt(r+1),Rt.isZeroWidthJoiner(e,i)?(n=!0,s[s.length-1]+=t.substr(r,2),r+=1):s.push(t.charAt(r))):Rt.isZeroWidthJoiner(e)?(s[s.length-1]+=t.charAt(r),n=!0):s.push(t.charAt(r)),r+=1;return s},ti.prototype.completeTextData=function(t){t.__complete=!0;var e,i,s,r,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,d=0,u=0,c=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,k=zt(b);t.fWeight=k.weight,t.fStyle=k.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var x,P=t.tr/1e3*t.finalSize;if(t.sz)for(var A,w,E=!0,C=t.sz[0],D=t.sz[1];E;){A=0,y=0,i=(w=this.buildFinalText(t.t)).length,P=t.tr/1e3*t.finalSize;var S=-1;for(e=0;e<i;e+=1)x=w[e].charCodeAt(0),s=!1," "===w[e]?S=e:13!==x&&3!==x||(y=0,s=!0,A+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(w[e],b.fStyle,b.fFamily),_=s?0:o.w*t.finalSize/100):_=h.measureText(w[e],t.f,t.finalSize),y+_>C&&" "!==w[e]?(-1===S?i+=1:e=S,A+=t.finalLineHeight||1.2*t.finalSize,w.splice(e,S===e?1:0,"\r"),S=-1,y=0):(y+=_,y+=P);A+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&D<A?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=w,i=t.finalText.length,E=!1)}y=-P,_=0;var M,F=0;for(e=0;e<i;e+=1)if(s=!1,13===(x=(M=t.finalText[e]).charCodeAt(0))||3===x?(F=0,g.push(y),v=y>v?y:v,y=-2*P,r="",s=!0,c+=1):r=M,h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),_=s?0:o.w*t.finalSize/100):_=h.measureText(r,t.f,t.finalSize)," "===M?F+=_+P:(y+=_+P+F,F=0),p.push({l:_,an:_,add:d,n:s,anIndexes:[],val:r,line:c,animatorJustifyOffset:0}),2==m){if(d+=_,""===r||" "===r||e===i-1){for(""!==r&&" "!==r||(d-=_);u<=e;)p[u].an=d,p[u].ind=f,p[u].extra=_,u+=1;f+=1,d=0}}else if(3==m){if(d+=_,""===r||e===i-1){for(""===r&&(d-=_);u<=e;)p[u].an=d,p[u].ind=f,p[u].extra=_,u+=1;d=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var T,I,B,L,z=l.a;n=z.length;var R=[];for(a=0;a<n;a+=1){for((T=z[a]).a.sc&&(t.strokeColorAnim=!0),T.a.sw&&(t.strokeWidthAnim=!0),(T.a.fc||T.a.fh||T.a.fs||T.a.fb)&&(t.fillColorAnim=!0),L=0,B=T.s.b,e=0;e<i;e+=1)(I=p[e]).anIndexes[a]=L,(1==B&&""!==I.val||2==B&&""!==I.val&&" "!==I.val||3==B&&(I.n||" "==I.val||e==i-1)||4==B&&(I.n||e==i-1))&&(1===T.s.rn&&R.push(L),L+=1);l.a[a].s.totalChars=L;var V,O=-1;if(1===T.s.rn)for(e=0;e<i;e+=1)O!=(I=p[e]).anIndexes[a]&&(O=I.anIndexes[a],V=R.splice(Math.floor(Math.random()*R.length),1)[0]),I.anIndexes[a]=V}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},ti.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.copyData({},this.data.d.k[e].s);i=this.copyData(i,t),this.data.d.k[e].s=i,this.recalculate(e),this.elem.addDynamicProperty(this)},ti.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},ti.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},ti.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var ei=function(){var t=Math.max,e=Math.min,i=Math.floor;function s(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=ht.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?ht.getProp(t,e.e,0,0,this):{v:100},this.o=ht.getProp(t,e.o||{k:0},0,0,this),this.xe=ht.getProp(t,e.xe||{k:0},0,0,this),this.ne=ht.getProp(t,e.ne||{k:0},0,0,this),this.sm=ht.getProp(t,e.sm||{k:100},0,0,this),this.a=ht.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return s.prototype={getMult:function(s){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var r=0,a=0,n=1,o=1;this.ne.v>0?r=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=it.getBezierEasing(r,a,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?s>=f?1:0:t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(3===m)l=h(l=f===p?s>=f?0:1:1-t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(s-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var d=f-p,u=-d/2+(s=e(t(0,s+.5-p),f-p)),c=d/2;l=Math.sqrt(1-u*u/(c*c))}l=h(l)}else 6===m?(f===p?l=0:(s=e(t(0,s+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*s/(f-p)))/2),l=h(l)):(s>=i(p)&&(l=t(0,e(s-p<0?e(f,1)-(p-s):f-s,1))),l=h(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;l<y?l=0:(l=(l-y)/g)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,s=this.s.v/e+i,r=this.e.v/e+i;if(s>r){var a=s;s=r,r=a}this.finalS=s,this.finalE=r}},a([lt],s),{getTextSelectorProp:function(t,e,i){return new s(t,e,i)}}}();function ii(t,e,i){var s={propType:!1},r=ht.getProp,a=e.a;this.a={r:a.r?r(t,a.r,0,P,i):s,rx:a.rx?r(t,a.rx,0,P,i):s,ry:a.ry?r(t,a.ry,0,P,i):s,sk:a.sk?r(t,a.sk,0,P,i):s,sa:a.sa?r(t,a.sa,0,P,i):s,s:a.s?r(t,a.s,1,.01,i):s,a:a.a?r(t,a.a,1,0,i):s,o:a.o?r(t,a.o,0,.01,i):s,p:a.p?r(t,a.p,1,0,i):s,sw:a.sw?r(t,a.sw,0,0,i):s,sc:a.sc?r(t,a.sc,1,0,i):s,fc:a.fc?r(t,a.fc,1,0,i):s,fh:a.fh?r(t,a.fh,0,0,i):s,fs:a.fs?r(t,a.fs,0,.01,i):s,fb:a.fb?r(t,a.fb,0,.01,i):s,t:a.t?r(t,a.t,0,0,i):s},this.s=ei.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function si(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=p(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function ri(){}si.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,s=ht.getProp;for(t=0;t<i;t+=1)e=this._textData.a[t],this._animatorsData[t]=new ii(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this),p:s(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m.a,1,0,this)},si.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,s,r,a,n,o,h,l,p,f,m,d,u,c,g,y,v,b,_,k=this._moreOptions.alignment.v,x=this._animatorsData,P=this._textData,A=this.mHelper,w=this._renderType,E=this.renderedLetters.length,C=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var D,S=_.v;for(this._pathData.r.v&&(S=S.reverse()),n={tLength:0,segments:[]},a=S._length-1,y=0,r=0;r<a;r+=1)D=ot.buildBezierData(S.v[r],S.v[r+1],[S.o[r][0]-S.v[r][0],S.o[r][1]-S.v[r][1]],[S.i[r+1][0]-S.v[r+1][0],S.i[r+1][1]-S.v[r+1][1]]),n.tLength+=D.segmentLength,n.segments.push(D),y+=D.segmentLength;r=a,_.v.c&&(D=ot.buildBezierData(S.v[r],S.v[0],[S.o[r][0]-S.v[r][0],S.o[r][1]-S.v[r][1]],[S.i[0][0]-S.v[0][0],S.i[0][1]-S.v[0][1]]),n.tLength+=D.segmentLength,n.segments.push(D),y+=D.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=0,f=1,l=0,p=!0,c=n.segments,o<0&&_.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(u=c[m=c.length-1].points).length-1;o<0;)o+=u[f].partialLength,(f-=1)<0&&(f=(u=c[m-=1].points).length-1);d=(u=c[m].points)[f-1],g=(h=u[f]).partialLength}a=C.length,i=0,s=0;var M,F,T,I,B,L=1.2*t.finalSize*.714,z=!0;T=x.length;var R,G,j,q,W,H,X,Y,Z,K,J,U,Q=-1,$=o,tt=m,et=f,it=-1,st="",rt=this.defaultPropsArray;if(2===t.j||1===t.j){var at=0,nt=0,ht=2===t.j?-.5:-1,lt=0,pt=!0;for(r=0;r<a;r+=1)if(C[r].n){for(at&&(at+=nt);lt<r;)C[lt].animatorJustifyOffset=at,lt+=1;at=0,pt=!0}else{for(F=0;F<T;F+=1)(M=x[F].a).t.propType&&(pt&&2===t.j&&(nt+=M.t.v*ht),(B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars)).length?at+=M.t.v*B[0]*ht:at+=M.t.v*B*ht);pt=!1}for(at&&(at+=nt);lt<r;)C[lt].animatorJustifyOffset=at,lt+=1}for(r=0;r<a;r+=1){if(A.reset(),q=1,C[r].n)i=0,s+=t.yOffset,s+=z?1:0,o=$,z=!1,this._hasMaskedPath&&(f=et,d=(u=c[m=tt].points)[f-1],g=(h=u[f]).partialLength,l=0),st="",J="",Z="",U="",rt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(it!==C[r].line){switch(t.j){case 1:o+=y-t.lineWidths[C[r].line];break;case 2:o+=(y-t.lineWidths[C[r].line])/2}it=C[r].line}Q!==C[r].ind&&(C[Q]&&(o+=C[Q].extra),o+=C[r].an/2,Q=C[r].ind),o+=k[0]*C[r].an*.005;var ft=0;for(F=0;F<T;F+=1)(M=x[F].a).p.propType&&((B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars)).length?ft+=M.p.v[0]*B[0]:ft+=M.p.v[0]*B),M.a.propType&&((B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars)).length?ft+=M.a.v[0]*B[0]:ft+=M.a.v[0]*B);for(p=!0,this._pathData.a.v&&(o=.5*C[0].an+(y-this._pathData.f.v-.5*C[0].an-.5*C[C.length-1].an)*Q/(a-1),o+=this._pathData.f.v);p;)l+g>=o+ft||!u?(v=(o+ft-l)/h.partialLength,G=d.point[0]+(h.point[0]-d.point[0])*v,j=d.point[1]+(h.point[1]-d.point[1])*v,A.translate(-k[0]*C[r].an*.005,-k[1]*L*.01),p=!1):u&&(l+=h.partialLength,(f+=1)>=u.length&&(f=0,c[m+=1]?u=c[m].points:_.v.c?(f=0,u=c[m=0].points):(l-=h.partialLength,u=null)),u&&(d=h,g=(h=u[f]).partialLength));R=C[r].an/2-C[r].add,A.translate(-R,0,0)}else R=C[r].an/2-C[r].add,A.translate(-R,0,0),A.translate(-k[0]*C[r].an*.005,-k[1]*L*.01,0);for(F=0;F<T;F+=1)(M=x[F].a).t.propType&&(B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars),0===i&&0===t.j||(this._hasMaskedPath?B.length?o+=M.t.v*B[0]:o+=M.t.v*B:B.length?i+=M.t.v*B[0]:i+=M.t.v*B));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(W=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(X=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<T;F+=1)(M=x[F].a).a.propType&&((B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars)).length?A.translate(-M.a.v[0]*B[0],-M.a.v[1]*B[1],M.a.v[2]*B[2]):A.translate(-M.a.v[0]*B,-M.a.v[1]*B,M.a.v[2]*B));for(F=0;F<T;F+=1)(M=x[F].a).s.propType&&((B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars)).length?A.scale(1+(M.s.v[0]-1)*B[0],1+(M.s.v[1]-1)*B[1],1):A.scale(1+(M.s.v[0]-1)*B,1+(M.s.v[1]-1)*B,1));for(F=0;F<T;F+=1){if(M=x[F].a,B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars),M.sk.propType&&(B.length?A.skewFromAxis(-M.sk.v*B[0],M.sa.v*B[1]):A.skewFromAxis(-M.sk.v*B,M.sa.v*B)),M.r.propType&&(B.length?A.rotateZ(-M.r.v*B[2]):A.rotateZ(-M.r.v*B)),M.ry.propType&&(B.length?A.rotateY(M.ry.v*B[1]):A.rotateY(M.ry.v*B)),M.rx.propType&&(B.length?A.rotateX(M.rx.v*B[0]):A.rotateX(M.rx.v*B)),M.o.propType&&(B.length?q+=(M.o.v*B[0]-q)*B[0]:q+=(M.o.v*B-q)*B),t.strokeWidthAnim&&M.sw.propType&&(B.length?H+=M.sw.v*B[0]:H+=M.sw.v*B),t.strokeColorAnim&&M.sc.propType)for(Y=0;Y<3;Y+=1)B.length?W[Y]+=(M.sc.v[Y]-W[Y])*B[0]:W[Y]+=(M.sc.v[Y]-W[Y])*B;if(t.fillColorAnim&&t.fc){if(M.fc.propType)for(Y=0;Y<3;Y+=1)B.length?X[Y]+=(M.fc.v[Y]-X[Y])*B[0]:X[Y]+=(M.fc.v[Y]-X[Y])*B;M.fh.propType&&(X=B.length?N(X,M.fh.v*B[0]):N(X,M.fh.v*B)),M.fs.propType&&(X=B.length?V(X,M.fs.v*B[0]):V(X,M.fs.v*B)),M.fb.propType&&(X=B.length?O(X,M.fb.v*B[0]):O(X,M.fb.v*B))}}for(F=0;F<T;F+=1)(M=x[F].a).p.propType&&(B=x[F].s.getMult(C[r].anIndexes[F],P.a[F].s.totalChars),this._hasMaskedPath?B.length?A.translate(0,M.p.v[1]*B[0],-M.p.v[2]*B[1]):A.translate(0,M.p.v[1]*B,-M.p.v[2]*B):B.length?A.translate(M.p.v[0]*B[0],M.p.v[1]*B[1],-M.p.v[2]*B[2]):A.translate(M.p.v[0]*B,M.p.v[1]*B,-M.p.v[2]*B));if(t.strokeWidthAnim&&(Z=H<0?0:H),t.strokeColorAnim&&(K="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),t.fillColorAnim&&t.fc&&(J="rgb("+Math.round(255*X[0])+","+Math.round(255*X[1])+","+Math.round(255*X[2])+")"),this._hasMaskedPath){if(A.translate(0,-t.ls),A.translate(0,k[1]*L*.01+s,0),this._pathData.p.v){b=(h.point[1]-d.point[1])/(h.point[0]-d.point[0]);var mt=180*Math.atan(b)/Math.PI;h.point[0]<d.point[0]&&(mt+=180),A.rotate(-mt*Math.PI/180)}A.translate(G,j,0),o-=k[0]*C[r].an*.005,C[r+1]&&Q!==C[r+1].ind&&(o+=C[r].an/2,o+=.001*t.tr*t.finalSize)}else{switch(A.translate(i,s,0),t.ps&&A.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:A.translate(C[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[r].line]),0,0);break;case 2:A.translate(C[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[C[r].line])/2,0,0)}A.translate(0,-t.ls),A.translate(R,0,0),A.translate(k[0]*C[r].an*.005,k[1]*L*.01,0),i+=C[r].l+.001*t.tr*t.finalSize}"html"===w?st=A.toCSS():"svg"===w?st=A.to2dCSS():rt=[A.props[0],A.props[1],A.props[2],A.props[3],A.props[4],A.props[5],A.props[6],A.props[7],A.props[8],A.props[9],A.props[10],A.props[11],A.props[12],A.props[13],A.props[14],A.props[15]],U=q}E<=r?(I=new $e(U,Z,K,J,st,rt),this.renderedLetters.push(I),E+=1,this.lettersChangedFlag=!0):(I=this.renderedLetters[r],this.lettersChangedFlag=I.update(U,Z,K,J,st,rt)||this.lettersChangedFlag)}}},si.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},si.prototype.mHelper=new kt,si.prototype.defaultPropsArray=[],a([lt],si),ri.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textProperty=new ti(this,t.t,this.dynamicProperties),this.textAnimator=new si(t.t,this.renderType,this),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ri.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ri.prototype.createPathShape=function(t,e){var i,s,r=e.length,a="";for(i=0;i<r;i+=1)"sh"===e[i].ty&&(s=e[i].ks.k,a+=Je(s,s.i.length,!0,t));return a},ri.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ri.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ri.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ri.prototype.applyTextPropertiesToMatrix=function(t,e,i,s,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(s,r,0)},ri.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ri.prototype.emptyProp=new $e,ri.prototype.destroy=function(){};var ai,ni={shapes:[]};function oi(t,e,i){this.textSpans=[],this.renderType="svg",this.initElement(t,e,i)}function hi(t,e,i){this.initElement(t,e,i)}function li(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initFrame(),this.initTransform(t,e,i),this.initHierarchy()}function pi(){}function fi(){}function mi(t,e,i){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?p(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?ht.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function di(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=H("svg");var i="";if(e&&e.title){var s=H("title"),r=L();s.setAttribute("id",r),s.textContent=e.title,this.svgElement.appendChild(s),i+=r}if(e&&e.description){var a=H("desc"),n=L();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),i+=" "+n}i&&this.svgElement.setAttribute("aria-labelledby",i);var o=H("defs");this.svgElement.appendChild(o);var h=H("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ui(){}function ci(){}function gi(t,e,i){this.initElement(t,e,i)}function yi(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=H("g"),this.initElement(t,e,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function vi(t,e,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,i)}function bi(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initHierarchy();var s=ht.getProp;if(this.pe=s(this,t.pe,0,0,this),t.ks.p.s?(this.px=s(this,t.ks.p.x,1,0,this),this.py=s(this,t.ks.p.y,1,0,this),this.pz=s(this,t.ks.p.z,1,0,this)):this.p=s(this,t.ks.p,1,0,this),t.ks.a&&(this.a=s(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var r,a=t.ks.or.k.length;for(r=0;r<a;r+=1)t.ks.or.k[r].to=null,t.ks.or.k[r].ti=null}this.or=s(this,t.ks.or,1,P,this),this.or.sh=!0,this.rx=s(this,t.ks.rx,0,P,this),this.ry=s(this,t.ks.ry,0,P,this),this.rz=s(this,t.ks.rz,0,P,this),this.mat=new kt,this._prevMat=new kt,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function _i(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i)}function ki(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function xi(t,e,i){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?p(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?ht.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function Pi(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}return a([he,ge,Fe,Te,le,Ie,ri],oi),oi.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=H("text"))},oi.prototype.buildTextContents=function(t){for(var e=0,i=t.length,s=[],r="";e<i;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(s.push(r),r=""):r+=t[e],e+=1;return s.push(r),s},oi.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var i=this.textProperty.currentData;this.renderedLetters=p(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var s=this.globalData.fontManager.getFontByName(i.f);if(s.fClass)this.layerElement.setAttribute("class",s.fClass);else{this.layerElement.setAttribute("font-family",s.fFamily);var r=i.fWeight,a=i.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",i.t);var n,o=i.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,f=this.data.singleShape,m=0,d=0,u=!0,c=.001*i.tr*i.finalSize;if(!f||h||i.sz){var g,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!f||0===t){if(n=y>t?this.textSpans[t].span:H(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var v=H("g");n.appendChild(v),this.textSpans[t].childSpan=v}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(i.finalSize/100,i.finalSize/100),f&&(o[t].n&&(m=-c,d+=i.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(i,l,o[t].line,m,d),m+=o[t].l||0,m+=c),h){var b;if(1===(g=this.globalData.fontManager.getCharData(i.finalText[t],s.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)b=new mi(g.data,this.globalData,this);else{var _=ni;g.data&&g.data.shapes&&(_=g.data),b=new Qe(_,this.globalData,this)}this.textSpans[t].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[t].childSpan.appendChild(b.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else f&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&n&&n.setAttribute("d","")}else{var k=this.textContainer,x="start";switch(i.j){case 1:x="end";break;case 2:x="middle";break;default:x="start"}k.setAttribute("text-anchor",x),k.setAttribute("letter-spacing",c);var P=this.buildTextContents(i.finalText);for(e=P.length,d=i.ps?i.ps[1]+i.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||H("tspan")).textContent=P[t],n.setAttribute("x",0),n.setAttribute("y",d),n.style.display="inherit",k.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,d+=i.finalLineHeight;this.layerElement.appendChild(k)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},oi.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},oi.prototype.getValue=function(){var t,e,i=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<i;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},oi.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var i,s,r,a=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(i=a[t],s=this.textSpans[t].span,(r=this.textSpans[t].glyph)&&r.renderFrame(),i._mdf.m&&s.setAttribute("transform",i.m),i._mdf.o&&s.setAttribute("opacity",i.o),i._mdf.sw&&s.setAttribute("stroke-width",i.sw),i._mdf.sc&&s.setAttribute("stroke",i.sc),i._mdf.fc&&s.setAttribute("fill",i.fc))}},a([Be],hi),hi.prototype.createContent=function(){var t=H("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},li.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},li.prototype.renderFrame=function(){},li.prototype.getBaseElement=function(){return null},li.prototype.destroy=function(){},li.prototype.sourceRectAtTime=function(){},li.prototype.hide=function(){},a([he,ge,Te,le],li),a([ce],pi),pi.prototype.createNull=function(t){return new li(t,this.globalData,this)},pi.prototype.createShape=function(t){return new Qe(t,this.globalData,this)},pi.prototype.createText=function(t){return new oi(t,this.globalData,this)},pi.prototype.createImage=function(t){return new Be(t,this.globalData,this)},pi.prototype.createSolid=function(t){return new hi(t,this.globalData,this)},pi.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=H("clipPath"),r=H("rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var a=L();i.setAttribute("id",a),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+s()+"#"+a+")"),e.appendChild(i),this.layers=t.layers,this.elements=p(t.layers.length)},pi.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},pi.prototype.updateContainerSize=function(){},pi.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);e[t]=i,j()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?i.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},pi.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;e<i;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},pi.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<i;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},pi.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var s,r=0;r<e;)this.elements[r]&&!0!==this.elements[r]&&this.elements[r].getBaseElement()&&(s=this.elements[r].getBaseElement()),r+=1;s?this.layerElement.insertBefore(i,s):this.layerElement.appendChild(i)}},pi.prototype.hide=function(){this.layerElement.style.display="none"},pi.prototype.show=function(){this.layerElement.style.display="block"},a([he,ge,Te,le,Ie],fi),fi.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},fi.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,s=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=s-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},fi.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},fi.prototype.setElements=function(t){this.elements=t},fi.prototype.getElements=function(){return this.elements},fi.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},fi.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},a([pi,fi,Fe],mi),mi.prototype.createComp=function(t){return new mi(t,this.globalData,this)},a([pi],di),di.prototype.createComp=function(t){return new mi(t,this.globalData,this)},ui.prototype.renderFrame=function(){},ci.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=r(this.data.tg||"div"),this.data.hasMask?(this.svgElement=H("svg"),this.layerElement=H("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,E(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new ui(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new ye(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},ci.prototype.getBaseElement=Fe.prototype.getBaseElement,ci.prototype.destroyBaseElement=ci.prototype.destroy,ci.prototype.buildElementParenting=ce.prototype.buildElementParenting,a([he,ge,ci,Te,le,Ie],gi),gi.prototype.createContent=function(){var t;this.data.hasMask?((t=H("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=r("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},a([he,ge,gi,Qe,ci,Te,le,Vt],yi),yi.prototype._renderShapeFrame=yi.prototype.renderInnerContent,yi.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=H("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},yi.prototype.getTransformedPoint=function(t,e){var i,s=t.length;for(i=0;i<s;i+=1)e=t[i].mProps.v.applyToPointArray(e[0],e[1],0);return e},yi.prototype.calculateShapeBoundingBox=function(t,e){var i,s,r,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(i=0;i<l-1;i+=1)s=this.getTransformedPoint(h,o.v[i]),r=this.getTransformedPoint(h,o.o[i]),a=this.getTransformedPoint(h,o.i[i+1]),n=this.getTransformedPoint(h,o.v[i+1]),this.checkBounds(s,r,a,n,e);o.c&&(s=this.getTransformedPoint(h,o.v[i]),r=this.getTransformedPoint(h,o.o[i]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(s,r,a,n,e))}},yi.prototype.checkBounds=function(t,e,i,s,r){this.getBoundsOfCurve(t,e,i,s);var a=this.shapeBoundingBox;r.x=_(a.left,r.x),r.xMax=b(a.right,r.xMax),r.y=_(a.top,r.y),r.yMax=b(a.bottom,r.yMax)},yi.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},yi.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},yi.prototype.getBoundsOfCurve=function(t,e,i,s){for(var r,a,n,o,h,l,p,f=[[t[0],s[0]],[t[1],s[1]]],m=0;m<2;++m)a=6*t[m]-12*e[m]+6*i[m],r=-3*t[m]+9*e[m]-9*i[m]+3*s[m],n=3*e[m]-3*t[m],a|=0,n|=0,0===(r|=0)&&0===a||(0===r?(o=-n/a)>0&&o<1&&f[m].push(this.calculateF(o,t,e,i,s,m)):(h=a*a-4*n*r)>=0&&((l=(-a+y(h))/(2*r))>0&&l<1&&f[m].push(this.calculateF(l,t,e,i,s,m)),(p=(-a-y(h))/(2*r))>0&&p<1&&f[m].push(this.calculateF(p,t,e,i,s,m))));this.shapeBoundingBox.left=_.apply(null,f[0]),this.shapeBoundingBox.top=_.apply(null,f[1]),this.shapeBoundingBox.right=b.apply(null,f[0]),this.shapeBoundingBox.bottom=b.apply(null,f[1])},yi.prototype.calculateF=function(t,e,i,s,r,a){return g(1-t,3)*e[a]+3*g(1-t,2)*t*i[a]+3*(1-t)*g(t,2)*s[a]+g(t,3)*r[a]},yi.prototype.calculateBoundingBox=function(t,e){var i,s=t.length;for(i=0;i<s;i+=1)t[i]&&t[i].sh?this.calculateShapeBoundingBox(t[i],e):t[i]&&t[i].it&&this.calculateBoundingBox(t[i].it,e)},yi.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},yi.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var i=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),i=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),i=!0),i||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var s=this.shapeCont.style,r="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";s.transform=r,s.webkitTransform=r}}},a([he,ge,ci,Te,le,Ie,ri],vi),vi.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=H("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},vi.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=p(t.l?t.l.length:0);var e=this.innerElem.style,i=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=i,e.color=i,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var s,a,n=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",n.fClass)this.innerElem.className=n.fClass;else{e.fontFamily=n.fFamily;var o=t.fWeight,h=t.fStyle;e.fontStyle=h,e.fontWeight=o}var l,f,m,d=t.l;a=d.length;var u,c=this.mHelper,g="",y=0;for(s=0;s<a;s+=1){if(this.globalData.fontManager.chars?(this.textPaths[y]?l=this.textPaths[y]:((l=H("path")).setAttribute("stroke-linecap",Re[1]),l.setAttribute("stroke-linejoin",Ve[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[y]?m=(f=this.textSpans[y]).children[0]:((f=r("div")).style.lineHeight=0,(m=H("svg")).appendChild(l),E(f)))):this.isMasked?l=this.textPaths[y]?this.textPaths[y]:H("text"):this.textSpans[y]?(f=this.textSpans[y],l=this.textPaths[y]):(E(f=r("span")),E(l=r("span")),f.appendChild(l)),this.globalData.fontManager.chars){var v,b=this.globalData.fontManager.getCharData(t.finalText[s],n.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(v=b?b.data:null,c.reset(),v&&v.shapes&&v.shapes.length&&(u=v.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),g=this.createPathShape(c,u),l.setAttribute("d",g)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(f),v&&v.shapes){document.body.appendChild(m);var _=m.getBBox();m.setAttribute("width",_.width+2),m.setAttribute("height",_.height+2),m.setAttribute("viewBox",_.x-1+" "+(_.y-1)+" "+(_.width+2)+" "+(_.height+2));var k=m.style,x="translate("+(_.x-1)+"px,"+(_.y-1)+"px)";k.transform=x,k.webkitTransform=x,d[s].yOffset=_.y-1}else m.setAttribute("width",1),m.setAttribute("height",1);f.appendChild(m)}}else if(l.textContent=d[s].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(f);var P=l.style,A="translate3d(0,"+-t.finalSize/1.2+"px,0)";P.transform=A,P.webkitTransform=A}this.isMasked?this.textSpans[y]=l:this.textSpans[y]=f,this.textSpans[y].style.display="block",this.textPaths[y]=l,y+=1}for(;y<this.textSpans.length;)this.textSpans[y].style.display="none",y+=1},vi.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var i,s,r,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(s=l.length,i=0;i<s;i+=1)l[i].n?o+=1:(a=this.textSpans[i],n=this.textPaths[i],r=h[o],o+=1,r._mdf.m&&(this.isMasked?a.setAttribute("transform",r.m):(a.style.webkitTransform=r.m,a.style.transform=r.m)),a.style.opacity=r.o,r.sw&&r._mdf.sw&&n.setAttribute("stroke-width",r.sw),r.sc&&r._mdf.sc&&n.setAttribute("stroke",r.sc),r.fc&&r._mdf.fc&&(n.setAttribute("fill",r.fc),n.style.color=r.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},a([he,le,Te],bi),bi.prototype.setup=function(){var t,e,i,s,r=this.comp.threeDElements.length;for(t=0;t<r;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){i=e.perspectiveElem.style,s=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";i.perspective=a,i.webkitPerspective=a,s.transformOrigin=n,s.mozTransformOrigin=n,s.webkitTransformOrigin=n,i.transform=o,i.webkitTransform=o}},bi.prototype.createElements=function(){},bi.prototype.hide=function(){},bi.prototype.renderFrame=function(){var t,e,i=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)i=this.hierarchy[t].finalTransform.mProp._mdf||i;if(i||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var s=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-s.p.v[0],-s.p.v[1],s.p.v[2]),this.mat.rotateX(-s.or.v[0]).rotateY(-s.or.v[1]).rotateZ(s.or.v[2]),this.mat.rotateX(-s.rx.v).rotateY(-s.ry.v).rotateZ(s.rz.v),this.mat.scale(1/s.s.v[0],1/s.s.v[1],1/s.s.v[2]),this.mat.translate(s.a.v[0],s.a.v[1],s.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r;r=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)+Math.pow(r[2],2)),n=[r[0]/a,r[1]/a,r[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,d;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var u=this.mat.toCSS();(d=f.container.style).transform=u,d.webkitTransform=u}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},bi.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},bi.prototype.destroy=function(){},bi.prototype.getBaseElement=function(){return null},a([he,ge,ci,gi,Te,le,Vt],_i),_i.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=H("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},a([ce],ki),ki.prototype.buildItem=di.prototype.buildItem,ki.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},ki.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){var s=this.layers[e];if(s.ddd&&this.supports3d)this.addTo3dContainer(i,e);else if(this.threeDElements)this.addTo3dContainer(i,e);else{for(var r,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],r=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||r),n+=1;r?s.ddd&&this.supports3d||this.layerElement.insertBefore(i,r):s.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},ki.prototype.createShape=function(t){return this.supports3d?new yi(t,this.globalData,this):new Qe(t,this.globalData,this)},ki.prototype.createText=function(t){return this.supports3d?new vi(t,this.globalData,this):new oi(t,this.globalData,this)},ki.prototype.createCamera=function(t){return this.camera=new bi(t,this.globalData,this),this.camera},ki.prototype.createImage=function(t){return this.supports3d?new _i(t,this.globalData,this):new Be(t,this.globalData,this)},ki.prototype.createSolid=function(t){return this.supports3d?new gi(t,this.globalData,this):new hi(t,this.globalData,this)},ki.prototype.createNull=di.prototype.createNull,ki.prototype.getThreeDContainerByPos=function(t){for(var e=0,i=this.threeDElements.length;e<i;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},ki.prototype.createThreeDContainer=function(t,e){var i,s,a=r("div");E(a);var n=r("div");if(E(n),"3d"===e){(i=a.style).width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var o="50% 50%";i.webkitTransformOrigin=o,i.mozTransformOrigin=o,i.transformOrigin=o;var h="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(s=n.style).transform=h,s.webkitTransform=h}a.appendChild(n);var l={container:n,perspectiveElem:a,startPos:t,endPos:t,type:e};return this.threeDElements.push(l),l},ki.prototype.build3dContainers=function(){var t,e,i=this.layers.length,s="";for(t=0;t<i;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?("3d"!==s&&(s="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):("2d"!==s&&(s="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(i=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},ki.prototype.addTo3dContainer=function(t,e){for(var i=0,s=this.threeDElements.length;i<s;){if(e<=this.threeDElements[i].endPos){for(var r,a=this.threeDElements[i].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(r=this.elements[a].getBaseElement()),a+=1;r?this.threeDElements[i].container.insertBefore(t,r):this.threeDElements[i].container.appendChild(t);break}i+=1}},ki.prototype.configAnimation=function(t){var e=r("div"),i=this.animationItem.wrapper,s=e.style;s.width=t.w+"px",s.height=t.h+"px",this.resizerElem=e,E(e),s.transformStyle="flat",s.mozTransformStyle="flat",s.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),i.appendChild(e),s.overflow="hidden";var a=H("svg");a.setAttribute("width","1"),a.setAttribute("height","1"),E(a),this.resizerElem.appendChild(a);var n=H("defs");a.appendChild(n),this.data=t,this.setupGlobalData(t,a),this.globalData.defs=n,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},ki.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},ki.prototype.updateContainerSize=function(){var t,e,i,s,r=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,n=r/a;this.globalData.compSize.w/this.globalData.compSize.h>n?(t=r/this.globalData.compSize.w,e=r/this.globalData.compSize.w,i=0,s=(a-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(r-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,s=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+s+",0,1)",o.transform=o.webkitTransform},ki.prototype.renderFrame=di.prototype.renderFrame,ki.prototype.hide=function(){this.resizerElem.style.display="none"},ki.prototype.show=function(){this.resizerElem.style.display="block"},ki.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,s=this.threeDElements.length;for(t=0;t<s;t+=1){var r=this.threeDElements[t].perspectiveElem.style;r.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(i,2))+"px",r.perspective=r.webkitPerspective}}},ki.prototype.searchExtraCompositions=function(t){var e,i=t.length,s=r("div");for(e=0;e<i;e+=1)if(t[e].xt){var a=this.createComp(t[e],s,this.globalData.comp,null);a.initExpressions(),this.globalData.projectInterface.registerComposition(a)}},a([ki,fi,ci],xi),xi.prototype._createBaseContainerElements=xi.prototype.createContainerElements,xi.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},xi.prototype.addTo3dContainer=function(t,e){for(var i,s=0;s<e;)this.elements[s]&&this.elements[s].getBaseElement&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(t,i):this.layerElement.appendChild(t)},xi.prototype.createComp=function(t){return this.supports3d?new xi(t,this.globalData,this):new mi(t,this.globalData,this)},a([ki],Pi),Pi.prototype.createComp=function(t){return this.supports3d?new xi(t,this.globalData,this):new mi(t,this.globalData,this)},ai=Pi,Q["html"]=ai,St.registerModifier("tm",Ft),St.registerModifier("pb",Tt),St.registerModifier("rp",Bt),St.registerModifier("rd",Lt),At}));
diff --git a/build/player/lottie_svg.js b/build/player/lottie_svg.js
index 70b2bde..d7d41f9 100644
--- a/build/player/lottie_svg.js
+++ b/build/player/lottie_svg.js
@@ -1,1911 +1,579 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
+(typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-'use strict';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var locationHref = '';
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-var initialDefaultFrame = -999999;
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var _useWebWorker = false;
-
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
-
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* global svgNS */
-/* exported createNS */
-
-function createNS(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElementNS(svgNS, type);
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$6(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -1913,4860 +581,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$5(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6774,5688 +1620,6062 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$4(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
+  };
 
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
 
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
+    if (expressionsPlugin) {
+      expressionsPlugin.initExpressions(this);
     }
 
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
-    } else {
-      rect = null;
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
+
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
 
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
-    } else {
-      count += 1;
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
+  };
 
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
+    }
+
+    this.loadNextSegment();
+  };
+
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
+
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
+
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
+    }
+
+    try {
+      this.animationData = animData;
+
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        feMorph = null;
-        x = null;
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
       }
 
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+      this.renderer.configAnimation(animData);
 
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
+      if (!animData.assets) {
+        animData.assets = [];
       }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
       }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+    } catch (error) {
+      this.triggerConfigError(error);
+    }
+  };
+
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
+    }
+
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
+    } else {
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
       }
     }
-  }
+  };
 
-  this.maskElement = createNS(maskType);
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
 
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
 
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
 
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
     }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
     }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
       }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
+    } else {
+      this.pause();
+    }
+  };
+
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
+
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
+
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
+      }
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
+      }
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
         } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
+      if (!this.checkSegments(nextValue % this.totalFrames)) {
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
           }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
+      }
+    } else {
+      this.setCurrentRawFrameValue(nextValue);
+    }
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$4(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
         }
       }
     }
-  }
-};
 
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
+    function freeze() {
+      _isFrozen = true;
+    }
 
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
 
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
+    function setVolume(val, animation) {
+      var i;
 
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
       }
-      viewData.elem.setAttribute('d', pathShapeValue);
     }
-    viewData.lastPath = pathString;
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
   }
-};
 
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
+  var bez = bezFunction();
 
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
 
-function HierarchyElement() {}
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
 
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-  },
-};
 
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
 
-function FrameElement() {}
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
 
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
           this._mdf = true;
         }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
+      } else {
+        var i = 0;
+        var len = this.v.length;
 
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
         while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
           }
+
           i += 1;
         }
       }
+    }
 
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
         return;
       }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
       }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
       this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-/* global createNS */
-
-function SVGStyleData(data, level) {
-  this.data = data;
-  this.type = data.ty;
-  this.d = '';
-  this.lvl = level;
-  this._mdf = false;
-  this.closed = data.hd === true;
-  this.pElem = createNS('path');
-  this.msElem = null;
-}
-
-SVGStyleData.prototype.reset = function () {
-  this.d = '';
-  this._mdf = false;
-};
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-}
 
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
 
-/* exported SVGTransformData */
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
 
-function SVGTransformData(mProps, op, container) {
-  this.transform = {
-    mProps: mProps,
-    op: op,
-    container: container,
-  };
-  this.elements = [];
-  this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
-}
-
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-  this._isAnimated = !!this._isAnimated;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
-
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
-
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
-
-function SVGGradientFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.initGradientData(elem, data, styleOb);
-}
-
-SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
-  this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);
-  this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);
-  this.g = new GradientProperty(elem, data.g, this);
-  this.style = styleOb;
-  this.stops = [];
-  this.setGradientData(styleOb.pElem, data);
-  this.setGradientOpacity(data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-};
-
-SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
-  var gradientId = createElementID();
-  var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-  gfill.setAttribute('id', gradientId);
-  gfill.setAttribute('spreadMethod', 'pad');
-  gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
-  var stops = [];
-  var stop;
-  var j;
-  var jLen;
-  jLen = data.g.p * 4;
-  for (j = 0; j < jLen; j += 4) {
-    stop = createNS('stop');
-    gfill.appendChild(stop);
-    stops.push(stop);
-  }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
-  this.gf = gfill;
-  this.cst = stops;
-};
-
-SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
-  if (this.g._hasOpacity && !this.g._collapsable) {
-    var stop;
-    var j;
-    var jLen;
-    var mask = createNS('mask');
-    var maskElement = createNS('path');
-    mask.appendChild(maskElement);
-    var opacityId = createElementID();
-    var maskId = createElementID();
-    mask.setAttribute('id', maskId);
-    var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-    opFill.setAttribute('id', opacityId);
-    opFill.setAttribute('spreadMethod', 'pad');
-    opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
-    jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
-    var stops = this.stops;
-    for (j = data.g.p * 4; j < jLen; j += 2) {
-      stop = createNS('stop');
-      stop.setAttribute('stop-color', 'rgb(255,255,255)');
-      opFill.appendChild(stop);
-      stops.push(stop);
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
-    if (data.ty === 'gs') {
-      maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-      maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-      if (data.lj === 1) {
-        maskElement.setAttribute('stroke-miterlimit', data.ml);
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
       }
     }
-    this.of = opFill;
-    this.ms = mask;
-    this.ost = stops;
-    this.maskId = maskId;
-    styleOb.msElem = maskElement;
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
   }
-};
 
-extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
 
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
 
-function SVGGradientStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.initGradientData(elem, data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-}
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
 
-extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
 
-/* global createNS */
-/* exported ShapeGroupData */
+    return animationManager.loadAnimation(params);
+  }
 
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
 
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
 
-var SVGElementsRenderer = (function () {
-  var _identityMatrix = new Matrix();
-  var _matrixHelper = new Matrix();
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
 
-  var ob = {
-    createRenderFunction: createRenderFunction,
-  };
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
 
-  function createRenderFunction(data) {
-    switch (data.ty) {
-      case 'fl':
-        return renderFill;
-      case 'gf':
-        return renderGradient;
-      case 'gs':
-        return renderGradientStroke;
-      case 'st':
-        return renderStroke;
-      case 'sh':
-      case 'el':
-      case 'rc':
-      case 'sr':
-        return renderPath;
-      case 'tr':
-        return renderContentTransform;
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
       default:
         return null;
     }
   }
 
-  function renderContentTransform(styleData, itemData, isFirstFrame) {
-    if (isFirstFrame || itemData.transform.op._mdf) {
-      itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
-    }
-    if (isFirstFrame || itemData.transform.mProps._mdf) {
-      itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
-    }
-  }
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
 
-  function renderPath(styleData, itemData, isFirstFrame) {
-    var j;
-    var jLen;
-    var pathStringTransformed;
-    var redraw;
-    var pathNodes;
-    var l;
-    var lLen = itemData.styles.length;
-    var lvl = itemData.lvl;
-    var paths;
-    var mat;
-    var props;
-    var iterations;
-    var k;
-    for (l = 0; l < lLen; l += 1) {
-      redraw = itemData.sh._mdf || isFirstFrame;
-      if (itemData.styles[l].lvl < lvl) {
-        mat = _matrixHelper.reset();
-        iterations = lvl - itemData.styles[l].lvl;
-        k = itemData.transformers.length - 1;
-        while (!redraw && iterations > 0) {
-          redraw = itemData.transformers[k].mProps._mdf || redraw;
-          iterations -= 1;
-          k -= 1;
-        }
-        if (redraw) {
-          iterations = lvl - itemData.styles[l].lvl;
-          k = itemData.transformers.length - 1;
-          while (iterations > 0) {
-            props = itemData.transformers[k].mProps.v.props;
-            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]);
-            iterations -= 1;
-            k -= 1;
-          }
-        }
-      } else {
-        mat = _identityMatrix;
-      }
-      paths = itemData.sh.paths;
-      jLen = paths._length;
-      if (redraw) {
-        pathStringTransformed = '';
-        for (j = 0; j < jLen; j += 1) {
-          pathNodes = paths.shapes[j];
-          if (pathNodes && pathNodes._length) {
-            pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
-          }
-        }
-        itemData.caches[l] = pathStringTransformed;
-      } else {
-        pathStringTransformed = itemData.caches[l];
-      }
-      itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
-      itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
-    }
-  }
-
-  function renderFill(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
 
-    if (itemData.c._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
     }
   }
 
-  function renderGradientStroke(styleData, itemData, isFirstFrame) {
-    renderGradient(styleData, itemData, isFirstFrame);
-    renderStroke(styleData, itemData, isFirstFrame);
-  }
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
 
-  function renderGradient(styleData, itemData, isFirstFrame) {
-    var gfill = itemData.gf;
-    var hasOpacity = itemData.g._hasOpacity;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
 
-    if (itemData.o._mdf || isFirstFrame) {
-      var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
-      itemData.style.pElem.setAttribute(attr, itemData.o.v);
-    }
-    if (itemData.s._mdf || isFirstFrame) {
-      var attr1 = styleData.t === 1 ? 'x1' : 'cx';
-      var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
-      gfill.setAttribute(attr1, pt1[0]);
-      gfill.setAttribute(attr2, pt1[1]);
-      if (hasOpacity && !itemData.g._collapsable) {
-        itemData.of.setAttribute(attr1, pt1[0]);
-        itemData.of.setAttribute(attr2, pt1[1]);
-      }
-    }
-    var stops;
-    var i;
-    var len;
-    var stop;
-    if (itemData.g._cmdf || isFirstFrame) {
-      stops = itemData.cst;
-      var cValues = itemData.g.c;
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        stop.setAttribute('offset', cValues[i * 4] + '%');
-        stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
-      }
-    }
-    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
-      var oValues = itemData.g.o;
-      if (itemData.g._collapsable) {
-        stops = itemData.cst;
-      } else {
-        stops = itemData.ost;
-      }
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        if (!itemData.g._collapsable) {
-          stop.setAttribute('offset', oValues[i * 2] + '%');
-        }
-        stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
-      }
-    }
-    if (styleData.t === 1) {
-      if (itemData.e._mdf || isFirstFrame) {
-        gfill.setAttribute('x2', pt2[0]);
-        gfill.setAttribute('y2', pt2[1]);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('x2', pt2[0]);
-          itemData.of.setAttribute('y2', pt2[1]);
-        }
-      }
-    } else {
-      var rad;
-      if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
-        rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        gfill.setAttribute('r', rad);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('r', rad);
-        }
-      }
-      if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
-        if (!rad) {
-          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        }
-        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-        var percent = itemData.h.v;
-        if (percent >= 1) {
-          percent = 0.99;
-        } else if (percent <= -1) {
-          percent = -0.99;
-        }
-        var dist = rad * percent;
-        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-        gfill.setAttribute('fx', x);
-        gfill.setAttribute('fy', y);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('fx', x);
-          itemData.of.setAttribute('fy', y);
-        }
-      }
-      // gfill.setAttribute('fy','200');
-    }
-  }
-
-  function renderStroke(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
-    var d = itemData.d;
-    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
-      styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
-      styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
-    }
-    if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
-      styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
-    }
-    if (itemData.w._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
-      if (styleElem.msElem) {
-        styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
-      }
-    }
-  }
-
-  return ob;
-}());
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
-
-function FootageElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.footageData = globalData.imageLoader.getAsset(this.assetData);
-  this.initBaseData(data, globalData, comp);
-}
-
-FootageElement.prototype.prepareFrame = function () {
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
-
-FootageElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-FootageElement.prototype.renderFrame = function () {
-};
-
-FootageElement.prototype.destroy = function () {
-};
-
-FootageElement.prototype.initExpressions = function () {
-  this.layerInterface = FootageInterface(this);
-};
-
-FootageElement.prototype.getFootageData = function () {
-  return this.footageData;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
-
-function SVGCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = true;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
-
-function SVGTextLottieElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.renderType = 'svg';
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
-
-SVGTextLottieElement.prototype.createContent = function () {
-  if (this.data.singleShape && !this.globalData.fontManager.chars) {
-    this.textContainer = createNS('text');
-  }
-};
-
-SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
-  var i = 0;
-  var len = textArray.length;
-  var textContents = [];
-  var currentTextContent = '';
-  while (i < len) {
-    if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
-      textContents.push(currentTextContent);
-      currentTextContent = '';
-    } else {
-      currentTextContent += textArray[i];
-    }
-    i += 1;
-  }
-  textContents.push(currentTextContent);
-  return textContents;
-};
-
-SVGTextLottieElement.prototype.buildNewText = function () {
-  var i;
-  var len;
-
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
-  if (documentData.fc) {
-    this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
-  } else {
-    this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
-  }
-  if (documentData.sc) {
-    this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
-    this.layerElement.setAttribute('stroke-width', documentData.sw);
-  }
-  this.layerElement.setAttribute('font-size', documentData.finalSize);
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (fontData.fClass) {
-    this.layerElement.setAttribute('class', fontData.fClass);
-  } else {
-    this.layerElement.setAttribute('font-family', fontData.fFamily);
-    var fWeight = documentData.fWeight;
-    var fStyle = documentData.fStyle;
-    this.layerElement.setAttribute('font-style', fStyle);
-    this.layerElement.setAttribute('font-weight', fWeight);
-  }
-  this.layerElement.setAttribute('aria-label', documentData.t);
-
-  var letters = documentData.l || [];
-  var usesGlyphs = !!this.globalData.fontManager.chars;
-  len = letters.length;
-
-  var tSpan;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var singleShape = this.data.singleShape;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  if (singleShape && !usesGlyphs && !documentData.sz) {
-    var tElement = this.textContainer;
-    var justify = 'start';
-    switch (documentData.j) {
-      case 1:
-        justify = 'end';
-        break;
-      case 2:
-        justify = 'middle';
-        break;
-      default:
-        justify = 'start';
-        break;
-    }
-    tElement.setAttribute('text-anchor', justify);
-    tElement.setAttribute('letter-spacing', trackingOffset);
-    var textContent = this.buildTextContents(documentData.finalText);
-    len = textContent.length;
-    yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
-    for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
-      tSpan.textContent = textContent[i];
-      tSpan.setAttribute('x', 0);
-      tSpan.setAttribute('y', yPos);
-      tSpan.style.display = 'inherit';
-      tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
-      yPos += documentData.finalLineHeight;
-    }
-
-    this.layerElement.appendChild(tElement);
-  } else {
-    var cachedSpansLength = this.textSpans.length;
-    var shapeData;
-    var charData;
-    for (i = 0; i < len; i += 1) {
-      if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
-        if (cachedSpansLength <= i) {
-          tSpan.setAttribute('stroke-linecap', 'butt');
-          tSpan.setAttribute('stroke-linejoin', 'round');
-          tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
-          this.layerElement.appendChild(tSpan);
-        }
-        tSpan.style.display = 'inherit';
-      }
-
-      matrixHelper.reset();
-      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-      if (singleShape) {
-        if (letters[i].n) {
-          xPos = -trackingOffset;
-          yPos += documentData.yOffset;
-          yPos += firstLine ? 1 : 0;
-          firstLine = false;
-        }
-        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-        xPos += letters[i].l || 0;
-        // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-        xPos += trackingOffset;
-      }
-      if (usesGlyphs) {
-        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
-        } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
-        }
-      } else {
-        if (singleShape) {
-          tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
-        }
-        tSpan.textContent = letters[i].val;
-        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      }
-      //
-    }
-    if (singleShape && tSpan) {
-      tSpan.setAttribute('d', shapeStr);
-    }
-  }
-  while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
-    i += 1;
-  }
-
-  this._sizeChanged = true;
-};
-
-SVGTextLottieElement.prototype.sourceRectAtTime = function () {
-  this.prepareFrame(this.comp.renderedFrame - this.data.st);
-  this.renderInnerContent();
-  if (this._sizeChanged) {
-    this._sizeChanged = false;
-    var textBox = this.layerElement.getBBox();
-    this.bbox = {
-      top: textBox.y,
-      left: textBox.x,
-      width: textBox.width,
-      height: textBox.height,
-    };
-  }
-  return this.bbox;
-};
-
-SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-    if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
-      this._sizeChanged = true;
-      var i;
-      var len;
-      var renderedLetters = this.textAnimator.renderedLetters;
-
-      var letters = this.textProperty.currentData.l;
-
-      len = letters.length;
-      var renderedLetter;
-      var textSpan;
-      for (i = 0; i < len; i += 1) {
-        if (!letters[i].n) {
-          renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
-          if (renderedLetter._mdf.m) {
-            textSpan.setAttribute('transform', renderedLetter.m);
-          }
-          if (renderedLetter._mdf.o) {
-            textSpan.setAttribute('opacity', renderedLetter.o);
-          }
-          if (renderedLetter._mdf.sw) {
-            textSpan.setAttribute('stroke-width', renderedLetter.sw);
-          }
-          if (renderedLetter._mdf.sc) {
-            textSpan.setAttribute('stroke', renderedLetter.sc);
-          }
-          if (renderedLetter._mdf.fc) {
-            textSpan.setAttribute('fill', renderedLetter.fc);
-          }
-        }
-      }
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global createNS */
-
-function SVGTintFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  feColorMatrix.setAttribute('result', 'f2');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-  if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
-    var feMerge = createNS('feMerge');
-    filter.appendChild(feMerge);
-    var feMergeNode;
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'SourceGraphic');
-    feMerge.appendChild(feMergeNode);
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'f2');
-    feMerge.appendChild(feMergeNode);
-  }
-}
-
-SVGTintFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var colorBlack = this.filterManager.effectElements[0].p.v;
-    var colorWhite = this.filterManager.effectElements[1].p.v;
-    var opacity = this.filterManager.effectElements[2].p.v / 100;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGFillFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-}
-SVGFillFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color = this.filterManager.effectElements[2].p.v;
-    var opacity = this.filterManager.effectElements[6].p.v;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGGaussianBlurEffect(filter, filterManager) {
-  // Outset the filter region by 100% on all sides to accommodate blur expansion.
-  filter.setAttribute('x', '-100%');
-  filter.setAttribute('y', '-100%');
-  filter.setAttribute('width', '300%');
-  filter.setAttribute('height', '300%');
-
-  this.filterManager = filterManager;
-  var feGaussianBlur = createNS('feGaussianBlur');
-  filter.appendChild(feGaussianBlur);
-  this.feGaussianBlur = feGaussianBlur;
-}
-
-SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    // Empirical value, matching AE's blur appearance.
-    var kBlurrinessToSigma = 0.3;
-    var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
-
-    // Dimensions mapping:
-    //
-    //   1 -> horizontal & vertical
-    //   2 -> horizontal only
-    //   3 -> vertical only
-    //
-    var dimensions = this.filterManager.effectElements[1].p.v;
-    var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq
-    var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq
-
-    this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);
-
-    // Repeat edges mapping:
-    //
-    //   0 -> off -> duplicate
-    //   1 -> on  -> wrap
-    var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
-    this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
-  }
-};
-
-/* global createNS, createElementID, locationHref, bmFloor */
-
-function SVGStrokeEffect(elem, filterManager) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.elem = elem;
-  this.paths = [];
-}
-
-SVGStrokeEffect.prototype.initialize = function () {
-  var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-  var path;
-  var groupPath;
-  var i;
-  var len;
-  if (this.filterManager.effectElements[1].p.v === 1) {
-    len = this.elem.maskManager.masksProperties.length;
-    i = 0;
-  } else {
-    i = this.filterManager.effectElements[0].p.v - 1;
-    len = i + 1;
-  }
-  groupPath = createNS('g');
-  groupPath.setAttribute('fill', 'none');
-  groupPath.setAttribute('stroke-linecap', 'round');
-  groupPath.setAttribute('stroke-dashoffset', 1);
-  for (i; i < len; i += 1) {
-    path = createNS('path');
-    groupPath.appendChild(path);
-    this.paths.push({ p: path, m: i });
-  }
-  if (this.filterManager.effectElements[10].p.v === 3) {
-    var mask = createNS('mask');
-    var id = createElementID();
-    mask.setAttribute('id', id);
-    mask.setAttribute('mask-type', 'alpha');
-    mask.appendChild(groupPath);
-    this.elem.globalData.defs.appendChild(mask);
-    var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-    while (elemChildren[0]) {
-      g.appendChild(elemChildren[0]);
-    }
-    this.elem.layerElement.appendChild(g);
-    this.masker = mask;
-    groupPath.setAttribute('stroke', '#fff');
-  } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (this.filterManager.effectElements[10].p.v === 2) {
-      elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-      while (elemChildren.length) {
-        this.elem.layerElement.removeChild(elemChildren[0]);
-      }
-    }
-    this.elem.layerElement.appendChild(groupPath);
-    this.elem.layerElement.removeAttribute('mask');
-    groupPath.setAttribute('stroke', '#fff');
-  }
-  this.initialized = true;
-  this.pathMasker = groupPath;
-};
-
-SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
-  if (!this.initialized) {
-    this.initialize();
-  }
-  var i;
-  var len = this.paths.length;
-  var mask;
-  var path;
-  for (i = 0; i < len; i += 1) {
-    if (this.paths[i].m !== -1) {
-      mask = this.elem.maskManager.viewData[this.paths[i].m];
-      path = this.paths[i].p;
-      if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
-        path.setAttribute('d', mask.lastPath);
-      }
-      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) {
-        var dasharrayValue;
-        if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
-          var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var l = path.getTotalLength();
-          dasharrayValue = '0 0 0 ' + l * s + ' ';
-          var lineLength = l * (e - s);
-          var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-          var units = Math.floor(lineLength / segment);
-          var j;
-          for (j = 0; j < units; j += 1) {
-            dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
-          }
-          dasharrayValue += '0 ' + l * 10 + ' 0 0';
-        } else {
-          dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-        }
-        path.setAttribute('stroke-dasharray', dasharrayValue);
-      }
-    }
-  }
-  if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-    this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
-  }
-
-  if (forceRender || this.filterManager.effectElements[6].p._mdf) {
-    this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
-  }
-  if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (forceRender || this.filterManager.effectElements[3].p._mdf) {
-      var color = this.filterManager.effectElements[3].p.v;
-      this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
-    }
-  }
-};
-
-/* global createNS */
-
-function SVGTritoneFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  var feComponentTransfer = createNS('feComponentTransfer');
-  feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-  filter.appendChild(feComponentTransfer);
-  this.matrixFilter = feComponentTransfer;
-  var feFuncR = createNS('feFuncR');
-  feFuncR.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncR);
-  this.feFuncR = feFuncR;
-  var feFuncG = createNS('feFuncG');
-  feFuncG.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncG);
-  this.feFuncG = feFuncG;
-  var feFuncB = createNS('feFuncB');
-  feFuncB.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncB);
-  this.feFuncB = feFuncB;
-}
-
-SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color1 = this.filterManager.effectElements[0].p.v;
-    var color2 = this.filterManager.effectElements[1].p.v;
-    var color3 = this.filterManager.effectElements[2].p.v;
-    var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
-    var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
-    var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
-    this.feFuncR.setAttribute('tableValues', tableR);
-    this.feFuncG.setAttribute('tableValues', tableG);
-    this.feFuncB.setAttribute('tableValues', tableB);
-    // var opacity = this.filterManager.effectElements[2].p.v/100;
-    // 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');
-  }
-};
-
-/* global createNS */
-
-function SVGProLevelsFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var effectElements = this.filterManager.effectElements;
-  var feComponentTransfer = createNS('feComponentTransfer');
-
-  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) {
-    this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
-  }
-  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) {
-    this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
-  }
-  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) {
-    this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-  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) {
-    this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
-  }
-
-  if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    feComponentTransfer = createNS('feComponentTransfer');
-  }
-
-  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) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
-    this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
-    this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-}
-
-SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
-  var feFunc = createNS(type);
-  feFunc.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFunc);
-  return feFunc;
-};
-
-SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
-  var cnt = 0;
-  var segments = 256;
-  var perc;
-  var min = Math.min(inputBlack, inputWhite);
-  var max = Math.max(inputBlack, inputWhite);
-  var table = Array.call(null, { length: segments });
-  var colorValue;
-  var pos = 0;
-  var outputDelta = outputWhite - outputBlack;
-  var inputDelta = inputWhite - inputBlack;
-  while (cnt <= 256) {
-    perc = cnt / 256;
-    if (perc <= min) {
-      colorValue = inputDelta < 0 ? outputWhite : outputBlack;
-    } else if (perc >= max) {
-      colorValue = inputDelta < 0 ? outputBlack : outputWhite;
-    } else {
-      colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
-    }
-    table[pos] = colorValue;
-    pos += 1;
-    cnt += 256 / (segments - 1);
-  }
-  return table.join(' ');
-};
-
-SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var val;
-    var effectElements = this.filterManager.effectElements;
-    if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
-      val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
-      this.feFuncRComposed.setAttribute('tableValues', val);
-      this.feFuncGComposed.setAttribute('tableValues', val);
-      this.feFuncBComposed.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
-      val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
-      this.feFuncR.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
-      val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
-      this.feFuncG.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
-      val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
-      this.feFuncB.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
-      val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
-      this.feFuncA.setAttribute('tableValues', val);
-    }
-  }
-};
-
-/* global createNS, rgbToHex, degToRads */
-
-function SVGDropShadowEffect(filter, filterManager) {
-  var filterSize = filterManager.container.globalData.renderConfig.filterSize;
-  filter.setAttribute('x', filterSize.x);
-  filter.setAttribute('y', filterSize.y);
-  filter.setAttribute('width', filterSize.width);
-  filter.setAttribute('height', filterSize.height);
-  this.filterManager = filterManager;
-
-  var feGaussianBlur = createNS('feGaussianBlur');
-  feGaussianBlur.setAttribute('in', 'SourceAlpha');
-  feGaussianBlur.setAttribute('result', 'drop_shadow_1');
-  feGaussianBlur.setAttribute('stdDeviation', '0');
-  this.feGaussianBlur = feGaussianBlur;
-  filter.appendChild(feGaussianBlur);
-
-  var feOffset = createNS('feOffset');
-  feOffset.setAttribute('dx', '25');
-  feOffset.setAttribute('dy', '0');
-  feOffset.setAttribute('in', 'drop_shadow_1');
-  feOffset.setAttribute('result', 'drop_shadow_2');
-  this.feOffset = feOffset;
-  filter.appendChild(feOffset);
-  var feFlood = createNS('feFlood');
-  feFlood.setAttribute('flood-color', '#00ff00');
-  feFlood.setAttribute('flood-opacity', '1');
-  feFlood.setAttribute('result', 'drop_shadow_3');
-  this.feFlood = feFlood;
-  filter.appendChild(feFlood);
-
-  var feComposite = createNS('feComposite');
-  feComposite.setAttribute('in', 'drop_shadow_3');
-  feComposite.setAttribute('in2', 'drop_shadow_2');
-  feComposite.setAttribute('operator', 'in');
-  feComposite.setAttribute('result', 'drop_shadow_4');
-  filter.appendChild(feComposite);
-
-  var feMerge = createNS('feMerge');
-  filter.appendChild(feMerge);
-  var feMergeNode;
-  feMergeNode = createNS('feMergeNode');
-  feMerge.appendChild(feMergeNode);
-  feMergeNode = createNS('feMergeNode');
-  feMergeNode.setAttribute('in', 'SourceGraphic');
-  this.feMergeNode = feMergeNode;
-  this.feMerge = feMerge;
-  this.originalNodeAdded = false;
-  feMerge.appendChild(feMergeNode);
-}
-
-SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-      this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
-    }
-    if (forceRender || this.filterManager.effectElements[0].p._mdf) {
-      var col = this.filterManager.effectElements[0].p.v;
-      this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
-    }
-    if (forceRender || this.filterManager.effectElements[1].p._mdf) {
-      this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
-    }
-    if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
-      var distance = this.filterManager.effectElements[3].p.v;
-      var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
-      var x = distance * Math.cos(angle);
-      var y = distance * Math.sin(angle);
-      this.feOffset.setAttribute('dx', x);
-      this.feOffset.setAttribute('dy', y);
-    }
-    /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
-            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
-                this.feMerge.removeChild(this.feMergeNode);
-                this.originalNodeAdded = false;
-            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
-                this.feMerge.appendChild(this.feMergeNode);
-                this.originalNodeAdded = true;
-            }
-        } */
-  }
-};
-
-/* global createElementID, createNS */
-
-var _svgMatteSymbols = [];
-
-function SVGMatte3Effect(filterElem, filterManager, elem) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.filterElem = filterElem;
-  this.elem = elem;
-  elem.matteElement = createNS('g');
-  elem.matteElement.appendChild(elem.layerElement);
-  elem.matteElement.appendChild(elem.transformedElement);
-  elem.baseElement = elem.matteElement;
-}
-
-SVGMatte3Effect.prototype.findSymbol = function (mask) {
-  var i = 0;
-  var len = _svgMatteSymbols.length;
-  while (i < len) {
-    if (_svgMatteSymbols[i] === mask) {
-      return _svgMatteSymbols[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
-  var parentNode = mask.layerElement.parentNode;
-  if (!parentNode) {
-    return;
-  }
-  var children = parentNode.children;
-  var i = 0;
-  var len = children.length;
-  while (i < len) {
-    if (children[i] === mask.layerElement) {
-      break;
-    }
-    i += 1;
-  }
-  var nextChild;
-  if (i <= len - 2) {
-    nextChild = children[i + 1];
-  }
-  var useElem = createNS('use');
-  useElem.setAttribute('href', '#' + symbolId);
-  if (nextChild) {
-    parentNode.insertBefore(useElem, nextChild);
-  } else {
-    parentNode.appendChild(useElem);
-  }
-};
-
-SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
-  if (!this.findSymbol(mask)) {
-    var symbolId = createElementID();
-    var masker = createNS('mask');
-    masker.setAttribute('id', mask.layerId);
-    masker.setAttribute('mask-type', 'alpha');
-    _svgMatteSymbols.push(mask);
-    var defs = elem.globalData.defs;
-    defs.appendChild(masker);
-    var symbol = createNS('symbol');
-    symbol.setAttribute('id', symbolId);
-    this.replaceInParent(mask, symbolId);
-    symbol.appendChild(mask.layerElement);
-    defs.appendChild(symbol);
-    var useElem = createNS('use');
-    useElem.setAttribute('href', '#' + symbolId);
-    masker.appendChild(useElem);
-    mask.data.hd = false;
-    mask.show();
-  }
-  elem.setMatte(mask.layerId);
-};
-
-SVGMatte3Effect.prototype.initialize = function () {
-  var ind = this.filterManager.effectElements[0].p.v;
-  var elements = this.elem.comp.elements;
-  var i = 0;
-  var len = elements.length;
-  while (i < len) {
-    if (elements[i] && elements[i].data.ind === ind) {
-      this.setElementAsMask(this.elem, elements[i]);
-    }
-    i += 1;
-  }
-  this.initialized = true;
-};
-
-SVGMatte3Effect.prototype.renderFrame = function () {
-  if (!this.initialized) {
-    this.initialize();
-  }
-};
-
-/* global createElementID, filtersFactory, SVGTintFilter, SVGFillFilter, SVGStrokeEffect, SVGTritoneFilter,
-SVGProLevelsFilter, SVGDropShadowEffect, SVGMatte3Effect, SVGGaussianBlurEffect, locationHref */
-
-function SVGEffects(elem) {
-  var i;
-  var len = elem.data.ef ? elem.data.ef.length : 0;
-  var filId = createElementID();
-  var fil = filtersFactory.createFilter(filId, true);
-  var count = 0;
-  this.filters = [];
-  var filterManager;
-  for (i = 0; i < len; i += 1) {
-    filterManager = null;
-    if (elem.data.ef[i].ty === 20) {
-      count += 1;
-      filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 21) {
-      count += 1;
-      filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 22) {
-      filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 23) {
-      count += 1;
-      filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 24) {
-      count += 1;
-      filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 25) {
-      count += 1;
-      filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 28) {
-      // count += 1;
-      filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
-    } else if (elem.data.ef[i].ty === 29) {
-      count += 1;
-      filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
-    }
-    if (filterManager) {
-      this.filters.push(filterManager);
-    }
-  }
-  if (count) {
-    elem.globalData.defs.appendChild(fil);
-    elem.layerElement.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-  }
-  if (this.filters.length) {
-    elem.addRenderableComponent(this);
-  }
-}
-
-SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
-  var i;
-  var len = this.filters.length;
-  for (i = 0; i < len; i += 1) {
-    this.filters[i].renderFrame(_isFirstFrame);
-  }
-};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
-
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
-    if (expressionsPlugin) {
-      expressionsPlugin.initExpressions(this);
-    }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
-    }
-  }
-};
-
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
-
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
-
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
-    }
-  }
-};
-
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
-
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
-
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
-
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
-    }
-  }
-  return null;
-};
-
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
-
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
-      } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
-      }
-    }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
-
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
-      }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
-      if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
-      }
-    } else {
-      this.setCurrentRawFrameValue(nextValue);
-    }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
-        } else {
-          this.trigger('loopComplete');
-        }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
-      }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
-
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
-      }
-    }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
-      }
-    }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
-    }
-  }
-
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
-
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
-
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
-
-var Expressions = (function () {
-  var ob = {};
-  ob.initExpressions = initExpressions;
-
-  function initExpressions(animation) {
-    var stackCount = 0;
-    var registers = [];
-
-    function pushExpression() {
-      stackCount += 1;
-    }
-
-    function popExpression() {
-      stackCount -= 1;
-      if (stackCount === 0) {
-        releaseInstances();
-      }
-    }
-
-    function registerExpressionProperty(expression) {
-      if (registers.indexOf(expression) === -1) {
-        registers.push(expression);
-      }
-    }
-
-    function releaseInstances() {
-      var i;
-      var len = registers.length;
-      for (i = 0; i < len; i += 1) {
-        registers[i].release();
-      }
-      registers.length = 0;
-    }
-
-    animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-    animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
-    animation.renderer.globalData.pushExpression = pushExpression;
-    animation.renderer.globalData.popExpression = popExpression;
-    animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
-  }
-  return ob;
-}());
-
-expressionsPlugin = Expressions;
-
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
-
-var ExpressionManager = (function () {
-  'use strict';
-
-  var ob = {};
-  var Math = BMMath;
-  var window = null;
-  var document = null;
-  var XMLHttpRequest = null;
-  var fetch = null;
-  var frames = null;
-
-  function $bm_isInstanceOfArray(arr) {
-    return arr.constructor === Array || arr.constructor === Float32Array;
-  }
-
-  function isNumerable(tOfV, v) {
-    return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
-  }
-
-  function $bm_neg(a) {
-    var tOfA = typeof a;
-    if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
-      return -a;
-    }
-    if ($bm_isInstanceOfArray(a)) {
-      var i;
-      var lenA = a.length;
-      var retArr = [];
-      for (i = 0; i < lenA; i += 1) {
-        retArr[i] = -a[i];
-      }
-      return retArr;
-    }
-    if (a.propType) {
-      return a.v;
-    }
-    return -a;
-  }
-
-  var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
-  var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
-  var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
-
-  function sum(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (tOfA === 'string' || tOfB === 'string') {
-      return a + b;
-    }
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a + b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] += b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a + b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] + b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-  var add = sum;
-
-  function sub(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      if (tOfA === 'string') {
-        a = parseInt(a, 10);
-      }
-      if (tOfB === 'string') {
-        b = parseInt(b, 10);
-      }
-      return a - b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] -= b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a - b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] - b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-
-  function mul(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a * b;
-    }
-
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] * b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a * b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-
-  function div(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a / b;
-    }
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] / b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a / b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-  function mod(a, b) {
-    if (typeof a === 'string') {
-      a = parseInt(a, 10);
-    }
-    if (typeof b === 'string') {
-      b = parseInt(b, 10);
-    }
-    return a % b;
-  }
-  var $bm_sum = sum;
-  var $bm_sub = sub;
-  var $bm_mul = mul;
-  var $bm_div = div;
-  var $bm_mod = mod;
-
-  function clamp(num, min, max) {
-    if (min > max) {
-      var mm = max;
-      max = min;
-      min = mm;
-    }
-    return Math.min(Math.max(num, min), max);
-  }
-
-  function radiansToDegrees(val) {
-    return val / degToRads;
-  }
-  var radians_to_degrees = radiansToDegrees;
-
-  function degreesToRadians(val) {
-    return val * degToRads;
-  }
-  var degrees_to_radians = radiansToDegrees;
-
-  var helperLengthArray = [0, 0, 0, 0, 0, 0];
-
-  function length(arr1, arr2) {
-    if (typeof arr1 === 'number' || arr1 instanceof Number) {
-      arr2 = arr2 || 0;
-      return Math.abs(arr1 - arr2);
-    }
-    if (!arr2) {
-      arr2 = helperLengthArray;
-    }
-    var i;
-    var len = Math.min(arr1.length, arr2.length);
-    var addedLength = 0;
-    for (i = 0; i < len; i += 1) {
-      addedLength += Math.pow(arr2[i] - arr1[i], 2);
-    }
-    return Math.sqrt(addedLength);
-  }
-
-  function normalize(vec) {
-    return div(vec, length(vec));
-  }
-
-  function rgbToHsl(val) {
-    var r = val[0]; var g = val[1]; var b = val[2];
-    var max = Math.max(r, g, b);
-    var min = Math.min(r, g, b);
-    var h;
-    var s;
-    var l = (max + min) / 2;
-
-    if (max === min) {
-      h = 0; // achromatic
-      s = 0; // achromatic
-    } else {
-      var d = max - min;
-      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
-      switch (max) {
-        case r: h = (g - b) / d + (g < b ? 6 : 0); break;
-        case g: h = (b - r) / d + 2; break;
-        case b: h = (r - g) / d + 4; break;
-        default: break;
-      }
-      h /= 6;
-    }
-
-    return [h, s, l, val[3]];
-  }
-
-  function hue2rgb(p, q, t) {
-    if (t < 0) t += 1;
-    if (t > 1) t -= 1;
-    if (t < 1 / 6) return p + (q - p) * 6 * t;
-    if (t < 1 / 2) return q;
-    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
-    return p;
-  }
-
-  function hslToRgb(val) {
-    var h = val[0];
-    var s = val[1];
-    var l = val[2];
-
-    var r;
-    var g;
-    var b;
-
-    if (s === 0) {
-      r = l; // achromatic
-      b = l; // achromatic
-      g = l; // achromatic
-    } else {
-      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-      var p = 2 * l - q;
-      r = hue2rgb(p, q, h + 1 / 3);
-      g = hue2rgb(p, q, h);
-      b = hue2rgb(p, q, h - 1 / 3);
-    }
-
-    return [r, g, b, val[3]];
-  }
-
-  function linear(t, tMin, tMax, value1, value2) {
-    if (value1 === undefined || value2 === undefined) {
-      value1 = tMin;
-      value2 = tMax;
-      tMin = 0;
-      tMax = 1;
-    }
-    if (tMax < tMin) {
-      var _tMin = tMax;
-      tMax = tMin;
-      tMin = _tMin;
-    }
-    if (t <= tMin) {
-      return value1;
-    } if (t >= tMax) {
-      return value2;
-    }
-    var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
-    if (!value1.length) {
-      return value1 + (value2 - value1) * perc;
-    }
-    var i;
-    var len = value1.length;
-    var arr = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
-    }
-    return arr;
-  }
-  function random(min, max) {
-    if (max === undefined) {
-      if (min === undefined) {
-        min = 0;
-        max = 1;
-      } else {
-        max = min;
-        min = undefined;
-      }
-    }
-    if (max.length) {
-      var i;
-      var len = max.length;
-      if (!min) {
-        min = createTypedArray('float32', len);
-      }
-      var arr = createTypedArray('float32', len);
-      var rnd = BMMath.random();
-      for (i = 0; i < len; i += 1) {
-        arr[i] = min[i] + rnd * (max[i] - min[i]);
-      }
-      return arr;
-    }
-    if (min === undefined) {
-      min = 0;
-    }
-    var rndm = BMMath.random();
-    return min + rndm * (max - min);
-  }
-
-  function createPath(points, inTangents, outTangents, closed) {
-    var i;
-    var len = points.length;
-    var path = shapePool.newElement();
-    path.setPathData(!!closed, len);
-    var arrPlaceholder = [0, 0];
-    var inVertexPoint;
-    var outVertexPoint;
-    for (i = 0; i < len; i += 1) {
-      inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
-      outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
-      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);
-    }
-    return path;
-  }
-
-  function initiateExpression(elem, data, property) {
-    var val = data.x;
-    var needsVelocity = /velocity(?![\w\d])/.test(val);
-    var _needsRandom = val.indexOf('random') !== -1;
-    var elemType = elem.data.ty;
-    var transform;
-    var $bm_transform;
-    var content;
-    var effect;
-    var thisProperty = property;
-    thisProperty.valueAtTime = thisProperty.getValueAtTime;
-    Object.defineProperty(thisProperty, 'value', {
-      get: function () {
-        return thisProperty.v;
-      },
-    });
-    elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
-    elem.comp.displayStartTime = 0;
-    var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    var outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    var width = elem.data.sw ? elem.data.sw : 0;
-    var height = elem.data.sh ? elem.data.sh : 0;
-    var name = elem.data.nm;
-    var loopIn;
-    var loop_in;
-    var loopOut;
-    var loop_out;
-    var smooth;
-    var toWorld;
-    var fromWorld;
-    var fromComp;
-    var toComp;
-    var fromCompToSurface;
-    var position;
-    var rotation;
-    var anchorPoint;
-    var scale;
-    var thisLayer;
-    var thisComp;
-    var mask;
-    var valueAtTime;
-    var velocityAtTime;
-
-    var scoped_bm_rt;
-    // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
-    var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
-    var numKeys = property.kf ? data.k.length : 0;
-
-    var active = !this.data || this.data.hd !== true;
-
-    var wiggle = function wiggle(freq, amp) {
-      var iWiggle;
-      var j;
-      var lenWiggle = this.pv.length ? this.pv.length : 1;
-      var addedAmps = createTypedArray('float32', lenWiggle);
-      freq = 5;
-      var iterations = Math.floor(time * freq);
-      iWiggle = 0;
-      j = 0;
-      while (iWiggle < iterations) {
-        // var rnd = BMMath.random();
-        for (j = 0; j < lenWiggle; j += 1) {
-          addedAmps[j] += -amp + amp * 2 * BMMath.random();
-          // addedAmps[j] += -amp + amp*2*rnd;
-        }
-        iWiggle += 1;
-      }
-      // var rnd2 = BMMath.random();
-      var periods = time * freq;
-      var perc = periods - Math.floor(periods);
-      var arr = createTypedArray('float32', lenWiggle);
-      if (lenWiggle > 1) {
-        for (j = 0; j < lenWiggle; j += 1) {
-          arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;
-          // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
-          // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
-        }
-        return arr;
-      }
-      return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
-    }.bind(this);
-
-    if (thisProperty.loopIn) {
-      loopIn = thisProperty.loopIn.bind(thisProperty);
-      loop_in = loopIn;
-    }
-
-    if (thisProperty.loopOut) {
-      loopOut = thisProperty.loopOut.bind(thisProperty);
-      loop_out = loopOut;
-    }
-
-    if (thisProperty.smooth) {
-      smooth = thisProperty.smooth.bind(thisProperty);
-    }
-
-    function loopInDuration(type, duration) {
-      return loopIn(type, duration, true);
-    }
-
-    function loopOutDuration(type, duration) {
-      return loopOut(type, duration, true);
-    }
-
-    if (this.getValueAtTime) {
-      valueAtTime = this.getValueAtTime.bind(this);
-    }
-
-    if (this.getVelocityAtTime) {
-      velocityAtTime = this.getVelocityAtTime.bind(this);
-    }
-
-    var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
-
-    function lookAt(elem1, elem2) {
-      var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
-      var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
-      var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
-      return [yaw, pitch, 0];
-    }
-
-    function easeOut(t, tMin, tMax, val1, val2) {
-      return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function easeIn(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInBez, t, tMin, tMax, val1, val2);
-    }
-
-    function ease(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function applyEase(fn, t, tMin, tMax, val1, val2) {
-      if (val1 === undefined) {
-        val1 = tMin;
-        val2 = tMax;
-      } else {
-        t = (t - tMin) / (tMax - tMin);
-      }
-      if (t > 1) {
-        t = 1;
-      } else if (t < 0) {
-        t = 0;
-      }
-      var mult = fn(t);
-      if ($bm_isInstanceOfArray(val1)) {
-        var iKey;
-        var lenKey = val1.length;
-        var arr = createTypedArray('float32', lenKey);
-        for (iKey = 0; iKey < lenKey; iKey += 1) {
-          arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
-        }
-        return arr;
-      }
-      return (val2 - val1) * mult + val1;
-    }
-
-    function nearestKey(time) {
-      var iKey;
-      var lenKey = data.k.length;
-      var index;
-      var keyTime;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        index = 0;
-        keyTime = 0;
-      } else {
-        index = -1;
-        time *= elem.comp.globalData.frameRate;
-        if (time < data.k[0].t) {
-          index = 1;
-          keyTime = data.k[0].t;
-        } else {
-          for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
-            if (time === data.k[iKey].t) {
-              index = iKey + 1;
-              keyTime = data.k[iKey].t;
-              break;
-            } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
-              if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
-                index = iKey + 2;
-                keyTime = data.k[iKey + 1].t;
-              } else {
-                index = iKey + 1;
-                keyTime = data.k[iKey].t;
-              }
-              break;
-            }
-          }
-          if (index === -1) {
-            index = iKey + 1;
-            keyTime = data.k[iKey].t;
-          }
-        }
-      }
-      var obKey = {};
-      obKey.index = index;
-      obKey.time = keyTime / elem.comp.globalData.frameRate;
-      return obKey;
-    }
-
-    function key(ind) {
-      var obKey;
-      var iKey;
-      var lenKey;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        throw new Error('The property has no keyframe at index ' + ind);
-      }
-      ind -= 1;
-      obKey = {
-        time: data.k[ind].t / elem.comp.globalData.frameRate,
-        value: [],
-      };
-      var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
-
-      lenKey = arr.length;
-      for (iKey = 0; iKey < lenKey; iKey += 1) {
-        obKey[iKey] = arr[iKey];
-        obKey.value[iKey] = arr[iKey];
-      }
-      return obKey;
-    }
-
-    function framesToTime(fr, fps) {
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return fr / fps;
-    }
-
-    function timeToFrames(t, fps) {
-      if (!t && t !== 0) {
-        t = time;
-      }
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return t * fps;
-    }
-
-    function seedRandom(seed) {
-      BMMath.seedrandom(randSeed + seed);
-    }
-
-    function sourceRectAtTime() {
-      return elem.sourceRectAtTime();
-    }
-
-    function substring(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substring(init);
-        }
-        return value.substring(init, end);
-      }
-      return '';
-    }
-
-    function substr(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substr(init);
-        }
-        return value.substr(init, end);
-      }
-      return '';
-    }
-
-    function posterizeTime(framesPerSecond) {
-      time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
-      value = valueAtTime(time);
-    }
-
-    var time;
-    var velocity;
-    var value;
-    var text;
-    var textIndex;
-    var textTotal;
-    var selectorValue;
-    var index = elem.data.ind;
-    var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-    var parent;
-    var randSeed = Math.floor(Math.random() * 1000000);
-    var globalData = elem.globalData;
-    function executeExpression(_value) {
-      // globalData.pushExpression();
-      value = _value;
-      if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
-        return value;
-      }
-      if (this.propType === 'textSelector') {
-        textIndex = this.textIndex;
-        textTotal = this.textTotal;
-        selectorValue = this.selectorValue;
-      }
-      if (!thisLayer) {
-        text = elem.layerInterface.text;
-        thisLayer = elem.layerInterface;
-        thisComp = elem.comp.compInterface;
-        toWorld = thisLayer.toWorld.bind(thisLayer);
-        fromWorld = thisLayer.fromWorld.bind(thisLayer);
-        fromComp = thisLayer.fromComp.bind(thisLayer);
-        toComp = thisLayer.toComp.bind(thisLayer);
-        mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
-        fromCompToSurface = fromComp;
-      }
-      if (!transform) {
-        transform = elem.layerInterface('ADBE Transform Group');
-        $bm_transform = transform;
-        if (transform) {
-          anchorPoint = transform.anchorPoint;
-          /* position = transform.position;
-                    rotation = transform.rotation;
-                    scale = transform.scale; */
-        }
-      }
-
-      if (elemType === 4 && !content) {
-        content = thisLayer('ADBE Root Vectors Group');
-      }
-      if (!effect) {
-        effect = thisLayer(4);
-      }
-      hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-      if (hasParent && !parent) {
-        parent = elem.hierarchy[0].layerInterface;
-      }
-      time = this.comp.renderedFrame / this.comp.globalData.frameRate;
-      if (_needsRandom) {
-        seedRandom(randSeed + time);
-      }
-      if (needsVelocity) {
-        velocity = velocityAtTime(time);
-      }
-      expression_function();
-      this.frameExpressionId = elem.globalData.frameId;
-
-      // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
-      return scoped_bm_rt;
-    }
-    return executeExpression;
-  }
-
-  ob.initiateExpression = initiateExpression;
-  return ob;
-}());
-
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
-
-var expressionHelpers = (function () {
-  function searchExpressions(elem, data, prop) {
-    if (data.x) {
-      prop.k = true;
-      prop.x = true;
-      prop.initiateExpression = ExpressionManager.initiateExpression;
-      prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
-    }
-  }
-
-  function getValueAtTime(frameNum) {
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastFrame) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
-      this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
-      this._cachingAtTime.lastFrame = frameNum;
-    }
-    return this._cachingAtTime.value;
-  }
-
-  function getSpeedAtTime(frameNum) {
-    var delta = -0.01;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var speed = 0;
-    if (v1.length) {
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        speed += Math.pow(v2[i] - v1[i], 2);
-      }
-      speed = Math.sqrt(speed) * 100;
-    } else {
-      speed = 0;
-    }
-    return speed;
-  }
-
-  function getVelocityAtTime(frameNum) {
-    if (this.vel !== undefined) {
-      return this.vel;
-    }
-    var delta = -0.001;
-    // frameNum += this.elem.data.st;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var velocity;
-    if (v1.length) {
-      velocity = createTypedArray('float32', v1.length);
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        // removing frameRate
-        // if needed, don't add it here
-        // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
-        velocity[i] = (v2[i] - v1[i]) / delta;
-      }
-    } else {
-      velocity = (v2 - v1) / delta;
-    }
-    return velocity;
-  }
-
-  function getStaticValueAtTime() {
-    return this.pv;
-  }
-
-  function setGroupProperty(propertyGroup) {
-    this.propertyGroup = propertyGroup;
-  }
-
-  return {
-    searchExpressions: searchExpressions,
-    getSpeedAtTime: getSpeedAtTime,
-    getVelocityAtTime: getVelocityAtTime,
-    getValueAtTime: getValueAtTime,
-    getStaticValueAtTime: getStaticValueAtTime,
-    setGroupProperty: setGroupProperty,
-  };
-}());
-
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
-
-(function addPropertyDecorator() {
-  function loopOut(type, duration, durationFlag) {
-    if (!this.k || !this.keyframes) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var lastKeyFrame = keyframes[keyframes.length - 1].t;
-    if (currentFrame <= lastKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var firstKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
-      } else {
-        cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
-      }
-      firstKeyFrame = lastKeyFrame - cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (iterations % 2 !== 0) {
-          return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = (endV[i] - initV[i]) * repeats + current[i];
-        }
-        return ret;
-      }
-      return (endV - initV) * repeats + current;
-    } else if (type === 'continue') {
-      var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(lastValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
-        }
-        return ret;
-      }
-      return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);
-    }
-      return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function loopIn(type, duration, durationFlag) {
-    if (!this.k) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var firstKeyFrame = keyframes[0].t;
-    if (currentFrame >= firstKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var lastKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      lastKeyFrame = keyframes[duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
-      } else {
-        cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
-      }
-      lastKeyFrame = firstKeyFrame + cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
-      if (iterations % 2 === 0) {
-          return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);
-      var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
-        }
-        return ret;
-      }
-      return current - (endV - initV) * repeats;
-    } else if (type === 'continue') {
-      var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(firstValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;
-        }
-        return ret;
-      }
-      return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;
-    }
-      return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function smooth(width, samples) {
-    if (!this.k) {
-      return this.pv;
-    }
-    width = (width || 0.4) * 0.5;
-    samples = Math.floor(samples || 5);
-    if (samples <= 1) {
-      return this.pv;
-    }
-    var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
-    var initFrame = currentTime - width;
-    var endFrame = currentTime + width;
-    var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
-    var i = 0;
-    var j = 0;
-    var value;
-    if (this.pv.length) {
-      value = createTypedArray('float32', this.pv.length);
-    } else {
-      value = 0;
-    }
-    var sampleValue;
-    while (i < samples) {
-      sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
-      if (this.pv.length) {
-        for (j = 0; j < this.pv.length; j += 1) {
-          value[j] += sampleValue[j];
-        }
-      } else {
-        value += sampleValue;
-      }
-      i += 1;
-    }
-    if (this.pv.length) {
-      for (j = 0; j < this.pv.length; j += 1) {
-        value[j] /= samples;
-      }
-    } else {
-      value /= samples;
-    }
-    return value;
-  }
-
-  function getTransformValueAtTime(time) {
-    if (!this._transformCachingAtTime) {
-      this._transformCachingAtTime = {
-        v: new Matrix(),
-      };
-    }
-    /// /
-    var matrix = this._transformCachingAtTime.v;
-    matrix.cloneFromProps(this.pre.props);
-    if (this.appliedTransformations < 1) {
-      var anchor = this.a.getValueAtTime(time);
-      matrix.translate(
-        -anchor[0] * this.a.mult,
-        -anchor[1] * this.a.mult,
-        anchor[2] * this.a.mult
-      );
-    }
-    if (this.appliedTransformations < 2) {
-      var scale = this.s.getValueAtTime(time);
-      matrix.scale(
-        scale[0] * this.s.mult,
-        scale[1] * this.s.mult,
-        scale[2] * this.s.mult
-      );
-    }
-    if (this.sk && this.appliedTransformations < 3) {
-      var skew = this.sk.getValueAtTime(time);
-      var skewAxis = this.sa.getValueAtTime(time);
-      matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
-    }
-    if (this.r && this.appliedTransformations < 4) {
-      var rotation = this.r.getValueAtTime(time);
-      matrix.rotate(-rotation * this.r.mult);
-    } else if (!this.r && this.appliedTransformations < 4) {
-      var rotationZ = this.rz.getValueAtTime(time);
-      var rotationY = this.ry.getValueAtTime(time);
-      var rotationX = this.rx.getValueAtTime(time);
-      var orientation = this.or.getValueAtTime(time);
-      matrix.rotateZ(-rotationZ * this.rz.mult)
-        .rotateY(rotationY * this.ry.mult)
-        .rotateX(rotationX * this.rx.mult)
-        .rotateZ(-orientation[2] * this.or.mult)
-        .rotateY(orientation[1] * this.or.mult)
-        .rotateX(orientation[0] * this.or.mult);
-    }
-    if (this.data.p && this.data.p.s) {
-      var positionX = this.px.getValueAtTime(time);
-      var positionY = this.py.getValueAtTime(time);
-      if (this.data.p.z) {
-        var positionZ = this.pz.getValueAtTime(time);
-        matrix.translate(
-          positionX * this.px.mult,
-          positionY * this.py.mult,
-          -positionZ * this.pz.mult
-        );
-      } else {
-        matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
-      }
-    } else {
-      var position = this.p.getValueAtTime(time);
-      matrix.translate(
-        position[0] * this.p.mult,
-        position[1] * this.p.mult,
-        -position[2] * this.p.mult
-      );
-    }
-    return matrix;
-    /// /
-  }
-
-  function getTransformStaticValueAtTime() {
-    return this.v.clone(new Matrix());
-  }
-
-  var getTransformProperty = TransformPropertyFactory.getTransformProperty;
-  TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
-    var prop = getTransformProperty(elem, data, container);
-    if (prop.dynamicProperties.length) {
-      prop.getValueAtTime = getTransformValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    return prop;
-  };
-
-  var propertyGetProp = PropertyFactory.getProp;
-  PropertyFactory.getProp = function (elem, data, type, mult, container) {
-    var prop = propertyGetProp(elem, data, type, mult, container);
-    // prop.getVelocityAtTime = getVelocityAtTime;
-    // prop.loopOut = loopOut;
-    // prop.loopIn = loopIn;
-    if (prop.kf) {
-      prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    prop.loopOut = loopOut;
-    prop.loopIn = loopIn;
-    prop.smooth = smooth;
-    prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
-    prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
-    prop.numKeys = data.a === 1 ? data.k.length : 0;
-    prop.propertyIndex = data.ix;
-    var value = 0;
-    if (type !== 0) {
-      value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
-    }
-    prop._cachingAtTime = {
-      lastFrame: initialDefaultFrame,
-      lastIndex: 0,
-      value: value,
-    };
-    expressionHelpers.searchExpressions(elem, data, prop);
-    if (prop.k) {
-      container.addDynamicProperty(prop);
-    }
-
-    return prop;
-  };
-
-  function getShapeValueAtTime(frameNum) {
-    // For now this caching object is created only when needed instead of creating it when the shape is initialized.
-    if (!this._cachingAtTime) {
-      this._cachingAtTime = {
-        shapeValue: shapePool.clone(this.pv),
-        lastIndex: 0,
-        lastTime: initialDefaultFrame,
-      };
-    }
-
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastTime) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
-      this._cachingAtTime.lastTime = frameNum;
-      this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
-    }
-    return this._cachingAtTime.shapeValue;
-  }
-
-  var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
-  var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
-
-  function ShapeExpressions() {}
-  ShapeExpressions.prototype = {
-    vertices: function (prop, time) {
-      if (this.k) {
-        this.getValue();
-      }
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      var i;
-      var len = shapePath._length;
-      var vertices = shapePath[prop];
-      var points = shapePath.v;
-      var arr = createSizedArray(len);
-      for (i = 0; i < len; i += 1) {
-        if (prop === 'i' || prop === 'o') {
-          arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
-        } else {
-          arr[i] = [vertices[i][0], vertices[i][1]];
-        }
-      }
-      return arr;
-    },
-    points: function (time) {
-      return this.vertices('v', time);
-    },
-    inTangents: function (time) {
-      return this.vertices('i', time);
-    },
-    outTangents: function (time) {
-      return this.vertices('o', time);
-    },
-    isClosed: function () {
-      return this.v.c;
-    },
-    pointOnPath: function (perc, time) {
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      if (!this._segmentsLength) {
-        this._segmentsLength = bez.getSegmentsLength(shapePath);
-      }
-
-      var segmentsLength = this._segmentsLength;
-      var lengths = segmentsLength.lengths;
-      var lengthPos = segmentsLength.totalLength * perc;
-      var i = 0;
-      var len = lengths.length;
-      var accumulatedLength = 0;
-      var pt;
-      while (i < len) {
-        if (accumulatedLength + lengths[i].addedLength > lengthPos) {
-          var initIndex = i;
-          var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
-          var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
-          pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
-          break;
-        } else {
-          accumulatedLength += lengths[i].addedLength;
-        }
-        i += 1;
-      }
-      if (!pt) {
-        pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
-      }
-      return pt;
-    },
-    vectorOnPath: function (perc, time, vectorType) {
-      // perc doesn't use triple equality because it can be a Number object as well as a primitive.
-      if (perc == 1) { // eslint-disable-line eqeqeq
-        perc = this.v.c;
-      } else if (perc == 0) { // eslint-disable-line eqeqeq
-        perc = 0.999;
-      }
-      var pt1 = this.pointOnPath(perc, time);
-      var pt2 = this.pointOnPath(perc + 0.001, time);
-      var xLength = pt2[0] - pt1[0];
-      var yLength = pt2[1] - pt1[1];
-      var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
-      if (magnitude === 0) {
-        return [0, 0];
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
       }
-      var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
-      return unitVector;
-    },
-    tangentOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'tangent');
-    },
-    normalOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'normal');
-    },
-    setGroupProperty: expressionHelpers.setGroupProperty,
-    getValueAtTime: expressionHelpers.getStaticValueAtTime,
-  };
-  extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
-  extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-  KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
-  KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
-
-  var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
-  ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
-    var prop = propertyGetShapeProp(elem, data, type, arr, trims);
-    prop.propertyIndex = data.ix;
-    prop.lock = false;
-    if (type === 3) {
-      expressionHelpers.searchExpressions(elem, data.pt, prop);
-    } else if (type === 4) {
-      expressionHelpers.searchExpressions(elem, data.ks, prop);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
     }
-    return prop;
-  };
-}());
 
-/* global ExpressionManager, TextProperty */
-
-(function addDecorator() {
-  function searchExpressions() {
-    if (this.data.d.x) {
-      this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
-      this.addEffect(this.getExpressionValue.bind(this));
-      return true;
-    }
     return null;
   }
 
-  TextProperty.prototype.getExpressionValue = function (currentValue, text) {
-    var newValue = this.calculateExpression(text);
-    if (currentValue.t !== newValue) {
-      var newData = {};
-      this.copyData(newData, currentValue);
-      newData.t = newValue.toString();
-      newData.__complete = false;
-      return newData;
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
     }
-    return currentValue;
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
   };
 
-  TextProperty.prototype.searchProperty = function () {
-    var isKeyframed = this.searchKeyframes();
-    var hasExpressions = this.searchExpressions();
-    this.kf = isKeyframed || hasExpressions;
-    return this.kf;
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
   };
 
-  TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
 
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-var ShapePathInterface = (
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-  function () {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
       var prop = view.sh;
 
@@ -12463,1602 +7683,7986 @@
         if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
           return interfaceFunction.path;
         }
+
         return null;
       }
 
       var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
       prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
       Object.defineProperties(interfaceFunction, {
         path: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
         shape: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
-        _name: { value: shape.nm },
-        ix: { value: shape.ix },
-        propertyIndex: { value: shape.ix },
-        mn: { value: shape.mn },
-        propertyGroup: { value: propertyGroup },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
       });
       return interfaceFunction;
     };
-  }()
-);
+  }();
 
-/* exported propertyGroupFactory */
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
 
-var propertyGroupFactory = (function () {
-  return function (interfaceFunction, parentPropertyGroup) {
-    return function (val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return parentPropertyGroup(val - 1);
-    };
-  };
-}());
-
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
-  return function (propertyName, propertyGroup) {
-    var interfaceFunction = {
-      _name: propertyName,
-    };
-
-    function _propertyGroup(val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return propertyGroup(val - 1);
-    }
-
-    return _propertyGroup;
-  };
-}());
-
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
-
-var ShapeExpressionInterface = (function () {
-  function iterateElements(shapes, view, propertyGroup) {
-    var arr = [];
-    var i;
-    var len = shapes ? shapes.length : 0;
-    for (i = 0; i < len; i += 1) {
-      if (shapes[i].ty === 'gr') {
-        arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'fl') {
-        arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'st') {
-        arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tm') {
-        arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tr') {
-        // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
-      } else if (shapes[i].ty === 'el') {
-        arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sr') {
-        arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sh') {
-        arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rc') {
-        arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rd') {
-        arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rp') {
-        arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'gf') {
-        arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else {
-        arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
-      }
-    }
-    return arr;
-  }
-
-  function contentsInterfaceFactory(shape, view, propertyGroup) {
-    var interfaces;
-    var interfaceFunction = function _interfaceFunction(value) {
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
-          return interfaces[i];
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
         }
-        i += 1;
       }
-      if (typeof value === 'number') {
-        return interfaces[value - 1];
-      }
-      return null;
-    };
 
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
-    interfaceFunction.numProperties = interfaces.length;
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.transform = transformInterface;
-    interfaceFunction.propertyIndex = shape.cix;
-    interfaceFunction._name = shape.nm;
+      return arr;
+    }
 
-    return interfaceFunction;
-  }
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
 
-  function groupInterfaceFactory(shape, view, propertyGroup) {
-    var interfaceFunction = function _interfaceFunction(value) {
-      switch (value) {
-        case 'ADBE Vectors Group':
-        case 'Contents':
-        case 2:
-          return interfaceFunction.content;
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
           // Not necessary for now. Keeping them here in case a new case appears
           // case 'ADBE Vector Transform Group':
           // case 3:
-        default:
-          return interfaceFunction.transform;
-      }
-    };
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.content = content;
-    interfaceFunction.transform = transformInterface;
-    Object.defineProperty(interfaceFunction, '_name', {
-      get: function () {
-        return shape.nm;
-      },
-    });
-    // interfaceFunction.content = interfaceFunction;
-    interfaceFunction.numProperties = shape.np;
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.nm = shape.nm;
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
 
-  function fillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
     }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
 
-    view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
 
-  function gradientFillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Start Point' || val === 'start point') {
-        return interfaceFunction.startPoint;
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      if (val === 'End Point' || val === 'end point') {
-        return interfaceFunction.endPoint;
-      }
-      if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      startPoint: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      endPoint: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      type: {
-        get: function () {
-          return 'a';
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
-  function defaultInterfaceFactory() {
-    function interfaceFunction() {
-      return null;
-    }
-    return interfaceFunction;
-  }
-
-  function strokeInterfaceFactory(shape, view, propertyGroup) {
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
-    function addPropertyToDashOb(i) {
-      Object.defineProperty(dashOb, shape.d[i].nm, {
-        get: ExpressionPropertyInterface(view.d.dataProps[i].p),
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
       });
-    }
-    var i;
-    var len = shape.d ? shape.d.length : 0;
-    var dashOb = {};
-    for (i = 0; i < len; i += 1) {
-      addPropertyToDashOb(i);
-      view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      } if (val === 'Stroke Width' || val === 'stroke width') {
-        return interfaceFunction.strokeWidth;
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      strokeWidth: {
-        get: ExpressionPropertyInterface(view.w),
-      },
-      dash: {
-        get: function () {
-          return dashOb;
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
-    return interfaceFunction;
-  }
-
-  function trimInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === shape.e.ix || val === 'End' || val === 'end') {
-        return interfaceFunction.end;
-      }
-      if (val === shape.s.ix) {
-        return interfaceFunction.start;
-      }
-      if (val === shape.o.ix) {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-
-    view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.propertyGroup = propertyGroup;
-
-    Object.defineProperties(interfaceFunction, {
-      start: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      end: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function transformInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.a.ix === value || value === 'Anchor Point') {
-        return interfaceFunction.anchorPoint;
-      }
-      if (shape.o.ix === value || value === 'Opacity') {
-        return interfaceFunction.opacity;
-      }
-      if (shape.p.ix === value || value === 'Position') {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
-        return interfaceFunction.rotation;
-      }
-      if (shape.s.ix === value || value === 'Scale') {
-        return interfaceFunction.scale;
-      }
-      if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {
-        return interfaceFunction.skew;
-      }
-      if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {
-        return interfaceFunction.skewAxis;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
-    view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
-    view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (view.transform.mProps.sk) {
-      view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
-      view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
-    }
-    view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      opacity: {
-        get: ExpressionPropertyInterface(view.transform.mProps.o),
-      },
-      position: {
-        get: ExpressionPropertyInterface(view.transform.mProps.p),
-      },
-      anchorPoint: {
-        get: ExpressionPropertyInterface(view.transform.mProps.a),
-      },
-      scale: {
-        get: ExpressionPropertyInterface(view.transform.mProps.s),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(view.transform.mProps.r),
-      },
-      skew: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sk),
-      },
-      skewAxis: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sa),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.ty = 'tr';
-    interfaceFunction.mn = shape.mn;
-    interfaceFunction.propertyGroup = propertyGroup;
-    return interfaceFunction;
-  }
-
-  function ellipseInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.s.ix === value) {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function starInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.rotation;
-      }
-      if (shape.pt.ix === value) {
-        return interfaceFunction.points;
-      }
-      if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
-        return interfaceFunction.outerRadius;
-      }
-      if (shape.os.ix === value) {
-        return interfaceFunction.outerRoundness;
-      }
-      if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
-        return interfaceFunction.innerRadius;
-      }
-      if (shape.is && shape.is.ix === value) {
-        return interfaceFunction.innerRoundness;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
-    prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
-    prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (shape.ir) {
-      prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
-      prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
-    }
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      points: {
-        get: ExpressionPropertyInterface(prop.pt),
-      },
-      outerRadius: {
-        get: ExpressionPropertyInterface(prop.or),
-      },
-      outerRoundness: {
-        get: ExpressionPropertyInterface(prop.os),
-      },
-      innerRadius: {
-        get: ExpressionPropertyInterface(prop.ir),
-      },
-      innerRoundness: {
-        get: ExpressionPropertyInterface(prop.is),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function rectInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.roundness;
-      }
-      if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      roundness: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function roundedInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.r.ix === value || value === 'Round Corners 1') {
-        return interfaceFunction.radius;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      radius: {
-        get: ExpressionPropertyInterface(prop.rd),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function repeaterInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.c.ix === value || value === 'Copies') {
-        return interfaceFunction.copies;
-      } if (shape.o.ix === value || value === 'Offset') {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
-    prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      copies: {
-        get: ExpressionPropertyInterface(prop.c),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(prop.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  return function (shapes, view, propertyGroup) {
-    var interfaces;
-    function _interfaceFunction(value) {
-      if (typeof value === 'number') {
-        value = value === undefined ? 1 : value;
-        if (value === 0) {
-          return propertyGroup;
-        }
-        return interfaces[value - 1];
-      }
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value) {
-          return interfaces[i];
-        }
-        i += 1;
-      }
-      return null;
-    }
-    function parentGroupWrapper() {
-      return propertyGroup;
-    }
-    _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
-    interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
-    _interfaceFunction.numProperties = interfaces.length;
-    _interfaceFunction._name = 'Contents';
-    return _interfaceFunction;
-  };
-}());
-
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
-  return function (elem) {
-    var _prevValue;
-    var _sourceText;
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Text Document':
-          return _thisLayerFunction.sourceText;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisLayerFunction, 'sourceText', {
-      get: function () {
-        elem.textProperty.getValue();
-        var stringValue = elem.textProperty.currentData.t;
-        if (stringValue !== _prevValue) {
-          elem.textProperty.currentData.t = _prevValue;
-          _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
-          // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
-          _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
-        }
-        return _sourceText;
-      },
-    });
-    return _thisLayerFunction;
-  };
-}());
-
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
-
-var LayerExpressionInterface = (function () {
-  function getMatrix(time) {
-    var toWorldMat = new Matrix();
-    if (time !== undefined) {
-      var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
-      propMatrix.clone(toWorldMat);
-    } else {
-      var transformMat = this._elem.finalTransform.mProp;
-      transformMat.applyToMatrix(toWorldMat);
-    }
-    return toWorldMat;
-  }
-
-  function toWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function toWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function fromWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function fromWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function applyPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
-  }
-
-  function invertPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.inversePoint(arr);
-  }
-
-  function fromComp(arr) {
-    var toWorldMat = new Matrix();
-    toWorldMat.reset();
-    this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
-      }
-      return toWorldMat.inversePoint(arr);
-    }
-    return toWorldMat.inversePoint(arr);
-  }
-
-  function sampleImage() {
-    return [1, 1, 1, 1];
-  }
-
-  return function (elem) {
-    var transformInterface;
-
-    function _registerMaskInterface(maskManager) {
-      _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
-    }
-    function _registerEffectsInterface(effects) {
-      _thisLayerFunction.effect = effects;
-    }
-
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Root Vectors Group':
-        case 'Contents':
-        case 2:
-          return _thisLayerFunction.shapeInterface;
-        case 1:
-        case 6:
-        case 'Transform':
-        case 'transform':
-        case 'ADBE Transform Group':
-          return transformInterface;
-        case 4:
-        case 'ADBE Effect Parade':
-        case 'effects':
-        case 'Effects':
-          return _thisLayerFunction.effect;
-        case 'ADBE Text Properties':
-          return _thisLayerFunction.textInterface;
-        default:
-          return null;
-      }
-    }
-    _thisLayerFunction.getMatrix = getMatrix;
-    _thisLayerFunction.invertPoint = invertPoint;
-    _thisLayerFunction.applyPoint = applyPoint;
-    _thisLayerFunction.toWorld = toWorld;
-    _thisLayerFunction.toWorldVec = toWorldVec;
-    _thisLayerFunction.fromWorld = fromWorld;
-    _thisLayerFunction.fromWorldVec = fromWorldVec;
-    _thisLayerFunction.toComp = toWorld;
-    _thisLayerFunction.fromComp = fromComp;
-    _thisLayerFunction.sampleImage = sampleImage;
-    _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-    _thisLayerFunction._elem = elem;
-    transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
-    var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-    Object.defineProperties(_thisLayerFunction, {
-      hasParent: {
-        get: function () {
-          return elem.hierarchy.length;
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
         },
-      },
-      parent: {
-        get: function () {
-          return elem.hierarchy[0].layerInterface;
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
         },
-      },
-      rotation: getDescriptor(transformInterface, 'rotation'),
-      scale: getDescriptor(transformInterface, 'scale'),
-      position: getDescriptor(transformInterface, 'position'),
-      opacity: getDescriptor(transformInterface, 'opacity'),
-      anchorPoint: anchorPointDescriptor,
-      anchor_point: anchorPointDescriptor,
-      transform: {
-        get: function () {
-          return transformInterface;
-        },
-      },
-      active: {
-        get: function () {
-          return elem.isInRange;
-        },
-      },
-    });
-
-    _thisLayerFunction.startTime = elem.data.st;
-    _thisLayerFunction.index = elem.data.ind;
-    _thisLayerFunction.source = elem.data.refId;
-    _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
-    _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
-    _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    _thisLayerFunction._name = elem.data.nm;
-
-    _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
-    _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
-  var outlineInterfaceFactory = (function (elem) {
-    var currentPropertyName = '';
-    var currentProperty = elem.getFootageData();
-    function init() {
-      currentPropertyName = '';
-      currentProperty = elem.getFootageData();
-      return searchProperty;
-    }
-    function searchProperty(value) {
-      if (currentProperty[value]) {
-        currentPropertyName = value;
-        currentProperty = currentProperty[value];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      var propertyNameIndex = value.indexOf(currentPropertyName);
-      if (propertyNameIndex !== -1) {
-        var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
-        currentProperty = currentProperty[index];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      return '';
-    }
-    return init;
-  });
-
-  var dataInterfaceFactory = function (elem) {
-    function interfaceFunction(value) {
-      if (value === 'Outline') {
-        return interfaceFunction.outlineInterface();
-      }
-      return null;
-    }
-
-    interfaceFunction._name = 'Outline';
-    interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
-    return interfaceFunction;
-  };
-
-  return function (elem) {
-    function _interfaceFunction(value) {
-      if (value === 'Data') {
-        return _interfaceFunction.dataInterface;
-      }
-      return null;
-    }
-
-    _interfaceFunction._name = 'Data';
-    _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
-    return _interfaceFunction;
-  };
-}());
-
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
-  return function (comp) {
-    function _thisLayerFunction(name) {
-      var i = 0;
-      var len = comp.layers.length;
-      while (i < len) {
-        if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
-          return comp.elements[i].layerInterface;
-        }
-        i += 1;
-      }
-      return null;
-      // return {active:false};
-    }
-    Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });
-    _thisLayerFunction.layer = _thisLayerFunction;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
-    _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
-    _thisLayerFunction.displayStartTime = 0;
-    _thisLayerFunction.numLayers = comp.layers.length;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
-
-var TransformExpressionInterface = (function () {
-  return function (transform) {
-    function _thisFunction(name) {
-      switch (name) {
-        case 'scale':
-        case 'Scale':
-        case 'ADBE Scale':
-        case 6:
-          return _thisFunction.scale;
-        case 'rotation':
-        case 'Rotation':
-        case 'ADBE Rotation':
-        case 'ADBE Rotate Z':
-        case 10:
-          return _thisFunction.rotation;
-        case 'ADBE Rotate X':
-          return _thisFunction.xRotation;
-        case 'ADBE Rotate Y':
-          return _thisFunction.yRotation;
-        case 'position':
-        case 'Position':
-        case 'ADBE Position':
-        case 2:
-          return _thisFunction.position;
-        case 'ADBE Position_0':
-          return _thisFunction.xPosition;
-        case 'ADBE Position_1':
-          return _thisFunction.yPosition;
-        case 'ADBE Position_2':
-          return _thisFunction.zPosition;
-        case 'anchorPoint':
-        case 'AnchorPoint':
-        case 'Anchor Point':
-        case 'ADBE AnchorPoint':
-        case 1:
-          return _thisFunction.anchorPoint;
-        case 'opacity':
-        case 'Opacity':
-        case 11:
-          return _thisFunction.opacity;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisFunction, 'rotation', {
-      get: ExpressionPropertyInterface(transform.r || transform.rz),
-    });
-
-    Object.defineProperty(_thisFunction, 'zRotation', {
-      get: ExpressionPropertyInterface(transform.rz || transform.r),
-    });
-
-    Object.defineProperty(_thisFunction, 'xRotation', {
-      get: ExpressionPropertyInterface(transform.rx),
-    });
-
-    Object.defineProperty(_thisFunction, 'yRotation', {
-      get: ExpressionPropertyInterface(transform.ry),
-    });
-    Object.defineProperty(_thisFunction, 'scale', {
-      get: ExpressionPropertyInterface(transform.s),
-    });
-    var _px;
-    var _py;
-    var _pz;
-    var _transformFactory;
-    if (transform.p) {
-      _transformFactory = ExpressionPropertyInterface(transform.p);
-    } else {
-      _px = ExpressionPropertyInterface(transform.px);
-      _py = ExpressionPropertyInterface(transform.py);
-      if (transform.pz) {
-        _pz = ExpressionPropertyInterface(transform.pz);
-      }
-    }
-    Object.defineProperty(_thisFunction, 'position', {
-      get: function () {
-        if (transform.p) {
-          return _transformFactory();
-        }
-        return [
-          _px(),
-          _py(),
-          _pz ? _pz() : 0];
-      },
-    });
-
-    Object.defineProperty(_thisFunction, 'xPosition', {
-      get: ExpressionPropertyInterface(transform.px),
-    });
-
-    Object.defineProperty(_thisFunction, 'yPosition', {
-      get: ExpressionPropertyInterface(transform.py),
-    });
-
-    Object.defineProperty(_thisFunction, 'zPosition', {
-      get: ExpressionPropertyInterface(transform.pz),
-    });
-
-    Object.defineProperty(_thisFunction, 'anchorPoint', {
-      get: ExpressionPropertyInterface(transform.a),
-    });
-
-    Object.defineProperty(_thisFunction, 'opacity', {
-      get: ExpressionPropertyInterface(transform.o),
-    });
-
-    Object.defineProperty(_thisFunction, 'skew', {
-      get: ExpressionPropertyInterface(transform.sk),
-    });
-
-    Object.defineProperty(_thisFunction, 'skewAxis', {
-      get: ExpressionPropertyInterface(transform.sa),
-    });
-
-    Object.defineProperty(_thisFunction, 'orientation', {
-      get: ExpressionPropertyInterface(transform.or),
-    });
-
-    return _thisFunction;
-  };
-}());
-
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
-  function registerComposition(comp) {
-    this.compositions.push(comp);
-  }
-
-  return function () {
-    function _thisProjectFunction(name) {
-      var i = 0;
-      var len = this.compositions.length;
-      while (i < len) {
-        if (this.compositions[i].data && this.compositions[i].data.nm === name) {
-          if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
-            this.compositions[i].prepareFrame(this.currentFrame);
+        type: {
+          get: function get() {
+            return 'a';
           }
-          return this.compositions[i].compInterface;
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
         }
-        i += 1;
-      }
-      return null;
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    _thisProjectFunction.compositions = [];
-    _thisProjectFunction.currentFrame = 0;
-
-    _thisProjectFunction.registerComposition = registerComposition;
-
-    return _thisProjectFunction;
-  };
-}());
-
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
-
-var EffectsExpressionInterface = (function () {
-  var ob = {
-    createEffectsInterface: createEffectsInterface,
-  };
-
-  function createEffectsInterface(elem, propertyGroup) {
-    if (elem.effectsManager) {
-      var effectElements = [];
-      var effectsData = elem.data.ef;
-      var i;
-      var len = elem.effectsManager.effectElements.length;
-      for (i = 0; i < len; i += 1) {
-        effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
       }
 
-      var effects = elem.data.ef || [];
-      var groupInterface = function (name) {
-        i = 0;
-        len = effects.length;
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
         while (i < len) {
-          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-            return effectElements[i];
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
           }
+
           i += 1;
         }
+
         return null;
-      };
-      Object.defineProperty(groupInterface, 'numProperties', {
-        get: function () {
-          return effects.length;
-        },
-      });
-      return groupInterface;
-    }
-    return null;
-  }
+      }
 
-  function createGroupInterface(data, elements, propertyGroup, elem) {
-    function groupInterface(name) {
-      var effects = data.ef;
-      var i = 0;
-      var len = effects.length;
-      while (i < len) {
-        if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-          if (effects[i].ty === 5) {
-            return effectElements[i];
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
           }
-          return effectElements[i]();
+
+          return _sourceText;
         }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
         i += 1;
       }
-      throw new Error();
-    }
-    var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
 
-    var effectElements = [];
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
     var i;
-    var len = data.ef.length;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
     for (i = 0; i < len; i += 1) {
-      if (data.ef[i].ty === 5) {
-        effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
     }
 
-    if (data.mn === 'ADBE Color Control') {
-      Object.defineProperty(groupInterface, 'color', {
-        get: function () {
-          return effectElements[0]();
-        },
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
       });
     }
-    Object.defineProperties(groupInterface, {
-      numProperties: {
-        get: function () {
-          return data.np;
-        },
-      },
-      _name: { value: data.nm },
-      propertyGroup: { value: _propertyGroup },
-    });
-    groupInterface.enabled = data.en !== 0;
-    groupInterface.active = groupInterface.enabled;
-    return groupInterface;
-  }
 
-  function createValueInterface(element, type, elem, propertyGroup) {
-    var expressionProperty = ExpressionPropertyInterface(element.p);
-    function interfaceFunction() {
-      if (type === 10) {
-        return elem.comp.compInterface(element.p.v);
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
       }
-      return expressionProperty();
-    }
 
-    if (element.p.setGroupProperty) {
-      element.p.setGroupProperty(PropertyInterface('', propertyGroup));
-    }
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
 
-    return interfaceFunction;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray */
-/* exported MaskManagerInterface */
-
-var MaskManagerInterface = (function () {
-  function MaskInterface(mask, data) {
-    this._mask = mask;
-    this._data = data;
-  }
-  Object.defineProperty(MaskInterface.prototype, 'maskPath', {
-    get: function () {
-      if (this._mask.prop.k) {
-        this._mask.prop.getValue();
-      }
-      return this._mask.prop;
-    },
-  });
-  Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
-    get: function () {
-      if (this._mask.op.k) {
-        this._mask.op.getValue();
-      }
-      return this._mask.op.v * 100;
-    },
-  });
-
-  var MaskManager = function (maskManager) {
-    var _masksInterfaces = createSizedArray(maskManager.viewData.length);
-    var i;
-    var len = maskManager.viewData.length;
-    for (i = 0; i < len; i += 1) {
-      _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
-    }
-
-    var maskFunction = function (name) {
-      i = 0;
-      while (i < len) {
-        if (maskManager.masksProperties[i].nm === name) {
-          return _masksInterfaces[i];
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
         }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
         i += 1;
       }
-      return null;
-    };
-    return maskFunction;
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
   };
-  return MaskManager;
-}());
 
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
-
-var ExpressionPropertyInterface = (function () {
-  var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
-  var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
-
-  function completeProperty(expressionValue, property, type) {
-    Object.defineProperty(expressionValue, 'velocity', {
-      get: function () {
-        return property.getVelocityAtTime(property.comp.currentFrame);
-      },
-    });
-    expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
-    expressionValue.key = function (pos) {
-      if (!expressionValue.numKeys) {
-        return 0;
-      }
-      var value = '';
-      if ('s' in property.keyframes[pos - 1]) {
-        value = property.keyframes[pos - 1].s;
-      } else if ('e' in property.keyframes[pos - 2]) {
-        value = property.keyframes[pos - 2].e;
-      } else {
-        value = property.keyframes[pos - 2].s;
-      }
-      var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
-      valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
-      valueProp.value = type === 'unidimensional' ? value[0] : value;
-      return valueProp;
-    };
-    expressionValue.valueAtTime = property.getValueAtTime;
-    expressionValue.speedAtTime = property.getSpeedAtTime;
-    expressionValue.velocityAtTime = property.getVelocityAtTime;
-    expressionValue.propertyGroup = property.propertyGroup;
-  }
-
-  function UnidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultUnidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var val = property.pv * mult;
-    var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-    expressionValue.value = val;
-    completeProperty(expressionValue, property, 'unidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      val = property.v * mult;
-      if (expressionValue.value !== val) {
-        expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-        expressionValue.value = val;
-        completeProperty(expressionValue, property, 'unidimensional');
-      }
-      return expressionValue;
-    };
-  }
-
-  function MultidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultMultidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var len = (property.data && property.data.l) || property.pv.length;
-    var expressionValue = createTypedArray('float32', len);
-    var arrValue = createTypedArray('float32', len);
-    expressionValue.value = arrValue;
-    completeProperty(expressionValue, property, 'multidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      for (var i = 0; i < len; i += 1) {
-        arrValue[i] = property.v[i] * mult;
-        expressionValue[i] = arrValue[i];
-      }
-      return expressionValue;
-    };
-  }
-
-  // TODO: try to avoid using this getter
-  function defaultGetter() {
-    return defaultUnidimensionalValue;
-  }
-
-  return function (property) {
-    if (!property) {
-      return defaultGetter;
-    } if (property.propType === 'unidimensional') {
-      return UnidimensionalPropertyInterface(property);
-    }
-    return MultidimensionalPropertyInterface(property);
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
   };
-}());
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
 
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
-  function getValueProxy(index, total) {
-    this.textIndex = index + 1;
-    this.textTotal = total;
-    this.v = this.getValue() * this.mult;
-    return this.v;
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
   }
 
-  return function (elem, data) {
-    this.pv = 1;
-    this.comp = elem.comp;
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
     this.elem = elem;
-    this.mult = 0.01;
-    this.propType = 'textSelector';
-    this.textTotal = data.totalChars;
-    this.selectorValue = 100;
-    this.lastValue = [1, 1, 1];
-    this.k = true;
-    this.x = true;
-    this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);
-    this.getMult = getValueProxy;
-    this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
+    }
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
+
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
     if (this.kf) {
-      this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
     } else {
-      this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
     }
-    this.setGroupProperty = expressionHelpers.setGroupProperty;
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
   };
-}());
 
-var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
-TextSelectorProp.getTextSelectorProp = function (elem, data, arr) {
-  if (data.t === 1) {
-    return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
   }
-  return propertyGetTextProp(elem, data, arr);
-};
 
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
-
-function SliderEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function AngleEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function ColorEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function PointEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function LayerIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function MaskIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function CheckboxEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function NoValueEffect() {
-  this.p = {};
-}
-
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
-
-function EffectsManager(data, element) {
-  var effects = data.ef || [];
-  this.effectElements = [];
-  var i;
-  var len = effects.length;
-  var effectItem;
-  for (i = 0; i < len; i += 1) {
-    effectItem = new GroupEffect(effects[i], element);
-    this.effectElements.push(effectItem);
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
   }
-}
 
-function GroupEffect(data, element) {
-  this.init(data, element);
-}
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
 
-extendPrototype([DynamicPropertyContainer], GroupEffect);
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
 
-GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
 
-GroupEffect.prototype.init = function (data, element) {
-  this.data = data;
-  this.effectElements = [];
-  this.initDynamicPropertyContainer(element);
-  var i;
-  var len = this.data.ef.length;
-  var eff;
-  var effects = this.data.ef;
-  for (i = 0; i < len; i += 1) {
-    eff = null;
-    switch (effects[i].ty) {
-      case 0:
-        eff = new SliderEffect(effects[i], element, this);
-        break;
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
       case 1:
-        eff = new AngleEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
         break;
+
       case 2:
-        eff = new ColorEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
         break;
-      case 3:
-        eff = new PointEffect(effects[i], element, this);
-        break;
-      case 4:
-      case 7:
-        eff = new CheckboxEffect(effects[i], element, this);
-        break;
-      case 10:
-        eff = new LayerIndexEffect(effects[i], element, this);
-        break;
-      case 11:
-        eff = new MaskIndexEffect(effects[i], element, this);
-        break;
-      case 5:
-        eff = new EffectsManager(effects[i], element, this);
-        break;
-        // case 6:
+
       default:
-        eff = new NoValueEffect(effects[i], element, this);
         break;
     }
-    if (eff) {
-      this.effectElements.push(eff);
-    }
-  }
-};
 
-
-var lottie = {};
-
-function setLocationHref(href) {
-  locationHref = href;
-}
-
-function searchAnimations() {
-  if (standalone === true) {
-    animationManager.searchAnimations(animationData, standalone, renderer);
-  } else {
-    animationManager.searchAnimations();
-  }
-}
-
-function setSubframeRendering(flag) {
-  subframeEnabled = flag;
-}
-
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
-}
-
-function loadAnimation(params) {
-  if (standalone === true) {
-    params.animationData = JSON.parse(animationData);
-  }
-  return animationManager.loadAnimation(params);
-}
-
-function setQuality(value) {
-  if (typeof value === 'string') {
-    switch (value) {
-      case 'high':
-        defaultCurveSegments = 200;
-        break;
-      default:
-      case 'medium':
-        defaultCurveSegments = 50;
-        break;
-      case 'low':
-        defaultCurveSegments = 10;
-        break;
-    }
-  } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
-  }
-  if (defaultCurveSegments >= 50) {
-    roundValues(false);
-  } else {
-    roundValues(true);
-  }
-}
-
-function inBrowser() {
-  return typeof navigator !== 'undefined';
-}
-
-function installPlugin(type, plugin) {
-  if (type === 'expressions') {
-    expressionsPlugin = plugin;
-  }
-}
-
-function getFactory(name) {
-  switch (name) {
-    case 'propertyFactory':
-      return PropertyFactory;
-    case 'shapePropertyFactory':
-      return ShapePropertyFactory;
-    case 'matrix':
-      return Matrix;
-    default:
-      return null;
-  }
-}
-
-lottie.play = animationManager.play;
-lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
-lottie.togglePause = animationManager.togglePause;
-lottie.setSpeed = animationManager.setSpeed;
-lottie.setDirection = animationManager.setDirection;
-lottie.stop = animationManager.stop;
-lottie.searchAnimations = searchAnimations;
-lottie.registerAnimation = animationManager.registerAnimation;
-lottie.loadAnimation = loadAnimation;
-lottie.setSubframeRendering = setSubframeRendering;
-lottie.resize = animationManager.resize;
-// lottie.start = start;
-lottie.goToAndStop = animationManager.goToAndStop;
-lottie.destroy = animationManager.destroy;
-lottie.setQuality = setQuality;
-lottie.inBrowser = inBrowser;
-lottie.installPlugin = installPlugin;
-lottie.freeze = animationManager.freeze;
-lottie.unfreeze = animationManager.unfreeze;
-lottie.setVolume = animationManager.setVolume;
-lottie.mute = animationManager.mute;
-lottie.unmute = animationManager.unmute;
-lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
-lottie.__getFactory = getFactory;
-lottie.version = '5.8.1';
-
-function checkReady() {
-  if (document.readyState === 'complete') {
-    clearInterval(readyStateCheckInterval);
-    searchAnimations();
-  }
-}
-
-function getQueryVariable(variable) {
-  var vars = queryString.split('&');
-  for (var i = 0; i < vars.length; i += 1) {
-    var pair = vars[i].split('=');
-    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
-      return decodeURIComponent(pair[1]);
-    }
-  }
-  return null;
-}
-var standalone = '__[STANDALONE]__';
-var animationData = '__[ANIMATIONDATA]__';
-var renderer = '';
-var queryString;
-if (standalone) {
-  var scripts = document.getElementsByTagName('script');
-  var index = scripts.length - 1;
-  var myScript = scripts[index] || {
-    src: '',
+    matrixHelper.translate(xPos, yPos, 0);
   };
-  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
-  renderer = getQueryVariable('renderer');
-}
-var readyStateCheckInterval = setInterval(checkReady, 100);
 
-return lottie;
-}));
\ No newline at end of file
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  registerRenderer('svg', SVGRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+  var Expressions = function () {
+    var ob = {};
+    ob.initExpressions = initExpressions;
+
+    function initExpressions(animation) {
+      var stackCount = 0;
+      var registers = [];
+
+      function pushExpression() {
+        stackCount += 1;
+      }
+
+      function popExpression() {
+        stackCount -= 1;
+
+        if (stackCount === 0) {
+          releaseInstances();
+        }
+      }
+
+      function registerExpressionProperty(expression) {
+        if (registers.indexOf(expression) === -1) {
+          registers.push(expression);
+        }
+      }
+
+      function releaseInstances() {
+        var i;
+        var len = registers.length;
+
+        for (i = 0; i < len; i += 1) {
+          registers[i].release();
+        }
+
+        registers.length = 0;
+      }
+
+      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
+      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
+      animation.renderer.globalData.pushExpression = pushExpression;
+      animation.renderer.globalData.popExpression = popExpression;
+      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
+    }
+
+    return ob;
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+  /* eslint-disable */
+
+  /*
+   Copyright 2014 David Bau.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+   */
+  function seedRandom(pool, math) {
+    //
+    // The following constants are related to IEEE 754 limits.
+    //
+    var global = this,
+        width = 256,
+        // each RC4 output is 0 <= x < 256
+    chunks = 6,
+        // at least six RC4 outputs for each double
+    digits = 52,
+        // there are 52 significant digits in a double
+    rngname = 'random',
+        // rngname: name for Math.random and Math.seedrandom
+    startdenom = math.pow(width, chunks),
+        significance = math.pow(2, digits),
+        overflow = significance * 2,
+        mask = width - 1,
+        nodecrypto; // node.js crypto module, initialized at the bottom.
+    //
+    // seedrandom()
+    // This is the seedrandom function described above.
+    //
+
+    function seedrandom(seed, options, callback) {
+      var key = [];
+      options = options === true ? {
+        entropy: true
+      } : options || {}; // Flatten the seed string or build one from local entropy if needed.
+
+      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.
+
+      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains
+      // randomness in every bit of the mantissa of the IEEE 754 value.
+
+      var prng = function prng() {
+        var n = arc4.g(chunks),
+            // Start with a numerator n < 2 ^ 48
+        d = startdenom,
+            //   and denominator d = 2 ^ 48.
+        x = 0; //   and no 'extra last byte'.
+
+        while (n < significance) {
+          // Fill up all significant digits by
+          n = (n + x) * width; //   shifting numerator and
+
+          d *= width; //   denominator and generating a
+
+          x = arc4.g(1); //   new least-significant-byte.
+        }
+
+        while (n >= overflow) {
+          // To avoid rounding up, before adding
+          n /= 2; //   last byte, shift everything
+
+          d /= 2; //   right using integer math until
+
+          x >>>= 1; //   we have exactly the desired bits.
+        }
+
+        return (n + x) / d; // Form the number within [0, 1).
+      };
+
+      prng.int32 = function () {
+        return arc4.g(4) | 0;
+      };
+
+      prng.quick = function () {
+        return arc4.g(4) / 0x100000000;
+      };
+
+      prng["double"] = prng; // Mix the randomness into accumulated entropy.
+
+      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.
+
+      return (options.pass || callback || function (prng, seed, is_math_call, state) {
+        if (state) {
+          // Load the arc4 state from the given state if it has an S array.
+          if (state.S) {
+            copy(state, arc4);
+          } // Only provide the .state method if requested via options.state.
+
+
+          prng.state = function () {
+            return copy(arc4, {});
+          };
+        } // If called as a method of Math (Math.seedrandom()), mutate
+        // Math.random because that is how seedrandom.js has worked since v1.0.
+
+
+        if (is_math_call) {
+          math[rngname] = prng;
+          return seed;
+        } // Otherwise, it is a newer calling convention, so return the
+        // prng directly.
+        else return prng;
+      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);
+    }
+
+    math['seed' + rngname] = seedrandom; //
+    // ARC4
+    //
+    // An ARC4 implementation.  The constructor takes a key in the form of
+    // an array of at most (width) integers that should be 0 <= x < (width).
+    //
+    // The g(count) method returns a pseudorandom integer that concatenates
+    // the next (count) outputs from ARC4.  Its return value is a number x
+    // that is in the range 0 <= x < (width ^ count).
+    //
+
+    function ARC4(key) {
+      var t,
+          keylen = key.length,
+          me = this,
+          i = 0,
+          j = me.i = me.j = 0,
+          s = me.S = []; // The empty key [] is treated as [0].
+
+      if (!keylen) {
+        key = [keylen++];
+      } // Set up S using the standard key scheduling algorithm.
+
+
+      while (i < width) {
+        s[i] = i++;
+      }
+
+      for (i = 0; i < width; i++) {
+        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
+        s[j] = t;
+      } // The "g" method returns the next (count) outputs as one number.
+
+
+      me.g = function (count) {
+        // Using instance members instead of closure state nearly doubles speed.
+        var t,
+            r = 0,
+            i = me.i,
+            j = me.j,
+            s = me.S;
+
+        while (count--) {
+          t = s[i = mask & i + 1];
+          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];
+        }
+
+        me.i = i;
+        me.j = j;
+        return r; // For robust unpredictability, the function call below automatically
+        // discards an initial batch of values.  This is called RC4-drop[256].
+        // See http://google.com/search?q=rsa+fluhrer+response&btnI
+      };
+    } //
+    // copy()
+    // Copies internal state of ARC4 to or from a plain object.
+    //
+
+
+    function copy(f, t) {
+      t.i = f.i;
+      t.j = f.j;
+      t.S = f.S.slice();
+      return t;
+    } //
+    // flatten()
+    // Converts an object tree to nested arrays of strings.
+    //
+
+
+    function flatten(obj, depth) {
+      var result = [],
+          typ = _typeof$1(obj),
+          prop;
+
+      if (depth && typ == 'object') {
+        for (prop in obj) {
+          try {
+            result.push(flatten(obj[prop], depth - 1));
+          } catch (e) {}
+        }
+      }
+
+      return result.length ? result : typ == 'string' ? obj : obj + '\0';
+    } //
+    // mixkey()
+    // Mixes a string seed into a key that is an array of integers, and
+    // returns a shortened string seed that is equivalent to the result key.
+    //
+
+
+    function mixkey(seed, key) {
+      var stringseed = seed + '',
+          smear,
+          j = 0;
+
+      while (j < stringseed.length) {
+        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
+      }
+
+      return tostring(key);
+    } //
+    // autoseed()
+    // Returns an object for autoseeding, using window.crypto and Node crypto
+    // module if available.
+    //
+
+
+    function autoseed() {
+      try {
+        if (nodecrypto) {
+          return tostring(nodecrypto.randomBytes(width));
+        }
+
+        var out = new Uint8Array(width);
+        (global.crypto || global.msCrypto).getRandomValues(out);
+        return tostring(out);
+      } catch (e) {
+        var browser = global.navigator,
+            plugins = browser && browser.plugins;
+        return [+new Date(), global, plugins, global.screen, tostring(pool)];
+      }
+    } //
+    // tostring()
+    // Converts an array of charcodes to a string
+    //
+
+
+    function tostring(a) {
+      return String.fromCharCode.apply(0, a);
+    } //
+    // When seedrandom.js is loaded, we immediately mix a few bits
+    // from the built-in RNG into the entropy pool.  Because we do
+    // not want to interfere with deterministic PRNG state later,
+    // seedrandom will not call math.random on its own again after
+    // initialization.
+    //
+
+
+    mixkey(math.random(), pool); //
+    // Nodejs and AMD support: export the implementation as a module using
+    // either convention.
+    //
+    // End anonymous scope, and pass initial values.
+  }
+
+  ;
+
+  function initialize$2(BMMath) {
+    seedRandom([], BMMath);
+  }
+
+  var propTypes = {
+    SHAPE: 'shape'
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var ExpressionManager = function () {
+    'use strict';
+
+    var ob = {};
+    var Math = BMMath;
+    var window = null;
+    var document = null;
+    var XMLHttpRequest = null;
+    var fetch = null;
+    var frames = null;
+    initialize$2(BMMath);
+
+    function $bm_isInstanceOfArray(arr) {
+      return arr.constructor === Array || arr.constructor === Float32Array;
+    }
+
+    function isNumerable(tOfV, v) {
+      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
+    }
+
+    function $bm_neg(a) {
+      var tOfA = _typeof(a);
+
+      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
+        return -a;
+      }
+
+      if ($bm_isInstanceOfArray(a)) {
+        var i;
+        var lenA = a.length;
+        var retArr = [];
+
+        for (i = 0; i < lenA; i += 1) {
+          retArr[i] = -a[i];
+        }
+
+        return retArr;
+      }
+
+      if (a.propType) {
+        return a.v;
+      }
+
+      return -a;
+    }
+
+    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
+    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
+    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
+
+    function sum(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (tOfA === 'string' || tOfB === 'string') {
+        return a + b;
+      }
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a + b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] += b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a + b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] + b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    var add = sum;
+
+    function sub(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        if (tOfA === 'string') {
+          a = parseInt(a, 10);
+        }
+
+        if (tOfB === 'string') {
+          b = parseInt(b, 10);
+        }
+
+        return a - b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] -= b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a - b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] - b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    function mul(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a * b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] * b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a * b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function div(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a / b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] / b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a / b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function mod(a, b) {
+      if (typeof a === 'string') {
+        a = parseInt(a, 10);
+      }
+
+      if (typeof b === 'string') {
+        b = parseInt(b, 10);
+      }
+
+      return a % b;
+    }
+
+    var $bm_sum = sum;
+    var $bm_sub = sub;
+    var $bm_mul = mul;
+    var $bm_div = div;
+    var $bm_mod = mod;
+
+    function clamp(num, min, max) {
+      if (min > max) {
+        var mm = max;
+        max = min;
+        min = mm;
+      }
+
+      return Math.min(Math.max(num, min), max);
+    }
+
+    function radiansToDegrees(val) {
+      return val / degToRads;
+    }
+
+    var radians_to_degrees = radiansToDegrees;
+
+    function degreesToRadians(val) {
+      return val * degToRads;
+    }
+
+    var degrees_to_radians = radiansToDegrees;
+    var helperLengthArray = [0, 0, 0, 0, 0, 0];
+
+    function length(arr1, arr2) {
+      if (typeof arr1 === 'number' || arr1 instanceof Number) {
+        arr2 = arr2 || 0;
+        return Math.abs(arr1 - arr2);
+      }
+
+      if (!arr2) {
+        arr2 = helperLengthArray;
+      }
+
+      var i;
+      var len = Math.min(arr1.length, arr2.length);
+      var addedLength = 0;
+
+      for (i = 0; i < len; i += 1) {
+        addedLength += Math.pow(arr2[i] - arr1[i], 2);
+      }
+
+      return Math.sqrt(addedLength);
+    }
+
+    function normalize(vec) {
+      return div(vec, length(vec));
+    }
+
+    function rgbToHsl(val) {
+      var r = val[0];
+      var g = val[1];
+      var b = val[2];
+      var max = Math.max(r, g, b);
+      var min = Math.min(r, g, b);
+      var h;
+      var s;
+      var l = (max + min) / 2;
+
+      if (max === min) {
+        h = 0; // achromatic
+
+        s = 0; // achromatic
+      } else {
+        var d = max - min;
+        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+
+        switch (max) {
+          case r:
+            h = (g - b) / d + (g < b ? 6 : 0);
+            break;
+
+          case g:
+            h = (b - r) / d + 2;
+            break;
+
+          case b:
+            h = (r - g) / d + 4;
+            break;
+
+          default:
+            break;
+        }
+
+        h /= 6;
+      }
+
+      return [h, s, l, val[3]];
+    }
+
+    function hue2rgb(p, q, t) {
+      if (t < 0) t += 1;
+      if (t > 1) t -= 1;
+      if (t < 1 / 6) return p + (q - p) * 6 * t;
+      if (t < 1 / 2) return q;
+      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+      return p;
+    }
+
+    function hslToRgb(val) {
+      var h = val[0];
+      var s = val[1];
+      var l = val[2];
+      var r;
+      var g;
+      var b;
+
+      if (s === 0) {
+        r = l; // achromatic
+
+        b = l; // achromatic
+
+        g = l; // achromatic
+      } else {
+        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+        var p = 2 * l - q;
+        r = hue2rgb(p, q, h + 1 / 3);
+        g = hue2rgb(p, q, h);
+        b = hue2rgb(p, q, h - 1 / 3);
+      }
+
+      return [r, g, b, val[3]];
+    }
+
+    function linear(t, tMin, tMax, value1, value2) {
+      if (value1 === undefined || value2 === undefined) {
+        value1 = tMin;
+        value2 = tMax;
+        tMin = 0;
+        tMax = 1;
+      }
+
+      if (tMax < tMin) {
+        var _tMin = tMax;
+        tMax = tMin;
+        tMin = _tMin;
+      }
+
+      if (t <= tMin) {
+        return value1;
+      }
+
+      if (t >= tMax) {
+        return value2;
+      }
+
+      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
+
+      if (!value1.length) {
+        return value1 + (value2 - value1) * perc;
+      }
+
+      var i;
+      var len = value1.length;
+      var arr = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
+      }
+
+      return arr;
+    }
+
+    function random(min, max) {
+      if (max === undefined) {
+        if (min === undefined) {
+          min = 0;
+          max = 1;
+        } else {
+          max = min;
+          min = undefined;
+        }
+      }
+
+      if (max.length) {
+        var i;
+        var len = max.length;
+
+        if (!min) {
+          min = createTypedArray('float32', len);
+        }
+
+        var arr = createTypedArray('float32', len);
+        var rnd = BMMath.random();
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = min[i] + rnd * (max[i] - min[i]);
+        }
+
+        return arr;
+      }
+
+      if (min === undefined) {
+        min = 0;
+      }
+
+      var rndm = BMMath.random();
+      return min + rndm * (max - min);
+    }
+
+    function createPath(points, inTangents, outTangents, closed) {
+      var i;
+      var len = points.length;
+      var path = shapePool.newElement();
+      path.setPathData(!!closed, len);
+      var arrPlaceholder = [0, 0];
+      var inVertexPoint;
+      var outVertexPoint;
+
+      for (i = 0; i < len; i += 1) {
+        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
+        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
+        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);
+      }
+
+      return path;
+    }
+
+    function initiateExpression(elem, data, property) {
+      var val = data.x;
+      var needsVelocity = /velocity(?![\w\d])/.test(val);
+
+      var _needsRandom = val.indexOf('random') !== -1;
+
+      var elemType = elem.data.ty;
+      var transform;
+      var $bm_transform;
+      var content;
+      var effect;
+      var thisProperty = property;
+      thisProperty.valueAtTime = thisProperty.getValueAtTime;
+      Object.defineProperty(thisProperty, 'value', {
+        get: function get() {
+          return thisProperty.v;
+        }
+      });
+      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
+      elem.comp.displayStartTime = 0;
+      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      var outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      var width = elem.data.sw ? elem.data.sw : 0;
+      var height = elem.data.sh ? elem.data.sh : 0;
+      var name = elem.data.nm;
+      var loopIn;
+      var loop_in;
+      var loopOut;
+      var loop_out;
+      var smooth;
+      var toWorld;
+      var fromWorld;
+      var fromComp;
+      var toComp;
+      var fromCompToSurface;
+      var position;
+      var rotation;
+      var anchorPoint;
+      var scale;
+      var thisLayer;
+      var thisComp;
+      var mask;
+      var valueAtTime;
+      var velocityAtTime;
+      var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
+
+      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
+
+      var numKeys = property.kf ? data.k.length : 0;
+      var active = !this.data || this.data.hd !== true;
+
+      var wiggle = function wiggle(freq, amp) {
+        var iWiggle;
+        var j;
+        var lenWiggle = this.pv.length ? this.pv.length : 1;
+        var addedAmps = createTypedArray('float32', lenWiggle);
+        freq = 5;
+        var iterations = Math.floor(time * freq);
+        iWiggle = 0;
+        j = 0;
+
+        while (iWiggle < iterations) {
+          // var rnd = BMMath.random();
+          for (j = 0; j < lenWiggle; j += 1) {
+            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;
+          }
+
+          iWiggle += 1;
+        } // var rnd2 = BMMath.random();
+
+
+        var periods = time * freq;
+        var perc = periods - Math.floor(periods);
+        var arr = createTypedArray('float32', lenWiggle);
+
+        if (lenWiggle > 1) {
+          for (j = 0; j < lenWiggle; j += 1) {
+            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
+            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
+          }
+
+          return arr;
+        }
+
+        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
+      }.bind(this);
+
+      if (thisProperty.loopIn) {
+        loopIn = thisProperty.loopIn.bind(thisProperty);
+        loop_in = loopIn;
+      }
+
+      if (thisProperty.loopOut) {
+        loopOut = thisProperty.loopOut.bind(thisProperty);
+        loop_out = loopOut;
+      }
+
+      if (thisProperty.smooth) {
+        smooth = thisProperty.smooth.bind(thisProperty);
+      }
+
+      function loopInDuration(type, duration) {
+        return loopIn(type, duration, true);
+      }
+
+      function loopOutDuration(type, duration) {
+        return loopOut(type, duration, true);
+      }
+
+      if (this.getValueAtTime) {
+        valueAtTime = this.getValueAtTime.bind(this);
+      }
+
+      if (this.getVelocityAtTime) {
+        velocityAtTime = this.getVelocityAtTime.bind(this);
+      }
+
+      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
+
+      function lookAt(elem1, elem2) {
+        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
+        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
+        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
+        return [yaw, pitch, 0];
+      }
+
+      function easeOut(t, tMin, tMax, val1, val2) {
+        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function easeIn(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInBez, t, tMin, tMax, val1, val2);
+      }
+
+      function ease(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function applyEase(fn, t, tMin, tMax, val1, val2) {
+        if (val1 === undefined) {
+          val1 = tMin;
+          val2 = tMax;
+        } else {
+          t = (t - tMin) / (tMax - tMin);
+        }
+
+        if (t > 1) {
+          t = 1;
+        } else if (t < 0) {
+          t = 0;
+        }
+
+        var mult = fn(t);
+
+        if ($bm_isInstanceOfArray(val1)) {
+          var iKey;
+          var lenKey = val1.length;
+          var arr = createTypedArray('float32', lenKey);
+
+          for (iKey = 0; iKey < lenKey; iKey += 1) {
+            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
+          }
+
+          return arr;
+        }
+
+        return (val2 - val1) * mult + val1;
+      }
+
+      function nearestKey(time) {
+        var iKey;
+        var lenKey = data.k.length;
+        var index;
+        var keyTime;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          index = 0;
+          keyTime = 0;
+        } else {
+          index = -1;
+          time *= elem.comp.globalData.frameRate;
+
+          if (time < data.k[0].t) {
+            index = 1;
+            keyTime = data.k[0].t;
+          } else {
+            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
+              if (time === data.k[iKey].t) {
+                index = iKey + 1;
+                keyTime = data.k[iKey].t;
+                break;
+              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
+                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
+                  index = iKey + 2;
+                  keyTime = data.k[iKey + 1].t;
+                } else {
+                  index = iKey + 1;
+                  keyTime = data.k[iKey].t;
+                }
+
+                break;
+              }
+            }
+
+            if (index === -1) {
+              index = iKey + 1;
+              keyTime = data.k[iKey].t;
+            }
+          }
+        }
+
+        var obKey = {};
+        obKey.index = index;
+        obKey.time = keyTime / elem.comp.globalData.frameRate;
+        return obKey;
+      }
+
+      function key(ind) {
+        var obKey;
+        var iKey;
+        var lenKey;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          throw new Error('The property has no keyframe at index ' + ind);
+        }
+
+        ind -= 1;
+        obKey = {
+          time: data.k[ind].t / elem.comp.globalData.frameRate,
+          value: []
+        };
+        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
+        lenKey = arr.length;
+
+        for (iKey = 0; iKey < lenKey; iKey += 1) {
+          obKey[iKey] = arr[iKey];
+          obKey.value[iKey] = arr[iKey];
+        }
+
+        return obKey;
+      }
+
+      function framesToTime(fr, fps) {
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return fr / fps;
+      }
+
+      function timeToFrames(t, fps) {
+        if (!t && t !== 0) {
+          t = time;
+        }
+
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return t * fps;
+      }
+
+      function seedRandom(seed) {
+        BMMath.seedrandom(randSeed + seed);
+      }
+
+      function sourceRectAtTime() {
+        return elem.sourceRectAtTime();
+      }
+
+      function substring(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substring(init);
+          }
+
+          return value.substring(init, end);
+        }
+
+        return '';
+      }
+
+      function substr(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substr(init);
+          }
+
+          return value.substr(init, end);
+        }
+
+        return '';
+      }
+
+      function posterizeTime(framesPerSecond) {
+        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
+        value = valueAtTime(time);
+      }
+
+      var time;
+      var velocity;
+      var value;
+      var text;
+      var textIndex;
+      var textTotal;
+      var selectorValue;
+      var index = elem.data.ind;
+      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+      var parent;
+      var randSeed = Math.floor(Math.random() * 1000000);
+      var globalData = elem.globalData;
+
+      function executeExpression(_value) {
+        // globalData.pushExpression();
+        value = _value;
+
+        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
+          return value;
+        }
+
+        if (this.propType === 'textSelector') {
+          textIndex = this.textIndex;
+          textTotal = this.textTotal;
+          selectorValue = this.selectorValue;
+        }
+
+        if (!thisLayer) {
+          text = elem.layerInterface.text;
+          thisLayer = elem.layerInterface;
+          thisComp = elem.comp.compInterface;
+          toWorld = thisLayer.toWorld.bind(thisLayer);
+          fromWorld = thisLayer.fromWorld.bind(thisLayer);
+          fromComp = thisLayer.fromComp.bind(thisLayer);
+          toComp = thisLayer.toComp.bind(thisLayer);
+          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
+          fromCompToSurface = fromComp;
+        }
+
+        if (!transform) {
+          transform = elem.layerInterface('ADBE Transform Group');
+          $bm_transform = transform;
+
+          if (transform) {
+            anchorPoint = transform.anchorPoint;
+            /* position = transform.position;
+                      rotation = transform.rotation;
+                      scale = transform.scale; */
+          }
+        }
+
+        if (elemType === 4 && !content) {
+          content = thisLayer('ADBE Root Vectors Group');
+        }
+
+        if (!effect) {
+          effect = thisLayer(4);
+        }
+
+        hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+
+        if (hasParent && !parent) {
+          parent = elem.hierarchy[0].layerInterface;
+        }
+
+        time = this.comp.renderedFrame / this.comp.globalData.frameRate;
+
+        if (_needsRandom) {
+          seedRandom(randSeed + time);
+        }
+
+        if (needsVelocity) {
+          velocity = velocityAtTime(time);
+        }
+
+        expression_function();
+        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value
+        // Changed this to a ternary operation because Rollup failed compiling it correctly
+
+        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;
+        return scoped_bm_rt;
+      } // Bundlers will see these as dead code and unless we reference them
+
+
+      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
+      return executeExpression;
+    }
+
+    ob.initiateExpression = initiateExpression;
+    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
+    return ob;
+  }();
+
+  var expressionHelpers = function () {
+    function searchExpressions(elem, data, prop) {
+      if (data.x) {
+        prop.k = true;
+        prop.x = true;
+        prop.initiateExpression = ExpressionManager.initiateExpression;
+        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
+      }
+    }
+
+    function getValueAtTime(frameNum) {
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastFrame) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
+        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
+        this._cachingAtTime.lastFrame = frameNum;
+      }
+
+      return this._cachingAtTime.value;
+    }
+
+    function getSpeedAtTime(frameNum) {
+      var delta = -0.01;
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var speed = 0;
+
+      if (v1.length) {
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          speed += Math.pow(v2[i] - v1[i], 2);
+        }
+
+        speed = Math.sqrt(speed) * 100;
+      } else {
+        speed = 0;
+      }
+
+      return speed;
+    }
+
+    function getVelocityAtTime(frameNum) {
+      if (this.vel !== undefined) {
+        return this.vel;
+      }
+
+      var delta = -0.001; // frameNum += this.elem.data.st;
+
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var velocity;
+
+      if (v1.length) {
+        velocity = createTypedArray('float32', v1.length);
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          // removing frameRate
+          // if needed, don't add it here
+          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
+          velocity[i] = (v2[i] - v1[i]) / delta;
+        }
+      } else {
+        velocity = (v2 - v1) / delta;
+      }
+
+      return velocity;
+    }
+
+    function getStaticValueAtTime() {
+      return this.pv;
+    }
+
+    function setGroupProperty(propertyGroup) {
+      this.propertyGroup = propertyGroup;
+    }
+
+    return {
+      searchExpressions: searchExpressions,
+      getSpeedAtTime: getSpeedAtTime,
+      getVelocityAtTime: getVelocityAtTime,
+      getValueAtTime: getValueAtTime,
+      getStaticValueAtTime: getStaticValueAtTime,
+      setGroupProperty: setGroupProperty
+    };
+  }();
+
+  function addPropertyDecorator() {
+    function loopOut(type, duration, durationFlag) {
+      if (!this.k || !this.keyframes) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var lastKeyFrame = keyframes[keyframes.length - 1].t;
+
+      if (currentFrame <= lastKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var firstKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
+        } else {
+          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
+        }
+
+        firstKeyFrame = lastKeyFrame - cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (iterations % 2 !== 0) {
+          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+
+        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = (endV[i] - initV[i]) * repeats + current[i];
+          }
+
+          return ret;
+        }
+
+        return (endV - initV) * repeats + current;
+      } else if (type === 'continue') {
+        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(lastValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
+          }
+
+          return ret;
+        }
+
+        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);
+      }
+
+      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function loopIn(type, duration, durationFlag) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var firstKeyFrame = keyframes[0].t;
+
+      if (currentFrame >= firstKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var lastKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        lastKeyFrame = keyframes[duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
+        } else {
+          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
+        }
+
+        lastKeyFrame = firstKeyFrame + cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
+
+        if (iterations % 2 === 0) {
+          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);
+        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
+          }
+
+          return ret;
+        }
+
+        return current - (endV - initV) * repeats;
+      } else if (type === 'continue') {
+        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(firstValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;
+          }
+
+          return ret;
+        }
+
+        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;
+      }
+
+      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function smooth(width, samples) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      width = (width || 0.4) * 0.5;
+      samples = Math.floor(samples || 5);
+
+      if (samples <= 1) {
+        return this.pv;
+      }
+
+      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
+      var initFrame = currentTime - width;
+      var endFrame = currentTime + width;
+      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
+      var i = 0;
+      var j = 0;
+      var value;
+
+      if (this.pv.length) {
+        value = createTypedArray('float32', this.pv.length);
+      } else {
+        value = 0;
+      }
+
+      var sampleValue;
+
+      while (i < samples) {
+        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
+
+        if (this.pv.length) {
+          for (j = 0; j < this.pv.length; j += 1) {
+            value[j] += sampleValue[j];
+          }
+        } else {
+          value += sampleValue;
+        }
+
+        i += 1;
+      }
+
+      if (this.pv.length) {
+        for (j = 0; j < this.pv.length; j += 1) {
+          value[j] /= samples;
+        }
+      } else {
+        value /= samples;
+      }
+
+      return value;
+    }
+
+    function getTransformValueAtTime(time) {
+      if (!this._transformCachingAtTime) {
+        this._transformCachingAtTime = {
+          v: new Matrix()
+        };
+      } /// /
+
+
+      var matrix = this._transformCachingAtTime.v;
+      matrix.cloneFromProps(this.pre.props);
+
+      if (this.appliedTransformations < 1) {
+        var anchor = this.a.getValueAtTime(time);
+        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);
+      }
+
+      if (this.appliedTransformations < 2) {
+        var scale = this.s.getValueAtTime(time);
+        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);
+      }
+
+      if (this.sk && this.appliedTransformations < 3) {
+        var skew = this.sk.getValueAtTime(time);
+        var skewAxis = this.sa.getValueAtTime(time);
+        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
+      }
+
+      if (this.r && this.appliedTransformations < 4) {
+        var rotation = this.r.getValueAtTime(time);
+        matrix.rotate(-rotation * this.r.mult);
+      } else if (!this.r && this.appliedTransformations < 4) {
+        var rotationZ = this.rz.getValueAtTime(time);
+        var rotationY = this.ry.getValueAtTime(time);
+        var rotationX = this.rx.getValueAtTime(time);
+        var orientation = this.or.getValueAtTime(time);
+        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);
+      }
+
+      if (this.data.p && this.data.p.s) {
+        var positionX = this.px.getValueAtTime(time);
+        var positionY = this.py.getValueAtTime(time);
+
+        if (this.data.p.z) {
+          var positionZ = this.pz.getValueAtTime(time);
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);
+        } else {
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
+        }
+      } else {
+        var position = this.p.getValueAtTime(time);
+        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);
+      }
+
+      return matrix; /// /
+    }
+
+    function getTransformStaticValueAtTime() {
+      return this.v.clone(new Matrix());
+    }
+
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+
+    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
+      var prop = getTransformProperty(elem, data, container);
+
+      if (prop.dynamicProperties.length) {
+        prop.getValueAtTime = getTransformValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      return prop;
+    };
+
+    var propertyGetProp = PropertyFactory.getProp;
+
+    PropertyFactory.getProp = function (elem, data, type, mult, container) {
+      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;
+      // prop.loopOut = loopOut;
+      // prop.loopIn = loopIn;
+
+      if (prop.kf) {
+        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      prop.loopOut = loopOut;
+      prop.loopIn = loopIn;
+      prop.smooth = smooth;
+      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
+      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
+      prop.numKeys = data.a === 1 ? data.k.length : 0;
+      prop.propertyIndex = data.ix;
+      var value = 0;
+
+      if (type !== 0) {
+        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
+      }
+
+      prop._cachingAtTime = {
+        lastFrame: initialDefaultFrame,
+        lastIndex: 0,
+        value: value
+      };
+      expressionHelpers.searchExpressions(elem, data, prop);
+
+      if (prop.k) {
+        container.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+
+    function getShapeValueAtTime(frameNum) {
+      // For now this caching object is created only when needed instead of creating it when the shape is initialized.
+      if (!this._cachingAtTime) {
+        this._cachingAtTime = {
+          shapeValue: shapePool.clone(this.pv),
+          lastIndex: 0,
+          lastTime: initialDefaultFrame
+        };
+      }
+
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastTime) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
+        this._cachingAtTime.lastTime = frameNum;
+        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
+      }
+
+      return this._cachingAtTime.shapeValue;
+    }
+
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
+
+    function ShapeExpressions() {}
+
+    ShapeExpressions.prototype = {
+      vertices: function vertices(prop, time) {
+        if (this.k) {
+          this.getValue();
+        }
+
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        var i;
+        var len = shapePath._length;
+        var vertices = shapePath[prop];
+        var points = shapePath.v;
+        var arr = createSizedArray(len);
+
+        for (i = 0; i < len; i += 1) {
+          if (prop === 'i' || prop === 'o') {
+            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
+          } else {
+            arr[i] = [vertices[i][0], vertices[i][1]];
+          }
+        }
+
+        return arr;
+      },
+      points: function points(time) {
+        return this.vertices('v', time);
+      },
+      inTangents: function inTangents(time) {
+        return this.vertices('i', time);
+      },
+      outTangents: function outTangents(time) {
+        return this.vertices('o', time);
+      },
+      isClosed: function isClosed() {
+        return this.v.c;
+      },
+      pointOnPath: function pointOnPath(perc, time) {
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        if (!this._segmentsLength) {
+          this._segmentsLength = bez.getSegmentsLength(shapePath);
+        }
+
+        var segmentsLength = this._segmentsLength;
+        var lengths = segmentsLength.lengths;
+        var lengthPos = segmentsLength.totalLength * perc;
+        var i = 0;
+        var len = lengths.length;
+        var accumulatedLength = 0;
+        var pt;
+
+        while (i < len) {
+          if (accumulatedLength + lengths[i].addedLength > lengthPos) {
+            var initIndex = i;
+            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;
+            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
+            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
+            break;
+          } else {
+            accumulatedLength += lengths[i].addedLength;
+          }
+
+          i += 1;
+        }
+
+        if (!pt) {
+          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
+        }
+
+        return pt;
+      },
+      vectorOnPath: function vectorOnPath(perc, time, vectorType) {
+        // perc doesn't use triple equality because it can be a Number object as well as a primitive.
+        if (perc == 1) {
+          // eslint-disable-line eqeqeq
+          perc = this.v.c;
+        } else if (perc == 0) {
+          // eslint-disable-line eqeqeq
+          perc = 0.999;
+        }
+
+        var pt1 = this.pointOnPath(perc, time);
+        var pt2 = this.pointOnPath(perc + 0.001, time);
+        var xLength = pt2[0] - pt1[0];
+        var yLength = pt2[1] - pt1[1];
+        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
+
+        if (magnitude === 0) {
+          return [0, 0];
+        }
+
+        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
+        return unitVector;
+      },
+      tangentOnPath: function tangentOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'tangent');
+      },
+      normalOnPath: function normalOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'normal');
+      },
+      setGroupProperty: expressionHelpers.setGroupProperty,
+      getValueAtTime: expressionHelpers.getStaticValueAtTime
+    };
+    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
+    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+
+    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
+      var prop = propertyGetShapeProp(elem, data, type, arr, trims);
+      prop.propertyIndex = data.ix;
+      prop.lock = false;
+
+      if (type === 3) {
+        expressionHelpers.searchExpressions(elem, data.pt, prop);
+      } else if (type === 4) {
+        expressionHelpers.searchExpressions(elem, data.ks, prop);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+  }
+
+  function initialize$1() {
+    addPropertyDecorator();
+  }
+
+  function addDecorator() {
+    function searchExpressions() {
+      if (this.data.d.x) {
+        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
+        this.addEffect(this.getExpressionValue.bind(this));
+        return true;
+      }
+
+      return null;
+    }
+
+    TextProperty.prototype.getExpressionValue = function (currentValue, text) {
+      var newValue = this.calculateExpression(text);
+
+      if (currentValue.t !== newValue) {
+        var newData = {};
+        this.copyData(newData, currentValue);
+        newData.t = newValue.toString();
+        newData.__complete = false;
+        return newData;
+      }
+
+      return currentValue;
+    };
+
+    TextProperty.prototype.searchProperty = function () {
+      var isKeyframed = this.searchKeyframes();
+      var hasExpressions = this.searchExpressions();
+      this.kf = isKeyframed || hasExpressions;
+      return this.kf;
+    };
+
+    TextProperty.prototype.searchExpressions = searchExpressions;
+  }
+
+  function initialize() {
+    addDecorator();
+  }
+
+  setExpressionsPlugin(Expressions);
+  initialize$1();
+  initialize();
+  registerEffect(20, SVGTintFilter, true);
+  registerEffect(21, SVGFillFilter, true);
+  registerEffect(22, SVGStrokeEffect, false);
+  registerEffect(23, SVGTritoneFilter, true);
+  registerEffect(24, SVGProLevelsFilter, true);
+  registerEffect(25, SVGDropShadowEffect, true);
+  registerEffect(28, SVGMatte3Effect, false);
+  registerEffect(29, SVGGaussianBlurEffect, true);
+
+  return lottie;
+
+}));
diff --git a/build/player/lottie_svg.min.js b/build/player/lottie_svg.min.js
index 526f3a3..b7075ec 100644
--- a/build/player/lottie_svg.min.js
+++ b/build/player/lottie_svg.min.js
@@ -1,15 +1 @@
-(typeof navigator !== "undefined") && (function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define(function() {
-            return factory(root);
-        });
-    } else if (typeof module === "object" && module.exports) {
-        module.exports = factory(root);
-    } else {
-        root.lottie = factory(root);
-        root.bodymovin = root.lottie;
-    }
-}((window || {}), function(window) {
-	"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,_useWebWorker=!1,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bmRnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}roundValues(!1);var createElementID=(F=0,function(){return idPrefix+"__lottie_element_"+(F+=1)}),F;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function createNS(t){return document.createElementNS(svgNS,t)}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var getBlendMode=(Oa={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Oa[t]||""}),Oa,lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"},Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,f,m,c,u,d){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=u,this.props[15]=d,this}function u(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function d(t,e,r,i,s,a,n,o,h,l,p,f,m,c,u,d){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*u,y[15]*=d,this._identityCalculated=!1,this;var g=y[0],v=y[1],P=y[2],b=y[3],A=y[4],S=y[5],_=y[6],E=y[7],x=y[8],k=y[9],T=y[10],M=y[11],F=y[12],I=y[13],D=y[14],C=y[15];return y[0]=g*t+v*s+P*h+b*m,y[1]=g*e+v*a+P*l+b*c,y[2]=g*r+v*n+P*p+b*u,y[3]=g*i+v*o+P*f+b*d,y[4]=A*t+S*s+_*h+E*m,y[5]=A*e+S*a+_*l+E*c,y[6]=A*r+S*n+_*p+E*u,y[7]=A*i+S*o+_*f+E*d,y[8]=x*t+k*s+T*h+M*m,y[9]=x*e+k*a+T*l+M*c,y[10]=x*r+k*n+T*p+M*u,y[11]=x*i+k*o+T*f+M*d,y[12]=F*t+I*s+D*h+C*m,y[13]=F*e+I*a+D*l+C*c,y[14]=F*r+I*n+D*p+C*u,y[15]=F*i+I*o+D*f+C*d,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function P(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function b(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function A(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function S(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function _(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function E(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function x(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function k(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=x(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function M(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function F(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function I(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function D(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function C(){var t=this.props;return"matrix("+D(t[0])+","+D(t[1])+","+D(t[4])+","+D(t[5])+","+D(t[12])+","+D(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=u,this.transform=d,this.applyToPoint=b,this.applyToX=A,this.applyToY=S,this.applyToZ=_,this.applyToPointArray=M,this.applyToTriplePoints=T,this.applyToPointStringified=F,this.toCSS=I,this.to2dCSS=C,this.clone=v,this.cloneFromProps=P,this.equals=g,this.inversePoints=k,this.inversePoint=x,this.getInverseMatrix=E,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var l,p=this,f=256,m=6,c="random",u=h.pow(f,m),d=h.pow(2,52),y=2*d,g=f-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<f;)a[i]=i++;for(i=0;i<f;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*f+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function P(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function b(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return A(e)}function A(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=b(function t(e,r){var i,s=[],a=typeof e;if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,A(o)]:null===t?function(){try{if(l)return A(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),A(t)}catch(t){var e=p.navigator,r=e&&e.plugins;return[+new Date,p,r,p.screen,A(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(m),e=u,r=0;t<d;)t=(t+r)*f,e*=f,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,b(A(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&P(i,a),t.state=function(){return P(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},b(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function f(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function m(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:f(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<l;++r)this._mSampleValues[r]=f(r*p,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&i[a]<=t;++a)s+=p;var o=s+(t-i[--a])/(i[a+1]-i[a])*p,h=m(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=m(e,r,i);if(0===a)return e;e-=(f(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=f(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,r)}},t}();function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){var F=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var p=function(t,e,r,i){var s,a,n,o,h,l,p=defaultCurveSegments,f=0,m=[],c=[],u=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),u.percents[s]=h,u.lengths[s]=f}return u.addedLength=f,u};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var P,t=(P={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!P[s]){var a,n,o,h,l,p,f,m=defaultCurveSegments,c=0,u=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(m=2);var d=new g(m);for(o=r.length,a=0;a<m;a+=1){for(f=createSizedArray(o),l=a/(m-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+r[n])+3*(1-l)*bmPow(l,2)*(e[n]+i[n])+bmPow(l,3)*e[n],f[n]=h,null!==u&&(p+=bmPow(f[n]-u[n],2));c+=p=bmSqrt(p),d.points[a]=new v(p,f),u=f}d.segmentLength=c,P[s]=d}return P[s]});function I(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var D=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),r.totalLength=l,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=I(s,n),l=I(a=1<a?1:a,n),p=t.length,f=1-h,m=1-l,c=f*f*f,u=h*f*f*3,d=h*h*f*3,y=h*h*h,g=f*f*m,v=h*f*m+f*h*m+f*f*l,P=h*h*m+f*h*l+h*f*l,b=h*h*l,A=f*m*m,S=h*m*m+f*l*m+f*m*l,_=h*l*m+f*l*l+h*m*l,E=h*l*l,x=m*m*m,k=l*m*m+m*l*m+m*m*l,T=l*l*m+m*l*l+l*m*l,M=l*l*l;for(o=0;o<p;o+=1)D[4*o]=F.round(1e3*(c*t[o]+u*r[o]+d*i[o]+y*e[o]))/1e3,D[4*o+1]=F.round(1e3*(g*t[o]+v*r[o]+P*i[o]+b*e[o]))/1e3,D[4*o+2]=F.round(1e3*(A*t[o]+S*r[o]+_*i[o]+E*e[o]))/1e3,D[4*o+3]=F.round(1e3*(x*t[o]+k*r[o]+T*i[o]+M*e[o]))/1e3;return D},getPointInSegment:function(t,e,r,i,s,a){var n=I(s,a),o=1-n;return[F.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,F.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var l,p=F.sqrt(F.pow(i-t,2)+F.pow(s-e,2)+F.pow(a-r,2)),f=F.sqrt(F.pow(n-t,2)+F.pow(o-e,2)+F.pow(h-r,2)),m=F.sqrt(F.pow(n-i,2)+F.pow(o-s,2)+F.pow(h-a,2));return-1e-4<(l=f<p?m<p?p-f-m:m-f-p:f<m?m-f-p:f-p-m)&&l<1e-4}}}!function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-s)),i=setTimeout(function(){t(e+r)},r);return s=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&_useWebWorker){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function f(t,e){var r,i,s,a,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var p=r.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)u(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&u(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&u(p[s].pt.k[n].e[0])}0===r.ty?(r.layers=m(r.refId,e),f(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0!==(h=r).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function m(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}return null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)u(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&u(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&u(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function u(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var h,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,r,i,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(a=t.chars[e].data.shapes[0].it).length,r=0;r<i;r+=1)(s=a[r].ks.k).__converted||(u(a[r].ks.k),s.__converted=!0)}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),s=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,4,18];function l(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(s(t),e(t),r(t),i(t),a(t),f(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=s,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=a,t.completeLayers=f,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}();function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}var FontManager=function(){var a={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function m(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=m(i[r].fFamily,"monospace"),i[r].sansCase=m(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.setAttribute("f-family",i[r].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(l)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.type="text/css",p.rel="stylesheet",p.href=i[r].fPath,document.body.appendChild(p)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var f=createTag("link");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[r].fPath),e.appendChild(f)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),PropertyFactory=function(){var f=initialDefaultFrame,s=Math.abs;function m(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,u=c,d=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[u],a=this.keyframes[u+1],u===d-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=u;break}u<d-1?u+=1:(c=0,y=!1)}n=this.keyframesMetadata[u]||{};var g,v,P,b,A,S,_,E,x,k,T=a.t-i,M=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var F=n.bezierData;if(T<=t||t<M){var I=T<=t?F.points.length-1:0;for(h=F.points[I].point.length,o=0;o<h;o+=1)r[o]=F.points[I].point[o]}else{n.__fnct?m=n.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=m),l=m((t-M)/(T-M));var D,C=F.segmentLength*l,w=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastPoint:0,y=!0,p=F.points.length;y;){if(w+=F.points[f].partialLength,0===C||0===l||f===F.points.length-1){for(h=F.points[f].point.length,o=0;o<h;o+=1)r[o]=F.points[f].point[o];break}if(w<=C&&C<w+F.points[f+1].partialLength){for(D=(C-w)/F.points[f+1].partialLength,h=F.points[f].point.length,o=0;o<h;o+=1)r[o]=F.points[f].point[o]+(F.points[f+1].point[o]-F.points[f].point[o])*D;break}f<p-1?f+=1:y=!1}e._lastPoint=f,e._lastAddedLength=w-F.points[f].partialLength,e._lastKeyframeIndex=u}}else{var V,R,L,G,N;if(d=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(T<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=M)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var B=O(s.s),z=O(g);v=r,P=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],u=e[1],d=e[2],y=e[3];(s=l*c+p*u+f*d+m*y)<0&&(s=-s,c=-c,u=-u,d=-d,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*l+o*c,h[1]=n*p+o*u,h[2]=n*f+o*d,h[3]=n*m+o*y,h}(B,z,(t-M)/(T-M)),b=P[0],A=P[1],S=P[2],_=P[3],E=Math.atan2(2*A*_-2*b*S,1-2*A*A-2*S*S),x=Math.asin(2*b*A+2*S*_),k=Math.atan2(2*b*_-2*A*S,1-2*b*b-2*S*S),v[0]=E/degToRads,v[1]=x/degToRads,v[2]=k/degToRads}else for(u=0;u<d;u+=1)1!==s.h&&(l=T<=t?1:t<M?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[u]?m=n.__fnct[u]:(V=void 0===s.o.x[u]?s.o.x[0]:s.o.x[u],R=void 0===s.o.y[u]?s.o.y[0]:s.o.y[u],L=void 0===s.i.x[u]?s.i.x[0]:s.i.x[u],G=void 0===s.i.y[u]?s.i.y[0]:s.i.y[u],m=BezierFactory.getBezierEasing(V,R,L,G).get,n.__fnct[u]=m)):n.__fnct?m=n.__fnct:(V=s.o.x,R=s.o.y,L=s.i.x,G=s.i.y,m=BezierFactory.getBezierEasing(V,R,L,G).get,s.keyframeMetadata=m),m((t-M)/(T-M)))),g=a.s||s.e,N=1===s.h?s.s[u]:s.s[u]+(g[u]-s.s[u])*l,"multidimensional"===this.propType?r[u]=N:r=N}return e.lastIndex=c,r}function O(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function u(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function d(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=d,this.setVValue=u,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=d,this.setVValue=u,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=d,this.setVValue=u,this.interpolateValue=m,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=d,this.setVValue=u,this.interpolateValue=m,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=f,this.pv[s]=f;this._caching={lastFrame:f,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new l(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var u,d,y,g=m,v=c.length-1,P=!0;P&&(u=c[g],!((d=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:P=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===u.h)){if(t>=d.t-this.offsetTime)p=1;else if(t<u.t-this.offsetTime)p=0;else{var b;y.__fnct?b=y.__fnct:(b=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,y.__fnct=b),p=b((t-(u.t-this.offsetTime))/(d.t-this.offsetTime-(u.t-this.offsetTime)))}s=d.s?d.s[0]:u.e[0]}i=u.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var u=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?l:p,i=n?f:m;var d=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===d&&0===y?0:y/Math.sqrt(d*d+y*y),v=0===d&&0===y?0:-d/Math.sqrt(d*d+y*y);d+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(d,y,d-g*i*r*u,y-v*i*r*u,d+g*i*r*u,y+v*i*r*u,t,!0),n=!n,c+=a*u}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var f={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new p(t,e):6===r?i=new h(t,e):7===r&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return f}(),ShapeModifiers=(tt={},ut={},tt.registerModifier=function(t,e){ut[t]||(ut[t]=e)},tt.getModifier=function(t,e,r){return new ut[t](e,r)},tt),tt,ut;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var u,d,y=[];for(s=0;s<m;s+=1)if((u=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=u.shape.paths)._length,f=0,!u.shape._mdf&&u.pathsData.length)f=u.totalShapeLength;else{for(l=this.releasePathsData(u.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;u.totalShapeLength=f,u.pathsData=l}c+=f,u.shape._mdf=!0}else u.shape.paths=u.localShapeCollection;var g,v=e,P=r,b=0;for(s=m-1;0<=s;s-=1)if((u=this.shapes[s]).shape._mdf){for((d=u.localShapeCollection).releaseShapes(),2===this.m&&1<m?(g=this.calculateShapeEdges(e,r,u.totalShapeLength,b,c),b+=u.totalShapeLength):g=[[v,P]],h=g.length,o=0;o<h;o+=1){v=g[o][0],P=g[o][1],y.length=0,P<=1?y.push({s:u.totalShapeLength*v,e:u.totalShapeLength*P}):1<=v?y.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(P-1)}):(y.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),y.push({s:0,e:u.totalShapeLength*(P-1)}));var A=this.addShapes(u,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var S=A.pop();this.addPaths(A,d),A=this.addShapes(u,y[1],S)}else this.addPaths(A,d),A=this.addShapes(u,y[1]);this.addPaths(A,d)}}u.shape.paths=d}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,u=0,d=[],y=!0;for(p=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),d.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,a=m[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(u+(n=h[s-1]).addedLength<e.s)u+=n.addedLength,r.c=!1;else{if(u>e.e){r.c=!1;break}e.s<=u&&e.e>=u+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-u)/n.addedLength,(e.e-u)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),u+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],u<=e.e){var g=h[s-1].addedLength;e.s<=u&&e.e>=u+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-u)/g,(e.e-u)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;u+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),u>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,d.push(r),o=0)}return d},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,f,m,c,u,d,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=u=s[0]+(o[0]-s[0])*l,f=d=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,u,d,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,u=p-(p-s[0])*roundCorner,d=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,u,d,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,f=t.i[a][1]+(i[1]-t.i[a][1])*-r,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,u=0<m?Math.floor(m):Math.ceil(m),d=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,P,b=0;if(0<m){for(;b<u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),b+=c)}else if(m<0){for(;u<b;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),b-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(P=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),v=0;v<P;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<P;v+=1)r[v]=this.matrix.props[v];b+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}(),featureSupport=(My={maskType:!0},(/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))&&(My.maskType=!1),My),My,filtersFactory=(Ny={},Ny.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},Ny.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},Ny),Ny;function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,f,m,c,u,d,y,g,v,P,b,A=this._moreOptions.alignment.v,S=this._animatorsData,_=this._textData,E=this.mHelper,x=this._renderType,k=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var M,F=b.v;for(this._pathData.r.v&&(F=F.reverse()),n={tLength:0,segments:[]},a=F._length-1,s=g=0;s<a;s+=1)M=bez.buildBezierData(F.v[s],F.v[s+1],[F.o[s][0]-F.v[s][0],F.o[s][1]-F.v[s][1]],[F.i[s+1][0]-F.v[s+1][0],F.i[s+1][1]-F.v[s+1][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength;s=a,b.v.c&&(M=bez.buildBezierData(F.v[s],F.v[0],[F.o[s][0]-F.v[s][0],F.o[s][1]-F.v[s][1]],[F.i[0][0]-F.v[0][0],F.i[0][1]-F.v[0][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=1,p=!(l=m=0),d=n.segments,o<0&&b.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(u=d[m=d.length-1].points).length-1;o<0;)o+=u[f].partialLength,(f-=1)<0&&(f=(u=d[m-=1].points).length-1);c=(u=d[m].points)[f-1],y=(h=u[f]).partialLength}a=T.length,i=r=0;var I,D,C,w,V,R=1.2*t.finalSize*.714,L=!0;C=S.length;var G,N,B,z,O,j,q,H,W,X,Y,$,K=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(D=0;D<C;D+=1)(I=S[D].a).t.propType&&(nt&&2===t.j&&(it+=I.t.v*st),(V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars)).length?rt+=I.t.v*V[0]*st:rt+=I.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(E.reset(),z=1,T[s].n)r=0,i+=t.yOffset,i+=L?1:0,o=J,L=!1,this._hasMaskedPath&&(f=U,c=(u=d[m=Z].points)[f-1],y=(h=u[f]).partialLength,l=0),$=W=Y=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}K!==T[s].ind&&(T[K]&&(o+=T[K].extra),o+=T[s].an/2,K=T[s].ind),o+=A[0]*T[s].an*.005;var ot=0;for(D=0;D<C;D+=1)(I=S[D].a).p.propType&&((V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars)).length?ot+=I.p.v[0]*V[0]:ot+=I.p.v[0]*V),I.a.propType&&((V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars)).length?ot+=I.a.v[0]*V[0]:ot+=I.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!u?(v=(o+ot-l)/h.partialLength,N=c.point[0]+(h.point[0]-c.point[0])*v,B=c.point[1]+(h.point[1]-c.point[1])*v,E.translate(-A[0]*T[s].an*.005,-A[1]*R*.01),p=!1):u&&(l+=h.partialLength,(f+=1)>=u.length&&(f=0,u=d[m+=1]?d[m].points:b.v.c?d[m=f=0].points:(l-=h.partialLength,null)),u&&(c=h,y=(h=u[f]).partialLength));G=T[s].an/2-T[s].add,E.translate(-G,0,0)}else G=T[s].an/2-T[s].add,E.translate(-G,0,0),E.translate(-A[0]*T[s].an*.005,-A[1]*R*.01,0);for(D=0;D<C;D+=1)(I=S[D].a).t.propType&&(V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=I.t.v*V[0]:o+=I.t.v*V:V.length?r+=I.t.v*V[0]:r+=I.t.v*V));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(q=[t.fc[0],t.fc[1],t.fc[2]]),D=0;D<C;D+=1)(I=S[D].a).a.propType&&((V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars)).length?E.translate(-I.a.v[0]*V[0],-I.a.v[1]*V[1],I.a.v[2]*V[2]):E.translate(-I.a.v[0]*V,-I.a.v[1]*V,I.a.v[2]*V));for(D=0;D<C;D+=1)(I=S[D].a).s.propType&&((V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars)).length?E.scale(1+(I.s.v[0]-1)*V[0],1+(I.s.v[1]-1)*V[1],1):E.scale(1+(I.s.v[0]-1)*V,1+(I.s.v[1]-1)*V,1));for(D=0;D<C;D+=1){if(I=S[D].a,V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars),I.sk.propType&&(V.length?E.skewFromAxis(-I.sk.v*V[0],I.sa.v*V[1]):E.skewFromAxis(-I.sk.v*V,I.sa.v*V)),I.r.propType&&(V.length?E.rotateZ(-I.r.v*V[2]):E.rotateZ(-I.r.v*V)),I.ry.propType&&(V.length?E.rotateY(I.ry.v*V[1]):E.rotateY(I.ry.v*V)),I.rx.propType&&(V.length?E.rotateX(I.rx.v*V[0]):E.rotateX(I.rx.v*V)),I.o.propType&&(V.length?z+=(I.o.v*V[0]-z)*V[0]:z+=(I.o.v*V-z)*V),t.strokeWidthAnim&&I.sw.propType&&(V.length?j+=I.sw.v*V[0]:j+=I.sw.v*V),t.strokeColorAnim&&I.sc.propType)for(H=0;H<3;H+=1)V.length?O[H]+=(I.sc.v[H]-O[H])*V[0]:O[H]+=(I.sc.v[H]-O[H])*V;if(t.fillColorAnim&&t.fc){if(I.fc.propType)for(H=0;H<3;H+=1)V.length?q[H]+=(I.fc.v[H]-q[H])*V[0]:q[H]+=(I.fc.v[H]-q[H])*V;I.fh.propType&&(q=V.length?addHueToRGB(q,I.fh.v*V[0]):addHueToRGB(q,I.fh.v*V)),I.fs.propType&&(q=V.length?addSaturationToRGB(q,I.fs.v*V[0]):addSaturationToRGB(q,I.fs.v*V)),I.fb.propType&&(q=V.length?addBrightnessToRGB(q,I.fb.v*V[0]):addBrightnessToRGB(q,I.fb.v*V))}}for(D=0;D<C;D+=1)(I=S[D].a).p.propType&&(V=S[D].s.getMult(T[s].anIndexes[D],_.a[D].s.totalChars),this._hasMaskedPath?V.length?E.translate(0,I.p.v[1]*V[0],-I.p.v[2]*V[1]):E.translate(0,I.p.v[1]*V,-I.p.v[2]*V):V.length?E.translate(I.p.v[0]*V[0],I.p.v[1]*V[1],-I.p.v[2]*V[2]):E.translate(I.p.v[0]*V,I.p.v[1]*V,-I.p.v[2]*V));if(t.strokeWidthAnim&&(W=j<0?0:j),t.strokeColorAnim&&(X="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*q[0])+","+Math.round(255*q[1])+","+Math.round(255*q[2])+")"),this._hasMaskedPath){if(E.translate(0,-t.ls),E.translate(0,A[1]*R*.01+i,0),this._pathData.p.v){P=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(P)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),E.rotate(-ht*Math.PI/180)}E.translate(N,B,0),o-=A[0]*T[s].an*.005,T[s+1]&&K!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(E.translate(r,i,0),t.ps&&E.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:E.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:E.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}E.translate(0,-t.ls),E.translate(G,0,0),E.translate(A[0]*T[s].an*.005,A[1]*R*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===x?tt=E.toCSS():"svg"===x?tt=E.to2dCSS():et=[E.props[0],E.props[1],E.props[2],E.props[3],E.props[4],E.props[5],E.props[6],E.props[7],E.props[8],E.props[9],E.props[10],E.props[11],E.props[12],E.props[13],E.props[14],E.props[15]],$=z}this.lettersChangedFlag=k<=s?(w=new LetterProps($,W,X,Y,tt,et),this.renderedLetters.push(w),k+=1,!0):(w=this.renderedLetters[s]).update($,W,X,Y,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,u=0,d=0,y=[],g=0,v=0,P=h.getFontByName(t.f),b=0,A=getFontProperties(P);t.fWeight=A.weight,t.fStyle=A.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var S,_=t.tr/1e3*t.finalSize;if(t.sz)for(var E,x,k=!0,T=t.sz[0],M=t.sz[1];k;){g=E=0,r=(x=this.buildFinalText(t.t)).length,_=t.tr/1e3*t.finalSize;var F=-1;for(e=0;e<r;e+=1)S=x[e].charCodeAt(0),i=!1," "===x[e]?F=e:13!==S&&3!==S||(i=!(g=0),E+=t.finalLineHeight||1.2*t.finalSize),T<g+(b=h.chars?(o=h.getCharData(x[e],P.fStyle,P.fFamily),i?0:o.w*t.finalSize/100):h.measureText(x[e],t.f,t.finalSize))&&" "!==x[e]?(-1===F?r+=1:e=F,E+=t.finalLineHeight||1.2*t.finalSize,x.splice(e,F===e?1:0,"\r"),F=-1,g=0):(g+=b,g+=_);E+=P.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&M<E?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=x,r=t.finalText.length,k=!1)}g=-_;var I,D=b=0;for(e=0;e<r;e+=1)if(i=!1,13===(S=(I=t.finalText[e]).charCodeAt(0))||3===S?(D=0,y.push(g),v=v<g?g:v,g=-2*_,i=!(s=""),d+=1):s=I,b=h.chars?(o=h.getCharData(I,P.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===I?D+=b+_:(g+=b+_+D,D=0),p.push({l:b,an:b,add:c,n:i,anIndexes:[],val:s,line:d,animatorJustifyOffset:0}),2==m){if(c+=b,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=b);u<=e;)p[u].an=c,p[u].ind=f,p[u].extra=b,u+=1;f+=1,c=0}}else if(3==m){if(c+=b,""===s||e===r-1){for(""===s&&(c-=b);u<=e;)p[u].an=c,p[u].ind=f,p[u].extra=b,u+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var C,w,V,R,L=l.a;n=L.length;var G=[];for(a=0;a<n;a+=1){for((C=L[a]).a.sc&&(t.strokeColorAnim=!0),C.a.sw&&(t.strokeWidthAnim=!0),(C.a.fc||C.a.fh||C.a.fs||C.a.fb)&&(t.fillColorAnim=!0),R=0,V=C.s.b,e=0;e<r;e+=1)(w=p[e]).anIndexes[a]=R,(1==V&&""!==w.val||2==V&&""!==w.val&&" "!==w.val||3==V&&(w.n||" "==w.val||e==r-1)||4==V&&(w.n||e==r-1))&&(1===C.s.rn&&G.push(R),R+=1);l.a[a].s.totalChars=R;var N,B=-1;if(1===C.s.rn)for(e=0;e<r;e+=1)B!=(w=p[e]).anIndexes[a]&&(B=w.anIndexes[a],N=G.splice(Math.floor(Math.random()*G.length),1)[0]),w.anIndexes[a]=N}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=P.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var d=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:d(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-d(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=d(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,f=-p/2+(t=y(d(0,t+.5-o),h-o)),m=p/2;n=Math.sqrt(1-f*f/(m*m))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(d(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=d(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var u=.5-.5*c;n<u?n=0:1<(n=(n-u)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}(),poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},pointPool=poolFactory(8,function(){return createTypedArray("float32",2)}),shapePool=(NC=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),NC.clone=function(t){var e,r=NC.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},NC),NC,shapeCollectionPool=(VC={newShapeCollection:function(){var t;t=WC?YC[WC-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,WC===XC&&(YC=pooling.double(YC),XC*=2);YC[WC]=t,WC+=1}},WC=0,XC=4,YC=createSizedArray(XC),VC),VC,WC,XC,YC,segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}),bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}),markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}();function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,u=0,d=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==u?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),d.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var P;if(u+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),P=createElementID(),(p=createNS("filter")).setAttribute("id",P),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):m=f=null,this.storedData[i]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:P,lastRadius:0},"i"===c[i].mode){h=d.length;var b=createNS("g");for(o=0;o<h;o+=1)b.appendChild(d[o]);var A=createNS("mask");A.setAttribute("mask-type","alpha"),A.setAttribute("id",y+"_"+u),A.appendChild(s),a.appendChild(A),b.setAttribute("mask","url("+locationHref+"#"+y+"_"+u+")"),d.length=0,d.push(b)}else d.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=d.length,i=0;i<n;i+=1)this.maskElement.appendChild(d[i]);0<u&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+locationHref+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+locationHref+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function r(t,e,r){var i,s,a,n,o,h,l,p,f,m,c,u=e.styles.length,d=e.lvl;for(h=0;h<u;h+=1){if(n=e.sh._mdf||r,e.styles[h].lvl<d){for(p=g.reset(),m=d-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<m;)n=e.transformers[c].mProps._mdf||n,m-=1,c-=1;if(n)for(m=d-e.styles[h].lvl,c=e.transformers.length-1;0<m;)f=e.transformers[c].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m-=1,c-=1}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",i=0;i<s;i+=1)(o=l.shapes[i])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function i(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function s(t,e,r){a(t,e,r),n(t,e,r)}function a(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",u="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(u,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(u,p[1]))}if(e.g._cmdf||r){i=e.cst;var d=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",d[4*s]+"%"),n.setAttribute("stop-color","rgb("+d[4*s+1]+","+d[4*s+2]+","+d[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var P=o*v,b=Math.cos(g+e.a.v)*P+p[0],A=Math.sin(g+e.a.v)*P+p[1];h.setAttribute("fx",b),h.setAttribute("fy",A),l&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",A))}}function n(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return i;case"gf":return a;case"gs":return s;case"st":return n;case"sh":case"el":case"rc":case"sr":return r;case"tr":return e;default:return null}}}}();function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function BaseElement(){}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,r){this.initElement(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e,r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l,p=this.mHelper,f="",m=this.data.singleShape,c=0,u=0,d=!0,y=.001*r.tr*r.finalSize;if(!m||h||r.sz){var g,v,P=this.textSpans.length;for(t=0;t<e;t+=1)h&&m&&0!==t||(n=t<P?this.textSpans[t]:createNS(h?"path":"text"),P<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(r.finalSize/100,r.finalSize/100),m&&(o[t].n&&(c=-y,u+=r.yOffset,u+=d?1:0,d=!1),this.applyTextPropertiesToMatrix(r,p,o[t].line,c,u),c+=o[t].l||0,c+=y),h?(l=(g=(v=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily))&&v.data||{}).shapes?g.shapes[0].it:[],m?f+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(m&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));m&&n&&n.setAttribute("d",f)}else{var b=this.textContainer,A="start";switch(r.j){case 1:A="end";break;case 2:A="middle";break;default:A="start"}b.setAttribute("text-anchor",A),b.setAttribute("letter-spacing",y);var S=this.buildTextContents(r.finalText);for(e=S.length,u=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||createNS("tspan")).textContent=S[t],n.setAttribute("x",0),n.setAttribute("y",u),n.style.display="inherit",b.appendChild(n),this.textSpans[t]=n,u+=r.finalLineHeight;this.layerElement.appendChild(b)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(r=s[t],i=this.textSpans[t],r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+locationHref+"#"+r.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,f,m,c=[].concat(a),u=t.length-1,d=[],y=[];for(o=u;0<=o;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),d.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),(e[o]=f).init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(u=d.length,o=0;o<u;o+=1)d[o].closed=!0;for(u=y.length,o=0;o<u;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+locationHref+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:l<=a?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=r).matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1)r=null,20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r);n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+locationHref+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return m(i,t),i.setData(t,e),i}function p(){n+=1,u()}function f(){n-=1}function m(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",p),t.addEventListener("_idle",f),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function u(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),l(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,u()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(yR={},yR.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},yR),yR;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=typeof t,i=typeof e;if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=typeof t,i=typeof e;if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var l=n-o;switch(r=.5<h?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),u=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*u+c[a];return o}return(m-f)*u+c}if("continue"===t){var d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(d.length)).length,a=0;a<n;a+=1)o[a]=d[a]+(d[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return d+(h-p)/.001*(d-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),u=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*u;return o}return c-(m-f)*u}if("continue"===t){var d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(d.length)).length,a=0;a<n;a+=1)o[a]=d[a]+(d[a]-y[a])*(p-h)/.001;return o}return d+(d-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var u=this.p.getValueAtTime(t);e.translate(u[0]*this.p.mult,u[1]*this.p.mult,-u[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null};var ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(f(t[i],e[i],r)):"tm"===t[i].ty?s.push(m(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(u(t[i],e[i],r)):"sr"===t[i].ty?s.push(d(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(l(t[i],e[i],r)):s.push(p(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(){return function(){return null}}function f(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function m(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function f(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function m(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=p,i.applyPoint=l,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=f,i.sampleImage=m,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),FootageInterface=(k_=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"==typeof(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"==typeof(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=k_(t),e}),k_,CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function l(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(p(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function p(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(l(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TextExpressionSelectorPropFactory=function(){function r(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=r,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}TextSelectorProp.getTextSelectorProp=function(t,e,r){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,r):propertyGetTextProp(t,e,r)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}};var lottie={};function setLocationHref(t){locationHref=t}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){subframeEnabled=t}function setIDPrefix(t){idPrefix=t}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;default:case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocationHref,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=function(t){_useWebWorker=t},lottie.setIDPrefix=setIDPrefix,lottie.__getFactory=getFactory,lottie.version="5.8.1";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);
-return lottie;
-}));
\ No newline at end of file
+"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,a=t.length;for(r=0;r<a;r+=1)for(var s in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,s)&&(e.prototype[s]=i[s])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(t,e){var r,i=0,a=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)a.push(r);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,r){return"float32"===e?new Float32Array(r):"int16"===e?new Int16Array(r):"uint8c"===e?new Uint8ClampedArray(r):t(e,r)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,idPrefix="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,r){var i,a,s,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,a=p,s=h;break;case 1:i=l,a=r,s=h;break;case 2:i=h,a=r,s=p;break;case 3:i=h,a=l,s=r;break;case 4:i=p,a=h,s=r;break;case 5:i=r,a=h,s=l}return[i,a,s]}function RGBtoHSV(t,e,r){var i,a=Math.max(t,e,r),s=Math.min(t,e,r),n=a-s,o=0===a?0:n/a,h=a/255;switch(a){case s:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix=t},getIdPrefix=function(){return idPrefix};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,r=1,i=[],a={onmessage:function(){},postMessage:function(e){t({data:e})}},s={postMessage:function(t){a.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(r);return new Worker(i)}return t=e,a}((function(t){if(s.dataManager||(s.dataManager=function(){function t(a,s){var n,o,h,l,p,m,c=a.length;for(o=0;o<c;o+=1)if("ks"in(n=a[o])&&!n.completed){if(n.completed=!0,n.tt&&(a[o-1].td=n.tt),n.hasMask){var u=n.masksProperties;for(l=u.length,h=0;h<l;h+=1)if(u[h].pt.k.i)i(u[h].pt.k);else for(m=u[h].pt.k.length,p=0;p<m;p+=1)u[h].pt.k[p].s&&i(u[h].pt.k[p].s[0]),u[h].pt.k[p].e&&i(u[h].pt.k[p].e[0])}0===n.ty?(n.layers=e(n.refId,s),t(n.layers,s)):4===n.ty?r(n.shapes):5===n.ty&&f(n)}}function e(t,e){var r=function(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r];r+=1}return null}(t,e);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(t){var e,a,s;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(s=t[e].ks.k.length,a=0;a<s;a+=1)t[e].ks.k[a].s&&i(t[e].ks.k[a].s[0]),t[e].ks.k[a].e&&i(t[e].ks.k[a].e[0]);else"gr"===t[e].ty&&r(t[e].it)}function i(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function a(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var s,n=function(){var t=[4,4,14];function e(t){var e,r,i,a=t.length;for(e=0;e<a;e+=1)5===t[e].ty&&(i=void 0,i=(r=t[e]).t.d,r.t.d={k:[{s:i,t:0}]})}return function(r){if(a(t,r.v)&&(e(r.layers),r.assets)){var i,s=r.assets.length;for(i=0;i<s;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),o=(s=[4,7,99],function(t){if(t.chars&&!a(s,t.v)){var e,i=t.chars.length;for(e=0;e<i;e+=1){var n=t.chars[e];n.data&&n.data.shapes&&(r(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),h=function(){var t=[5,7,15];function e(t){var e,r,i=t.length;for(e=0;e<i;e+=1)5===t[e].ty&&(r=void 0,"number"==typeof(r=t[e].t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(r){if(a(t,r.v)&&(e(r.layers),r.assets)){var i,s=r.assets.length;for(i=0;i<s;i+=1)r.assets[i].layers&&e(r.assets[i].layers)}}}(),l=function(){var t=[4,1,9];function e(t){var r,i,a,s=t.length;for(r=0;r<s;r+=1)if("gr"===t[r].ty)e(t[r].it);else if("fl"===t[r].ty||"st"===t[r].ty)if(t[r].c.k&&t[r].c.k[0].i)for(a=t[r].c.k.length,i=0;i<a;i+=1)t[r].c.k[i].s&&(t[r].c.k[i].s[0]/=255,t[r].c.k[i].s[1]/=255,t[r].c.k[i].s[2]/=255,t[r].c.k[i].s[3]/=255),t[r].c.k[i].e&&(t[r].c.k[i].e[0]/=255,t[r].c.k[i].e[1]/=255,t[r].c.k[i].e[2]/=255,t[r].c.k[i].e[3]/=255);else t[r].c.k[0]/=255,t[r].c.k[1]/=255,t[r].c.k[2]/=255,t[r].c.k[3]/=255}function r(t){var r,i=t.length;for(r=0;r<i;r+=1)4===t[r].ty&&e(t[r].shapes)}return function(e){if(a(t,e.v)&&(r(e.layers),e.assets)){var i,s=e.assets.length;for(i=0;i<s;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}(),p=function(){var t=[4,4,18];function e(t){var r,i,a;for(r=t.length-1;r>=0;r-=1)if("sh"===t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(a=t[r].ks.k.length,i=0;i<a;i+=1)t[r].ks.k[i].s&&(t[r].ks.k[i].s[0].c=t[r].closed),t[r].ks.k[i].e&&(t[r].ks.k[i].e[0].c=t[r].closed);else"gr"===t[r].ty&&e(t[r].it)}function r(t){var r,i,a,s,n,o,h=t.length;for(i=0;i<h;i+=1){if((r=t[i]).hasMask){var l=r.masksProperties;for(s=l.length,a=0;a<s;a+=1)if(l[a].pt.k.i)l[a].pt.k.c=l[a].cl;else for(o=l[a].pt.k.length,n=0;n<o;n+=1)l[a].pt.k[n].s&&(l[a].pt.k[n].s[0].c=l[a].cl),l[a].pt.k[n].e&&(l[a].pt.k[n].e[0].c=l[a].cl)}4===r.ty&&e(r.shapes)}}return function(e){if(a(t,e.v)&&(r(e.layers),e.assets)){var i,s=e.assets.length;for(i=0;i<s;i+=1)e.assets[i].layers&&r(e.assets[i].layers)}}}();function f(t){0===t.t.a.length&&t.t.p}var m={completeData:function(r){r.__complete||(l(r),n(r),o(r),h(r),p(r),t(r.layers,r.assets),function(r,i){if(r){var a=0,s=r.length;for(a=0;a<s;a+=1)1===r[a].t&&(r[a].data.layers=e(r[a].data.refId,i),t(r[a].data.layers,i))}}(r.chars,r.assets),r.__complete=!0)}};return m.checkColors=l,m.checkChars=o,m.checkPathProperties=h,m.checkShapes=p,m.completeLayers=t,m}()),s.assetLoader||(s.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,i,a){var s,n=new XMLHttpRequest;try{n.responseType="json"}catch(t){}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status)s=t(n),i(s);else try{s=t(n),i(s)}catch(t){a&&a(t)}};try{n.open("GET",e,!0)}catch(t){n.open("GET",r+"/"+e,!0)}n.send()}}}()),"loadAnimation"===t.data.type)s.assetLoader.load(t.data.path,t.data.fullPath,(function(e){s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){s.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&s.assetLoader.load(t.data.path,t.data.fullPath,(function(e){s.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){s.postMessage({id:t.data.id,status:"error"})}))})),e.onmessage=function(t){var e=t.data,r=e.id,a=i[r];i[r]=null,"success"===e.status?a.onComplete(e.payload):a.onError&&a.onError()})}function o(t,e){var a="processId_"+(r+=1);return i[a]={onComplete:t,onError:e},a}return{loadAnimation:function(t,r,i){n();var a=o(r,i);e.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:a})},loadData:function(t,r,i){n();var a=o(r,i);e.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:a})},completeAnimation:function(t,r,i){n();var a=o(r,i);e.postMessage({type:"complete",animation:t,id:a})}}}(),ImagePreloader=function(){var t=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,r){var i="";if(t.e)i=t.p;else if(e){var a=t.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),i=e+a}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function a(t){var e=0,r=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}function s(t){var e={assetData:t},r=i(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=s.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var r=i(e,this.assetsPath,this.path),a=createTag("img");a.crossOrigin="anonymous",a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){s.img=t,this._imageLoaded()}.bind(this),!1),a.src=r;var s={img:a,assetData:e};return s},createImageData:function(e){var r=i(e,this.assetsPath,this.path),a=createNS("image");isSafari?this.testImageLoaded(a):a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){s.img=t,this._imageLoaded()}.bind(this),!1),a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(a):this._elementHelper.appendChild(a);var s={img:a,assetData:e};return s},imageLoaded:e,footageLoaded:r,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},n}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(t){for(var e,r=t.split("\r\n"),i={},a=0,s=0;s<r.length;s+=1)2===(e=r[s].split(":")).length&&(i[e[0]]=e[1].trim(),a+=1);if(0===a)throw new Error;return i}return function(e){for(var r=[],i=0;i<e.length;i+=1){var a=e[i],s={time:a.tm,duration:a.dr};try{s.payload=JSON.parse(e[i].cm)}catch(r){try{s.payload=t(e[i].cm)}catch(t){s.payload={name:e[i]}}}r.push(s)}return r}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===a?r.loop=!1:"true"===a?r.loop=!0:""!==a&&(r.loop=parseInt(a,10));var s=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==s,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,a=i.length,s=t.layers,n=s.length;for(r=0;r<n;r+=1)for(e=0;e<a;){if(i[e].id===s[r].id){i[e]=s[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,i=0,a=0,s=!0,n=!1;function o(t){for(var r=0,a=t.target;r<i;)e[r].animation===a&&(e.splice(r,1),r-=1,i-=1,a.isPaused||p()),r+=1}function h(t,r){if(!t)return null;for(var a=0;a<i;){if(e[a].elem===t&&null!==e[a].elem)return e[a].animation;a+=1}var s=new AnimationItem;return f(s,t),s.setData(t,r),s}function l(){a+=1,u()}function p(){a-=1}function f(t,r){t.addEventListener("destroy",o),t.addEventListener("_active",l),t.addEventListener("_idle",p),e.push({elem:r,animation:t}),i+=1}function m(t){var o,h=t-r;for(o=0;o<i;o+=1)e[o].animation.advanceTime(h);r=t,a&&!n?window.requestAnimationFrame(m):s=!0}function c(t){r=t,window.requestAnimationFrame(m)}function u(){!n&&a&&s&&(window.requestAnimationFrame(c),s=!1)}return t.registerAnimation=h,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,r){var a;for(a=0;a<i;a+=1)e[a].animation.setSpeed(t,r)},t.setDirection=function(t,r){var a;for(a=0;a<i;a+=1)e[a].animation.setDirection(t,r)},t.play=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.play(t)},t.pause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.pause(t)},t.stop=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.stop(t)},t.togglePause=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),s=a.length;for(i=0;i<s;i+=1)r&&a[i].setAttribute("data-bm-type",r),h(a[i],t);if(e&&0===s){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),h(o,t)}},t.resize=function(){var t;for(t=0;t<i;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,r,a){var s;for(s=0;s<i;s+=1)e[s].animation.goToAndStop(t,r,a)},t.destroy=function(t){var r;for(r=i-1;r>=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,u()},t.setVolume=function(t,r){var a;for(a=0;a<i;a+=1)e[a].animation.setVolume(t,r)},t.mute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.mute(t)},t.unmute=function(t){var r;for(r=0;r<i;r+=1)e[r].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,r=e.length,i=[];for(t=0;t<r;t+=1)i.push(e[t].animation);return i},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,r,i,a,s){var n=s||("bez_"+t+"_"+r+"_"+i+"_"+a).replace(/\./g,"p");if(e[n])return e[n];var o=new l([t,r,i,a]);return e[n]=o,o}},e={};var r=.1,i="function"==typeof Float32Array;function a(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,e,r){return((a(e,r)*t+s(e,r))*t+n(e))*t}function h(t,e,r){return 3*a(e,r)*t*t+2*s(e,r)*t+n(e)}function l(t){this._p=t,this._mSampleValues=i?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===r&&i===a?t:0===t?0:1===t?1:o(this._getTForX(t),r,a)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<11;++i)this._mSampleValues[i]=o(i*r,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],a=this._mSampleValues,s=0,n=1;10!==n&&a[n]<=t;++n)s+=r;var l=s+(t-a[--n])/(a[n+1]-a[n])*r,p=h(l,e,i);return p>=.001?function(t,e,r,i){for(var a=0;a<4;++a){var s=h(e,r,i);if(0===s)return e;e-=(o(e,r,i)-t)/s}return e}(t,l,e,i):0===p?l:function(t,e,r,i,a){var s,n,h=0;do{(s=o(n=e+(r-e)/2,i,a)-t)>0?r=n:e=n}while(Math.abs(s)>1e-7&&++h<10);return n}(t,s,s+r,e,i)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,a=t,s=createSizedArray(a);return{newElement:function(){return i?s[i-=1]:e()},release:function(t){i===a&&(s=pooling.double(s),a*=2),r&&r(t),s[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}));function bezFunction(){var t=Math;function e(t,e,r,i,a,s){var n=t*i+e*a+r*s-a*i-s*t-r*e;return n>-.001&&n<.001}var r=function(t,e,r,i){var a,s,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],u=bezierLengthPool.newElement();for(n=r.length,a=0;a<p;a+=1){for(h=a/(p-1),l=0,s=0;s<n;s+=1)o=bmPow(1-h,3)*t[s]+3*bmPow(1-h,2)*h*r[s]+3*(1-h)*bmPow(h,2)*i[s]+bmPow(h,3)*e[s],m[s]=o,null!==c[s]&&(l+=bmPow(m[s]-c[s],2)),c[s]=m[s];l&&(f+=l=bmSqrt(l)),u.percents[a]=h,u.lengths[a]=f}return u.addedLength=f,u};function i(t){this.segmentLength=0,this.points=new Array(t)}function a(t,e){this.partialLength=t,this.point=e}var s,n=(s={},function(t,r,n,o){var h=(t[0]+"_"+t[1]+"_"+r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!s[h]){var l,p,f,m,c,u,d,y=getDefaultCurveSegments(),g=0,v=null;2===t.length&&(t[0]!==r[0]||t[1]!==r[1])&&e(t[0],t[1],r[0],r[1],t[0]+n[0],t[1]+n[1])&&e(t[0],t[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(y=2);var b=new i(y);for(f=n.length,l=0;l<y;l+=1){for(d=createSizedArray(f),c=l/(y-1),u=0,p=0;p<f;p+=1)m=bmPow(1-c,3)*t[p]+3*bmPow(1-c,2)*c*(t[p]+n[p])+3*(1-c)*bmPow(c,2)*(r[p]+o[p])+bmPow(c,3)*r[p],d[p]=m,null!==v&&(u+=bmPow(d[p]-v[p],2));g+=u=bmSqrt(u),b.points[l]=new a(u,d),v=d}b.segmentLength=g,s[h]=b}return s[h]});function o(t,e){var r=e.percents,i=e.lengths,a=r.length,s=bmFloor((a-1)*t),n=t*e.addedLength,o=0;if(s===a-1||0===s||n===i[s])return r[s];for(var h=i[s]>n?-1:1,l=!0;l;)if(i[s]<=n&&i[s+1]>n?(o=(n-i[s])/(i[s+1]-i[s]),l=!1):s+=h,s<0||s>=a-1){if(s===a-1)return r[s];l=!1}return r[s]+(r[s+1]-r[s])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),a=t.c,s=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=r(s[e],s[e+1],n[e],o[e+1]),p+=l[e].addedLength;return a&&h&&(l[e]=r(s[e],s[0],n[e],o[0]),p+=l[e].addedLength),i.totalLength=p,i},getNewSegment:function(e,r,i,a,s,n,l){s<0?s=0:s>1&&(s=1);var p,f=o(s,l),m=o(n=n>1?1:n,l),c=e.length,u=1-f,d=1-m,y=u*u*u,g=f*u*u*3,v=f*f*u*3,b=f*f*f,P=u*u*d,S=f*u*d+u*f*d+u*u*m,_=f*f*d+u*f*m+f*u*m,A=f*f*m,E=u*d*d,x=f*d*d+u*m*d+u*d*m,k=f*m*d+u*m*m+f*d*m,T=f*m*m,M=d*d*d,F=m*d*d+d*m*d+d*d*m,D=m*m*d+d*m*m+m*d*m,I=m*m*m;for(p=0;p<c;p+=1)h[4*p]=t.round(1e3*(y*e[p]+g*i[p]+v*a[p]+b*r[p]))/1e3,h[4*p+1]=t.round(1e3*(P*e[p]+S*i[p]+_*a[p]+A*r[p]))/1e3,h[4*p+2]=t.round(1e3*(E*e[p]+x*i[p]+k*a[p]+T*r[p]))/1e3,h[4*p+3]=t.round(1e3*(M*e[p]+F*i[p]+D*a[p]+I*r[p]))/1e3;return h},getPointInSegment:function(e,r,i,a,s,n){var h=o(s,n),l=1-h;return[t.round(1e3*(l*l*l*e[0]+(h*l*l+l*h*l+l*l*h)*i[0]+(h*h*l+l*h*h+h*l*h)*a[0]+h*h*h*r[0]))/1e3,t.round(1e3*(l*l*l*e[1]+(h*l*l+l*h*l+l*l*h)*i[1]+(h*h*l+l*h*h+h*l*h)*a[1]+h*h*h*r[1]))/1e3]},buildBezierData:n,pointOnLine2D:e,pointOnLine3D:function(r,i,a,s,n,o,h,l,p){if(0===a&&0===o&&0===p)return e(r,i,s,n,h,l);var f,m=t.sqrt(t.pow(s-r,2)+t.pow(n-i,2)+t.pow(o-a,2)),c=t.sqrt(t.pow(h-r,2)+t.pow(l-i,2)+t.pow(p-a,2)),u=t.sqrt(t.pow(h-s,2)+t.pow(l-n,2)+t.pow(p-o,2));return(f=m>c?m>u?m-c-u:u-c-m:u>c?u-c-m:c-m-u)>-1e-4&&f<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(t,e){var r,a=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,n,o,h,l,p,f,m,c,u=e.lastIndex,d=u,y=this.keyframes.length-1,g=!0;g;){if(s=this.keyframes[d],n=this.keyframes[d+1],d===y-1&&t>=n.t-a){s.h&&(s=n),u=0;break}if(n.t-a>t){u=d;break}d<y-1?d+=1:(u=0,g=!1)}o=this.keyframesMetadata[d]||{};var v,b,P,S,_,A,E,x,k,T,M=n.t-a,F=s.t-a;if(s.to){o.bezierData||(o.bezierData=bez.buildBezierData(s.s,n.s||s.e,s.to,s.ti));var D=o.bezierData;if(t>=M||t<F){var I=t>=M?D.points.length-1:0;for(l=D.points[I].point.length,h=0;h<l;h+=1)r[h]=D.points[I].point[h]}else{o.__fnct?c=o.__fnct:(c=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,o.__fnct=c),p=c((t-F)/(M-F));var C,w=D.segmentLength*p,V=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(m=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,g=!0,f=D.points.length;g;){if(V+=D.points[m].partialLength,0===w||0===p||m===D.points.length-1){for(l=D.points[m].point.length,h=0;h<l;h+=1)r[h]=D.points[m].point[h];break}if(w>=V&&w<V+D.points[m+1].partialLength){for(C=(w-V)/D.points[m+1].partialLength,l=D.points[m].point.length,h=0;h<l;h+=1)r[h]=D.points[m].point[h]+(D.points[m+1].point[h]-D.points[m].point[h])*C;break}m<f-1?m+=1:g=!1}e._lastPoint=m,e._lastAddedLength=V-D.points[m].partialLength,e._lastKeyframeIndex=d}}else{var R,L,G,B,N;if(y=s.s.length,v=n.s||s.e,this.sh&&1!==s.h)if(t>=M)r[0]=v[0],r[1]=v[1],r[2]=v[2];else if(t<=F)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var z=i(s.s),O=i(v);b=r,P=function(t,e,r){var i,a,s,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],u=e[1],d=e[2],y=e[3];return(a=l*c+p*u+f*d+m*y)<0&&(a=-a,c=-c,u=-u,d=-d,y=-y),1-a>1e-6?(i=Math.acos(a),s=Math.sin(i),n=Math.sin((1-r)*i)/s,o=Math.sin(r*i)/s):(n=1-r,o=r),h[0]=n*l+o*c,h[1]=n*p+o*u,h[2]=n*f+o*d,h[3]=n*m+o*y,h}(z,O,(t-F)/(M-F)),S=P[0],_=P[1],A=P[2],E=P[3],x=Math.atan2(2*_*E-2*S*A,1-2*_*_-2*A*A),k=Math.asin(2*S*_+2*A*E),T=Math.atan2(2*S*E-2*_*A,1-2*S*S-2*A*A),b[0]=x/degToRads,b[1]=k/degToRads,b[2]=T/degToRads}else for(d=0;d<y;d+=1)1!==s.h&&(t>=M?p=1:t<F?p=0:(s.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[d]?c=o.__fnct[d]:(R=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],L=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],G=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],B=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],c=BezierFactory.getBezierEasing(R,L,G,B).get,o.__fnct[d]=c)):o.__fnct?c=o.__fnct:(R=s.o.x,L=s.o.y,G=s.i.x,B=s.i.y,c=BezierFactory.getBezierEasing(R,L,G,B).get,s.keyframeMetadata=c),p=c((t-F)/(M-F)))),v=n.s||s.e,N=1===s.h?s.s[d]:s.s[d]+(v[d]-s.s[d])*p,"multidimensional"===this.propType?r[d]=N:r=N}return e.lastIndex=u,r}function i(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,a=Math.cos(e/2),s=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+a*s*l,o*s*n+a*h*l,a*h*n-o*s*l,a*s*n-o*h*l]}function a(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<r&&e<r))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var a=this.interpolateValue(e,this._caching);this.pv=a}return this._caching.lastFrame=e,this.pv}function s(t){var r;if("unidimensional"===this.propType)r=t*this.mult,e(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var i=0,a=this.v.length;i<a;)r=t[i]*this.mult,e(this.v[i]-r)>1e-5&&(this.v[i]=r,this._mdf=!0),i+=1}function n(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=n,this.setVValue=s,this.addEffect=o}function l(t,e,r,i){var a;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var h=e.k.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),this.vel=createTypedArray("float32",h),a=0;a<h;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=n,this.setVValue=s,this.addEffect=o}function p(e,i,h,l){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=n,this.setVValue=s,this.interpolateValue=r,this.effectsSequence=[a.bind(this)],this.addEffect=o}function f(e,i,h,l){var p;this.propType="multidimensional";var f,m,c,u,d=i.k.length;for(p=0;p<d-1;p+=1)i.k[p].to&&i.k[p].s&&i.k[p+1]&&i.k[p+1].s&&(f=i.k[p].s,m=i.k[p+1].s,c=i.k[p].to,u=i.k[p].ti,(2===f.length&&(f[0]!==m[0]||f[1]!==m[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],f[0]+c[0],f[1]+c[1])&&bez.pointOnLine2D(f[0],f[1],m[0],m[1],m[0]+u[0],m[1]+u[1])||3===f.length&&(f[0]!==m[0]||f[1]!==m[1]||f[2]!==m[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],f[0]+c[0],f[1]+c[1],f[2]+c[2])&&bez.pointOnLine3D(f[0],f[1],f[2],m[0],m[1],m[2],m[0]+u[0],m[1]+u[1],m[2]+u[2]))&&(i.k[p].to=null,i.k[p].ti=null),f[0]===m[0]&&f[1]===m[1]&&0===c[0]&&0===c[1]&&0===u[0]&&0===u[1]&&(2===f.length||f[2]===m[2]&&0===c[2]&&0===u[2])&&(i.k[p].to=null,i.k[p].ti=null));this.effectsSequence=[a.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=h||1,this.elem=e,this.container=l,this.comp=e.comp,this.getValue=n,this.setVValue=s,this.interpolateValue=r,this.frameId=-1;var y=i.k[0].s.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),p=0;p<y;p+=1)this.v[p]=t,this.pv[p]=t;this._caching={lastFrame:t,lastIndex:0,value:createTypedArray("float32",y)},this.addEffect=o}return{getProp:function(t,e,r,i,a){var s;if(e.k.length)if("number"==typeof e.k[0])s=new l(t,e,i,a);else switch(r){case 0:s=new p(t,e,i,a);break;case 1:s=new f(t,e,i,a)}else s=new h(t,e,i,a);return s.effectsSequence.length&&a.addDynamicProperty(s),s}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,a){var s;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[]}(!s[i]||s[i]&&!a)&&(s[i]=pointPool.newElement()),s[i][0]=t,s[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,a,s,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(a,s,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),a=1);var s,n=this._length-1,o=this._length;for(s=a;s<o;s+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],s,!1),n-=1;return t};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})),factory.clone=function(t){var e,r=factory.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var t=-999999;function e(t,e,r){var i,a,s,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],s=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],s=!0;else{for(var u,d,y,g=m,v=c.length-1,b=!0;b&&(u=c[g],!((d=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(s=1===u.h)){if(t>=d.t-this.offsetTime)p=1;else if(t<u.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,y.__fnct=P),p=P((t-(u.t-this.offsetTime))/(d.t-this.offsetTime-(u.t-this.offsetTime)))}a=d.s?d.s[0]:u.e[0]}i=u.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=s?i.i[n][o]:i.i[n][o]+(a.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=s?i.o[n][o]:i.o[n][o]+(a.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=s?i.v[n][o]:i.v[n][o]+(a.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function r(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,a=this._caching.lastFrame;return a!==t&&(a<r&&e<r||a>i&&e>i)||(this._caching.lastIndex=a<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function a(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var a=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function h(e,a,s){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===s?a.pt.k:a.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[r.bind(this)]}n.prototype.interpolateShape=e,n.prototype.getValue=s,n.prototype.setVValue=a,n.prototype.addEffect=o,h.prototype.getValue=s,h.prototype.interpolateShape=e,h.prototype.setVValue=a,h.prototype.addEffect=o;var l=function(){var t=roundCorner;function e(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],r=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2,s=3!==this.d,n=this.v;n.v[0][0]=e,n.v[0][1]=r-a,n.v[1][0]=s?e+i:e-i,n.v[1][1]=r,n.v[2][0]=e,n.v[2][1]=r+a,n.v[3][0]=s?e-i:e+i,n.v[3][1]=r,n.i[0][0]=s?e-i*t:e+i*t,n.i[0][1]=r-a,n.i[1][0]=s?e+i:e-i,n.i[1][1]=r-a*t,n.i[2][0]=s?e+i*t:e-i*t,n.i[2][1]=r+a,n.i[3][0]=s?e-i:e+i,n.i[3][1]=r+a*t,n.o[0][0]=s?e+i*t:e-i*t,n.o[0][1]=r-a,n.o[1][0]=s?e+i:e-i,n.o[1][1]=r+a*t,n.o[2][0]=s?e-i*t:e+i*t,n.o[2][1]=r+a,n.o[3][0]=s?e-i:e+i,n.o[3][1]=r-a*t}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,a=2*Math.floor(this.pt.v),s=2*Math.PI/a,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*a),m=2*Math.PI*h/(2*a),c=-Math.PI/2;c+=this.r.v;var u=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<a;t+=1){r=n?l:p,i=n?f:m;var d=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===d&&0===y?0:y/Math.sqrt(d*d+y*y),v=0===d&&0===y?0:-d/Math.sqrt(d*d+y*y);d+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(d,y,d-g*i*r*u,y-v*i*r*u,d+g*i*r*u,y+v*i*r*u,t,!0),n=!n,c+=s*u}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,a=this.os.v,s=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*s*a*o,l-f*s*a*o,h+p*s*a*o,l+f*s*a*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),f=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,a=bmMin(r,i,this.r.v),s=a*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+a,t+r,e-i+a,t+r,e-i+s,0,!0),this.v.setTripleAt(t+r,e+i-a,t+r,e+i-s,t+r,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+r-a,e+i,t+r-a,e+i,t+r-s,e+i,2,!0),this.v.setTripleAt(t-r+a,e+i,t-r+s,e+i,t-r+a,e+i,3,!0),this.v.setTripleAt(t-r,e+i-a,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r,e-i+a,t-r,e-i+s,t-r,e-i+a,5,!0),this.v.setTripleAt(t-r+a,e-i,t-r+a,e-i,t-r+s,e-i,6,!0),this.v.setTripleAt(t+r-a,e-i,t+r-s,e-i,t+r-a,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+s,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+s,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+a,t+r,e-i+s,t+r,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+r-a,e-i,t+r-a,e-i,t+r-s,e-i,1,!0),this.v.setTripleAt(t-r+a,e-i,t-r+s,e-i,t-r+a,e-i,2,!0),this.v.setTripleAt(t-r,e-i+a,t-r,e-i+a,t-r,e-i+s,3,!0),this.v.setTripleAt(t-r,e+i-a,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r+a,e+i,t-r+a,e+i,t-r+s,e+i,5,!0),this.v.setTripleAt(t+r-a,e+i,t+r-s,e+i,t+r-a,e+i,6,!0),this.v.setTripleAt(t+r,e+i-a,t+r,e+i-a,t+r,e+i-s,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+s,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-s,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-s,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new h(t,e,r):new n(t,e,r):5===r?i=new f(t,e):6===r?i=new l(t,e):7===r&&(i=new p(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return h}};return m}(),Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,i=Math.round;function a(){return 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,this}function s(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(i,-a,0,0,a,i,0,0,0,0,1,0,0,0,0,1)}function n(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(1,0,0,0,0,i,-a,0,0,a,i,0,0,0,0,1)}function o(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(i,0,a,0,0,1,0,0,-a,0,i,0,0,0,0,1)}function h(r){if(0===r)return this;var i=t(r),a=e(r);return this._t(i,-a,0,0,a,i,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(r(t),r(e))}function f(i,a){var s=t(a),n=e(a);return this._t(s,n,0,0,-n,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(i),1,0,0,0,0,1,0,0,0,0,1)._t(s,-n,0,0,n,s,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,a,s,n,o,h,l,p,f,m,c,u,d){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=a,this.props[5]=s,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=u,this.props[15]=d,this}function u(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function d(t,e,r,i,a,s,n,o,h,l,p,f,m,c,u,d){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===a&&1===s&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*s+y[15]*c,y[14]=y[14]*p+y[15]*u,y[15]*=d,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],S=y[4],_=y[5],A=y[6],E=y[7],x=y[8],k=y[9],T=y[10],M=y[11],F=y[12],D=y[13],I=y[14],C=y[15];return y[0]=g*t+v*a+b*h+P*m,y[1]=g*e+v*s+b*l+P*c,y[2]=g*r+v*n+b*p+P*u,y[3]=g*i+v*o+b*f+P*d,y[4]=S*t+_*a+A*h+E*m,y[5]=S*e+_*s+A*l+E*c,y[6]=S*r+_*n+A*p+E*u,y[7]=S*i+_*o+A*f+E*d,y[8]=x*t+k*a+T*h+M*m,y[9]=x*e+k*s+T*l+M*c,y[10]=x*r+k*n+T*p+M*u,y[11]=x*i+k*o+T*f+M*d,y[12]=F*t+D*a+I*h+C*m,y[13]=F*e+D*s+I*l+C*c,y[14]=F*r+D*n+I*p+C*u,y[15]=F*i+D*o+I*f+C*d,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function S(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function _(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function A(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function E(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,a=this.props[0]/t,s=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=a,o.props[12]=s,o.props[13]=n,o}function x(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function k(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=x(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var a=this.props[0],s=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*a+t[1]*n+h,i[1]=t[0]*s+t[1]*o+l,i[2]=e[0]*a+e[1]*n+h,i[3]=e[0]*s+e[1]*o+l,i[4]=r[0]*a+r[1]*n+h,i[5]=r[0]*s+r[1]*o+l}return i}function M(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function F(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function D(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function I(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function C(){var t=this.props;return"matrix("+I(t[0])+","+I(t[1])+","+I(t[4])+","+I(t[5])+","+I(t[12])+","+I(t[13])+")"}return function(){this.reset=a,this.rotate=s,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=u,this.transform=d,this.applyToPoint=P,this.applyToX=S,this.applyToY=_,this.applyToZ=A,this.applyToPointArray=M,this.applyToTriplePoints=T,this.applyToPointStringified=F,this.toCSS=D,this.to2dCSS=C,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=k,this.inversePoint=x,this.getInverseMatrix=E,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}if(lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.1",standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===("undefined"==typeof exports?"undefined":_typeof$3(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(t,r){e[t]||(e[t]=r)},t.getModifier=function(t,r,i){return new e[t](r,i)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,a){var s=[];e<=1?s.push({s:t,e:e}):t>=1?s.push({s:t-1,e:e-1}):(s.push({s:t,e:1}),s.push({s:0,e:e-1}));var n,o,h=[],l=s.length;for(n=0;n<l;n+=1){var p,f;if(!((o=s[n]).e*a<i||o.s*a>i+r))p=o.s*a<=i?0:(o.s*a-i)/r,f=o.e*a>=i+r?1:(o.e*a-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,a;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),(e=this.s.v>1?1+s:this.s.v<0?0+s:this.s.v+s)>(r=this.e.v>1?1+s:this.e.v<0?0+s:this.e.v+s)){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(a=0;a<m;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(a=0;a<m;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var u,d,y=[];for(a=0;a<m;a+=1)if((u=this.shapes[a]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=u.shape.paths)._length,f=0,!u.shape._mdf&&u.pathsData.length)f=u.totalShapeLength;else{for(l=this.releasePathsData(u.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;u.totalShapeLength=f,u.pathsData=l}c+=f,u.shape._mdf=!0}else u.shape.paths=u.localShapeCollection;var g,v=e,b=r,P=0;for(a=m-1;a>=0;a-=1)if((u=this.shapes[a]).shape._mdf){for((d=u.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,r,u.totalShapeLength,P,c),P+=u.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:u.totalShapeLength*v,e:u.totalShapeLength*b}):v>=1?y.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(b-1)}):(y.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),y.push({s:0,e:u.totalShapeLength*(b-1)}));var S=this.addShapes(u,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var _=S.pop();this.addPaths(S,d),S=this.addShapes(u,y[1],_)}else this.addPaths(S,d),S=this.addShapes(u,y[1]);this.addPaths(S,d)}}u.shape.paths=d}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,a,s,n){a.setXYAt(e[0],e[1],"o",s),a.setXYAt(r[0],r[1],"i",s+1),n&&a.setXYAt(t[0],t[1],"v",s),a.setXYAt(i[0],i[1],"v",s+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,a,s,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,u=0,d=[],y=!0;for(r?(o=r._length,p=r._length):(r=shapePool.newElement(),o=0,p=0),d.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,s=m[i].c?h.length:h.length+1,a=1;a<s;a+=1)if(u+(n=h[a-1]).addedLength<e.s)u+=n.addedLength,r.c=!1;else{if(u>e.e){r.c=!1;break}e.s<=u&&e.e>=u+n.addedLength?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[a],m[i].v[a],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[a-1],m[i].v[a],m[i].o[a-1],m[i].i[a],(e.s-u)/n.addedLength,(e.e-u)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),u+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[a-1],u<=e.e){var g=h[a-1].addedLength;e.s<=u&&e.e>=u+g?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[a-1],m[i].v[0],m[i].o[a-1],m[i].i[0],(e.s-u)/g,(e.e-u)/g,h[a-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;u+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),u>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,d.push(r),o=0)}return d},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],a=t._length,s=0;for(s=0;s<a;s+=1)i[0]+=t.v[s][0],i[1]+=t.v[s][1];i[0]/=a,i[1]/=a;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,s=0;s<a;s+=1)n=t.v[s][0]+(i[0]-t.v[s][0])*r,o=t.v[s][1]+(i[1]-t.v[s][1])*r,h=t.o[s][0]+(i[0]-t.o[s][0])*-r,l=t.o[s][1]+(i[1]-t.o[s][1])*-r,p=t.i[s][0]+(i[0]-t.i[s][0])*-r,f=t.i[s][1]+(i[1]-t.i[s][1])*-r,m.setTripleAt(n,o,h,l,p,f,s);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,a,s,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(n.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var r;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var i,a;if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),a=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],a=[];var s=this.px,n=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(i[0]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),a[0]=s.getValueAtTime(s.keyframes[0].t/r,0),a[1]=n.getValueAtTime(n.keyframes[0].t/r,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(i[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),a[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0),a[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0)):(i=[s.pv,n.pv],a[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime),a[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime))}else i=a=t;this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",a=e.length,s=0;s<a;s+=1)switch(e[s].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,a,s){var n=s?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-a),h=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(s?1/o:o,s?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,a,s,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(s=0,i=0;i<=this._groups.length-1;i+=1){if(o=s<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}s+=1}this._currentCopies=h;var m=this.o.v,c=m%1,u=m>0?Math.floor(m):Math.ceil(m),d=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(m>0){for(;P<u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(m<0){for(;P>u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,s=this._currentCopies;s;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];P+=1,s-=1,i+=a}}else for(s=this._currentCopies,i=0,a=1;s;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,s-=1,i+=a;return n},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var a,s,n,o,h,l,p,f,m,c,u,d,y=t._length,g=0;for(r=0;r<y;r+=1)a=t.v[r],n=t.o[r],s=t.i[r],a[0]===n[0]&&a[1]===n[1]&&a[0]===s[0]&&a[1]===s[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=u=a[0]+(o[0]-a[0])*l,f=d=a[1]-(a[1]-o[1])*l,m=p-(p-a[0])*roundCorner,c=f-(f-a[1])*roundCorner,i.setTripleAt(p,f,m,c,u,d,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=a[0]+(o[0]-a[0])*l,f=c=a[1]+(o[1]-a[1])*l,u=p-(p-a[0])*roundCorner,d=f-(f-a[1])*roundCorner,i.setTripleAt(p,f,m,c,u,d,g),g+=1):(i.setTripleAt(a[0],a[1],n[0],n[1],s[0],s[1],g),g+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,a,s,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(n.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)n.addShape(this.processPath(e[i],h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function a(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var a=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,a=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&a.push(r[e]);return a.join(",")}(t)+", "+e,{node:i,w:a,parent:r}}function s(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var n=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};n.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},n.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},n.isCombinedCharacter=function(t){return-1!==e.indexOf(t)};var o={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,a=t.length,s=this.chars.length;for(e=0;e<a;e+=1){for(r=0,i=!1;r<s;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),s+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,n=i.length,o=n;for(r=0;r<n;r+=1){var h,l,p=!0;if(i[r].loaded=!1,i[r].monoCase=a(i[r].fFamily,"monospace"),i[r].sansCase=a(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if((h=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length>0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("f-family",i[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(f)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;l<h.length;l+=1)-1!==h[l].href.indexOf(i[r].fPath)&&(p=!1);if(p){var m=createTag("link");m.setAttribute("f-forigin",i[r].fOrigin),m.setAttribute("f-origin",i[r].origin),m.type="text/css",m.rel="stylesheet",m.href=i[r].fPath,document.body.appendChild(m)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(h=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),l=0;l<h.length;l+=1)i[r].fPath===h[l].src&&(p=!1);if(p){var c=createTag("link");c.setAttribute("f-forigin",i[r].fOrigin),c.setAttribute("f-origin",i[r].origin),c.setAttribute("rel","stylesheet"),c.setAttribute("href",i[r].fPath),e.appendChild(c)}}}else i[r].loaded=!0,o-=1;i[r].helper=s(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,r,i){for(var a=0,s=this.chars.length;a<s;){if(this.chars[a].ch===e&&this.chars[a].style===r&&this.chars[a].fFamily===i)return this.chars[a];a+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,r,i)),t},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),a=t.charCodeAt(0);if(!i.cache[a+1]){var s=i.helper;if(" "===t){s.textContent="|"+t+"|";var n=s.getComputedTextLength();s.textContent="||";var o=s.getComputedTextLength();i.cache[a+1]=(n-o)/100}else s.textContent=t,i.cache[a+1]=s.getComputedTextLength()/100}return i.cache[a+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(a-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return n.prototype=o,n}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),a=e.viewData.length;for(r=0;r<a;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<a;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(t,e,r){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(i){if(!t.numKeys)return 0;var a="";a="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s;var s="unidimensional"===r?new Number(a):Object.assign({},a);return s.time=e.keyframes[i-1].t/e.elem.comp.globalData.frameRate,s.value="unidimensional"===r?a[0]:a,s},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function i(){return t}return function(a){return a?"unidimensional"===a.propType?function(e){e&&"pv"in e||(e=t);var i=1/e.mult,a=e.pv*i,s=new Number(a);return s.value=a,r(s,e,"unidimensional"),function(){return e.k&&e.getValue(),a=e.v*i,s.value!==a&&((s=new Number(a)).value=a,r(s,e,"unidimensional")),s}}(a):function(t){t&&"pv"in t||(t=e);var i=1/t.mult,a=t.data&&t.data.l||t.pv.length,s=createTypedArray("float32",a),n=createTypedArray("float32",a);return s.value=n,r(s,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<a;e+=1)n[e]=t.v[e]*i,s[e]=n[e];return s}}(a):i}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,a,s;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?s=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(a=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?s():[r(),i(),a?a():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function e(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function r(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function i(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function a(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function s(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function n(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function o(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function h(){return[1,1,1,1]}return function(l){var p;function f(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return f.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return f.effect;case"ADBE Text Properties":return f.textInterface;default:return null}}f.getMatrix=t,f.invertPoint=n,f.applyPoint=s,f.toWorld=r,f.toWorldVec=e,f.fromWorld=a,f.fromWorldVec=i,f.toComp=r,f.fromComp=o,f.sampleImage=h,f.sourceRectAtTime=l.sourceRectAtTime.bind(l),f._elem=l;var m=getDescriptor(p=TransformExpressionInterface(l.finalTransform.mProp),"anchorPoint");return Object.defineProperties(f,{hasParent:{get:function(){return l.hierarchy.length}},parent:{get:function(){return l.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return l.isInRange}}}),f.startTime=l.data.st,f.index=l.data.ind,f.source=l.data.refId,f.height=0===l.data.ty?l.data.h:100,f.width=0===l.data.ty?l.data.w:100,f.inPoint=l.data.ip/l.comp.globalData.frameRate,f.outPoint=l.data.op/l.comp.globalData.frameRate,f._name=l.data.nm,f.registerMaskInterface=function(t){f.mask=new MaskManagerInterface(t,l)},f.registerEffectsInterface=function(t){f.effect=t},f}}(),propertyGroupFactory=function(t,e){return function(r){return(r=void 0===r?1:r)<=0?t:e(r-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},EffectsExpressionInterface=function(){function t(r,i,a,s){function n(t){for(var e=r.ef,i=0,a=e.length;i<a;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?l[i]:l[i]();i+=1}throw new Error}var o,h=propertyGroupFactory(n,a),l=[],p=r.ef.length;for(o=0;o<p;o+=1)5===r.ef[o].ty?l.push(t(r.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,s)):l.push(e(i.effectElements[o],r.ef[o].ty,s,h));return"ADBE Color Control"===r.mn&&Object.defineProperty(n,"color",{get:function(){return l[0]()}}),Object.defineProperties(n,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:h}}),n.enabled=0!==r.en,n.active=n.enabled,n}function e(t,e,r,i){var a=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):a()}}return{createEffectsInterface:function(e,r){if(e.effectsManager){var i,a=[],s=e.data.ef,n=e.effectsManager.effectElements.length;for(i=0;i<n;i+=1)a.push(t(s[i],e.effectsManager.effectElements[i],r,e));var o=e.data.ef||[],h=function(t){for(i=0,n=o.length;i<n;){if(t===o[i].nm||t===o[i].mn||t===o[i].ix)return a[i];i+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return o.length}}),h}return null}}}(),CompExpressionInterface=function(t){function e(e){for(var r=0,i=t.layers.length;r<i;){if(t.layers[r].nm===e||t.layers[r].ind===e)return t.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},ShapePathInterface=function(t,e,r){var i=e.sh;function a(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?a.path:null}var s=propertyGroupFactory(a,r);return i.setGroupProperty(PropertyInterface("Path",s)),Object.defineProperties(a,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),a},ShapeExpressionInterface=function(){function t(t,o,c){var u,d=[],y=t?t.length:0;for(u=0;u<y;u+=1)"gr"===t[u].ty?d.push(e(t[u],o[u],c)):"fl"===t[u].ty?d.push(r(t[u],o[u],c)):"st"===t[u].ty?d.push(s(t[u],o[u],c)):"tm"===t[u].ty?d.push(n(t[u],o[u],c)):"tr"===t[u].ty||("el"===t[u].ty?d.push(h(t[u],o[u],c)):"sr"===t[u].ty?d.push(l(t[u],o[u],c)):"sh"===t[u].ty?d.push(ShapePathInterface(t[u],o[u],c)):"rc"===t[u].ty?d.push(p(t[u],o[u],c)):"rd"===t[u].ty?d.push(f(t[u],o[u],c)):"rp"===t[u].ty?d.push(m(t[u],o[u],c)):"gf"===t[u].ty?d.push(i(t[u],o[u],c)):d.push(a(t[u],o[u])));return d}function e(e,r,i){var a=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return a.content;default:return a.transform}};a.propertyGroup=propertyGroupFactory(a,i);var s=function(e,r,i){var a,s=function(t){for(var e=0,r=a.length;e<r;){if(a[e]._name===t||a[e].mn===t||a[e].propertyIndex===t||a[e].ix===t||a[e].ind===t)return a[e];e+=1}return"number"==typeof t?a[t-1]:null};s.propertyGroup=propertyGroupFactory(s,i),a=t(e.it,r.it,s.propertyGroup),s.numProperties=a.length;var n=o(e.it[e.it.length-1],r.it[r.it.length-1],s.propertyGroup);return s.transform=n,s.propertyIndex=e.cix,s._name=e.nm,s}(e,r,a.propertyGroup),n=o(e.it[e.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.content=s,a.transform=n,Object.defineProperty(a,"_name",{get:function(){return e.nm}}),a.numProperties=e.np,a.propertyIndex=e.ix,a.nm=e.nm,a.mn=e.mn,a}function r(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function i(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function a(){return function(){return null}}function s(t,e,r){var i,a=propertyGroupFactory(l,r),s=propertyGroupFactory(h,a);function n(r){Object.defineProperty(h,t.d[r].nm,{get:ExpressionPropertyInterface(e.d.dataProps[r].p)})}var o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n(i),e.d.dataProps[i].p.setGroupProperty(s);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",a)),e.o.setGroupProperty(PropertyInterface("Opacity",a)),e.w.setGroupProperty(PropertyInterface("Stroke Width",a)),l}function n(t,e,r){function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:null}var a=propertyGroupFactory(i,r);return i.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",a)),e.e.setGroupProperty(PropertyInterface("End",a)),e.o.setGroupProperty(PropertyInterface("Offset",a)),i.propertyIndex=t.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),i.mn=t.mn,i}function o(t,e,r){function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:null}var a=propertyGroupFactory(i,r);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",a)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",a)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",a)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",a)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",a)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",a)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",a))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",a)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i.propertyGroup=r,i}function h(t,e,r){function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:null}var a=propertyGroupFactory(i,r);i.propertyIndex=t.ix;var s="tm"===e.sh.ty?e.sh.prop:e.sh;return s.s.setGroupProperty(PropertyInterface("Size",a)),s.p.setGroupProperty(PropertyInterface("Position",a)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(s.s)},position:{get:ExpressionPropertyInterface(s.p)},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:null:i.innerRadius}var a=propertyGroupFactory(i,r),s="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,s.or.setGroupProperty(PropertyInterface("Outer Radius",a)),s.os.setGroupProperty(PropertyInterface("Outer Roundness",a)),s.pt.setGroupProperty(PropertyInterface("Points",a)),s.p.setGroupProperty(PropertyInterface("Position",a)),s.r.setGroupProperty(PropertyInterface("Rotation",a)),t.ir&&(s.ir.setGroupProperty(PropertyInterface("Inner Radius",a)),s.is.setGroupProperty(PropertyInterface("Inner Roundness",a))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(s.p)},rotation:{get:ExpressionPropertyInterface(s.r)},points:{get:ExpressionPropertyInterface(s.pt)},outerRadius:{get:ExpressionPropertyInterface(s.or)},outerRoundness:{get:ExpressionPropertyInterface(s.os)},innerRadius:{get:ExpressionPropertyInterface(s.ir)},innerRoundness:{get:ExpressionPropertyInterface(s.is)},_name:{value:t.nm}}),i.mn=t.mn,i}function p(t,e,r){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:null}var a=propertyGroupFactory(i,r),s="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,s.p.setGroupProperty(PropertyInterface("Position",a)),s.s.setGroupProperty(PropertyInterface("Size",a)),s.r.setGroupProperty(PropertyInterface("Rotation",a)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(s.p)},roundness:{get:ExpressionPropertyInterface(s.r)},size:{get:ExpressionPropertyInterface(s.s)},_name:{value:t.nm}}),i.mn=t.mn,i}function f(t,e,r){function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:null}var a=propertyGroupFactory(i,r),s=e;return i.propertyIndex=t.ix,s.rd.setGroupProperty(PropertyInterface("Radius",a)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(s.rd)},_name:{value:t.nm}}),i.mn=t.mn,i}function m(t,e,r){function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:null}var a=propertyGroupFactory(i,r),s=e;return i.propertyIndex=t.ix,s.c.setGroupProperty(PropertyInterface("Copies",a)),s.o.setGroupProperty(PropertyInterface("Offset",a)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(s.c)},offset:{get:ExpressionPropertyInterface(s.o)},_name:{value:t.nm}}),i.mn=t.mn,i}return function(e,r,i){var a;function s(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:a[t-1];for(var e=0,r=a.length;e<r;){if(a[e]._name===t)return a[e];e+=1}return null}return s.propertyGroup=propertyGroupFactory(s,(function(){return i})),a=t(e,r,s.propertyGroup),s.numProperties=a.length,s._name="Contents",s}}(),TextExpressionInterface=function(t){var e,r;function i(t){return"ADBE Text Document"===t?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==e&&(t.textProperty.currentData.t=e,(r=new String(i)).value=i||new String(i)),r}}),i},getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var a,s=i.length;for(r=0;r<s;r+=1)a=new GroupEffect(i[r],e),this.effectElements.push(a)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function _typeof$2(t){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,a=this.data.ef.length,s=this.data.ef;for(r=0;r<a;r+=1){switch(i=null,s[r].ty){case 0:i=new SliderEffect(s[r],e,this);break;case 1:i=new AngleEffect(s[r],e,this);break;case 2:i=new ColorEffect(s[r],e,this);break;case 3:i=new PointEffect(s[r],e,this);break;case 4:case 7:i=new CheckboxEffect(s[r],e,this);break;case 10:i=new LayerIndexEffect(s[r],e,this);break;case 11:i=new MaskIndexEffect(s[r],e,this);break;case 5:i=new EffectsManager(s[r],e,this);break;default:i=new NoValueEffect(s[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var FootageInterface=(dataInterfaceFactory=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",r=t.getFootageData();function i(t){if(r[t])return e=t,"object"===_typeof$2(r=r[t])?i:r;var a=t.indexOf(e);if(-1!==a){var s=parseInt(t.substr(a+e.length),10);return"object"===_typeof$2(r=r[s])?i:r}return""}return function(){return e="",r=t.getFootageData(),i}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory;function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,a,s=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,u=0,d=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(g="mask",v="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==u?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),d.push(l)),a=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:a,lastPath:""},s.appendChild(a);else{var b;if(u+=1,a.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(g="mask",v="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),s.appendChild(p),a.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):(f=null,m=null),this.storedData[i]={elem:a,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=d.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(d[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+u),S.appendChild(a),s.appendChild(S),P.setAttribute("mask","url("+getLocationHref()+"#"+y+"_"+u+")"),d.length=0,d.push(P)}else d.push(a);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=d.length,i=0;i<n;i+=1)this.maskElement.appendChild(d[i]);u>0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<a;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,a=this.layers,s=0,n=a.length;s<n;)a[s].ind==e&&(i[s]&&!0!==i[s]?(r.push(i[s]),i[s].setAsParent(),void 0!==a[s].parent?this.buildElementParenting(t,a[s].parent,r):t.setHierarchy(r)):(this.buildItem(s),this.addPendingElement(t))),s+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&e.splice(0,0,a.finalTransform),a=a.comp):i=!1;var s,n=e.length;for(r=0;r<n;r+=1)s=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-s[0],t[1]-s[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,a,s=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&a>1&&(s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==s){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+s:s),r.elem.setAttribute("d",n)),r.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var r=createNS("filter");r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%"));return r},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0};return(/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))&&(t.maskType=!1),t}();function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,a=createNS("feMerge");t.appendChild(a),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),a.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),a.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var a=createNS("feFuncR");a.setAttribute("type","table"),i.appendChild(a),this.feFuncR=a;var s=createNS("feFuncG");s.setAttribute("type","table"),i.appendChild(s),this.feFuncG=s;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var a=createNS("feOffset");a.setAttribute("dx","25"),a.setAttribute("dy","0"),a.setAttribute("in","drop_shadow_1"),a.setAttribute("result","drop_shadow_2"),this.feOffset=a,t.appendChild(a);var s=createNS("feFlood");s.setAttribute("flood-color","#00ff00"),s.setAttribute("flood-opacity","1"),s.setAttribute("result","drop_shadow_3"),this.feFlood=s,t.appendChild(s);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var s=createNS("mask"),n=createElementID();s.setAttribute("id",n),s.setAttribute("mask-type","alpha"),s.appendChild(e),this.elem.globalData.defs.appendChild(s);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+n+")");a[0];)o.appendChild(a[0]);this.elem.layerElement.appendChild(o),this.masker=s,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,a=this.paths.length;for(e=0;e<a;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var s;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();s="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)s+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";s+="0 "+10*h+" 0 0"}else s="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",s)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,a=i[0]+" "+r[0]+" "+e[0],s=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",s),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,a){for(var s,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=a-i,c=e-t;o<=256;)n=(s=o/256)<=h?c<0?a:i:s>=l?c<0?i:a:i+m*Math.pow((s-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,a=r*Math.cos(i),s=r*Math.sin(i);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",s)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,a=r.children,s=0,n=a.length;s<n&&a[s]!==t.layerElement;)s+=1;s<=n-2&&(i=a[s+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var a=t.globalData.defs;a.appendChild(i);var s=createNS("symbol");s.setAttribute("id",r),this.replaceInParent(e,r),s.appendChild(e.layerElement),a.appendChild(s);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,a=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+a);var s=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",s)}};var registeredEffects={};function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,a=createElementID(),s=filtersFactory.createFilter(a,!0),n=0;for(this.filters=[],e=0;e<i;e+=1){r=null;var o=t.data.ef[e].ty;if(registeredEffects[o])r=new(0,registeredEffects[o].effect)(s,t.effectsManager.effectElements[e],t),registeredEffects[o].countsAsEffect&&(n+=1);20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(s,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(s,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(s,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(s,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(s,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(s,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(s,t.effectsManager.effectElements[e])),r&&this.filters.push(r)}n&&(t.globalData.defs.appendChild(s),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+a+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),i=a,this.globalData.defs.appendChild(a),featureSupport.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,a.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type","alpha");var n=createNS("g");s.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(s.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(s)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,a=t.length;i<a;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var a;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var s,n=e.length||0;for(a=0;a<n;a+=1)s=PropertyFactory.getProp(t,e[a].v,0,0,this),this.k=s.k||this.k,this.dataProps[a]={n:e[a].n,p:s};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(Math.abs(t[4*r]-t[4*e+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,a=4*this.data.p;for(e=0;e<a;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var a,s,n,o=[];for(n=4*e.g.p,s=0;s<n;s+=4)a=createNS("stop"),i.appendChild(a),o.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,a,s=createNS("mask"),n=createNS("path");s.appendChild(n);var o=createElementID(),h=createElementID();s.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<a;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=s,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(0===e)return"";var a,s=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(a=1;a<e;a+=1)h+=" C"+i.applyToPointStringified(s[a-1][0],s[a-1][1])+" "+i.applyToPointStringified(n[a][0],n[a][1])+" "+i.applyToPointStringified(o[a][0],o[a][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(s[a-1][0],s[a-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function r(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(){}function a(r,i,a){var s,n,o,h,l,p,f,m,c,u,d,y=i.styles.length,g=i.lvl;for(p=0;p<y;p+=1){if(h=i.sh._mdf||a,i.styles[p].lvl<g){for(m=e.reset(),u=g-i.styles[p].lvl,d=i.transformers.length-1;!h&&u>0;)h=i.transformers[d].mProps._mdf||h,u-=1,d-=1;if(h)for(u=g-i.styles[p].lvl,d=i.transformers.length-1;u>0;)c=i.transformers[d].mProps.v.props,m.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),u-=1,d-=1}else m=t;if(n=(f=i.sh.paths)._length,h){for(o="",s=0;s<n;s+=1)(l=f.shapes[s])&&l._length&&(o+=buildShapeString(l,l._length,l.c,m));i.caches[p]=o}else o=i.caches[p];i.styles[p].d+=!0===r.hd?"":o,i.styles[p]._mdf=h||i.styles[p]._mdf}}function s(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function n(t,e,r){o(t,e,r),h(t,e,r)}function o(t,e,r){var i,a,s,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",u="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(u,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(u,p[1]))}if(e.g._cmdf||r){i=e.cst;var d=e.g.c;for(s=i.length,a=0;a<s;a+=1)(n=i[a]).setAttribute("offset",d[4*a]+"%"),n.setAttribute("stop-color","rgb("+d[4*a+1]+","+d[4*a+2]+","+d[4*a+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(s=(i=e.g._collapsable?e.cst:e.ost).length,a=0;a<s;a+=1)n=i[a],e.g._collapsable||n.setAttribute("offset",y[2*a]+"%"),n.setAttribute("stop-opacity",y[2*a+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],S=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",S),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",S))}}function h(t,e,r){var i=e.style,a=e.d;a&&(a._mdf||r)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return s;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return a;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,a,s){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=a,this.p=s,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,a=this.shapes.length,s=this.stylesList.length,n=[],o=!1;for(r=0;r<s;r+=1){for(i=this.stylesList[r],o=!1,n.length=0,t=0;t<a;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);n.length>1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),a=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),a.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else"no"===t.ty&&(r=new SVGNoStyleData(this,t,i));return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,a,s,n){var o,h,l,p,f,m,c=[].concat(s),u=t.length-1,d=[],y=[];for(o=u;o>=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),d.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,a+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,a)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),e[o]=f,f.init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(u=d.length,o=0;o<u;o+=1)d[o].closed=!0;for(u=y.length,o=0;o<u;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,a,s){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==a&&(this.m=a,this._mdf.m=!0,n=!0),!s.length||this.p[0]===s[0]&&this.p[1]===s[1]&&this.p[4]===s[4]&&this.p[5]===s[5]&&this.p[12]===s[12]&&this.p[13]===s[13]||(this.p=s,this._mdf.p=!0,n=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,s=t||this.data.d.k[this.keysIndex].s;for(i=0;i<a;i+=1)s=r!==this.keysIndex?this.effectsSequence[i](s,s.t):this.effectsSequence[i](this.currentData,s.t);e!==s&&this.setCurrentData(s),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],a=0,s=t.length,n=!1;a<s;)e=t.charCodeAt(a),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(a):e>=55296&&e<=56319?(r=t.charCodeAt(a+1))>=56320&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):e>56319?(r=t.charCodeAt(a+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,a,s,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,u=0,d=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,S=getFontProperties(b);t.fWeight=S.weight,t.fStyle=S.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var _,A=t.tr/1e3*t.finalSize;if(t.sz)for(var E,x,k=!0,T=t.sz[0],M=t.sz[1];k;){E=0,g=0,r=(x=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var F=-1;for(e=0;e<r;e+=1)_=x[e].charCodeAt(0),i=!1," "===x[e]?F=e:13!==_&&3!==_||(g=0,i=!0,E+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(x[e],b.fStyle,b.fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(x[e],t.f,t.finalSize),g+P>T&&" "!==x[e]?(-1===F?r+=1:e=F,E+=t.finalLineHeight||1.2*t.finalSize,x.splice(e,F===e?1:0,"\r"),F=-1,g=0):(g+=P,g+=A);E+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&M<E?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=x,r=t.finalText.length,k=!1)}g=-A,P=0;var D,I=0;for(e=0;e<r;e+=1)if(i=!1,13===(_=(D=t.finalText[e]).charCodeAt(0))||3===_?(I=0,y.push(g),v=g>v?g:v,g=-2*A,a="",i=!0,d+=1):a=D,h.chars?(o=h.getCharData(D,b.fStyle,h.getFontByName(t.f).fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(a,t.f,t.finalSize)," "===D?I+=P+A:(g+=P+A+I,I=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:a,line:d,animatorJustifyOffset:0}),2==m){if(c+=P,""===a||" "===a||e===r-1){for(""!==a&&" "!==a||(c-=P);u<=e;)p[u].an=c,p[u].ind=f,p[u].extra=P,u+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===a||e===r-1){for(""===a&&(c-=P);u<=e;)p[u].an=c,p[u].ind=f,p[u].extra=P,u+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var C,w,V,R,L=l.a;n=L.length;var G=[];for(s=0;s<n;s+=1){for((C=L[s]).a.sc&&(t.strokeColorAnim=!0),C.a.sw&&(t.strokeWidthAnim=!0),(C.a.fc||C.a.fh||C.a.fs||C.a.fb)&&(t.fillColorAnim=!0),R=0,V=C.s.b,e=0;e<r;e+=1)(w=p[e]).anIndexes[s]=R,(1==V&&""!==w.val||2==V&&""!==w.val&&" "!==w.val||3==V&&(w.n||" "==w.val||e==r-1)||4==V&&(w.n||e==r-1))&&(1===C.s.rn&&G.push(R),R+=1);l.a[s].s.totalChars=R;var B,N=-1;if(1===C.s.rn)for(e=0;e<r;e+=1)N!=(w=p[e]).anIndexes[s]&&(N=w.anIndexes[s],B=G.splice(Math.floor(Math.random()*G.length),1)[0]),w.anIndexes[s]=B}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var a=0,s=0,n=1,o=1;this.ne.v>0?a=this.ne.v/100:s=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(a,s,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===m)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,u=-c/2+(i=e(t(0,i+.5-p),f-p)),d=c/2;l=Math.sqrt(1-u*u/(d*d))}l=h(l)}else 6===m?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=r(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l<g?l=0:(l=(l-g)/y)>1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,a=this.e.v/e+r;if(i>a){var s=i;i=a,a=s}this.finalS=i,this.finalE=a}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},a=PropertyFactory.getProp,s=e.a;this.a={r:s.r?a(t,s.r,0,degToRads,r):i,rx:s.rx?a(t,s.rx,0,degToRads,r):i,ry:s.ry?a(t,s.ry,0,degToRads,r):i,sk:s.sk?a(t,s.sk,0,degToRads,r):i,sa:s.sa?a(t,s.sa,0,degToRads,r):i,s:s.s?a(t,s.s,1,.01,r):i,a:s.a?a(t,s.a,1,0,r):i,o:s.o?a(t,s.o,0,.01,r):i,p:s.p?a(t,s.p,1,0,r):i,sw:s.sw?a(t,s.sw,0,0,r):i,sc:s.sc?a(t,s.sc,1,0,r):i,fc:s.fc?a(t,s.fc,1,0,r):i,fh:s.fh?a(t,s.fh,0,0,r):i,fs:s.fs?a(t,s.fs,0,.01,r):i,fb:s.fb?a(t,s.fb,0,.01,r):i,t:s.t?a(t,s.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,a,s,n,o,h,l,p,f,m,c,u,d,y,g,v,b,P,S=this._moreOptions.alignment.v,_=this._animatorsData,A=this._textData,E=this.mHelper,x=this._renderType,k=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var M,F=P.v;for(this._pathData.r.v&&(F=F.reverse()),n={tLength:0,segments:[]},s=F._length-1,g=0,a=0;a<s;a+=1)M=bez.buildBezierData(F.v[a],F.v[a+1],[F.o[a][0]-F.v[a][0],F.o[a][1]-F.v[a][1]],[F.i[a+1][0]-F.v[a+1][0],F.i[a+1][1]-F.v[a+1][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength;a=s,P.v.c&&(M=bez.buildBezierData(F.v[a],F.v[0],[F.o[a][0]-F.v[a][0],F.o[a][1]-F.v[a][1]],[F.i[0][0]-F.v[0][0],F.i[0][1]-F.v[0][1]]),n.tLength+=M.segmentLength,n.segments.push(M),g+=M.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=0,f=1,l=0,p=!0,d=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(u=d[m=d.length-1].points).length-1;o<0;)o+=u[f].partialLength,(f-=1)<0&&(f=(u=d[m-=1].points).length-1);c=(u=d[m].points)[f-1],y=(h=u[f]).partialLength}s=T.length,r=0,i=0;var D,I,C,w,V,R=1.2*t.finalSize*.714,L=!0;C=_.length;var G,B,N,z,O,j,H,q,W,$,X,Y,K=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,at=2===t.j?-.5:-1,st=0,nt=!0;for(a=0;a<s;a+=1)if(T[a].n){for(rt&&(rt+=it);st<a;)T[st].animatorJustifyOffset=rt,st+=1;rt=0,nt=!0}else{for(I=0;I<C;I+=1)(D=_[I].a).t.propType&&(nt&&2===t.j&&(it+=D.t.v*at),(V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars)).length?rt+=D.t.v*V[0]*at:rt+=D.t.v*V*at);nt=!1}for(rt&&(rt+=it);st<a;)T[st].animatorJustifyOffset=rt,st+=1}for(a=0;a<s;a+=1){if(E.reset(),z=1,T[a].n)r=0,i+=t.yOffset,i+=L?1:0,o=J,L=!1,this._hasMaskedPath&&(f=U,c=(u=d[m=Z].points)[f-1],y=(h=u[f]).partialLength,l=0),tt="",X="",W="",Y="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[a].line){switch(t.j){case 1:o+=g-t.lineWidths[T[a].line];break;case 2:o+=(g-t.lineWidths[T[a].line])/2}Q=T[a].line}K!==T[a].ind&&(T[K]&&(o+=T[K].extra),o+=T[a].an/2,K=T[a].ind),o+=S[0]*T[a].an*.005;var ot=0;for(I=0;I<C;I+=1)(D=_[I].a).p.propType&&((V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars)).length?ot+=D.p.v[0]*V[0]:ot+=D.p.v[0]*V),D.a.propType&&((V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars)).length?ot+=D.a.v[0]*V[0]:ot+=D.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(s-1),o+=this._pathData.f.v);p;)l+y>=o+ot||!u?(v=(o+ot-l)/h.partialLength,B=c.point[0]+(h.point[0]-c.point[0])*v,N=c.point[1]+(h.point[1]-c.point[1])*v,E.translate(-S[0]*T[a].an*.005,-S[1]*R*.01),p=!1):u&&(l+=h.partialLength,(f+=1)>=u.length&&(f=0,d[m+=1]?u=d[m].points:P.v.c?(f=0,u=d[m=0].points):(l-=h.partialLength,u=null)),u&&(c=h,y=(h=u[f]).partialLength));G=T[a].an/2-T[a].add,E.translate(-G,0,0)}else G=T[a].an/2-T[a].add,E.translate(-G,0,0),E.translate(-S[0]*T[a].an*.005,-S[1]*R*.01,0);for(I=0;I<C;I+=1)(D=_[I].a).t.propType&&(V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=D.t.v*V[0]:o+=D.t.v*V:V.length?r+=D.t.v*V[0]:r+=D.t.v*V));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(H=[t.fc[0],t.fc[1],t.fc[2]]),I=0;I<C;I+=1)(D=_[I].a).a.propType&&((V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars)).length?E.translate(-D.a.v[0]*V[0],-D.a.v[1]*V[1],D.a.v[2]*V[2]):E.translate(-D.a.v[0]*V,-D.a.v[1]*V,D.a.v[2]*V));for(I=0;I<C;I+=1)(D=_[I].a).s.propType&&((V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars)).length?E.scale(1+(D.s.v[0]-1)*V[0],1+(D.s.v[1]-1)*V[1],1):E.scale(1+(D.s.v[0]-1)*V,1+(D.s.v[1]-1)*V,1));for(I=0;I<C;I+=1){if(D=_[I].a,V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars),D.sk.propType&&(V.length?E.skewFromAxis(-D.sk.v*V[0],D.sa.v*V[1]):E.skewFromAxis(-D.sk.v*V,D.sa.v*V)),D.r.propType&&(V.length?E.rotateZ(-D.r.v*V[2]):E.rotateZ(-D.r.v*V)),D.ry.propType&&(V.length?E.rotateY(D.ry.v*V[1]):E.rotateY(D.ry.v*V)),D.rx.propType&&(V.length?E.rotateX(D.rx.v*V[0]):E.rotateX(D.rx.v*V)),D.o.propType&&(V.length?z+=(D.o.v*V[0]-z)*V[0]:z+=(D.o.v*V-z)*V),t.strokeWidthAnim&&D.sw.propType&&(V.length?j+=D.sw.v*V[0]:j+=D.sw.v*V),t.strokeColorAnim&&D.sc.propType)for(q=0;q<3;q+=1)V.length?O[q]+=(D.sc.v[q]-O[q])*V[0]:O[q]+=(D.sc.v[q]-O[q])*V;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(q=0;q<3;q+=1)V.length?H[q]+=(D.fc.v[q]-H[q])*V[0]:H[q]+=(D.fc.v[q]-H[q])*V;D.fh.propType&&(H=V.length?addHueToRGB(H,D.fh.v*V[0]):addHueToRGB(H,D.fh.v*V)),D.fs.propType&&(H=V.length?addSaturationToRGB(H,D.fs.v*V[0]):addSaturationToRGB(H,D.fs.v*V)),D.fb.propType&&(H=V.length?addBrightnessToRGB(H,D.fb.v*V[0]):addBrightnessToRGB(H,D.fb.v*V))}}for(I=0;I<C;I+=1)(D=_[I].a).p.propType&&(V=_[I].s.getMult(T[a].anIndexes[I],A.a[I].s.totalChars),this._hasMaskedPath?V.length?E.translate(0,D.p.v[1]*V[0],-D.p.v[2]*V[1]):E.translate(0,D.p.v[1]*V,-D.p.v[2]*V):V.length?E.translate(D.p.v[0]*V[0],D.p.v[1]*V[1],-D.p.v[2]*V[2]):E.translate(D.p.v[0]*V,D.p.v[1]*V,-D.p.v[2]*V));if(t.strokeWidthAnim&&(W=j<0?0:j),t.strokeColorAnim&&($="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),this._hasMaskedPath){if(E.translate(0,-t.ls),E.translate(0,S[1]*R*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),E.rotate(-ht*Math.PI/180)}E.translate(B,N,0),o-=S[0]*T[a].an*.005,T[a+1]&&K!==T[a+1].ind&&(o+=T[a].an/2,o+=.001*t.tr*t.finalSize)}else{switch(E.translate(r,i,0),t.ps&&E.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:E.translate(T[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[a].line]),0,0);break;case 2:E.translate(T[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[a].line])/2,0,0)}E.translate(0,-t.ls),E.translate(G,0,0),E.translate(S[0]*T[a].an*.005,S[1]*R*.01,0),r+=T[a].l+.001*t.tr*t.finalSize}"html"===x?tt=E.toCSS():"svg"===x?tt=E.to2dCSS():et=[E.props[0],E.props[1],E.props[2],E.props[3],E.props[4],E.props[5],E.props[6],E.props[7],E.props[8],E.props[9],E.props[10],E.props[11],E.props[12],E.props[13],E.props[14],E.props[15]],Y=z}k<=a?(w=new LetterProps(Y,W,$,X,tt,et),this.renderedLetters.push(w),k+=1,this.lettersChangedFlag=!0):(w=this.renderedLetters[a],this.lettersChangedFlag=w.update(Y,W,$,X,tt,et)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,a=e.length,s="";for(r=0;r<a;r+=1)"sh"===e[r].ty&&(i=e[r].ks.k,s+=buildShapeString(i,i.i.length,!0,t));return s},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,a,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),a=createElementID();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),r+=a}if(e&&e.description){var s=createNS("desc"),n=createElementID();s.setAttribute("id",n),s.textContent=e.description,this.svgElement.appendChild(s),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],a="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(a),a=""):a+=t[e],e+=1;return i.push(a),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var a=r.fWeight,s=r.fStyle;this.layerElement.setAttribute("font-style",s),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,p=this.data.singleShape,f=0,m=0,c=!0,u=.001*r.tr*r.finalSize;if(!p||h||r.sz){var d,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!p||0===t){if(n=y>t?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(r.finalSize/100,r.finalSize/100),p&&(o[t].n&&(f=-u,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=u),h){var v;if(1===(d=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(d.data,this.globalData,this);else{var b=emptyShapeData;d.data&&d.data.shapes&&(b=d.data),v=new SVGShapeElement(b,this.globalData,this)}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var P=this.textContainer,S="start";switch(r.j){case 1:S="end";break;case 2:S="middle";break;default:S="start"}P.setAttribute("text-anchor",S),P.setAttribute("letter-spacing",u);var _=this.buildTextContents(r.finalText);for(e=_.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||createNS("tspan")).textContent=_[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",P.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=r.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,a,s=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(r=s[t],i=this.textSpans[t].span,(a=this.textSpans[t].glyph)&&a.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a=createElementID();r.setAttribute("id",a),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier);var Expressions=function(){var t={};return t.initExpressions=function(t){var e=0,r=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&function(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},t}();function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}function seedRandom(t,e){var r,i=this,a=256,s=e.pow(a,6),n=e.pow(2,52),o=2*n,h=255;function l(t){var e,r=t.length,i=this,s=0,n=i.i=i.j=0,o=i.S=[];for(r||(t=[r++]);s<a;)o[s]=s++;for(s=0;s<a;s++)o[s]=o[n=h&n+t[s%r]+(e=o[s])],o[n]=e;i.g=function(t){for(var e,r=0,s=i.i,n=i.j,o=i.S;t--;)e=o[s=h&s+1],r=r*a+o[h&(o[s]=o[n=h&n+e])+(o[n]=e)];return i.i=s,i.j=n,r}}function p(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function f(t,e){var r,i=[],a=_typeof$1(t);if(e&&"object"==a)for(r in t)try{i.push(f(t[r],e-1))}catch(t){}return i.length?i:"string"==a?t:t+"\0"}function m(t,e){for(var r,i=t+"",a=0;a<i.length;)e[h&a]=h&(r^=19*e[h&a])+i.charCodeAt(a++);return c(e)}function c(t){return String.fromCharCode.apply(0,t)}e.seedrandom=function(h,u,d){var y=[],g=m(f((u=!0===u?{entropy:!0}:u||{}).entropy?[h,c(t)]:null===h?function(){try{r;var e=new Uint8Array(a);return(i.crypto||i.msCrypto).getRandomValues(e),c(e)}catch(e){var s=i.navigator,n=s&&s.plugins;return[+new Date,i,n,i.screen,c(t)]}}():h,3),y),v=new l(y),b=function(){for(var t=v.g(6),e=s,r=0;t<n;)t=(t+r)*a,e*=a,r=v.g(1);for(;t>=o;)t/=2,e/=2,r>>>=1;return(t+r)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(u.pass||d||function(t,r,i,a){return a&&(a.S&&p(a,v),t.state=function(){return p(v,{})}),i?(e.random=t,r):t})(b,g,"global"in u?u.global:this==e,u.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,a=[];for(r=0;r<i;r+=1)a[r]=-t[r];return a}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var a=0,s=t.length,n=e.length,o=[];a<s||a<n;)("number"==typeof t[a]||t[a]instanceof Number)&&("number"==typeof e[a]||e[a]instanceof Number)?o[a]=t[a]+e[a]:o[a]=void 0===e[a]?t[a]:t[a]||e[a],a+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var a=0,s=t.length,n=e.length,o=[];a<s||a<n;)("number"==typeof t[a]||t[a]instanceof Number)&&("number"==typeof e[a]||e[a]instanceof Number)?o[a]=t[a]-e[a]:o[a]=void 0===e[a]?t[a]:t[a]||e[a],a+=1;return o}return 0}function mul(t,e){var r,i,a,s=_typeof(t),n=_typeof(e);if(isNumerable(s,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(a=t.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t[i]*e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(a=e.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,a,s=_typeof(t),n=_typeof(e);if(isNumerable(s,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(a=t.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t[i]/e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(a=e.length,r=createTypedArray("float32",a),i=0;i<a;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),a=0;for(r=0;r<i;r+=1)a+=Math.pow(e[r]-t[r],2);return Math.sqrt(a)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],a=t[1],s=t[2],n=Math.max(i,a,s),o=Math.min(i,a,s),h=(n+o)/2;if(n===o)e=0,r=0;else{var l=n-o;switch(r=h>.5?l/(2-n-o):l/(n+o),n){case i:e=(a-s)/l+(a<s?6:0);break;case a:e=(s-i)/l+2;break;case s:e=(i-a)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,a=t[0],s=t[1],n=t[2];if(0===s)e=n,i=n,r=n;else{var o=n<.5?n*(1+s):n+s-n*s,h=2*n-o;e=hue2rgb(h,o,a+1/3),r=hue2rgb(h,o,a),i=hue2rgb(h,o,a-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,a){if(void 0!==i&&void 0!==a||(i=e,a=r,e=0,r=1),r<e){var s=r;r=e,e=s}if(t<=e)return i;if(t>=r)return a;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(a-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(a[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var a=createTypedArray("float32",i),s=BMMath.random();for(r=0;r<i;r+=1)a[r]=t[r]+s*(e[r]-t[r]);return a}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var a,s=t.length,n=shapePool.newElement();n.setPathData(!!i,s);var o,h,l=[0,0];for(a=0;a<s;a+=1)o=e&&e[a]?e[a]:l,h=r&&r[a]?r[a]:l,n.setTripleAt(t[a][0],t[a][1],h[0]+t[a][0],h[1]+t[a][1],o[0]+t[a][0],o[1]+t[a][1],a,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,a=this.pv.length?this.pv.length:1,s=createTypedArray("float32",a);var n=Math.floor(5*time);for(r=0,i=0;r<n;){for(i=0;i<a;i+=1)s[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",a);if(a>1){for(i=0;i<a;i+=1)l[i]=this.pv[i]+s[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+s[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,a){return applyEase(easeOutBez,t,e,r,i,a)}function easeIn(t,e,r,i,a){return applyEase(easeInBez,t,e,r,i,a)}function ease(t,e,r,i,a){return applyEase(easeInOutBez,t,e,r,i,a)}function applyEase(t,e,r,i,a,s){void 0===a?(a=r,s=i):e=(e-r)/(i-r),e>1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(a)){var o,h=a.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(s[o]-a[o])*n+a[o];return l}return(s-a)*n+a}function nearestKey(t){var e,r,i,a=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<a-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var s={};return s.index=r,s.time=i/elem.comp.globalData.frameRate,s}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var a=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=a.length,r=0;r<i;r+=1)e[r]=a[r],e.value[r]=a[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var a;for(a=0;a<e.length;a+=1)i+=Math.pow(r[a]-e[a],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=-.001,a=this.getValueAtTime(t),s=this.getValueAtTime(t+i);if(a.length)for(e=createTypedArray("float32",a.length),r=0;r<a.length;r+=1)e[r]=(s[r]-a[r])/i;else e=(s-a)/i;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,a,s,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?a=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(a=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-a)/i)%2!=0)return this.getValueAtTime((i-(h-a)%i+a)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(a/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-a)%i+a)/this.comp.globalData.frameRate,0),u=Math.floor((h-a)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,s=0;s<n;s+=1)o[s]=(m[s]-f[s])*u+c[s];return o}return(m-f)*u+c}if("continue"===t){var d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(d.length)).length,s=0;s<n;s+=1)o[s]=d[s]+(d[s]-y[s])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return d+(h-p)/.001*(d-y)}}return this.getValueAtTime(((h-a)%i+a)/this.comp.globalData.frameRate,0)}function e(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,a,s,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(h>=p)return this.pv;if(r?a=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(a=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(a/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),u=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,s=0;s<n;s+=1)o[s]=c[s]-(m[s]-f[s])*u;return o}return c-(m-f)*u}if("continue"===t){var d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(d.length)).length,s=0;s<n;s+=1)o[s]=d[s]+(d[s]-y[s])*(p-h)/.001;return o}return d+(d-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function r(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,a=this.comp.renderedFrame/this.comp.globalData.frameRate,s=a-t,n=e>1?(a+t-s)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(s+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}function i(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var a=this.sk.getValueAtTime(t),s=this.sa.getValueAtTime(t);e.skewFromAxis(-a*this.sk.mult,s*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var u=this.p.getValueAtTime(t);e.translate(u[0]*this.p.mult,u[1]*this.p.mult,-u[2]*this.p.mult)}return e}function a(){return this.v.clone(new Matrix)}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var n=s(t,e,r);return n.dynamicProperties.length?n.getValueAtTime=i.bind(n):n.getValueAtTime=a.bind(n),n.setGroupProperty=expressionHelpers.setGroupProperty,n};var n=PropertyFactory.getProp;PropertyFactory.getProp=function(i,a,s,o,h){var l=n(i,a,s,o,h);l.kf?l.getValueAtTime=expressionHelpers.getValueAtTime.bind(l):l.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(l),l.setGroupProperty=expressionHelpers.setGroupProperty,l.loopOut=t,l.loopIn=e,l.smooth=r,l.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(l),l.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(l),l.numKeys=1===a.a?a.k.length:0,l.propertyIndex=a.ix;var p=0;return 0!==s&&(p=createTypedArray("float32",1===a.a?a.k[0].s.length:a.k.length)),l._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:p},expressionHelpers.searchExpressions(i,a,l),l.k&&h.addDynamicProperty(l),l};var o=ShapePropertyFactory.getConstructorFunction(),h=ShapePropertyFactory.getKeyframedConstructorFunction();function l(){}l.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var a=i._length,s=i[t],n=i.v,o=createSizedArray(a);for(r=0;r<a;r+=1)o[r]="i"===t||"o"===t?[s[r][0]-n[r][0],s[r][1]-n[r][1]]:[s[r][0],s[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,a=this._segmentsLength,s=a.lengths,n=a.totalLength*t,o=0,h=s.length,l=0;o<h;){if(l+s[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/s[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,s[o]);break}l+=s[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),a=this.pointOnPath(t+.001,e),s=a[0]-i[0],n=a[1]-i[1],o=Math.sqrt(Math.pow(s,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[s/o,n/o]:[-n/o,s/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},h.prototype.initiateExpression=ExpressionManager.initiateExpression;var p=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,a){var s=p(t,e,r,i,a);return s.propertyIndex=e.ix,s.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,s):4===r&&expressionHelpers.searchExpressions(t,e.ks,s),s.k&&t.addDynamicProperty(s),s}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t!==r){var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}return setExpressionsPlugin(Expressions),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie}));
diff --git a/build/player/lottie_worker.js b/build/player/lottie_worker.js
index 3d83a3c..48a60aa 100644
--- a/build/player/lottie_worker.js
+++ b/build/player/lottie_worker.js
@@ -10,10 +10,7 @@
         root.bodymovin = root.lottie;
     }
 }((self || {}), function(window) {
-	/* global defaultCurveSegments:writable, roundValues, animationManager, idPrefix:writable */
-/* exported idPrefix, document */
-
-function workerContent() {
+	function workerContent() {
   var localIdCounter = 0;
   var animations = {};
 
@@ -121,1901 +118,590 @@
     createElement: function (type) {
       return createElement('', type);
     },
+    getElementsByTagName: function () {
+      return [];
+    },
   };
   /* eslint-enable */
   var lottieInternal = (function () {
     'use strict';
 
-    /* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+    (typeof navigator !== "undefined") && (function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());
+})(this, (function () { 'use strict';
 
-var svgNS = 'http://www.w3.org/2000/svg';
+  var svgNS = 'http://www.w3.org/2000/svg';
+  var locationHref = '';
+  var _useWebWorker = false;
+  var initialDefaultFrame = -999999;
 
-var locationHref = '';
+  var setWebWorker = function setWebWorker(flag) {
+    _useWebWorker = !!flag;
+  };
 
-var initialDefaultFrame = -999999;
+  var getWebWorker = function getWebWorker() {
+    return _useWebWorker;
+  };
 
-var _useWebWorker = false;
+  var setLocationHref = function setLocationHref(value) {
+    locationHref = value;
+  };
 
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
+  var getLocationHref = function getLocationHref() {
+    return locationHref;
+  };
 
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
-
-var BMMath = {};
-(function () {
-  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'];
-  var i;
-  var len = propertyNames.length;
-  for (i = 0; i < len; i += 1) {
-    BMMath[propertyNames[i]] = Math[propertyNames[i]];
+  function createTag(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElement(type);
   }
-}());
 
-function ProjectInterface() { return {}; }
-
-BMMath.random = Math.random;
-BMMath.abs = function (val) {
-  var tOfVal = typeof val;
-  if (tOfVal === 'object' && val.length) {
-    var absArr = createSizedArray(val.length);
+  function extendPrototype(sources, destination) {
     var i;
-    var len = val.length;
+    var len = sources.length;
+    var sourcePrototype;
+
     for (i = 0; i < len; i += 1) {
-      absArr[i] = Math.abs(val[i]);
-    }
-    return absArr;
-  }
-  return Math.abs(val);
-};
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+      sourcePrototype = sources[i].prototype;
 
-function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
-}
-roundValues(false);
-
-function styleDiv(element) {
-  element.style.position = 'absolute';
-  element.style.top = 0;
-  element.style.left = 0;
-  element.style.display = 'block';
-  element.style.transformOrigin = '0 0';
-  element.style.webkitTransformOrigin = '0 0';
-  element.style.backfaceVisibility = 'visible';
-  element.style.webkitBackfaceVisibility = 'visible';
-  element.style.transformStyle = 'preserve-3d';
-  element.style.webkitTransformStyle = 'preserve-3d';
-  element.style.mozTransformStyle = 'preserve-3d';
-}
-
-function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
-  this.type = type;
-  this.currentTime = currentTime;
-  this.totalTime = totalTime;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteEvent(type, frameMultiplier) {
-  this.type = type;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
-  this.type = type;
-  this.currentLoop = currentLoop;
-  this.totalLoops = totalLoops;
-  this.direction = frameMultiplier < 0 ? -1 : 1;
-}
-
-function BMSegmentStartEvent(type, firstFrame, totalFrames) {
-  this.type = type;
-  this.firstFrame = firstFrame;
-  this.totalFrames = totalFrames;
-}
-
-function BMDestroyEvent(type, target) {
-  this.type = type;
-  this.target = target;
-}
-
-function BMRenderFrameErrorEvent(nativeError, currentTime) {
-  this.type = 'renderFrameError';
-  this.nativeError = nativeError;
-  this.currentTime = currentTime;
-}
-
-function BMConfigErrorEvent(nativeError) {
-  this.type = 'configError';
-  this.nativeError = nativeError;
-}
-
-function BMAnimationConfigErrorEvent(type, nativeError) {
-  this.type = type;
-  this.nativeError = nativeError;
-}
-
-var createElementID = (function () {
-  var _count = 0;
-  return function createID() {
-    _count += 1;
-    return idPrefix + '__lottie_element_' + _count;
-  };
-}());
-
-function HSVtoRGB(h, s, v) {
-  var r;
-  var g;
-  var b;
-  var i;
-  var f;
-  var p;
-  var q;
-  var t;
-  i = Math.floor(h * 6);
-  f = h * 6 - i;
-  p = v * (1 - s);
-  q = v * (1 - f * s);
-  t = v * (1 - (1 - f) * s);
-  switch (i % 6) {
-    case 0: r = v; g = t; b = p; break;
-    case 1: r = q; g = v; b = p; break;
-    case 2: r = p; g = v; b = t; break;
-    case 3: r = p; g = q; b = v; break;
-    case 4: r = t; g = p; b = v; break;
-    case 5: r = v; g = p; b = q; break;
-    default: break;
-  }
-  return [r,
-    g,
-    b];
-}
-
-function RGBtoHSV(r, g, b) {
-  var max = Math.max(r, g, b);
-  var min = Math.min(r, g, b);
-  var d = max - min;
-  var h;
-  var s = (max === 0 ? 0 : d / max);
-  var v = max / 255;
-
-  switch (max) {
-    case min: h = 0; break;
-    case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break;
-    case g: h = (b - r) + d * 2; h /= 6 * d; break;
-    case b: h = (r - g) + d * 4; h /= 6 * d; break;
-    default: break;
-  }
-
-  return [
-    h,
-    s,
-    v,
-  ];
-}
-
-function addSaturationToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[1] += offset;
-  if (hsv[1] > 1) {
-    hsv[1] = 1;
-  } else if (hsv[1] <= 0) {
-    hsv[1] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addBrightnessToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[2] += offset;
-  if (hsv[2] > 1) {
-    hsv[2] = 1;
-  } else if (hsv[2] < 0) {
-    hsv[2] = 0;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-function addHueToRGB(color, offset) {
-  var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
-  hsv[0] += offset / 360;
-  if (hsv[0] > 1) {
-    hsv[0] -= 1;
-  } else if (hsv[0] < 0) {
-    hsv[0] += 1;
-  }
-  return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
-}
-
-var rgbToHex = (function () {
-  var colorMap = [];
-  var i;
-  var hex;
-  for (i = 0; i < 256; i += 1) {
-    hex = i.toString(16);
-    colorMap[i] = hex.length === 1 ? '0' + hex : hex;
-  }
-
-  return function (r, g, b) {
-    if (r < 0) {
-      r = 0;
-    }
-    if (g < 0) {
-      g = 0;
-    }
-    if (b < 0) {
-      b = 0;
-    }
-    return '#' + colorMap[r] + colorMap[g] + colorMap[b];
-  };
-}());
-
-function BaseEvent() {}
-BaseEvent.prototype = {
-  triggerEvent: function (eventName, args) {
-    if (this._cbs[eventName]) {
-      var callbacks = this._cbs[eventName];
-      for (var i = 0; i < callbacks.length; i += 1) {
-        callbacks[i](args);
+      for (var attr in sourcePrototype) {
+        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
       }
     }
-  },
-  addEventListener: function (eventName, callback) {
-    if (!this._cbs[eventName]) {
-      this._cbs[eventName] = [];
-    }
-    this._cbs[eventName].push(callback);
-
-    return function () {
-      this.removeEventListener(eventName, callback);
-    }.bind(this);
-  },
-  removeEventListener: function (eventName, callback) {
-    if (!callback) {
-      this._cbs[eventName] = null;
-    } else if (this._cbs[eventName]) {
-      var i = 0;
-      var len = this._cbs[eventName].length;
-      while (i < len) {
-        if (this._cbs[eventName][i] === callback) {
-          this._cbs[eventName].splice(i, 1);
-          i -= 1;
-          len -= 1;
-        }
-        i += 1;
-      }
-      if (!this._cbs[eventName].length) {
-        this._cbs[eventName] = null;
-      }
-    }
-  },
-};
-
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
-  function createRegularArray(type, len) {
-    var i = 0;
-    var arr = [];
-    var value;
-    switch (type) {
-      case 'int16':
-      case 'uint8c':
-        value = 1;
-        break;
-      default:
-        value = 1.1;
-        break;
-    }
-    for (i = 0; i < len; i += 1) {
-      arr.push(value);
-    }
-    return arr;
-  }
-  function createTypedArrayFactory(type, len) {
-    if (type === 'float32') {
-      return new Float32Array(len);
-    } if (type === 'int16') {
-      return new Int16Array(len);
-    } if (type === 'uint8c') {
-      return new Uint8ClampedArray(len);
-    }
-    return createRegularArray(type, len);
-  }
-  if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-    return createTypedArrayFactory;
-  }
-  return createRegularArray;
-}());
-
-function createSizedArray(len) {
-  return Array.apply(null, { length: len });
-}
-
-/* global svgNS */
-/* exported createNS */
-
-function createNS(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElementNS(svgNS, type);
-}
-
-/* exported createTag */
-
-function createTag(type) {
-  // return {appendChild:function(){},setAttribute:function(){},style:{}}
-  return document.createElement(type);
-}
-
-function DynamicPropertyContainer() {}
-DynamicPropertyContainer.prototype = {
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-      this.container.addDynamicProperty(this);
-      this._isAnimated = true;
-    }
-  },
-  iterateDynamicProperties: function () {
-    this._mdf = false;
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      this.dynamicProperties[i].getValue();
-      if (this.dynamicProperties[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  },
-  initDynamicPropertyContainer: function (container) {
-    this.container = container;
-    this.dynamicProperties = [];
-    this._mdf = false;
-    this._isAnimated = false;
-  },
-};
-
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
-  var blendModeEnums = {
-    0: 'source-over',
-    1: 'multiply',
-    2: 'screen',
-    3: 'overlay',
-    4: 'darken',
-    5: 'lighten',
-    6: 'color-dodge',
-    7: 'color-burn',
-    8: 'hard-light',
-    9: 'soft-light',
-    10: 'difference',
-    11: 'exclusion',
-    12: 'hue',
-    13: 'saturation',
-    14: 'color',
-    15: 'luminosity',
-  };
-
-  return function (mode) {
-    return blendModeEnums[mode] || '';
-  };
-}());
-
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
-  1: 'butt',
-  2: 'round',
-  3: 'square',
-};
-
-var lineJoinEnum = {
-  1: 'miter',
-  2: 'round',
-  3: 'bevel',
-};
-
-/* global createTypedArray */
-
-/*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */
-
-/**
- * 2D transformation matrix object initialized with identity matrix.
- *
- * The matrix can synchronize a canvas context by supplying the context
- * as an argument, or later apply current absolute transform to an
- * existing context.
- *
- * All values are handled as floating point values.
- *
- * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
- * @prop {number} a - scale x
- * @prop {number} b - shear y
- * @prop {number} c - shear x
- * @prop {number} d - scale y
- * @prop {number} e - translate x
- * @prop {number} f - translate y
- * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
- * @constructor
- */
-
-var Matrix = (function () {
-  var _cos = Math.cos;
-  var _sin = Math.sin;
-  var _tan = Math.tan;
-  var _rnd = Math.round;
-
-  function reset() {
-    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;
-    return this;
   }
 
-  function rotate(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+  function getDescriptor(object, prop) {
+    return Object.getOwnPropertyDescriptor(object, prop);
   }
 
-  function rotateX(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+  function createProxyFunction(prototype) {
+    function ProxyFunction() {}
+
+    ProxyFunction.prototype = prototype;
+    return ProxyFunction;
   }
 
-  function rotateY(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
-  }
-
-  function rotateZ(angle) {
-    if (angle === 0) {
-      return this;
-    }
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-  }
-
-  function shear(sx, sy) {
-    return this._t(1, sy, sx, 1, 0, 0);
-  }
-
-  function skew(ax, ay) {
-    return this.shear(_tan(ax), _tan(ay));
-  }
-
-  function skewFromAxis(ax, angle) {
-    var mCos = _cos(angle);
-    var mSin = _sin(angle);
-    return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
-      ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-    // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
-  }
-
-  function scale(sx, sy, sz) {
-    if (!sz && sz !== 0) {
-      sz = 1;
-    }
-    if (sx === 1 && sy === 1 && sz === 1) {
-      return this;
-    }
-    return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
-  }
-
-  function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
-    this.props[0] = a;
-    this.props[1] = b;
-    this.props[2] = c;
-    this.props[3] = d;
-    this.props[4] = e;
-    this.props[5] = f;
-    this.props[6] = g;
-    this.props[7] = h;
-    this.props[8] = i;
-    this.props[9] = j;
-    this.props[10] = k;
-    this.props[11] = l;
-    this.props[12] = m;
-    this.props[13] = n;
-    this.props[14] = o;
-    this.props[15] = p;
-    return this;
-  }
-
-  function translate(tx, ty, tz) {
-    tz = tz || 0;
-    if (tx !== 0 || ty !== 0 || tz !== 0) {
-      return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
-    }
-    return this;
-  }
-
-  function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
-    var _p = this.props;
-
-    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) {
-      // NOTE: commenting this condition because TurboFan deoptimizes code when present
-      // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-      _p[12] = _p[12] * a2 + _p[15] * m2;
-      _p[13] = _p[13] * f2 + _p[15] * n2;
-      _p[14] = _p[14] * k2 + _p[15] * o2;
-      _p[15] *= p2;
-      // }
-      this._identityCalculated = false;
-      return this;
+  // import Howl from '../../3rd_party/howler';
+  var audioControllerFactory = function () {
+    function AudioController(audioFactory) {
+      this.audios = [];
+      this.audioFactory = audioFactory;
+      this._volume = 1;
+      this._isMuted = false;
     }
 
-    var a1 = _p[0];
-    var b1 = _p[1];
-    var c1 = _p[2];
-    var d1 = _p[3];
-    var e1 = _p[4];
-    var f1 = _p[5];
-    var g1 = _p[6];
-    var h1 = _p[7];
-    var i1 = _p[8];
-    var j1 = _p[9];
-    var k1 = _p[10];
-    var l1 = _p[11];
-    var m1 = _p[12];
-    var n1 = _p[13];
-    var o1 = _p[14];
-    var p1 = _p[15];
-
-    /* matrix order (canvas compatible):
-         * ace
-         * bdf
-         * 001
-         */
-    _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-    _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
-    _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
-    _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
-
-    _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
-    _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
-    _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
-    _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
-
-    _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
-    _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
-    _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
-    _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
-
-    _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
-    _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
-    _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
-    _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
-
-    this._identityCalculated = false;
-    return this;
-  }
-
-  function isIdentity() {
-    if (!this._identityCalculated) {
-      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);
-      this._identityCalculated = true;
-    }
-    return this._identity;
-  }
-
-  function equals(matr) {
-    var i = 0;
-    while (i < 16) {
-      if (matr.props[i] !== this.props[i]) {
-        return false;
-      }
-      i += 1;
-    }
-    return true;
-  }
-
-  function clone(matr) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      matr.props[i] = this.props[i];
-    }
-    return matr;
-  }
-
-  function cloneFromProps(props) {
-    var i;
-    for (i = 0; i < 16; i += 1) {
-      this.props[i] = props[i];
-    }
-  }
-
-  function applyToPoint(x, y, z) {
-    return {
-      x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
-      y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
-      z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14],
-    };
-    /* return {
-         x: x * me.a + y * me.c + me.e,
-         y: x * me.b + y * me.d + me.f
-         }; */
-  }
-  function applyToX(x, y, z) {
-    return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
-  }
-  function applyToY(x, y, z) {
-    return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
-  }
-  function applyToZ(x, y, z) {
-    return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
-  }
-
-  function getInverseMatrix() {
-    var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
-    var a = this.props[5] / determinant;
-    var b = -this.props[1] / determinant;
-    var c = -this.props[4] / determinant;
-    var d = this.props[0] / determinant;
-    var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
-    var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
-    var inverseMatrix = new Matrix();
-    inverseMatrix.props[0] = a;
-    inverseMatrix.props[1] = b;
-    inverseMatrix.props[4] = c;
-    inverseMatrix.props[5] = d;
-    inverseMatrix.props[12] = e;
-    inverseMatrix.props[13] = f;
-    return inverseMatrix;
-  }
-
-  function inversePoint(pt) {
-    var inverseMatrix = this.getInverseMatrix();
-    return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
-  }
-
-  function inversePoints(pts) {
-    var i;
-    var len = pts.length;
-    var retPts = [];
-    for (i = 0; i < len; i += 1) {
-      retPts[i] = inversePoint(pts[i]);
-    }
-    return retPts;
-  }
-
-  function applyToTriplePoints(pt1, pt2, pt3) {
-    var arr = createTypedArray('float32', 6);
-    if (this.isIdentity()) {
-      arr[0] = pt1[0];
-      arr[1] = pt1[1];
-      arr[2] = pt2[0];
-      arr[3] = pt2[1];
-      arr[4] = pt3[0];
-      arr[5] = pt3[1];
-    } else {
-      var p0 = this.props[0];
-      var p1 = this.props[1];
-      var p4 = this.props[4];
-      var p5 = this.props[5];
-      var p12 = this.props[12];
-      var p13 = this.props[13];
-      arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
-      arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
-      arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
-      arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
-      arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
-      arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
-    }
-    return arr;
-  }
-
-  function applyToPointArray(x, y, z) {
-    var arr;
-    if (this.isIdentity()) {
-      arr = [x, y, z];
-    } else {
-      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],
-      ];
-    }
-    return arr;
-  }
-
-  function applyToPointStringified(x, y) {
-    if (this.isIdentity()) {
-      return x + ',' + y;
-    }
-    var _p = this.props;
-    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;
-  }
-
-  function toCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var i = 0;
-    var props = this.props;
-    var cssValue = 'matrix3d(';
-    var v = 10000;
-    while (i < 16) {
-      cssValue += _rnd(props[i] * v) / v;
-      cssValue += i === 15 ? ')' : ',';
-      i += 1;
-    }
-    return cssValue;
-  }
-
-  function roundMatrixProperty(val) {
-    var v = 10000;
-    if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
-      return _rnd(val * v) / v;
-    }
-    return val;
-  }
-
-  function to2dCSS() {
-    // 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.
-    /* if(this.isIdentity()) {
-            return '';
-        } */
-    var props = this.props;
-    var _a = roundMatrixProperty(props[0]);
-    var _b = roundMatrixProperty(props[1]);
-    var _c = roundMatrixProperty(props[4]);
-    var _d = roundMatrixProperty(props[5]);
-    var _e = roundMatrixProperty(props[12]);
-    var _f = roundMatrixProperty(props[13]);
-    return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
-  }
-
-  return function () {
-    this.reset = reset;
-    this.rotate = rotate;
-    this.rotateX = rotateX;
-    this.rotateY = rotateY;
-    this.rotateZ = rotateZ;
-    this.skew = skew;
-    this.skewFromAxis = skewFromAxis;
-    this.shear = shear;
-    this.scale = scale;
-    this.setTransform = setTransform;
-    this.translate = translate;
-    this.transform = transform;
-    this.applyToPoint = applyToPoint;
-    this.applyToX = applyToX;
-    this.applyToY = applyToY;
-    this.applyToZ = applyToZ;
-    this.applyToPointArray = applyToPointArray;
-    this.applyToTriplePoints = applyToTriplePoints;
-    this.applyToPointStringified = applyToPointStringified;
-    this.toCSS = toCSS;
-    this.to2dCSS = to2dCSS;
-    this.clone = clone;
-    this.cloneFromProps = cloneFromProps;
-    this.equals = equals;
-    this.inversePoints = inversePoints;
-    this.inversePoint = inversePoint;
-    this.getInverseMatrix = getInverseMatrix;
-    this._t = this.transform;
-    this.isIdentity = isIdentity;
-    this._identity = true;
-    this._identityCalculated = false;
-
-    this.props = createTypedArray('float32', 16);
-    this.reset();
-  };
-}());
-
-/* eslint-disable */
-/*
- Copyright 2014 David Bau.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- */
-
-(function (pool, math) {
-//
-// The following constants are related to IEEE 754 limits.
-//
-    var global = this,
-        width = 256,        // each RC4 output is 0 <= x < 256
-        chunks = 6,         // at least six RC4 outputs for each double
-        digits = 52,        // there are 52 significant digits in a double
-        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
-        startdenom = math.pow(width, chunks),
-        significance = math.pow(2, digits),
-        overflow = significance * 2,
-        mask = width - 1,
-        nodecrypto;         // node.js crypto module, initialized at the bottom.
-
-//
-// seedrandom()
-// This is the seedrandom function described above.
-//
-    function seedrandom(seed, options, callback) {
-        var key = [];
-        options = (options === true) ? { entropy: true } : (options || {});
-
-        // Flatten the seed string or build one from local entropy if needed.
-        var shortseed = mixkey(flatten(
-            options.entropy ? [seed, tostring(pool)] :
-                (seed === null) ? autoseed() : seed, 3), key);
-
-        // Use the seed to initialize an ARC4 generator.
-        var arc4 = new ARC4(key);
-
-        // This function returns a random double in [0, 1) that contains
-        // randomness in every bit of the mantissa of the IEEE 754 value.
-        var prng = function() {
-            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
-                d = startdenom,                 //   and denominator d = 2 ^ 48.
-                x = 0;                          //   and no 'extra last byte'.
-            while (n < significance) {          // Fill up all significant digits by
-                n = (n + x) * width;              //   shifting numerator and
-                d *= width;                       //   denominator and generating a
-                x = arc4.g(1);                    //   new least-significant-byte.
-            }
-            while (n >= overflow) {             // To avoid rounding up, before adding
-                n /= 2;                           //   last byte, shift everything
-                d /= 2;                           //   right using integer math until
-                x >>>= 1;                         //   we have exactly the desired bits.
-            }
-            return (n + x) / d;                 // Form the number within [0, 1).
-        };
-
-        prng.int32 = function() { return arc4.g(4) | 0; };
-        prng.quick = function() { return arc4.g(4) / 0x100000000; };
-        prng.double = prng;
-
-        // Mix the randomness into accumulated entropy.
-        mixkey(tostring(arc4.S), pool);
-
-        // Calling convention: what to return as a function of prng, seed, is_math.
-        return (options.pass || callback ||
-        function(prng, seed, is_math_call, state) {
-            if (state) {
-                // Load the arc4 state from the given state if it has an S array.
-                if (state.S) { copy(state, arc4); }
-                // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); };
-            }
-
-            // If called as a method of Math (Math.seedrandom()), mutate
-            // Math.random because that is how seedrandom.js has worked since v1.0.
-            if (is_math_call) { math[rngname] = prng; return seed; }
-
-            // Otherwise, it is a newer calling convention, so return the
-            // prng directly.
-            else return prng;
-        })(
-            prng,
-            shortseed,
-            'global' in options ? options.global : (this == math),
-            options.state);
-    }
-    math['seed' + rngname] = seedrandom;
-
-//
-// ARC4
-//
-// An ARC4 implementation.  The constructor takes a key in the form of
-// an array of at most (width) integers that should be 0 <= x < (width).
-//
-// The g(count) method returns a pseudorandom integer that concatenates
-// the next (count) outputs from ARC4.  Its return value is a number x
-// that is in the range 0 <= x < (width ^ count).
-//
-    function ARC4(key) {
-        var t, keylen = key.length,
-            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
-
-        // The empty key [] is treated as [0].
-        if (!keylen) { key = [keylen++]; }
-
-        // Set up S using the standard key scheduling algorithm.
-        while (i < width) {
-            s[i] = i++;
-        }
-        for (i = 0; i < width; i++) {
-            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
-            s[j] = t;
-        }
-
-        // The "g" method returns the next (count) outputs as one number.
-        me.g = function(count) {
-            // Using instance members instead of closure state nearly doubles speed.
-            var t, r = 0,
-                i = me.i, j = me.j, s = me.S;
-            while (count--) {
-                t = s[i = mask & (i + 1)];
-                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
-            }
-            me.i = i; me.j = j;
-            return r;
-            // For robust unpredictability, the function call below automatically
-            // discards an initial batch of values.  This is called RC4-drop[256].
-            // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        };
-    }
-
-//
-// copy()
-// Copies internal state of ARC4 to or from a plain object.
-//
-    function copy(f, t) {
-        t.i = f.i;
-        t.j = f.j;
-        t.S = f.S.slice();
-        return t;
-    }
-
-//
-// flatten()
-// Converts an object tree to nested arrays of strings.
-//
-    function flatten(obj, depth) {
-        var result = [], typ = (typeof obj), prop;
-        if (depth && typ == 'object') {
-            for (prop in obj) {
-                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
-            }
-        }
-        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
-    }
-
-//
-// mixkey()
-// Mixes a string seed into a key that is an array of integers, and
-// returns a shortened string seed that is equivalent to the result key.
-//
-    function mixkey(seed, key) {
-        var stringseed = seed + '', smear, j = 0;
-        while (j < stringseed.length) {
-            key[mask & j] =
-                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
-        }
-        return tostring(key);
-    }
-
-//
-// autoseed()
-// Returns an object for autoseeding, using window.crypto and Node crypto
-// module if available.
-//
-    function autoseed() {
-        try {
-            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
-            var out = new Uint8Array(width);
-            (global.crypto || global.msCrypto).getRandomValues(out);
-            return tostring(out);
-        } catch (e) {
-            var browser = global.navigator,
-                plugins = browser && browser.plugins;
-            return [+new Date(), global, plugins, global.screen, tostring(pool)];
-        }
-    }
-
-//
-// tostring()
-// Converts an array of charcodes to a string
-//
-    function tostring(a) {
-        return String.fromCharCode.apply(0, a);
-    }
-
-//
-// When seedrandom.js is loaded, we immediately mix a few bits
-// from the built-in RNG into the entropy pool.  Because we do
-// not want to interfere with deterministic PRNG state later,
-// seedrandom will not call math.random on its own again after
-// initialization.
-//
-    mixkey(math.random(), pool);
-
-//
-// Nodejs and AMD support: export the implementation as a module using
-// either convention.
-//
-
-// End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
-/* eslint-disable */
-var BezierFactory = (function () {
-  /**
-     * BezierEasing - use bezier curve for transition easing function
-     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
-     *
-     * Credits: is based on Firefox's nsSMILKeySpline.cpp
-     * Usage:
-     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
-     * spline.get(x) => returns the easing value | x must be in [0, 1] range
-     *
-     */
-
-  var ob = {};
-  ob.getBezierEasing = getBezierEasing;
-  var beziers = {};
-
-  function getBezierEasing(a, b, c, d, nm) {
-    var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
-    if (beziers[str]) {
-      return beziers[str];
-    }
-    var bezEasing = new BezierEasing([a, b, c, d]);
-    beziers[str] = bezEasing;
-    return bezEasing;
-  }
-
-  // These values are established by empiricism with tests (tradeoff: performance VS precision)
-  var NEWTON_ITERATIONS = 4;
-  var NEWTON_MIN_SLOPE = 0.001;
-  var SUBDIVISION_PRECISION = 0.0000001;
-  var SUBDIVISION_MAX_ITERATIONS = 10;
-
-  var kSplineTableSize = 11;
-  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
-
-  var float32ArraySupported = typeof Float32Array === 'function';
-
-  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
-  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
-  function C(aA1) { return 3.0 * aA1; }
-
-  // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
-  function calcBezier(aT, aA1, aA2) {
-    return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
-  }
-
-  // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
-  function getSlope(aT, aA1, aA2) {
-    return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
-  }
-
-  function binarySubdivide(aX, aA, aB, mX1, mX2) {
-    var currentX,
-      currentT,
-      i = 0;
-    do {
-      currentT = aA + (aB - aA) / 2.0;
-      currentX = calcBezier(currentT, mX1, mX2) - aX;
-      if (currentX > 0.0) {
-        aB = currentT;
-      } else {
-        aA = currentT;
-      }
-    } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
-    return currentT;
-  }
-
-  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
-    for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
-      var currentSlope = getSlope(aGuessT, mX1, mX2);
-      if (currentSlope === 0.0) return aGuessT;
-      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
-      aGuessT -= currentX / currentSlope;
-    }
-    return aGuessT;
-  }
-
-  /**
-     * points is an array of [ mX1, mY1, mX2, mY2 ]
-     */
-  function BezierEasing(points) {
-    this._p = points;
-    this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
-    this._precomputed = false;
-
-    this.get = this.get.bind(this);
-  }
-
-  BezierEasing.prototype = {
-
-    get: function (x) {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      if (!this._precomputed) this._precompute();
-      if (mX1 === mY1 && mX2 === mY2) return x; // linear
-      // Because JavaScript number are imprecise, we should guarantee the extremes are right.
-      if (x === 0) return 0;
-      if (x === 1) return 1;
-      return calcBezier(this._getTForX(x), mY1, mY2);
-    },
-
-    // Private part
-
-    _precompute: function () {
-      var mX1 = this._p[0],
-        mY1 = this._p[1],
-        mX2 = this._p[2],
-        mY2 = this._p[3];
-      this._precomputed = true;
-      if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); }
-    },
-
-    _calcSampleValues: function () {
-      var mX1 = this._p[0],
-        mX2 = this._p[2];
-      for (var i = 0; i < kSplineTableSize; ++i) {
-        this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
-      }
-    },
-
-    /**
-         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
-         */
-    _getTForX: function (aX) {
-      var mX1 = this._p[0],
-        mX2 = this._p[2],
-        mSampleValues = this._mSampleValues;
-
-      var intervalStart = 0.0;
-      var currentSample = 1;
-      var lastSample = kSplineTableSize - 1;
-
-      for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
-        intervalStart += kSampleStepSize;
-      }
-      --currentSample;
-
-      // Interpolate to provide an initial guess for t
-      var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
-      var guessForT = intervalStart + dist * kSampleStepSize;
-
-      var initialSlope = getSlope(guessForT, mX1, mX2);
-      if (initialSlope >= NEWTON_MIN_SLOPE) {
-        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
-      } if (initialSlope === 0.0) {
-        return guessForT;
-      }
-      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
-    },
-  };
-
-  return ob;
-}());
-
-(function () {
-  var lastTime = 0;
-  var vendors = ['ms', 'moz', 'webkit', 'o'];
-  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { // eslint-disable-line no-plusplus
-    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
-    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function (callback) {
-      var currTime = new Date().getTime();
-      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
-      var id = setTimeout(function () {
-        callback(currTime + timeToCall);
+    AudioController.prototype = {
+      addAudio: function addAudio(audio) {
+        this.audios.push(audio);
       },
-      timeToCall);
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function (id) {
-      clearTimeout(id);
-    };
-  }
-}());
-
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
-function extendPrototype(sources, destination) {
-  var i;
-  var len = sources.length;
-  var sourcePrototype;
-  for (i = 0; i < len; i += 1) {
-    sourcePrototype = sources[i].prototype;
-    for (var attr in sourcePrototype) {
-      if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];
-    }
-  }
-}
-
-function getDescriptor(object, prop) {
-  return Object.getOwnPropertyDescriptor(object, prop);
-}
-
-function createProxyFunction(prototype) {
-  function ProxyFunction() {}
-  ProxyFunction.prototype = prototype;
-  return ProxyFunction;
-}
-
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
-
-function bezFunction() {
-  var math = Math;
-
-  function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
-    var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1);
-    return det1 > -0.001 && det1 < 0.001;
-  }
-
-  function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
-    if (z1 === 0 && z2 === 0 && z3 === 0) {
-      return pointOnLine2D(x1, y1, x2, y2, x3, y3);
-    }
-    var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
-    var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
-    var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
-    var diffDist;
-    if (dist1 > dist2) {
-      if (dist1 > dist3) {
-        diffDist = dist1 - dist2 - dist3;
-      } else {
-        diffDist = dist3 - dist2 - dist1;
-      }
-    } else if (dist3 > dist2) {
-      diffDist = dist3 - dist2 - dist1;
-    } else {
-      diffDist = dist2 - dist1 - dist3;
-    }
-    return diffDist > -0.0001 && diffDist < 0.0001;
-  }
-
-  var getBezierLength = (function () {
-    return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
-      var k;
-      var i;
-      var len;
-      var ptCoord;
-      var perc;
-      var addedLength = 0;
-      var ptDistance;
-      var point = [];
-      var lastPoint = [];
-      var lengthData = bezierLengthPool.newElement();
-      len = pt3.length;
-      for (k = 0; k < curveSegments; k += 1) {
-        perc = k / (curveSegments - 1);
-        ptDistance = 0;
-        for (i = 0; i < len; i += 1) {
-          ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
-          point[i] = ptCoord;
-          if (lastPoint[i] !== null) {
-            ptDistance += bmPow(point[i] - lastPoint[i], 2);
-          }
-          lastPoint[i] = point[i];
-        }
-        if (ptDistance) {
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-        }
-        lengthData.percents[k] = perc;
-        lengthData.lengths[k] = addedLength;
-      }
-      lengthData.addedLength = addedLength;
-      return lengthData;
-    };
-  }());
-
-  function getSegmentsLength(shapeData) {
-    var segmentsLength = segmentsLengthPool.newElement();
-    var closed = shapeData.c;
-    var pathV = shapeData.v;
-    var pathO = shapeData.o;
-    var pathI = shapeData.i;
-    var i;
-    var len = shapeData._length;
-    var lengths = segmentsLength.lengths;
-    var totalLength = 0;
-    for (i = 0; i < len - 1; i += 1) {
-      lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
-      totalLength += lengths[i].addedLength;
-    }
-    if (closed && len) {
-      lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
-      totalLength += lengths[i].addedLength;
-    }
-    segmentsLength.totalLength = totalLength;
-    return segmentsLength;
-  }
-
-  function BezierData(length) {
-    this.segmentLength = 0;
-    this.points = new Array(length);
-  }
-
-  function PointData(partial, point) {
-    this.partialLength = partial;
-    this.point = point;
-  }
-
-  var buildBezierData = (function () {
-    var storedData = {};
-
-    return function (pt1, pt2, pt3, pt4) {
-      var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
-      if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
-        var k;
+      pause: function pause() {
         var i;
-        var len;
-        var ptCoord;
-        var perc;
-        var addedLength = 0;
-        var ptDistance;
-        var point;
-        var lastPoint = null;
-        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])) {
-          curveSegments = 2;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].pause();
         }
-        var bezierData = new BezierData(curveSegments);
-        len = pt3.length;
-        for (k = 0; k < curveSegments; k += 1) {
-          point = createSizedArray(len);
-          perc = k / (curveSegments - 1);
-          ptDistance = 0;
-          for (i = 0; i < len; i += 1) {
-            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
-            point[i] = ptCoord;
-            if (lastPoint !== null) {
-              ptDistance += bmPow(point[i] - lastPoint[i], 2);
-            }
-          }
-          ptDistance = bmSqrt(ptDistance);
-          addedLength += ptDistance;
-          bezierData.points[k] = new PointData(ptDistance, point);
-          lastPoint = point;
+      },
+      resume: function resume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].resume();
         }
-        bezierData.segmentLength = addedLength;
-        storedData[bezierName] = bezierData;
+      },
+      setRate: function setRate(rateValue) {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].setRate(rateValue);
+        }
+      },
+      createAudio: function createAudio(assetPath) {
+        if (this.audioFactory) {
+          return this.audioFactory(assetPath);
+        }
+
+        if (window.Howl) {
+          return new window.Howl({
+            src: [assetPath]
+          });
+        }
+
+        return {
+          isPlaying: false,
+          play: function play() {
+            this.isPlaying = true;
+          },
+          seek: function seek() {
+            this.isPlaying = false;
+          },
+          playing: function playing() {},
+          rate: function rate() {},
+          setVolume: function setVolume() {}
+        };
+      },
+      setAudioFactory: function setAudioFactory(audioFactory) {
+        this.audioFactory = audioFactory;
+      },
+      setVolume: function setVolume(value) {
+        this._volume = value;
+
+        this._updateVolume();
+      },
+      mute: function mute() {
+        this._isMuted = true;
+
+        this._updateVolume();
+      },
+      unmute: function unmute() {
+        this._isMuted = false;
+
+        this._updateVolume();
+      },
+      getVolume: function getVolume() {
+        return this._volume;
+      },
+      _updateVolume: function _updateVolume() {
+        var i;
+        var len = this.audios.length;
+
+        for (i = 0; i < len; i += 1) {
+          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
+        }
       }
-      return storedData[bezierName];
     };
-  }());
+    return function () {
+      return new AudioController();
+    };
+  }();
 
-  function getDistancePerc(perc, bezierData) {
-    var percents = bezierData.percents;
-    var lengths = bezierData.lengths;
-    var len = percents.length;
-    var initPos = bmFloor((len - 1) * perc);
-    var lengthPos = perc * bezierData.addedLength;
-    var lPerc = 0;
-    if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
-      return percents[initPos];
-    }
-    var dir = lengths[initPos] > lengthPos ? -1 : 1;
-    var flag = true;
-    while (flag) {
-      if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
-        lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
-        flag = false;
-      } else {
-        initPos += dir;
+  var createTypedArray = function () {
+    function createRegularArray(type, len) {
+      var i = 0;
+      var arr = [];
+      var value;
+
+      switch (type) {
+        case 'int16':
+        case 'uint8c':
+          value = 1;
+          break;
+
+        default:
+          value = 1.1;
+          break;
       }
-      if (initPos < 0 || initPos >= len - 1) {
-        // FIX for TypedArrays that don't store floating point values with enough accuracy
-        if (initPos === len - 1) {
-          return percents[initPos];
-        }
-        flag = false;
+
+      for (i = 0; i < len; i += 1) {
+        arr.push(value);
       }
+
+      return arr;
     }
-    return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+
+    function createTypedArrayFactory(type, len) {
+      if (type === 'float32') {
+        return new Float32Array(len);
+      }
+
+      if (type === 'int16') {
+        return new Int16Array(len);
+      }
+
+      if (type === 'uint8c') {
+        return new Uint8ClampedArray(len);
+      }
+
+      return createRegularArray(type, len);
+    }
+
+    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
+      return createTypedArrayFactory;
+    }
+
+    return createRegularArray;
+  }();
+
+  function createSizedArray(len) {
+    return Array.apply(null, {
+      length: len
+    });
   }
 
-  function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
-    var t1 = getDistancePerc(percent, bezierData);
-    var u1 = 1 - t1;
-    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;
-    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;
-    return [ptX, ptY];
-  }
+  function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); }
+  var subframeEnabled = true;
+  var expressionsPlugin = null;
+  var idPrefix = '';
+  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+  var _shouldRoundValues = false;
+  var bmPow = Math.pow;
+  var bmSqrt = Math.sqrt;
+  var bmFloor = Math.floor;
+  var bmMax = Math.max;
+  var bmMin = Math.min;
+  var BMMath = {};
 
-  var bezierSegmentPoints = createTypedArray('float32', 8);
-
-  function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
-    if (startPerc < 0) {
-      startPerc = 0;
-    } else if (startPerc > 1) {
-      startPerc = 1;
-    }
-    var t0 = getDistancePerc(startPerc, bezierData);
-    endPerc = endPerc > 1 ? 1 : endPerc;
-    var t1 = getDistancePerc(endPerc, bezierData);
+  (function () {
+    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'];
     var i;
-    var len = pt1.length;
-    var u0 = 1 - t0;
-    var u1 = 1 - t1;
-    var u0u0u0 = u0 * u0 * u0;
-    var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
-    var t0t0t0 = t0 * t0 * t0;
-    //
-    var u0u0u1 = u0 * u0 * u1;
-    var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
-    var t0t0t1 = t0 * t0 * t1;
-    //
-    var u0u1u1 = u0 * u1 * u1;
-    var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
-    var t0t1t1 = t0 * t1 * t1;
-    //
-    var u1u1u1 = u1 * u1 * u1;
-    var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
-    var t1t1t1 = t1 * t1 * t1;
+    var len = propertyNames.length;
+
     for (i = 0; i < len; i += 1) {
-      bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
-      bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      BMMath[propertyNames[i]] = Math[propertyNames[i]];
     }
+  })();
 
-    return bezierSegmentPoints;
+  function ProjectInterface$1() {
+    return {};
   }
 
-  return {
-    getSegmentsLength: getSegmentsLength,
-    getNewSegment: getNewSegment,
-    getPointInSegment: getPointInSegment,
-    buildBezierData: buildBezierData,
-    pointOnLine2D: pointOnLine2D,
-    pointOnLine3D: pointOnLine3D,
-  };
-}
+  BMMath.random = Math.random;
 
-var bez = bezFunction();
+  BMMath.abs = function (val) {
+    var tOfVal = _typeof$6(val);
 
-/* global _useWebWorker */
+    if (tOfVal === 'object' && val.length) {
+      var absArr = createSizedArray(val.length);
+      var i;
+      var len = val.length;
 
-var dataManager = (function () {
-  var _counterId = 1;
-  var processes = [];
-  var workerFn;
-  var workerInstance;
-  var workerProxy = {
-    onmessage: function () {
+      for (i = 0; i < len; i += 1) {
+        absArr[i] = Math.abs(val[i]);
+      }
 
-    },
-    postMessage: function (path) {
-      workerFn({
-        data: path,
-      });
-    },
-  };
-  var _workerSelf = {
-    postMessage: function (data) {
-      workerProxy.onmessage({
-        data: data,
-      });
-    },
-  };
-  function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
-      var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
-      var url = URL.createObjectURL(blob);
-      return new Worker(url);
+      return absArr;
     }
-    workerFn = fn;
-    return workerProxy;
+
+    return Math.abs(val);
+  };
+
+  var defaultCurveSegments = 150;
+  var degToRads = Math.PI / 180;
+  var roundCorner = 0.5519;
+
+  function roundValues(flag) {
+    _shouldRoundValues = !!flag;
   }
 
-  function setupWorker() {
-    if (!workerInstance) {
-      workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
+  function bmRnd(value) {
+    if (_shouldRoundValues) {
+      return Math.round(value);
+    }
 
-        function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
+    return value;
+  }
 
-          function completeLayers(layers, comps) {
-            var layerData;
-            var i;
-            var len = layers.length;
-            var j;
-            var jLen;
-            var k;
-            var kLen;
-            for (i = 0; i < len; i += 1) {
-              layerData = layers[i];
-              if (('ks' in layerData) && !layerData.completed) {
-                layerData.completed = true;
-                if (layerData.tt) {
-                  layers[i - 1].td = layerData.tt;
-                }
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      convertPathsToAbsoluteValues(maskProps[j].pt.k);
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
-                        }
-                      }
-                    }
-                  }
-                }
-                if (layerData.ty === 0) {
-                  layerData.layers = findCompLayers(layerData.refId, comps);
-                  completeLayers(layerData.layers, comps);
-                } else if (layerData.ty === 4) {
-                  completeShapes(layerData.shapes);
-                } else if (layerData.ty === 5) {
-                  completeText(layerData);
-                }
-              }
-            }
-          }
+  function styleDiv(element) {
+    element.style.position = 'absolute';
+    element.style.top = 0;
+    element.style.left = 0;
+    element.style.display = 'block';
+    element.style.transformOrigin = '0 0';
+    element.style.webkitTransformOrigin = '0 0';
+    element.style.backfaceVisibility = 'visible';
+    element.style.webkitBackfaceVisibility = 'visible';
+    element.style.transformStyle = 'preserve-3d';
+    element.style.webkitTransformStyle = 'preserve-3d';
+    element.style.mozTransformStyle = 'preserve-3d';
+  }
 
-          function findCompLayers(id, comps) {
-            var i = 0;
-            var len = comps.length;
-            while (i < len) {
-              if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
-              }
-              i += 1;
-            }
-            return null;
-          }
+  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {
+    this.type = type;
+    this.currentTime = currentTime;
+    this.totalTime = totalTime;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function completeShapes(arr) {
-            var i;
-            var len = arr.length;
-            var j;
-            var jLen;
-            for (i = len - 1; i >= 0; i -= 1) {
-              if (arr[i].ty === 'sh') {
-                if (arr[i].ks.k.i) {
-                  convertPathsToAbsoluteValues(arr[i].ks.k);
-                } else {
-                  jLen = arr[i].ks.k.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (arr[i].ks.k[j].s) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
-                    }
-                    if (arr[i].ks.k[j].e) {
-                      convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
-                    }
-                  }
-                }
-              } else if (arr[i].ty === 'gr') {
-                completeShapes(arr[i].it);
-              }
-            }
-          }
+  function BMCompleteEvent(type, frameMultiplier) {
+    this.type = type;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function convertPathsToAbsoluteValues(path) {
-            var i;
-            var len = path.i.length;
-            for (i = 0; i < len; i += 1) {
-              path.i[i][0] += path.v[i][0];
-              path.i[i][1] += path.v[i][1];
-              path.o[i][0] += path.v[i][0];
-              path.o[i][1] += path.v[i][1];
-            }
-          }
+  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {
+    this.type = type;
+    this.currentLoop = currentLoop;
+    this.totalLoops = totalLoops;
+    this.direction = frameMultiplier < 0 ? -1 : 1;
+  }
 
-          function checkVersion(minimum, animVersionString) {
-            var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
-            if (minimum[0] > animVersion[0]) {
-              return true;
-            } if (animVersion[0] > minimum[0]) {
-              return false;
-            }
-            if (minimum[1] > animVersion[1]) {
-              return true;
-            } if (animVersion[1] > minimum[1]) {
-              return false;
-            }
-            if (minimum[2] > animVersion[2]) {
-              return true;
-            } if (animVersion[2] > minimum[2]) {
-              return false;
-            }
-            return null;
-          }
+  function BMSegmentStartEvent(type, firstFrame, totalFrames) {
+    this.type = type;
+    this.firstFrame = firstFrame;
+    this.totalFrames = totalFrames;
+  }
 
-          var checkText = (function () {
-            var minimumVersion = [4, 4, 14];
+  function BMDestroyEvent(type, target) {
+    this.type = type;
+    this.target = target;
+  }
 
-            function updateTextLayer(textLayer) {
-              var documentData = textLayer.t.d;
-              textLayer.t.d = {
-                k: [
-                  {
-                    s: documentData,
-                    t: 0,
-                  },
-                ],
-              };
-            }
+  function BMRenderFrameErrorEvent(nativeError, currentTime) {
+    this.type = 'renderFrameError';
+    this.nativeError = nativeError;
+    this.currentTime = currentTime;
+  }
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+  function BMConfigErrorEvent(nativeError) {
+    this.type = 'configError';
+    this.nativeError = nativeError;
+  }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function BMAnimationConfigErrorEvent(type, nativeError) {
+    this.type = type;
+    this.nativeError = nativeError;
+  }
 
-          var checkChars = (function () {
-            var minimumVersion = [4, 7, 99];
-            return function (animationData) {
-              if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
-                var i;
-                var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
-                for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
+  var createElementID = function () {
+    var _count = 0;
+    return function createID() {
+      _count += 1;
+      return idPrefix + '__lottie_element_' + _count;
+    };
+  }();
 
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
-                    }
-                  }
-                }
-              }
-            };
-          }());
+  function HSVtoRGB(h, s, v) {
+    var r;
+    var g;
+    var b;
+    var i;
+    var f;
+    var p;
+    var q;
+    var t;
+    i = Math.floor(h * 6);
+    f = h * 6 - i;
+    p = v * (1 - s);
+    q = v * (1 - f * s);
+    t = v * (1 - (1 - f) * s);
 
-          var checkPathProperties = (function () {
-            var minimumVersion = [5, 7, 15];
+    switch (i % 6) {
+      case 0:
+        r = v;
+        g = t;
+        b = p;
+        break;
 
-            function updateTextLayer(textLayer) {
-              var pathData = textLayer.t.p;
-              if (typeof pathData.a === 'number') {
-                pathData.a = {
-                  a: 0,
-                  k: pathData.a,
-                };
-              }
-              if (typeof pathData.p === 'number') {
-                pathData.p = {
-                  a: 0,
-                  k: pathData.p,
-                };
-              }
-              if (typeof pathData.r === 'number') {
-                pathData.r = {
-                  a: 0,
-                  k: pathData.r,
-                };
-              }
-            }
+      case 1:
+        r = q;
+        g = v;
+        b = p;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 5) {
-                  updateTextLayer(layers[i]);
-                }
-              }
-            }
+      case 2:
+        r = p;
+        g = v;
+        b = t;
+        break;
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+      case 3:
+        r = p;
+        g = q;
+        b = v;
+        break;
 
-          var checkColors = (function () {
-            var minimumVersion = [4, 1, 9];
+      case 4:
+        r = t;
+        g = p;
+        b = v;
+        break;
 
-            function iterateShapes(shapes) {
-              var i;
-              var len = shapes.length;
-              var j;
-              var jLen;
-              for (i = 0; i < len; i += 1) {
-                if (shapes[i].ty === 'gr') {
-                  iterateShapes(shapes[i].it);
-                } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
-                  if (shapes[i].c.k && shapes[i].c.k[0].i) {
-                    jLen = shapes[i].c.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (shapes[i].c.k[j].s) {
-                        shapes[i].c.k[j].s[0] /= 255;
-                        shapes[i].c.k[j].s[1] /= 255;
-                        shapes[i].c.k[j].s[2] /= 255;
-                        shapes[i].c.k[j].s[3] /= 255;
-                      }
-                      if (shapes[i].c.k[j].e) {
-                        shapes[i].c.k[j].e[0] /= 255;
-                        shapes[i].c.k[j].e[1] /= 255;
-                        shapes[i].c.k[j].e[2] /= 255;
-                        shapes[i].c.k[j].e[3] /= 255;
-                      }
-                    }
-                  } else {
-                    shapes[i].c.k[0] /= 255;
-                    shapes[i].c.k[1] /= 255;
-                    shapes[i].c.k[2] /= 255;
-                    shapes[i].c.k[3] /= 255;
-                  }
-                }
-              }
-            }
+      case 5:
+        r = v;
+        g = p;
+        b = q;
+        break;
 
-            function iterateLayers(layers) {
-              var i;
-              var len = layers.length;
-              for (i = 0; i < len; i += 1) {
-                if (layers[i].ty === 4) {
-                  iterateShapes(layers[i].shapes);
-                }
-              }
-            }
+      default:
+        break;
+    }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
-                  }
-                }
-              }
-            };
-          }());
+    return [r, g, b];
+  }
 
-          var checkShapes = (function () {
-            var minimumVersion = [4, 4, 18];
+  function RGBtoHSV(r, g, b) {
+    var max = Math.max(r, g, b);
+    var min = Math.min(r, g, b);
+    var d = max - min;
+    var h;
+    var s = max === 0 ? 0 : d / max;
+    var v = max / 255;
 
-            function completeClosingShapes(arr) {
-              var i;
-              var len = arr.length;
-              var j;
-              var jLen;
-              for (i = len - 1; i >= 0; i -= 1) {
-                if (arr[i].ty === 'sh') {
-                  if (arr[i].ks.k.i) {
-                    arr[i].ks.k.c = arr[i].closed;
-                  } else {
-                    jLen = arr[i].ks.k.length;
-                    for (j = 0; j < jLen; j += 1) {
-                      if (arr[i].ks.k[j].s) {
-                        arr[i].ks.k[j].s[0].c = arr[i].closed;
-                      }
-                      if (arr[i].ks.k[j].e) {
-                        arr[i].ks.k[j].e[0].c = arr[i].closed;
-                      }
-                    }
-                  }
-                } else if (arr[i].ty === 'gr') {
-                  completeClosingShapes(arr[i].it);
-                }
-              }
-            }
+    switch (max) {
+      case min:
+        h = 0;
+        break;
 
-            function iterateLayers(layers) {
+      case r:
+        h = g - b + d * (g < b ? 6 : 0);
+        h /= 6 * d;
+        break;
+
+      case g:
+        h = b - r + d * 2;
+        h /= 6 * d;
+        break;
+
+      case b:
+        h = r - g + d * 4;
+        h /= 6 * d;
+        break;
+
+      default:
+        break;
+    }
+
+    return [h, s, v];
+  }
+
+  function addSaturationToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[1] += offset;
+
+    if (hsv[1] > 1) {
+      hsv[1] = 1;
+    } else if (hsv[1] <= 0) {
+      hsv[1] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addBrightnessToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[2] += offset;
+
+    if (hsv[2] > 1) {
+      hsv[2] = 1;
+    } else if (hsv[2] < 0) {
+      hsv[2] = 0;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  function addHueToRGB(color, offset) {
+    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);
+    hsv[0] += offset / 360;
+
+    if (hsv[0] > 1) {
+      hsv[0] -= 1;
+    } else if (hsv[0] < 0) {
+      hsv[0] += 1;
+    }
+
+    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
+  }
+
+  var rgbToHex = function () {
+    var colorMap = [];
+    var i;
+    var hex;
+
+    for (i = 0; i < 256; i += 1) {
+      hex = i.toString(16);
+      colorMap[i] = hex.length === 1 ? '0' + hex : hex;
+    }
+
+    return function (r, g, b) {
+      if (r < 0) {
+        r = 0;
+      }
+
+      if (g < 0) {
+        g = 0;
+      }
+
+      if (b < 0) {
+        b = 0;
+      }
+
+      return '#' + colorMap[r] + colorMap[g] + colorMap[b];
+    };
+  }();
+
+  var setSubframeEnabled = function setSubframeEnabled(flag) {
+    subframeEnabled = !!flag;
+  };
+
+  var getSubframeEnabled = function getSubframeEnabled() {
+    return subframeEnabled;
+  };
+
+  var setExpressionsPlugin = function setExpressionsPlugin(value) {
+    expressionsPlugin = value;
+  };
+
+  var getExpressionsPlugin = function getExpressionsPlugin() {
+    return expressionsPlugin;
+  };
+
+  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {
+    defaultCurveSegments = value;
+  };
+
+  var getDefaultCurveSegments = function getDefaultCurveSegments() {
+    return defaultCurveSegments;
+  };
+
+  var setIdPrefix = function setIdPrefix(value) {
+    idPrefix = value;
+  };
+
+  var getIdPrefix = function getIdPrefix() {
+    return idPrefix;
+  };
+
+  function createNS(type) {
+    // return {appendChild:function(){},setAttribute:function(){},style:{}}
+    return document.createElementNS(svgNS, type);
+  }
+
+  function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); }
+
+  var dataManager = function () {
+    var _counterId = 1;
+    var processes = [];
+    var workerFn;
+    var workerInstance;
+    var workerProxy = {
+      onmessage: function onmessage() {},
+      postMessage: function postMessage(path) {
+        workerFn({
+          data: path
+        });
+      }
+    };
+    var _workerSelf = {
+      postMessage: function postMessage(data) {
+        workerProxy.onmessage({
+          data: data
+        });
+      }
+    };
+
+    function createWorker(fn) {
+      if (window.Worker && window.Blob && getWebWorker()) {
+        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {
+          type: 'text/javascript'
+        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
+
+        var url = URL.createObjectURL(blob);
+        return new Worker(url);
+      }
+
+      workerFn = fn;
+      return workerProxy;
+    }
+
+    function setupWorker() {
+      if (!workerInstance) {
+        workerInstance = createWorker(function workerStart(e) {
+          function dataFunctionManager() {
+            function completeLayers(layers, comps) {
               var layerData;
               var i;
               var len = layers.length;
@@ -2023,4860 +709,1038 @@
               var jLen;
               var k;
               var kLen;
+
               for (i = 0; i < len; i += 1) {
                 layerData = layers[i];
-                if (layerData.hasMask) {
-                  var maskProps = layerData.masksProperties;
-                  jLen = maskProps.length;
-                  for (j = 0; j < jLen; j += 1) {
-                    if (maskProps[j].pt.k.i) {
-                      maskProps[j].pt.k.c = maskProps[j].cl;
-                    } else {
-                      kLen = maskProps[j].pt.k.length;
-                      for (k = 0; k < kLen; k += 1) {
-                        if (maskProps[j].pt.k[k].s) {
-                          maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
-                        }
-                        if (maskProps[j].pt.k[k].e) {
-                          maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+
+                if ('ks' in layerData && !layerData.completed) {
+                  layerData.completed = true;
+
+                  if (layerData.tt) {
+                    layers[i - 1].td = layerData.tt;
+                  }
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
+                          }
                         }
                       }
                     }
                   }
-                }
-                if (layerData.ty === 4) {
-                  completeClosingShapes(layerData.shapes);
-                }
-              }
-            }
 
-            return function (animationData) {
-              if (checkVersion(minimumVersion, animationData.v)) {
-                iterateLayers(animationData.layers);
-                if (animationData.assets) {
-                  var i;
-                  var len = animationData.assets.length;
-                  for (i = 0; i < len; i += 1) {
-                    if (animationData.assets[i].layers) {
-                      iterateLayers(animationData.assets[i].layers);
-                    }
+                  if (layerData.ty === 0) {
+                    layerData.layers = findCompLayers(layerData.refId, comps);
+                    completeLayers(layerData.layers, comps);
+                  } else if (layerData.ty === 4) {
+                    completeShapes(layerData.shapes);
+                  } else if (layerData.ty === 5) {
+                    completeText(layerData);
                   }
                 }
               }
-            };
-          }());
-
-          function completeData(animationData) {
-            if (animationData.__complete) {
-              return;
             }
-            checkColors(animationData);
-            checkText(animationData);
-            checkChars(animationData);
-            checkPathProperties(animationData);
-            checkShapes(animationData);
-            completeLayers(animationData.layers, animationData.assets);
-            animationData.__complete = true;
-          }
 
-          function completeText(data) {
-            if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+            function completeChars(chars, assets) {
+              if (chars) {
+                var i = 0;
+                var len = chars.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (chars[i].t === 1) {
+                    // var compData = findComp(chars[i].data.refId, assets);
+                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;
+                    // chars[i].data.op = 99999;
+                    // chars[i].data.st = 0;
+                    // chars[i].data.sr = 1;
+                    // chars[i].w = compData.w;
+                    // chars[i].data.ks = {
+                    //   a: { k: [0, 0, 0], a: 0 },
+                    //   p: { k: [0, -compData.h, 0], a: 0 },
+                    //   r: { k: 0, a: 0 },
+                    //   s: { k: [100, 100], a: 0 },
+                    //   o: { k: 100, a: 0 },
+                    // };
+
+                    completeLayers(chars[i].data.layers, assets);
+                  }
+                }
+              }
             }
-          }
 
-          var moduleOb = {};
-          moduleOb.completeData = completeData;
-          moduleOb.checkColors = checkColors;
-          moduleOb.checkChars = checkChars;
-          moduleOb.checkPathProperties = checkPathProperties;
-          moduleOb.checkShapes = checkShapes;
-          moduleOb.completeLayers = completeLayers;
+            function findComp(id, comps) {
+              var i = 0;
+              var len = comps.length;
 
-          return moduleOb;
-        }
-        if (!_workerSelf.dataManager) {
-          _workerSelf.dataManager = dataFunctionManager();
-        }
+              while (i < len) {
+                if (comps[i].id === id) {
+                  return comps[i];
+                }
 
-        /* exported assetLoader */
-        if (!_workerSelf.assetLoader) {
-          _workerSelf.assetLoader = (function () {
-            function formatResponse(xhr) {
-              // using typeof doubles the time of execution of this method,
-              // so if available, it's better to use the header to validate the type
-              var contentTypeHeader = xhr.getResponseHeader('content-type');
-              if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
-                return xhr.response;
+                i += 1;
               }
-              if (xhr.response && typeof xhr.response === 'object') {
-                return xhr.response;
-              } if (xhr.response && typeof xhr.response === 'string') {
-                return JSON.parse(xhr.response);
-              } if (xhr.responseText) {
-                return JSON.parse(xhr.responseText);
-              }
+
               return null;
             }
 
-            function loadAsset(path, fullPath, callback, errorCallback) {
-              var response;
-              var xhr = new XMLHttpRequest();
-              // set responseType after calling open or IE will break.
-              try {
-                // This crashes on Android WebView prior to KitKat
-                xhr.responseType = 'json';
-              } catch (err) {} // eslint-disable-line no-empty
-              xhr.onreadystatechange = function () {
-                if (xhr.readyState === 4) {
-                  if (xhr.status === 200) {
-                    response = formatResponse(xhr);
-                    callback(response);
+            function findCompLayers(id, comps) {
+              var comp = findComp(id, comps);
+
+              if (comp) {
+                if (!comp.layers.__used) {
+                  comp.layers.__used = true;
+                  return comp.layers;
+                }
+
+                return JSON.parse(JSON.stringify(comp.layers));
+              }
+
+              return null;
+            }
+
+            function completeShapes(arr) {
+              var i;
+              var len = arr.length;
+              var j;
+              var jLen;
+
+              for (i = len - 1; i >= 0; i -= 1) {
+                if (arr[i].ty === 'sh') {
+                  if (arr[i].ks.k.i) {
+                    convertPathsToAbsoluteValues(arr[i].ks.k);
                   } else {
-                    try {
-                      response = formatResponse(xhr);
-                      callback(response);
-                    } catch (err) {
-                      if (errorCallback) {
-                        errorCallback(err);
+                    jLen = arr[i].ks.k.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (arr[i].ks.k[j].s) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
+                      }
+
+                      if (arr[i].ks.k[j].e) {
+                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
+                      }
+                    }
+                  }
+                } else if (arr[i].ty === 'gr') {
+                  completeShapes(arr[i].it);
+                }
+              }
+            }
+
+            function convertPathsToAbsoluteValues(path) {
+              var i;
+              var len = path.i.length;
+
+              for (i = 0; i < len; i += 1) {
+                path.i[i][0] += path.v[i][0];
+                path.i[i][1] += path.v[i][1];
+                path.o[i][0] += path.v[i][0];
+                path.o[i][1] += path.v[i][1];
+              }
+            }
+
+            function checkVersion(minimum, animVersionString) {
+              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];
+
+              if (minimum[0] > animVersion[0]) {
+                return true;
+              }
+
+              if (animVersion[0] > minimum[0]) {
+                return false;
+              }
+
+              if (minimum[1] > animVersion[1]) {
+                return true;
+              }
+
+              if (animVersion[1] > minimum[1]) {
+                return false;
+              }
+
+              if (minimum[2] > animVersion[2]) {
+                return true;
+              }
+
+              if (animVersion[2] > minimum[2]) {
+                return false;
+              }
+
+              return null;
+            }
+
+            var checkText = function () {
+              var minimumVersion = [4, 4, 14];
+
+              function updateTextLayer(textLayer) {
+                var documentData = textLayer.t.d;
+                textLayer.t.d = {
+                  k: [{
+                    s: documentData,
+                    t: 0
+                  }]
+                };
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
                       }
                     }
                   }
                 }
               };
-              try {
-                xhr.open('GET', path, true);
-              } catch (error) {
-                xhr.open('GET', fullPath + '/' + path, true);
-              }
-              xhr.send();
-            }
-            return {
-              load: loadAsset,
-            };
-          }());
-        }
+            }();
 
-        if (e.data.type === 'loadAnimation') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            var checkChars = function () {
+              var minimumVersion = [4, 7, 99];
+              return function (animationData) {
+                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
+                  var i;
+                  var len = animationData.chars.length;
+
+                  for (i = 0; i < len; i += 1) {
+                    var charData = animationData.chars[i];
+
+                    if (charData.data && charData.data.shapes) {
+                      completeShapes(charData.data.shapes);
+                      charData.data.ip = 0;
+                      charData.data.op = 99999;
+                      charData.data.st = 0;
+                      charData.data.sr = 1;
+                      charData.data.ks = {
+                        p: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        s: {
+                          k: [100, 100],
+                          a: 0
+                        },
+                        a: {
+                          k: [0, 0],
+                          a: 0
+                        },
+                        r: {
+                          k: 0,
+                          a: 0
+                        },
+                        o: {
+                          k: 100,
+                          a: 0
+                        }
+                      };
+
+                      if (!animationData.chars[i].t) {
+                        charData.data.shapes.push({
+                          ty: 'no'
+                        });
+                        charData.data.shapes[0].it.push({
+                          p: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          s: {
+                            k: [100, 100],
+                            a: 0
+                          },
+                          a: {
+                            k: [0, 0],
+                            a: 0
+                          },
+                          r: {
+                            k: 0,
+                            a: 0
+                          },
+                          o: {
+                            k: 100,
+                            a: 0
+                          },
+                          sk: {
+                            k: 0,
+                            a: 0
+                          },
+                          sa: {
+                            k: 0,
+                            a: 0
+                          },
+                          ty: 'tr'
+                        });
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkPathProperties = function () {
+              var minimumVersion = [5, 7, 15];
+
+              function updateTextLayer(textLayer) {
+                var pathData = textLayer.t.p;
+
+                if (typeof pathData.a === 'number') {
+                  pathData.a = {
+                    a: 0,
+                    k: pathData.a
+                  };
+                }
+
+                if (typeof pathData.p === 'number') {
+                  pathData.p = {
+                    a: 0,
+                    k: pathData.p
+                  };
+                }
+
+                if (typeof pathData.r === 'number') {
+                  pathData.r = {
+                    a: 0,
+                    k: pathData.r
+                  };
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 5) {
+                    updateTextLayer(layers[i]);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkColors = function () {
+              var minimumVersion = [4, 1, 9];
+
+              function iterateShapes(shapes) {
+                var i;
+                var len = shapes.length;
+                var j;
+                var jLen;
+
+                for (i = 0; i < len; i += 1) {
+                  if (shapes[i].ty === 'gr') {
+                    iterateShapes(shapes[i].it);
+                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {
+                    if (shapes[i].c.k && shapes[i].c.k[0].i) {
+                      jLen = shapes[i].c.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (shapes[i].c.k[j].s) {
+                          shapes[i].c.k[j].s[0] /= 255;
+                          shapes[i].c.k[j].s[1] /= 255;
+                          shapes[i].c.k[j].s[2] /= 255;
+                          shapes[i].c.k[j].s[3] /= 255;
+                        }
+
+                        if (shapes[i].c.k[j].e) {
+                          shapes[i].c.k[j].e[0] /= 255;
+                          shapes[i].c.k[j].e[1] /= 255;
+                          shapes[i].c.k[j].e[2] /= 255;
+                          shapes[i].c.k[j].e[3] /= 255;
+                        }
+                      }
+                    } else {
+                      shapes[i].c.k[0] /= 255;
+                      shapes[i].c.k[1] /= 255;
+                      shapes[i].c.k[2] /= 255;
+                      shapes[i].c.k[3] /= 255;
+                    }
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var i;
+                var len = layers.length;
+
+                for (i = 0; i < len; i += 1) {
+                  if (layers[i].ty === 4) {
+                    iterateShapes(layers[i].shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            var checkShapes = function () {
+              var minimumVersion = [4, 4, 18];
+
+              function completeClosingShapes(arr) {
+                var i;
+                var len = arr.length;
+                var j;
+                var jLen;
+
+                for (i = len - 1; i >= 0; i -= 1) {
+                  if (arr[i].ty === 'sh') {
+                    if (arr[i].ks.k.i) {
+                      arr[i].ks.k.c = arr[i].closed;
+                    } else {
+                      jLen = arr[i].ks.k.length;
+
+                      for (j = 0; j < jLen; j += 1) {
+                        if (arr[i].ks.k[j].s) {
+                          arr[i].ks.k[j].s[0].c = arr[i].closed;
+                        }
+
+                        if (arr[i].ks.k[j].e) {
+                          arr[i].ks.k[j].e[0].c = arr[i].closed;
+                        }
+                      }
+                    }
+                  } else if (arr[i].ty === 'gr') {
+                    completeClosingShapes(arr[i].it);
+                  }
+                }
+              }
+
+              function iterateLayers(layers) {
+                var layerData;
+                var i;
+                var len = layers.length;
+                var j;
+                var jLen;
+                var k;
+                var kLen;
+
+                for (i = 0; i < len; i += 1) {
+                  layerData = layers[i];
+
+                  if (layerData.hasMask) {
+                    var maskProps = layerData.masksProperties;
+                    jLen = maskProps.length;
+
+                    for (j = 0; j < jLen; j += 1) {
+                      if (maskProps[j].pt.k.i) {
+                        maskProps[j].pt.k.c = maskProps[j].cl;
+                      } else {
+                        kLen = maskProps[j].pt.k.length;
+
+                        for (k = 0; k < kLen; k += 1) {
+                          if (maskProps[j].pt.k[k].s) {
+                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
+                          }
+
+                          if (maskProps[j].pt.k[k].e) {
+                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (layerData.ty === 4) {
+                    completeClosingShapes(layerData.shapes);
+                  }
+                }
+              }
+
+              return function (animationData) {
+                if (checkVersion(minimumVersion, animationData.v)) {
+                  iterateLayers(animationData.layers);
+
+                  if (animationData.assets) {
+                    var i;
+                    var len = animationData.assets.length;
+
+                    for (i = 0; i < len; i += 1) {
+                      if (animationData.assets[i].layers) {
+                        iterateLayers(animationData.assets[i].layers);
+                      }
+                    }
+                  }
+                }
+              };
+            }();
+
+            function completeData(animationData) {
+              if (animationData.__complete) {
+                return;
+              }
+
+              checkColors(animationData);
+              checkText(animationData);
+              checkChars(animationData);
+              checkPathProperties(animationData);
+              checkShapes(animationData);
+              completeLayers(animationData.layers, animationData.assets);
+              completeChars(animationData.chars, animationData.assets);
+              animationData.__complete = true;
+            }
+
+            function completeText(data) {
+              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;
+              }
+            }
+
+            var moduleOb = {};
+            moduleOb.completeData = completeData;
+            moduleOb.checkColors = checkColors;
+            moduleOb.checkChars = checkChars;
+            moduleOb.checkPathProperties = checkPathProperties;
+            moduleOb.checkShapes = checkShapes;
+            moduleOb.completeLayers = completeLayers;
+            return moduleOb;
+          }
+
+          if (!_workerSelf.dataManager) {
+            _workerSelf.dataManager = dataFunctionManager();
+          }
+
+          if (!_workerSelf.assetLoader) {
+            _workerSelf.assetLoader = function () {
+              function formatResponse(xhr) {
+                // using typeof doubles the time of execution of this method,
+                // so if available, it's better to use the header to validate the type
+                var contentTypeHeader = xhr.getResponseHeader('content-type');
+
+                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {
+                  return xhr.response;
+                }
+
+                if (xhr.response && _typeof$5(xhr.response) === 'object') {
+                  return xhr.response;
+                }
+
+                if (xhr.response && typeof xhr.response === 'string') {
+                  return JSON.parse(xhr.response);
+                }
+
+                if (xhr.responseText) {
+                  return JSON.parse(xhr.responseText);
+                }
+
+                return null;
+              }
+
+              function loadAsset(path, fullPath, callback, errorCallback) {
+                var response;
+                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.
+
+                try {
+                  // This crashes on Android WebView prior to KitKat
+                  xhr.responseType = 'json';
+                } catch (err) {} // eslint-disable-line no-empty
+
+
+                xhr.onreadystatechange = function () {
+                  if (xhr.readyState === 4) {
+                    if (xhr.status === 200) {
+                      response = formatResponse(xhr);
+                      callback(response);
+                    } else {
+                      try {
+                        response = formatResponse(xhr);
+                        callback(response);
+                      } catch (err) {
+                        if (errorCallback) {
+                          errorCallback(err);
+                        }
+                      }
+                    }
+                  }
+                };
+
+                try {
+                  xhr.open('GET', path, true);
+                } catch (error) {
+                  xhr.open('GET', fullPath + '/' + path, true);
+                }
+
+                xhr.send();
+              }
+
+              return {
+                load: loadAsset
+              };
+            }();
+          }
+
+          if (e.data.type === 'loadAnimation') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.dataManager.completeData(data);
+
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        } else if (e.data.type === 'complete') {
-          var animation = e.data.animation;
-          _workerSelf.dataManager.completeData(animation);
-          _workerSelf.postMessage({
-            id: e.data.id,
-            payload: animation,
-            status: 'success',
-          });
-        } else if (e.data.type === 'loadData') {
-          _workerSelf.assetLoader.load(
-            e.data.path,
-            e.data.fullPath,
-            function (data) {
+            });
+          } else if (e.data.type === 'complete') {
+            var animation = e.data.animation;
+
+            _workerSelf.dataManager.completeData(animation);
+
+            _workerSelf.postMessage({
+              id: e.data.id,
+              payload: animation,
+              status: 'success'
+            });
+          } else if (e.data.type === 'loadData') {
+            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {
               _workerSelf.postMessage({
                 id: e.data.id,
                 payload: data,
-                status: 'success',
+                status: 'success'
               });
-            },
-            function () {
+            }, function () {
               _workerSelf.postMessage({
                 id: e.data.id,
-                status: 'error',
+                status: 'error'
               });
-            }
-          );
-        }
-      });
-
-      workerInstance.onmessage = function (event) {
-        var data = event.data;
-        var id = data.id;
-        var process = processes[id];
-        processes[id] = null;
-        if (data.status === 'success') {
-          process.onComplete(data.payload);
-        } else if (process.onError) {
-          process.onError();
-        }
-      };
-    }
-  }
-
-  function createProcess(onComplete, onError) {
-    _counterId += 1;
-    var id = 'processId_' + _counterId;
-    processes[id] = {
-      onComplete: onComplete,
-      onError: onError,
-    };
-    return id;
-  }
-
-  function loadAnimation(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadAnimation',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function loadData(path, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'loadData',
-      path: path,
-      fullPath: window.location.origin + window.location.pathname,
-      id: processId,
-    });
-  }
-
-  function completeAnimation(anim, onComplete, onError) {
-    setupWorker();
-    var processId = createProcess(onComplete, onError);
-    workerInstance.postMessage({
-      type: 'complete',
-      animation: anim,
-      id: processId,
-    });
-  }
-
-  return {
-    loadAnimation: loadAnimation,
-    loadData: loadData,
-    completeAnimation: completeAnimation,
-  };
-}());
-
-/* exported getFontProperties */
-
-function getFontProperties(fontData) {
-  var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
-
-  var fWeight = 'normal'; var
-    fStyle = 'normal';
-  var len = styles.length;
-  var styleName;
-  for (var i = 0; i < len; i += 1) {
-    styleName = styles[i].toLowerCase();
-    switch (styleName) {
-      case 'italic':
-        fStyle = 'italic';
-        break;
-      case 'bold':
-        fWeight = '700';
-        break;
-      case 'black':
-        fWeight = '900';
-        break;
-      case 'medium':
-        fWeight = '500';
-        break;
-      case 'regular':
-      case 'normal':
-        fWeight = '400';
-        break;
-      case 'light':
-      case 'thin':
-        fWeight = '200';
-        break;
-      default:
-        break;
-    }
-  }
-
-  return {
-    style: fStyle,
-    weight: fontData.fWeight || fWeight,
-  };
-}
-
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
-
-var FontManager = (function () {
-  var maxWaitingTime = 5000;
-  var emptyChar = {
-    w: 0,
-    size: 0,
-    shapes: [],
-  };
-  var combinedCharacters = [];
-  // Hindi characters
-  combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366,
-    2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
-    2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
-
-  var surrogateModifiers = [
-    'd83cdffb',
-    'd83cdffc',
-    'd83cdffd',
-    'd83cdffe',
-    'd83cdfff',
-  ];
-
-  var zeroWidthJoiner = [65039, 8205];
-
-  function trimFontOptions(font) {
-    var familyArray = font.split(',');
-    var i;
-    var len = familyArray.length;
-    var enabledFamilies = [];
-    for (i = 0; i < len; i += 1) {
-      if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
-        enabledFamilies.push(familyArray[i]);
-      }
-    }
-    return enabledFamilies.join(',');
-  }
-
-  function setUpNode(font, family) {
-    var parentNode = createTag('span');
-    // Node is invisible to screen readers.
-    parentNode.setAttribute('aria-hidden', true);
-    parentNode.style.fontFamily = family;
-    var node = createTag('span');
-    // Characters that vary significantly among different fonts
-    node.innerText = 'giItT1WQy@!-/#';
-    // Visible - so we can measure it - but not on the screen
-    parentNode.style.position = 'absolute';
-    parentNode.style.left = '-10000px';
-    parentNode.style.top = '-10000px';
-    // Large font size makes even subtle changes obvious
-    parentNode.style.fontSize = '300px';
-    // Reset any font properties
-    parentNode.style.fontVariant = 'normal';
-    parentNode.style.fontStyle = 'normal';
-    parentNode.style.fontWeight = 'normal';
-    parentNode.style.letterSpacing = '0';
-    parentNode.appendChild(node);
-    document.body.appendChild(parentNode);
-
-    // Remember width with no applied web font
-    var width = node.offsetWidth;
-    node.style.fontFamily = trimFontOptions(font) + ', ' + family;
-    return { node: node, w: width, parent: parentNode };
-  }
-
-  function checkLoadedFonts() {
-    var i;
-    var len = this.fonts.length;
-    var node;
-    var w;
-    var loadedCount = len;
-    for (i = 0; i < len; i += 1) {
-      if (this.fonts[i].loaded) {
-        loadedCount -= 1;
-      } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
-        this.fonts[i].loaded = true;
-      } else {
-        node = this.fonts[i].monoCase.node;
-        w = this.fonts[i].monoCase.w;
-        if (node.offsetWidth !== w) {
-          loadedCount -= 1;
-          this.fonts[i].loaded = true;
-        } else {
-          node = this.fonts[i].sansCase.node;
-          w = this.fonts[i].sansCase.w;
-          if (node.offsetWidth !== w) {
-            loadedCount -= 1;
-            this.fonts[i].loaded = true;
-          }
-        }
-        if (this.fonts[i].loaded) {
-          this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
-          this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
-        }
-      }
-    }
-
-    if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
-      setTimeout(this.checkLoadedFontsBinded, 20);
-    } else {
-      setTimeout(this.setIsLoadedBinded, 10);
-    }
-  }
-
-  function createHelper(def, fontData) {
-    var tHelper = createNS('text');
-    tHelper.style.fontSize = '100px';
-    // tHelper.style.fontFamily = fontData.fFamily;
-
-    var fontProps = getFontProperties(fontData);
-    tHelper.setAttribute('font-family', fontData.fFamily);
-    tHelper.setAttribute('font-style', fontProps.style);
-    tHelper.setAttribute('font-weight', fontProps.weight);
-    tHelper.textContent = '1';
-    if (fontData.fClass) {
-      tHelper.style.fontFamily = 'inherit';
-      tHelper.setAttribute('class', fontData.fClass);
-    } else {
-      tHelper.style.fontFamily = fontData.fFamily;
-    }
-    def.appendChild(tHelper);
-    var tCanvasHelper = createTag('canvas').getContext('2d');
-    tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily;
-    // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
-    return tHelper;
-  }
-
-  function addFonts(fontData, defs) {
-    if (!fontData) {
-      this.isLoaded = true;
-      return;
-    }
-    if (this.chars) {
-      this.isLoaded = true;
-      this.fonts = fontData.list;
-      return;
-    }
-
-    var fontArr = fontData.list;
-    var i;
-    var len = fontArr.length;
-    var _pendingFonts = len;
-    for (i = 0; i < len; i += 1) {
-      var shouldLoadFont = true;
-      var loadedSelector;
-      var j;
-      fontArr[i].loaded = false;
-      fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
-      fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
-      if (!fontArr[i].fPath) {
-        fontArr[i].loaded = true;
-        _pendingFonts -= 1;
-      } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
-        loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
-
-        if (loadedSelector.length > 0) {
-          shouldLoadFont = false;
-        }
-
-        if (shouldLoadFont) {
-          var s = createTag('style');
-          s.setAttribute('f-forigin', fontArr[i].fOrigin);
-          s.setAttribute('f-origin', fontArr[i].origin);
-          s.setAttribute('f-family', fontArr[i].fFamily);
-          s.type = 'text/css';
-          s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
-          defs.appendChild(s);
-        }
-      } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
-        loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var l = createTag('link');
-          l.setAttribute('f-forigin', fontArr[i].fOrigin);
-          l.setAttribute('f-origin', fontArr[i].origin);
-          l.type = 'text/css';
-          l.rel = 'stylesheet';
-          l.href = fontArr[i].fPath;
-          document.body.appendChild(l);
-        }
-      } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
-        loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
-
-        for (j = 0; j < loadedSelector.length; j += 1) {
-          if (fontArr[i].fPath === loadedSelector[j].src) {
-            // Font is already loaded
-            shouldLoadFont = false;
-          }
-        }
-
-        if (shouldLoadFont) {
-          var sc = createTag('link');
-          sc.setAttribute('f-forigin', fontArr[i].fOrigin);
-          sc.setAttribute('f-origin', fontArr[i].origin);
-          sc.setAttribute('rel', 'stylesheet');
-          sc.setAttribute('href', fontArr[i].fPath);
-          defs.appendChild(sc);
-        }
-      }
-      fontArr[i].helper = createHelper(defs, fontArr[i]);
-      fontArr[i].cache = {};
-      this.fonts.push(fontArr[i]);
-    }
-    if (_pendingFonts === 0) {
-      this.isLoaded = true;
-    } else {
-      // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
-      // Adding this timeout seems to fix it
-      setTimeout(this.checkLoadedFonts.bind(this), 100);
-    }
-  }
-
-  function addChars(chars) {
-    if (!chars) {
-      return;
-    }
-    if (!this.chars) {
-      this.chars = [];
-    }
-    var i;
-    var len = chars.length;
-    var j;
-    var jLen = this.chars.length;
-    var found;
-    for (i = 0; i < len; i += 1) {
-      j = 0;
-      found = false;
-      while (j < jLen) {
-        if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
-          found = true;
-        }
-        j += 1;
-      }
-      if (!found) {
-        this.chars.push(chars[i]);
-        jLen += 1;
-      }
-    }
-  }
-
-  function getCharData(char, style, font) {
-    var i = 0;
-    var len = this.chars.length;
-    while (i < len) {
-      if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) {
-        return this.chars[i];
-      }
-      i += 1;
-    }
-    if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char)
-            && console
-            && console.warn // eslint-disable-line no-console
-            && !this._warned
-    ) {
-      this._warned = true;
-      console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console
-    }
-    return emptyChar;
-  }
-
-  function measureText(char, fontName, size) {
-    var fontData = this.getFontByName(fontName);
-    var index = char.charCodeAt(0);
-    if (!fontData.cache[index + 1]) {
-      var tHelper = fontData.helper;
-      // Canvas version
-      // fontData.cache[index] = tHelper.measureText(char).width / 100;
-      // SVG version
-      // console.log(tHelper.getBBox().width)
-      if (char === ' ') {
-        tHelper.textContent = '|' + char + '|';
-        var doubleSize = tHelper.getComputedTextLength();
-        tHelper.textContent = '||';
-        var singleSize = tHelper.getComputedTextLength();
-        fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
-      } else {
-        tHelper.textContent = char;
-        fontData.cache[index + 1] = (tHelper.getComputedTextLength()) / 100;
-      }
-    }
-    return fontData.cache[index + 1] * size;
-  }
-
-  function getFontByName(name) {
-    var i = 0;
-    var len = this.fonts.length;
-    while (i < len) {
-      if (this.fonts[i].fName === name) {
-        return this.fonts[i];
-      }
-      i += 1;
-    }
-    return this.fonts[0];
-  }
-
-  function isModifier(firstCharCode, secondCharCode) {
-    var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
-    return surrogateModifiers.indexOf(sum) !== -1;
-  }
-
-  function isZeroWidthJoiner(firstCharCode, secondCharCode) {
-    if (!secondCharCode) {
-      return firstCharCode === zeroWidthJoiner[1];
-    }
-    return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
-  }
-
-  function isCombinedCharacter(char) {
-    return combinedCharacters.indexOf(char) !== -1;
-  }
-
-  function setIsLoaded() {
-    this.isLoaded = true;
-  }
-
-  var Font = function () {
-    this.fonts = [];
-    this.chars = null;
-    this.typekitLoaded = 0;
-    this.isLoaded = false;
-    this._warned = false;
-    this.initTime = Date.now();
-    this.setIsLoadedBinded = this.setIsLoaded.bind(this);
-    this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
-  };
-  Font.isModifier = isModifier;
-  Font.isZeroWidthJoiner = isZeroWidthJoiner;
-  Font.isCombinedCharacter = isCombinedCharacter;
-
-  var fontPrototype = {
-    addChars: addChars,
-    addFonts: addFonts,
-    getCharData: getCharData,
-    getFontByName: getFontByName,
-    measureText: measureText,
-    checkLoadedFonts: checkLoadedFonts,
-    setIsLoaded: setIsLoaded,
-  };
-
-  Font.prototype = fontPrototype;
-
-  return Font;
-}());
-
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
-
-var PropertyFactory = (function () {
-  var initFrame = initialDefaultFrame;
-  var mathAbs = Math.abs;
-
-  function interpolateValue(frameNum, caching) {
-    var offsetTime = this.offsetTime;
-    var newValue;
-    if (this.propType === 'multidimensional') {
-      newValue = createTypedArray('float32', this.pv.length);
-    }
-    var iterationIndex = caching.lastIndex;
-    var i = iterationIndex;
-    var len = this.keyframes.length - 1;
-    var flag = true;
-    var keyData;
-    var nextKeyData;
-    var keyframeMetadata;
-
-    while (flag) {
-      keyData = this.keyframes[i];
-      nextKeyData = this.keyframes[i + 1];
-      if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
-        if (keyData.h) {
-          keyData = nextKeyData;
-        }
-        iterationIndex = 0;
-        break;
-      }
-      if ((nextKeyData.t - offsetTime) > frameNum) {
-        iterationIndex = i;
-        break;
-      }
-      if (i < len - 1) {
-        i += 1;
-      } else {
-        iterationIndex = 0;
-        flag = false;
-      }
-    }
-    keyframeMetadata = this.keyframesMetadata[i] || {};
-
-    var k;
-    var kLen;
-    var perc;
-    var jLen;
-    var j;
-    var fnc;
-    var nextKeyTime = nextKeyData.t - offsetTime;
-    var keyTime = keyData.t - offsetTime;
-    var endValue;
-    if (keyData.to) {
-      if (!keyframeMetadata.bezierData) {
-        keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
-      }
-      var bezierData = keyframeMetadata.bezierData;
-      if (frameNum >= nextKeyTime || frameNum < keyTime) {
-        var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
-        kLen = bezierData.points[ind].point.length;
-        for (k = 0; k < kLen; k += 1) {
-          newValue[k] = bezierData.points[ind].point[k];
-        }
-        // caching._lastKeyframeIndex = -1;
-      } else {
-        if (keyframeMetadata.__fnct) {
-          fnc = keyframeMetadata.__fnct;
-        } else {
-          fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
-          keyframeMetadata.__fnct = fnc;
-        }
-        perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-        var distanceInLine = bezierData.segmentLength * perc;
-
-        var segmentPerc;
-        var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
-        j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
-        flag = true;
-        jLen = bezierData.points.length;
-        while (flag) {
-          addedLength += bezierData.points[j].partialLength;
-          if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k];
-            }
-            break;
-          } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
-            segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
-            kLen = bezierData.points[j].point.length;
-            for (k = 0; k < kLen; k += 1) {
-              newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
-            }
-            break;
-          }
-          if (j < jLen - 1) {
-            j += 1;
-          } else {
-            flag = false;
-          }
-        }
-        caching._lastPoint = j;
-        caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
-        caching._lastKeyframeIndex = i;
-      }
-    } else {
-      var outX;
-      var outY;
-      var inX;
-      var inY;
-      var keyValue;
-      len = keyData.s.length;
-      endValue = nextKeyData.s || keyData.e;
-      if (this.sh && keyData.h !== 1) {
-        if (frameNum >= nextKeyTime) {
-          newValue[0] = endValue[0];
-          newValue[1] = endValue[1];
-          newValue[2] = endValue[2];
-        } else if (frameNum <= keyTime) {
-          newValue[0] = keyData.s[0];
-          newValue[1] = keyData.s[1];
-          newValue[2] = keyData.s[2];
-        } else {
-          var quatStart = createQuaternion(keyData.s);
-          var quatEnd = createQuaternion(endValue);
-          var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
-          quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
-        }
-      } else {
-        for (i = 0; i < len; i += 1) {
-          if (keyData.h !== 1) {
-            if (frameNum >= nextKeyTime) {
-              perc = 1;
-            } else if (frameNum < keyTime) {
-              perc = 0;
-            } else {
-              if (keyData.o.x.constructor === Array) {
-                if (!keyframeMetadata.__fnct) {
-                  keyframeMetadata.__fnct = [];
-                }
-                if (!keyframeMetadata.__fnct[i]) {
-                  outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
-                  outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
-                  inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
-                  inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
-                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                  keyframeMetadata.__fnct[i] = fnc;
-                } else {
-                  fnc = keyframeMetadata.__fnct[i];
-                }
-              } else if (!keyframeMetadata.__fnct) {
-                outX = keyData.o.x;
-                outY = keyData.o.y;
-                inX = keyData.i.x;
-                inY = keyData.i.y;
-                fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
-                keyData.keyframeMetadata = fnc;
-              } else {
-                fnc = keyframeMetadata.__fnct;
-              }
-              perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
-            }
-          }
-
-          endValue = nextKeyData.s || keyData.e;
-          keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
-
-          if (this.propType === 'multidimensional') {
-            newValue[i] = keyValue;
-          } else {
-            newValue = keyValue;
-          }
-        }
-      }
-    }
-    caching.lastIndex = iterationIndex;
-    return newValue;
-  }
-
-  // based on @Toji's https://github.com/toji/gl-matrix/
-  function slerp(a, b, t) {
-    var out = [];
-    var ax = a[0];
-    var ay = a[1];
-    var az = a[2];
-    var aw = a[3];
-    var bx = b[0];
-    var by = b[1];
-    var bz = b[2];
-    var bw = b[3];
-
-    var omega;
-    var cosom;
-    var sinom;
-    var scale0;
-    var scale1;
-
-    cosom = ax * bx + ay * by + az * bz + aw * bw;
-    if (cosom < 0.0) {
-      cosom = -cosom;
-      bx = -bx;
-      by = -by;
-      bz = -bz;
-      bw = -bw;
-    }
-    if ((1.0 - cosom) > 0.000001) {
-      omega = Math.acos(cosom);
-      sinom = Math.sin(omega);
-      scale0 = Math.sin((1.0 - t) * omega) / sinom;
-      scale1 = Math.sin(t * omega) / sinom;
-    } else {
-      scale0 = 1.0 - t;
-      scale1 = t;
-    }
-    out[0] = scale0 * ax + scale1 * bx;
-    out[1] = scale0 * ay + scale1 * by;
-    out[2] = scale0 * az + scale1 * bz;
-    out[3] = scale0 * aw + scale1 * bw;
-
-    return out;
-  }
-
-  function quaternionToEuler(out, quat) {
-    var qx = quat[0];
-    var qy = quat[1];
-    var qz = quat[2];
-    var qw = quat[3];
-    var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
-    var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
-    var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
-    out[0] = heading / degToRads;
-    out[1] = attitude / degToRads;
-    out[2] = bank / degToRads;
-  }
-
-  function createQuaternion(values) {
-    var heading = values[0] * degToRads;
-    var attitude = values[1] * degToRads;
-    var bank = values[2] * degToRads;
-    var c1 = Math.cos(heading / 2);
-    var c2 = Math.cos(attitude / 2);
-    var c3 = Math.cos(bank / 2);
-    var s1 = Math.sin(heading / 2);
-    var s2 = Math.sin(attitude / 2);
-    var s3 = Math.sin(bank / 2);
-    var w = c1 * c2 * c3 - s1 * s2 * s3;
-    var x = s1 * s2 * c3 + c1 * c2 * s3;
-    var y = s1 * c2 * c3 + c1 * s2 * s3;
-    var z = c1 * s2 * c3 - s1 * c2 * s3;
-
-    return [x, y, z, w];
-  }
-
-  function getValueAtCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) {
-      if (this._caching.lastFrame >= frameNum) {
-        this._caching._lastKeyframeIndex = -1;
-        this._caching.lastIndex = 0;
-      }
-
-      var renderResult = this.interpolateValue(frameNum, this._caching);
-      this.pv = renderResult;
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function setVValue(val) {
-    var multipliedValue;
-    if (this.propType === 'unidimensional') {
-      multipliedValue = val * this.mult;
-      if (mathAbs(this.v - multipliedValue) > 0.00001) {
-        this.v = multipliedValue;
-        this._mdf = true;
-      }
-    } else {
-      var i = 0;
-      var len = this.v.length;
-      while (i < len) {
-        multipliedValue = val[i] * this.mult;
-        if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
-          this.v[i] = multipliedValue;
-          this._mdf = true;
-        }
-        i += 1;
-      }
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = this._isFirstFrame;
-    var i;
-    var len = this.effectsSequence.length;
-    var finalValue = this.kf ? this.pv : this.data.k;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this._isFirstFrame = false;
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  function ValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this.v = mult ? data.k * mult : data.k;
-    this.pv = data.k;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.vel = 0;
-    this.effectsSequence = [];
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function MultiDimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    this.mult = mult || 1;
-    this.data = data;
-    this._mdf = false;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.k = false;
-    this.kf = false;
-    this.frameId = -1;
-    var i;
-    var len = data.k.length;
-    this.v = createTypedArray('float32', len);
-    this.pv = createTypedArray('float32', len);
-    this.vel = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      this.v[i] = data.k[i] * this.mult;
-      this.pv[i] = data.k[i];
-    }
-    this._isFirstFrame = true;
-    this.effectsSequence = [];
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedValueProperty(elem, data, mult, container) {
-    this.propType = 'unidimensional';
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.frameId = -1;
-    this._caching = {
-      lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1,
-    };
-    this.k = true;
-    this.kf = true;
-    this.data = data;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.v = initFrame;
-    this.pv = initFrame;
-    this._isFirstFrame = true;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.addEffect = addEffect;
-  }
-
-  function KeyframedMultidimensionalProperty(elem, data, mult, container) {
-    this.propType = 'multidimensional';
-    var i;
-    var len = data.k.length;
-    var s;
-    var e;
-    var to;
-    var ti;
-    for (i = 0; i < len - 1; i += 1) {
-      if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
-        s = data.k[i].s;
-        e = data.k[i + 1].s;
-        to = data.k[i].to;
-        ti = data.k[i].ti;
-        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]))) {
-          data.k[i].to = null;
-          data.k[i].ti = null;
-        }
-        if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
-          if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
-            data.k[i].to = null;
-            data.k[i].ti = null;
-          }
-        }
-      }
-    }
-    this.effectsSequence = [getValueAtCurrentTime.bind(this)];
-    this.data = data;
-    this.keyframes = data.k;
-    this.keyframesMetadata = [];
-    this.offsetTime = elem.data.st;
-    this.k = true;
-    this.kf = true;
-    this._isFirstFrame = true;
-    this.mult = mult || 1;
-    this.elem = elem;
-    this.container = container;
-    this.comp = elem.comp;
-    this.getValue = processEffectsSequence;
-    this.setVValue = setVValue;
-    this.interpolateValue = interpolateValue;
-    this.frameId = -1;
-    var arrLen = data.k[0].s.length;
-    this.v = createTypedArray('float32', arrLen);
-    this.pv = createTypedArray('float32', arrLen);
-    for (i = 0; i < arrLen; i += 1) {
-      this.v[i] = initFrame;
-      this.pv[i] = initFrame;
-    }
-    this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) };
-    this.addEffect = addEffect;
-  }
-
-  function getProp(elem, data, type, mult, container) {
-    var p;
-    if (!data.k.length) {
-      p = new ValueProperty(elem, data, mult, container);
-    } else if (typeof (data.k[0]) === 'number') {
-      p = new MultiDimensionalProperty(elem, data, mult, container);
-    } else {
-      switch (type) {
-        case 0:
-          p = new KeyframedValueProperty(elem, data, mult, container);
-          break;
-        case 1:
-          p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
-          break;
-        default:
-          break;
-      }
-    }
-    if (p.effectsSequence.length) {
-      container.addDynamicProperty(p);
-    }
-    return p;
-  }
-
-  var ob = {
-    getProp: getProp,
-  };
-  return ob;
-}());
-
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
-
-var TransformPropertyFactory = (function () {
-  var defaultVector = [0, 0];
-
-  function applyToMatrix(mat) {
-    var _mdf = this._mdf;
-    this.iterateDynamicProperties();
-    this._mdf = this._mdf || _mdf;
-    if (this.a) {
-      mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-    }
-    if (this.s) {
-      mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-    }
-    if (this.sk) {
-      mat.skewFromAxis(-this.sk.v, this.sa.v);
-    }
-    if (this.r) {
-      mat.rotate(-this.r.v);
-    } else {
-      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]);
-    }
-    if (this.data.p.s) {
-      if (this.data.p.z) {
-        mat.translate(this.px.v, this.py.v, -this.pz.v);
-      } else {
-        mat.translate(this.px.v, this.py.v, 0);
-      }
-    } else {
-      mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-    }
-  }
-  function processKeys(forceRender) {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    }
-    if (this._isDirty) {
-      this.precalculateMatrix();
-      this._isDirty = false;
-    }
-
-    this.iterateDynamicProperties();
-
-    if (this._mdf || forceRender) {
-      var frameRate;
-      this.v.cloneFromProps(this.pre.props);
-      if (this.appliedTransformations < 1) {
-        this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      }
-      if (this.appliedTransformations < 2) {
-        this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      }
-      if (this.sk && this.appliedTransformations < 3) {
-        this.v.skewFromAxis(-this.sk.v, this.sa.v);
-      }
-      if (this.r && this.appliedTransformations < 4) {
-        this.v.rotate(-this.r.v);
-      } else if (!this.r && this.appliedTransformations < 4) {
-        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]);
-      }
-      if (this.autoOriented) {
-        var v1;
-        var v2;
-        frameRate = this.elem.globalData.frameRate;
-        if (this.p && this.p.keyframes && this.p.getValueAtTime) {
-          if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
-            v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
-          } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
-            v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
-            v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
-          } else {
-            v1 = this.p.pv;
-            v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
-          }
-        } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
-          v1 = [];
-          v2 = [];
-          var px = this.px;
-          var py = this.py;
-          if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
-            v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
-            v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0);
-          } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
-            v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0);
-            v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0);
-            v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
-            v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
-          } else {
-            v1 = [px.pv, py.pv];
-            v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
-            v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
-          }
-        } else {
-          v2 = defaultVector;
-          v1 = v2;
-        }
-        this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
-      }
-      if (this.data.p && this.data.p.s) {
-        if (this.data.p.z) {
-          this.v.translate(this.px.v, this.py.v, -this.pz.v);
-        } else {
-          this.v.translate(this.px.v, this.py.v, 0);
-        }
-      } else {
-        this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
-      }
-    }
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function precalculateMatrix() {
-    if (!this.a.k) {
-      this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
-      this.appliedTransformations = 1;
-    } else {
-      return;
-    }
-    if (!this.s.effectsSequence.length) {
-      this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
-      this.appliedTransformations = 2;
-    } else {
-      return;
-    }
-    if (this.sk) {
-      if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
-        this.pre.skewFromAxis(-this.sk.v, this.sa.v);
-        this.appliedTransformations = 3;
-      } else {
-        return;
-      }
-    }
-    if (this.r) {
-      if (!this.r.effectsSequence.length) {
-        this.pre.rotate(-this.r.v);
-        this.appliedTransformations = 4;
-      }
-    } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
-      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]);
-      this.appliedTransformations = 4;
-    }
-  }
-
-  function autoOrient() {
-    //
-    // var prevP = this.getValueAtTime();
-  }
-
-  function addDynamicProperty(prop) {
-    this._addDynamicProperty(prop);
-    this.elem.addDynamicProperty(prop);
-    this._isDirty = true;
-  }
-
-  function TransformProperty(elem, data, container) {
-    this.elem = elem;
-    this.frameId = -1;
-    this.propType = 'transform';
-    this.data = data;
-    this.v = new Matrix();
-    // Precalculated matrix with non animated properties
-    this.pre = new Matrix();
-    this.appliedTransformations = 0;
-    this.initDynamicPropertyContainer(container || elem);
-    if (data.p && data.p.s) {
-      this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
-      this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
-      if (data.p.z) {
-        this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
-      }
-    } else {
-      this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this);
-    }
-    if (data.rx) {
-      this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
-      this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
-      this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
-      if (data.or.k[0].ti) {
-        var i;
-        var len = data.or.k.length;
-        for (i = 0; i < len; i += 1) {
-          data.or.k[i].to = null;
-          data.or.k[i].ti = null;
-        }
-      }
-      this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
-      // sh Indicates it needs to be capped between -180 and 180
-      this.or.sh = true;
-    } else {
-      this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this);
-    }
-    if (data.sk) {
-      this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
-      this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
-    }
-    this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this);
-    // 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.
-    if (data.o) {
-      this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
-    } else {
-      this.o = { _mdf: false, v: 1 };
-    }
-    this._isDirty = true;
-    if (!this.dynamicProperties.length) {
-      this.getValue(true);
-    }
-  }
-
-  TransformProperty.prototype = {
-    applyToMatrix: applyToMatrix,
-    getValue: processKeys,
-    precalculateMatrix: precalculateMatrix,
-    autoOrient: autoOrient,
-  };
-
-  extendPrototype([DynamicPropertyContainer], TransformProperty);
-  TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
-  TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
-
-  function getTransformProperty(elem, data, container) {
-    return new TransformProperty(elem, data, container);
-  }
-
-  return {
-    getTransformProperty: getTransformProperty,
-  };
-}());
-
-/* global createSizedArray, createSizedArray, pointPool */
-
-function ShapePath() {
-  this.c = false;
-  this._length = 0;
-  this._maxLength = 8;
-  this.v = createSizedArray(this._maxLength);
-  this.o = createSizedArray(this._maxLength);
-  this.i = createSizedArray(this._maxLength);
-}
-
-ShapePath.prototype.setPathData = function (closed, len) {
-  this.c = closed;
-  this.setLength(len);
-  var i = 0;
-  while (i < len) {
-    this.v[i] = pointPool.newElement();
-    this.o[i] = pointPool.newElement();
-    this.i[i] = pointPool.newElement();
-    i += 1;
-  }
-};
-
-ShapePath.prototype.setLength = function (len) {
-  while (this._maxLength < len) {
-    this.doubleArrayLength();
-  }
-  this._length = len;
-};
-
-ShapePath.prototype.doubleArrayLength = function () {
-  this.v = this.v.concat(createSizedArray(this._maxLength));
-  this.i = this.i.concat(createSizedArray(this._maxLength));
-  this.o = this.o.concat(createSizedArray(this._maxLength));
-  this._maxLength *= 2;
-};
-
-ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
-  var arr;
-  this._length = Math.max(this._length, pos + 1);
-  if (this._length >= this._maxLength) {
-    this.doubleArrayLength();
-  }
-  switch (type) {
-    case 'v':
-      arr = this.v;
-      break;
-    case 'i':
-      arr = this.i;
-      break;
-    case 'o':
-      arr = this.o;
-      break;
-    default:
-      arr = [];
-      break;
-  }
-  if (!arr[pos] || (arr[pos] && !replace)) {
-    arr[pos] = pointPool.newElement();
-  }
-  arr[pos][0] = x;
-  arr[pos][1] = y;
-};
-
-ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
-  this.setXYAt(vX, vY, 'v', pos, replace);
-  this.setXYAt(oX, oY, 'o', pos, replace);
-  this.setXYAt(iX, iY, 'i', pos, replace);
-};
-
-ShapePath.prototype.reverse = function () {
-  var newPath = new ShapePath();
-  newPath.setPathData(this.c, this._length);
-  var vertices = this.v;
-  var outPoints = this.o;
-  var inPoints = this.i;
-  var init = 0;
-  if (this.c) {
-    newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
-    init = 1;
-  }
-  var cnt = this._length - 1;
-  var len = this._length;
-
-  var i;
-  for (i = init; i < len; i += 1) {
-    newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
-    cnt -= 1;
-  }
-  return newPath;
-};
-
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
-
-var ShapePropertyFactory = (function () {
-  var initFrame = -999999;
-
-  function interpolateShape(frameNum, previousValue, caching) {
-    var iterationIndex = caching.lastIndex;
-    var keyPropS;
-    var keyPropE;
-    var isHold;
-    var j;
-    var k;
-    var jLen;
-    var kLen;
-    var perc;
-    var vertexValue;
-    var kf = this.keyframes;
-    if (frameNum < kf[0].t - this.offsetTime) {
-      keyPropS = kf[0].s[0];
-      isHold = true;
-      iterationIndex = 0;
-    } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
-      keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
-      /* if(kf[kf.length - 1].s){
-                keyPropS = kf[kf.length - 1].s[0];
-            }else{
-                keyPropS = kf[kf.length - 2].e[0];
-            } */
-      isHold = true;
-    } else {
-      var i = iterationIndex;
-      var len = kf.length - 1;
-      var flag = true;
-      var keyData;
-      var nextKeyData;
-      var keyframeMetadata;
-      while (flag) {
-        keyData = kf[i];
-        nextKeyData = kf[i + 1];
-        if ((nextKeyData.t - this.offsetTime) > frameNum) {
-          break;
-        }
-        if (i < len - 1) {
-          i += 1;
-        } else {
-          flag = false;
-        }
-      }
-      keyframeMetadata = this.keyframesMetadata[i] || {};
-      isHold = keyData.h === 1;
-      iterationIndex = i;
-      if (!isHold) {
-        if (frameNum >= nextKeyData.t - this.offsetTime) {
-          perc = 1;
-        } else if (frameNum < keyData.t - this.offsetTime) {
-          perc = 0;
-        } else {
-          var fnc;
-          if (keyframeMetadata.__fnct) {
-            fnc = keyframeMetadata.__fnct;
-          } else {
-            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
-            keyframeMetadata.__fnct = fnc;
-          }
-          perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime)));
-        }
-        keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
-      }
-      keyPropS = keyData.s[0];
-    }
-    jLen = previousValue._length;
-    kLen = keyPropS.i[0].length;
-    caching.lastIndex = iterationIndex;
-
-    for (j = 0; j < jLen; j += 1) {
-      for (k = 0; k < kLen; k += 1) {
-        vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
-        previousValue.i[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
-        previousValue.o[j][k] = vertexValue;
-        vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
-        previousValue.v[j][k] = vertexValue;
-      }
-    }
-  }
-
-  function interpolateShapeCurrentTime() {
-    var frameNum = this.comp.renderedFrame - this.offsetTime;
-    var initTime = this.keyframes[0].t - this.offsetTime;
-    var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
-    var lastFrame = this._caching.lastFrame;
-    if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) {
-      /// /
-      this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
-      this.interpolateShape(frameNum, this.pv, this._caching);
-      /// /
-    }
-    this._caching.lastFrame = frameNum;
-    return this.pv;
-  }
-
-  function resetShape() {
-    this.paths = this.localShapeCollection;
-  }
-
-  function shapesEqual(shape1, shape2) {
-    if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
-      return false;
-    }
-    var i;
-    var len = shape1._length;
-    for (i = 0; i < len; i += 1) {
-      if (shape1.v[i][0] !== shape2.v[i][0]
-            || shape1.v[i][1] !== shape2.v[i][1]
-            || shape1.o[i][0] !== shape2.o[i][0]
-            || shape1.o[i][1] !== shape2.o[i][1]
-            || shape1.i[i][0] !== shape2.i[i][0]
-            || shape1.i[i][1] !== shape2.i[i][1]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  function setVValue(newPath) {
-    if (!shapesEqual(this.v, newPath)) {
-      this.v = shapePool.clone(newPath);
-      this.localShapeCollection.releaseShapes();
-      this.localShapeCollection.addShape(this.v);
-      this._mdf = true;
-      this.paths = this.localShapeCollection;
-    }
-  }
-
-  function processEffectsSequence() {
-    if (this.elem.globalData.frameId === this.frameId) {
-      return;
-    } if (!this.effectsSequence.length) {
-      this._mdf = false;
-      return;
-    }
-    if (this.lock) {
-      this.setVValue(this.pv);
-      return;
-    }
-    this.lock = true;
-    this._mdf = false;
-    var finalValue;
-    if (this.kf) {
-      finalValue = this.pv;
-    } else if (this.data.ks) {
-      finalValue = this.data.ks.k;
-    } else {
-      finalValue = this.data.pt.k;
-    }
-    var i;
-    var len = this.effectsSequence.length;
-    for (i = 0; i < len; i += 1) {
-      finalValue = this.effectsSequence[i](finalValue);
-    }
-    this.setVValue(finalValue);
-    this.lock = false;
-    this.frameId = this.elem.globalData.frameId;
-  }
-
-  function ShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.container = elem;
-    this.elem = elem;
-    this.data = data;
-    this.k = false;
-    this.kf = false;
-    this._mdf = false;
-    var pathData = type === 3 ? data.pt.k : data.ks.k;
-    this.v = shapePool.clone(pathData);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.reset = resetShape;
-    this.effectsSequence = [];
-  }
-
-  function addEffect(effectFunction) {
-    this.effectsSequence.push(effectFunction);
-    this.container.addDynamicProperty(this);
-  }
-
-  ShapeProperty.prototype.interpolateShape = interpolateShape;
-  ShapeProperty.prototype.getValue = processEffectsSequence;
-  ShapeProperty.prototype.setVValue = setVValue;
-  ShapeProperty.prototype.addEffect = addEffect;
-
-  function KeyframedShapeProperty(elem, data, type) {
-    this.propType = 'shape';
-    this.comp = elem.comp;
-    this.elem = elem;
-    this.container = elem;
-    this.offsetTime = elem.data.st;
-    this.keyframes = type === 3 ? data.pt.k : data.ks.k;
-    this.keyframesMetadata = [];
-    this.k = true;
-    this.kf = true;
-    var len = this.keyframes[0].s[0].i.length;
-    this.v = shapePool.newElement();
-    this.v.setPathData(this.keyframes[0].s[0].c, len);
-    this.pv = shapePool.clone(this.v);
-    this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-    this.paths = this.localShapeCollection;
-    this.paths.addShape(this.v);
-    this.lastFrame = initFrame;
-    this.reset = resetShape;
-    this._caching = { lastFrame: initFrame, lastIndex: 0 };
-    this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
-  }
-  KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
-  KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
-  KeyframedShapeProperty.prototype.setVValue = setVValue;
-  KeyframedShapeProperty.prototype.addEffect = addEffect;
-
-  var EllShapeProperty = (function () {
-    var cPoint = roundCorner;
-
-    function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 4);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.paths = this.localShapeCollection;
-      this.localShapeCollection.addShape(this.v);
-      this.d = data.d;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertEllToPath();
-      }
-    }
-
-    EllShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-
-        if (this._mdf) {
-          this.convertEllToPath();
-        }
-      },
-      convertEllToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var s0 = this.s.v[0] / 2;
-        var s1 = this.s.v[1] / 2;
-        var _cw = this.d !== 3;
-        var _v = this.v;
-        _v.v[0][0] = p0;
-        _v.v[0][1] = p1 - s1;
-        _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.v[1][1] = p1;
-        _v.v[2][0] = p0;
-        _v.v[2][1] = p1 + s1;
-        _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.v[3][1] = p1;
-        _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.i[0][1] = p1 - s1;
-        _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.i[1][1] = p1 - s1 * cPoint;
-        _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.i[2][1] = p1 + s1;
-        _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.i[3][1] = p1 + s1 * cPoint;
-        _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
-        _v.o[0][1] = p1 - s1;
-        _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
-        _v.o[1][1] = p1 + s1 * cPoint;
-        _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
-        _v.o[2][1] = p1 + s1;
-        _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
-        _v.o[3][1] = p1 - s1 * cPoint;
-      },
-    };
-
-    extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
-
-    return EllShapePropertyFactory;
-  }());
-
-  var StarShapeProperty = (function () {
-    function StarShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.setPathData(true, 0);
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.data = data;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      if (data.sy === 1) {
-        this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
-        this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
-        this.convertToPath = this.convertStarToPath;
-      } else {
-        this.convertToPath = this.convertPolygonToPath;
-      }
-      this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
-      this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
-      this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertToPath();
-      }
-    }
-
-    StarShapePropertyFactory.prototype = {
-      reset: resetShape,
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertToPath();
-        }
-      },
-      convertStarToPath: function () {
-        var numPts = Math.floor(this.pt.v) * 2;
-        var angle = (Math.PI * 2) / numPts;
-        /* this.v.v.length = numPts;
-                this.v.i.length = numPts;
-                this.v.o.length = numPts; */
-        var longFlag = true;
-        var longRad = this.or.v;
-        var shortRad = this.ir.v;
-        var longRound = this.os.v;
-        var shortRound = this.is.v;
-        var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2);
-        var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2);
-        var i;
-        var rad;
-        var roundness;
-        var perimSegment;
-        var currentAng = -Math.PI / 2;
-        currentAng += this.r.v;
-        var dir = this.data.d === 3 ? -1 : 1;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          rad = longFlag ? longRad : shortRad;
-          roundness = longFlag ? longRound : shortRound;
-          perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-
-          /* this.v.v[i] = [x,y];
-                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
-                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
-                    this.v._length = numPts; */
-          longFlag = !longFlag;
-          currentAng += angle * dir;
-        }
-      },
-      convertPolygonToPath: function () {
-        var numPts = Math.floor(this.pt.v);
-        var angle = (Math.PI * 2) / numPts;
-        var rad = this.or.v;
-        var roundness = this.os.v;
-        var perimSegment = (2 * Math.PI * rad) / (numPts * 4);
-        var i;
-        var currentAng = -Math.PI * 0.5;
-        var dir = this.data.d === 3 ? -1 : 1;
-        currentAng += this.r.v;
-        this.v._length = 0;
-        for (i = 0; i < numPts; i += 1) {
-          var x = rad * Math.cos(currentAng);
-          var y = rad * Math.sin(currentAng);
-          var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
-          var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
-          x += +this.p.v[0];
-          y += +this.p.v[1];
-          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);
-          currentAng += angle * dir;
-        }
-        this.paths.length = 0;
-        this.paths[0] = this.v;
-      },
-
-    };
-    extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
-
-    return StarShapePropertyFactory;
-  }());
-
-  var RectShapeProperty = (function () {
-    function RectShapePropertyFactory(elem, data) {
-      this.v = shapePool.newElement();
-      this.v.c = true;
-      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
-      this.localShapeCollection.addShape(this.v);
-      this.paths = this.localShapeCollection;
-      this.elem = elem;
-      this.comp = elem.comp;
-      this.frameId = -1;
-      this.d = data.d;
-      this.initDynamicPropertyContainer(elem);
-      this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
-      this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
-      this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
-      if (this.dynamicProperties.length) {
-        this.k = true;
-      } else {
-        this.k = false;
-        this.convertRectToPath();
-      }
-    }
-
-    RectShapePropertyFactory.prototype = {
-      convertRectToPath: function () {
-        var p0 = this.p.v[0];
-        var p1 = this.p.v[1];
-        var v0 = this.s.v[0] / 2;
-        var v1 = this.s.v[1] / 2;
-        var round = bmMin(v0, v1, this.r.v);
-        var cPoint = round * (1 - roundCorner);
-        this.v._length = 0;
-
-        if (this.d === 2 || this.d === 1) {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
-          this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
-          }
-        } else {
-          this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
-          if (round !== 0) {
-            this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
-            this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
-            this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
-            this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
-          } else {
-            this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
-            this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
-            this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
-          }
-        }
-      },
-      getValue: function () {
-        if (this.elem.globalData.frameId === this.frameId) {
-          return;
-        }
-        this.frameId = this.elem.globalData.frameId;
-        this.iterateDynamicProperties();
-        if (this._mdf) {
-          this.convertRectToPath();
-        }
-      },
-      reset: resetShape,
-    };
-    extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
-
-    return RectShapePropertyFactory;
-  }());
-
-  function getShapeProp(elem, data, type) {
-    var prop;
-    if (type === 3 || type === 4) {
-      var dataProp = type === 3 ? data.pt : data.ks;
-      var keys = dataProp.k;
-      if (keys.length) {
-        prop = new KeyframedShapeProperty(elem, data, type);
-      } else {
-        prop = new ShapeProperty(elem, data, type);
-      }
-    } else if (type === 5) {
-      prop = new RectShapeProperty(elem, data);
-    } else if (type === 6) {
-      prop = new EllShapeProperty(elem, data);
-    } else if (type === 7) {
-      prop = new StarShapeProperty(elem, data);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
-    }
-    return prop;
-  }
-
-  function getConstructorFunction() {
-    return ShapeProperty;
-  }
-
-  function getKeyframedConstructorFunction() {
-    return KeyframedShapeProperty;
-  }
-
-  var ob = {};
-  ob.getShapeProp = getShapeProp;
-  ob.getConstructorFunction = getConstructorFunction;
-  ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
-  return ob;
-}());
-
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
-
-var ShapeModifiers = (function () {
-  var ob = {};
-  var modifiers = {};
-  ob.registerModifier = registerModifier;
-  ob.getModifier = getModifier;
-
-  function registerModifier(nm, factory) {
-    if (!modifiers[nm]) {
-      modifiers[nm] = factory;
-    }
-  }
-
-  function getModifier(nm, elem, data) {
-    return new modifiers[nm](elem, data);
-  }
-
-  return ob;
-}());
-
-function ShapeModifier() {}
-ShapeModifier.prototype.initModifierProperties = function () {};
-ShapeModifier.prototype.addShapeToModifier = function () {};
-ShapeModifier.prototype.addShape = function (data) {
-  if (!this.closed) {
-    // 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.
-    data.sh.container.addDynamicProperty(data.sh);
-    var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() };
-    this.shapes.push(shapeData);
-    this.addShapeToModifier(shapeData);
-    if (this._isAnimated) {
-      data.setAsAnimated();
-    }
-  }
-};
-ShapeModifier.prototype.init = function (elem, data) {
-  this.shapes = [];
-  this.elem = elem;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, data);
-  this.frameId = initialDefaultFrame;
-  this.closed = false;
-  this.k = false;
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-ShapeModifier.prototype.processKeys = function () {
-  if (this.elem.globalData.frameId === this.frameId) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
-
-extendPrototype([DynamicPropertyContainer], ShapeModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
-
-function TrimModifier() {
-}
-extendPrototype([ShapeModifier], TrimModifier);
-TrimModifier.prototype.initModifierProperties = function (elem, data) {
-  this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
-  this.sValue = 0;
-  this.eValue = 0;
-  this.getValue = this.processKeys;
-  this.m = data.m;
-  this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
-};
-
-TrimModifier.prototype.addShapeToModifier = function (shapeData) {
-  shapeData.pathsData = [];
-};
-
-TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
-  var segments = [];
-  if (e <= 1) {
-    segments.push({
-      s: s,
-      e: e,
-    });
-  } else if (s >= 1) {
-    segments.push({
-      s: s - 1,
-      e: e - 1,
-    });
-  } else {
-    segments.push({
-      s: s,
-      e: 1,
-    });
-    segments.push({
-      s: 0,
-      e: e - 1,
-    });
-  }
-  var shapeSegments = [];
-  var i;
-  var len = segments.length;
-  var segmentOb;
-  for (i = 0; i < len; i += 1) {
-    segmentOb = segments[i];
-    if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
-      var shapeS;
-      var shapeE;
-      if (segmentOb.s * totalModifierLength <= addedLength) {
-        shapeS = 0;
-      } else {
-        shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
-      }
-      if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
-        shapeE = 1;
-      } else {
-        shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
-      }
-      shapeSegments.push([shapeS, shapeE]);
-    }
-  }
-  if (!shapeSegments.length) {
-    shapeSegments.push([0, 0]);
-  }
-  return shapeSegments;
-};
-
-TrimModifier.prototype.releasePathsData = function (pathsData) {
-  var i;
-  var len = pathsData.length;
-  for (i = 0; i < len; i += 1) {
-    segmentsLengthPool.release(pathsData[i]);
-  }
-  pathsData.length = 0;
-  return pathsData;
-};
-
-TrimModifier.prototype.processShapes = function (_isFirstFrame) {
-  var s;
-  var e;
-  if (this._mdf || _isFirstFrame) {
-    var o = (this.o.v % 360) / 360;
-    if (o < 0) {
-      o += 1;
-    }
-    if (this.s.v > 1) {
-      s = 1 + o;
-    } else if (this.s.v < 0) {
-      s = 0 + o;
-    } else {
-      s = this.s.v + o;
-    }
-    if (this.e.v > 1) {
-      e = 1 + o;
-    } else if (this.e.v < 0) {
-      e = 0 + o;
-    } else {
-      e = this.e.v + o;
-    }
-
-    if (s > e) {
-      var _s = s;
-      s = e;
-      e = _s;
-    }
-    s = Math.round(s * 10000) * 0.0001;
-    e = Math.round(e * 10000) * 0.0001;
-    this.sValue = s;
-    this.eValue = e;
-  } else {
-    s = this.sValue;
-    e = this.eValue;
-  }
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var pathsData;
-  var pathData;
-  var totalShapeLength;
-  var totalModifierLength = 0;
-
-  if (e === s) {
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].localShapeCollection.releaseShapes();
-      this.shapes[i].shape._mdf = true;
-      this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
-      if (this._mdf) {
-        this.shapes[i].pathsData.length = 0;
-      }
-    }
-  } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) {
-    var segments = [];
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-      if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
-        shapeData.shape.paths = shapeData.localShapeCollection;
-      } else {
-        shapePaths = shapeData.shape.paths;
-        jLen = shapePaths._length;
-        totalShapeLength = 0;
-        if (!shapeData.shape._mdf && shapeData.pathsData.length) {
-          totalShapeLength = shapeData.totalShapeLength;
-        } else {
-          pathsData = this.releasePathsData(shapeData.pathsData);
-          for (j = 0; j < jLen; j += 1) {
-            pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
-            pathsData.push(pathData);
-            totalShapeLength += pathData.totalLength;
-          }
-          shapeData.totalShapeLength = totalShapeLength;
-          shapeData.pathsData = pathsData;
-        }
-
-        totalModifierLength += totalShapeLength;
-        shapeData.shape._mdf = true;
-      }
-    }
-    var shapeS = s;
-    var shapeE = e;
-    var addedLength = 0;
-    var edges;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shapeData = this.shapes[i];
-      if (shapeData.shape._mdf) {
-        localShapeCollection = shapeData.localShapeCollection;
-        localShapeCollection.releaseShapes();
-        // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
-        if (this.m === 2 && len > 1) {
-          edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
-          addedLength += shapeData.totalShapeLength;
-        } else {
-          edges = [[shapeS, shapeE]];
-        }
-        jLen = edges.length;
-        for (j = 0; j < jLen; j += 1) {
-          shapeS = edges[j][0];
-          shapeE = edges[j][1];
-          segments.length = 0;
-          if (shapeE <= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength * shapeE,
-            });
-          } else if (shapeS >= 1) {
-            segments.push({
-              s: shapeData.totalShapeLength * (shapeS - 1),
-              e: shapeData.totalShapeLength * (shapeE - 1),
-            });
-          } else {
-            segments.push({
-              s: shapeData.totalShapeLength * shapeS,
-              e: shapeData.totalShapeLength,
-            });
-            segments.push({
-              s: 0,
-              e: shapeData.totalShapeLength * (shapeE - 1),
             });
           }
-          var newShapesData = this.addShapes(shapeData, segments[0]);
-          if (segments[0].s !== segments[0].e) {
-            if (segments.length > 1) {
-              var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
-              if (lastShapeInCollection.c) {
-                var lastShape = newShapesData.pop();
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
-              } else {
-                this.addPaths(newShapesData, localShapeCollection);
-                newShapesData = this.addShapes(shapeData, segments[1]);
-              }
-            }
-            this.addPaths(newShapesData, localShapeCollection);
+        });
+
+        workerInstance.onmessage = function (event) {
+          var data = event.data;
+          var id = data.id;
+          var process = processes[id];
+          processes[id] = null;
+
+          if (data.status === 'success') {
+            process.onComplete(data.payload);
+          } else if (process.onError) {
+            process.onError();
           }
-        }
-        shapeData.shape.paths = localShapeCollection;
-      }
-    }
-  } else if (this._mdf) {
-    for (i = 0; i < len; i += 1) {
-      // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
-      // Don't remove this even if it's losing cached info.
-      this.shapes[i].pathsData.length = 0;
-      this.shapes[i].shape._mdf = true;
-    }
-  }
-};
-
-TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
-  var i;
-  var len = newPaths.length;
-  for (i = 0; i < len; i += 1) {
-    localShapeCollection.addShape(newPaths[i]);
-  }
-};
-
-TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-  shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
-  shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
-  }
-  shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
-  shapePath.setXYAt(points[1], points[5], 'o', pos);
-  shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
-  if (newShape) {
-    shapePath.setXYAt(points[0], points[4], 'v', pos);
-  }
-  shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
-};
-
-TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
-  var pathsData = shapeData.pathsData;
-  var shapePaths = shapeData.shape.paths.shapes;
-  var i;
-  var len = shapeData.shape.paths._length;
-  var j;
-  var jLen;
-  var addedLength = 0;
-  var currentLengthData;
-  var segmentCount;
-  var lengths;
-  var segment;
-  var shapes = [];
-  var initPos;
-  var newShape = true;
-  if (!shapePath) {
-    shapePath = shapePool.newElement();
-    segmentCount = 0;
-    initPos = 0;
-  } else {
-    segmentCount = shapePath._length;
-    initPos = shapePath._length;
-  }
-  shapes.push(shapePath);
-  for (i = 0; i < len; i += 1) {
-    lengths = pathsData[i].lengths;
-    shapePath.c = shapePaths[i].c;
-    jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
-    for (j = 1; j < jLen; j += 1) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
-        addedLength += currentLengthData.addedLength;
-        shapePath.c = false;
-      } else if (addedLength > shapeSegment.e) {
-        shapePath.c = false;
-        break;
-      } else {
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-        addedLength += currentLengthData.addedLength;
-        segmentCount += 1;
-      }
-    }
-    if (shapePaths[i].c && lengths.length) {
-      currentLengthData = lengths[j - 1];
-      if (addedLength <= shapeSegment.e) {
-        var segmentLength = lengths[j - 1].addedLength;
-        if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
-          this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
-          newShape = false;
-        } else {
-          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]);
-          this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
-          // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
-          newShape = false;
-          shapePath.c = false;
-        }
-      } else {
-        shapePath.c = false;
-      }
-      addedLength += currentLengthData.addedLength;
-      segmentCount += 1;
-    }
-    if (shapePath._length) {
-      shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-      shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
-    }
-    if (addedLength > shapeSegment.e) {
-      break;
-    }
-    if (i < len - 1) {
-      shapePath = shapePool.newElement();
-      newShape = true;
-      shapes.push(shapePath);
-      segmentCount = 0;
-    }
-  }
-  return shapes;
-};
-
-ShapeModifiers.registerModifier('tm', TrimModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
-
-function RoundCornersModifier() {}
-extendPrototype([ShapeModifier], RoundCornersModifier);
-RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
-  this._isAnimated = !!this.rd.effectsSequence.length;
-};
-
-RoundCornersModifier.prototype.processPath = function (path, round) {
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var i;
-  var len = path._length;
-  var currentV;
-  var currentI;
-  var currentO;
-  var closerV;
-  var distance;
-  var newPosPerc;
-  var index = 0;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < len; i += 1) {
-    currentV = path.v[i];
-    currentO = path.o[i];
-    currentI = path.i[i];
-    if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
-      if ((i === 0 || i === len - 1) && !path.c) {
-        clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
-        /* clonedPath.v[index] = currentV;
-                clonedPath.o[index] = currentO;
-                clonedPath.i[index] = currentI; */
-        index += 1;
-      } else {
-        if (i === 0) {
-          closerV = path.v[len - 1];
-        } else {
-          closerV = path.v[i - 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = iX;
-        iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
-        vY = iY;
-        oX = vX - (vX - currentV[0]) * roundCorner;
-        oY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-
-        if (i === len - 1) {
-          closerV = path.v[0];
-        } else {
-          closerV = path.v[i + 1];
-        }
-        distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
-        newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
-        oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
-        vX = oX;
-        oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
-        vY = oY;
-        iX = vX - (vX - currentV[0]) * roundCorner;
-        iY = vY - (vY - currentV[1]) * roundCorner;
-        clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
-        index += 1;
-      }
-    } else {
-      clonedPath.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);
-      index += 1;
-    }
-  }
-  return clonedPath;
-};
-
-RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var rd = this.rd.v;
-
-  if (rd !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
-
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
-
-function PuckerAndBloatModifier() {}
-extendPrototype([ShapeModifier], PuckerAndBloatModifier);
-PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
-  this._isAnimated = !!this.amount.effectsSequence.length;
-};
-
-PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
-  var percent = amount / 100;
-  var centerPoint = [0, 0];
-  var pathLength = path._length;
-  var i = 0;
-  for (i = 0; i < pathLength; i += 1) {
-    centerPoint[0] += path.v[i][0];
-    centerPoint[1] += path.v[i][1];
-  }
-  centerPoint[0] /= pathLength;
-  centerPoint[1] /= pathLength;
-  var clonedPath = shapePool.newElement();
-  clonedPath.c = path.c;
-  var vX;
-  var vY;
-  var oX;
-  var oY;
-  var iX;
-  var iY;
-  for (i = 0; i < pathLength; i += 1) {
-    vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
-    vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
-    oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
-    oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
-    iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
-    iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
-    clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
-  }
-  return clonedPath;
-};
-
-PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
-  var shapePaths;
-  var i;
-  var len = this.shapes.length;
-  var j;
-  var jLen;
-  var amount = this.amount.v;
-
-  if (amount !== 0) {
-    var shapeData;
-    var localShapeCollection;
-    for (i = 0; i < len; i += 1) {
-      shapeData = this.shapes[i];
-      localShapeCollection = shapeData.localShapeCollection;
-      if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
-        localShapeCollection.releaseShapes();
-        shapeData.shape._mdf = true;
-        shapePaths = shapeData.shape.paths.shapes;
-        jLen = shapeData.shape.paths._length;
-        for (j = 0; j < jLen; j += 1) {
-          localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
-        }
-      }
-      shapeData.shape.paths = shapeData.localShapeCollection;
-    }
-  }
-  if (!this.dynamicProperties.length) {
-    this._mdf = false;
-  }
-};
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
-
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
-
-function RepeaterModifier() {}
-extendPrototype([ShapeModifier], RepeaterModifier);
-
-RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
-  this.getValue = this.processKeys;
-  this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
-  this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
-  this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
-  this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
-  this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
-  this.data = data;
-  if (!this.dynamicProperties.length) {
-    this.getValue(true);
-  }
-  this._isAnimated = !!this.dynamicProperties.length;
-  this.pMatrix = new Matrix();
-  this.rMatrix = new Matrix();
-  this.sMatrix = new Matrix();
-  this.tMatrix = new Matrix();
-  this.matrix = new Matrix();
-};
-
-RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
-  var dir = inv ? -1 : 1;
-  var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
-  var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
-  pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
-  rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  rMatrix.rotate(-transform.r.v * dir * perc);
-  rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-  sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
-  sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
-  sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-};
-
-RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
-  this.elem = elem;
-  this.arr = arr;
-  this.pos = pos;
-  this.elemsData = elemsData;
-  this._currentCopies = 0;
-  this._elements = [];
-  this._groups = [];
-  this.frameId = -1;
-  this.initDynamicPropertyContainer(elem);
-  this.initModifierProperties(elem, arr[pos]);
-  while (pos > 0) {
-    pos -= 1;
-    // this._elements.unshift(arr.splice(pos,1)[0]);
-    this._elements.unshift(arr[pos]);
-  }
-  if (this.dynamicProperties.length) {
-    this.k = true;
-  } else {
-    this.getValue(true);
-  }
-};
-
-RepeaterModifier.prototype.resetElements = function (elements) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._processed = false;
-    if (elements[i].ty === 'gr') {
-      this.resetElements(elements[i].it);
-    }
-  }
-};
-
-RepeaterModifier.prototype.cloneElements = function (elements) {
-  var newElements = JSON.parse(JSON.stringify(elements));
-  this.resetElements(newElements);
-  return newElements;
-};
-
-RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
-  var i;
-  var len = elements.length;
-  for (i = 0; i < len; i += 1) {
-    elements[i]._render = renderFlag;
-    if (elements[i].ty === 'gr') {
-      this.changeGroupRender(elements[i].it, renderFlag);
-    }
-  }
-};
-
-RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
-  var items;
-  var itemsTransform;
-  var i;
-  var dir;
-  var cont;
-  var hasReloaded = false;
-  if (this._mdf || _isFirstFrame) {
-    var copies = Math.ceil(this.c.v);
-    if (this._groups.length < copies) {
-      while (this._groups.length < copies) {
-        var group = {
-          it: this.cloneElements(this._elements),
-          ty: 'gr',
         };
-        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',
-        });
-
-        this.arr.splice(0, 0, group);
-        this._groups.splice(0, 0, group);
-        this._currentCopies += 1;
-      }
-      this.elem.reloadShapes();
-      hasReloaded = true;
-    }
-    cont = 0;
-    var renderFlag;
-    for (i = 0; i <= this._groups.length - 1; i += 1) {
-      renderFlag = cont < copies;
-      this._groups[i]._render = renderFlag;
-      this.changeGroupRender(this._groups[i].it, renderFlag);
-      if (!renderFlag) {
-        var elems = this.elemsData[i].it;
-        var transformData = elems[elems.length - 1];
-        if (transformData.transform.op.v !== 0) {
-          transformData.transform.op._mdf = true;
-          transformData.transform.op.v = 0;
-        } else {
-          transformData.transform.op._mdf = false;
-        }
-      }
-      cont += 1;
-    }
-
-    this._currentCopies = copies;
-    /// /
-
-    var offset = this.o.v;
-    var offsetModulo = offset % 1;
-    var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
-    var pProps = this.pMatrix.props;
-    var rProps = this.rMatrix.props;
-    var sProps = this.sMatrix.props;
-    this.pMatrix.reset();
-    this.rMatrix.reset();
-    this.sMatrix.reset();
-    this.tMatrix.reset();
-    this.matrix.reset();
-    var iteration = 0;
-
-    if (offset > 0) {
-      while (iteration < roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        iteration += 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
-        iteration += offsetModulo;
-      }
-    } else if (offset < 0) {
-      while (iteration > roundOffset) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
-        iteration -= 1;
-      }
-      if (offsetModulo) {
-        this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
-        iteration -= offsetModulo;
       }
     }
-    i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-    dir = this.data.m === 1 ? 1 : -1;
-    cont = this._currentCopies;
-    var j;
-    var jLen;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      jLen = itemsTransform.length;
-      items[items.length - 1].transform.mProps._mdf = true;
-      items[items.length - 1].transform.op._mdf = true;
-      items[items.length - 1].transform.op.v = this._currentCopies === 1
-        ? this.so.v
-        : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
 
-      if (iteration !== 0) {
-        if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) {
-          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
-        }
-        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]);
-        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]);
-        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]);
-
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-        this.matrix.reset();
-      } else {
-        this.matrix.reset();
-        for (j = 0; j < jLen; j += 1) {
-          itemsTransform[j] = this.matrix.props[j];
-        }
-      }
-      iteration += 1;
-      cont -= 1;
-      i += dir;
-    }
-  } else {
-    cont = this._currentCopies;
-    i = 0;
-    dir = 1;
-    while (cont) {
-      items = this.elemsData[i].it;
-      itemsTransform = items[items.length - 1].transform.mProps.v.props;
-      items[items.length - 1].transform.mProps._mdf = false;
-      items[items.length - 1].transform.op._mdf = false;
-      cont -= 1;
-      i += dir;
-    }
-  }
-  return hasReloaded;
-};
-
-RepeaterModifier.prototype.addShape = function () {};
-
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
-
-/* global createSizedArray, shapePool */
-
-function ShapeCollection() {
-  this._length = 0;
-  this._maxLength = 4;
-  this.shapes = createSizedArray(this._maxLength);
-}
-
-ShapeCollection.prototype.addShape = function (shapeData) {
-  if (this._length === this._maxLength) {
-    this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
-    this._maxLength *= 2;
-  }
-  this.shapes[this._length] = shapeData;
-  this._length += 1;
-};
-
-ShapeCollection.prototype.releaseShapes = function () {
-  var i;
-  for (i = 0; i < this._length; i += 1) {
-    shapePool.release(this.shapes[i]);
-  }
-  this._length = 0;
-};
-
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function DashProperty(elem, data, renderer, container) {
-  this.elem = elem;
-  this.frameId = -1;
-  this.dataProps = createSizedArray(data.length);
-  this.renderer = renderer;
-  this.k = false;
-  this.dashStr = '';
-  this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
-  this.dashoffset = createTypedArray('float32', 1);
-  this.initDynamicPropertyContainer(container);
-  var i;
-  var len = data.length || 0;
-  var prop;
-  for (i = 0; i < len; i += 1) {
-    prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
-    this.k = prop.k || this.k;
-    this.dataProps[i] = { n: data[i].n, p: prop };
-  }
-  if (!this.k) {
-    this.getValue(true);
-  }
-  this._isAnimated = this.k;
-}
-
-DashProperty.prototype.getValue = function (forceRender) {
-  if (this.elem.globalData.frameId === this.frameId && !forceRender) {
-    return;
-  }
-  this.frameId = this.elem.globalData.frameId;
-  this.iterateDynamicProperties();
-  this._mdf = this._mdf || forceRender;
-  if (this._mdf) {
-    var i = 0;
-    var len = this.dataProps.length;
-    if (this.renderer === 'svg') {
-      this.dashStr = '';
-    }
-    for (i = 0; i < len; i += 1) {
-      if (this.dataProps[i].n !== 'o') {
-        if (this.renderer === 'svg') {
-          this.dashStr += ' ' + this.dataProps[i].p.v;
-        } else {
-          this.dashArray[i] = this.dataProps[i].p.v;
-        }
-      } else {
-        this.dashoffset[0] = this.dataProps[i].p.v;
-      }
-    }
-  }
-};
-extendPrototype([DynamicPropertyContainer], DashProperty);
-
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-function GradientProperty(elem, data, container) {
-  this.data = data;
-  this.c = createTypedArray('uint8c', data.p * 4);
-  var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4;
-  this.o = createTypedArray('float32', cLength);
-  this._cmdf = false;
-  this._omdf = false;
-  this._collapsable = this.checkCollapsable();
-  this._hasOpacity = cLength;
-  this.initDynamicPropertyContainer(container);
-  this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
-  this.k = this.prop.k;
-  this.getValue(true);
-}
-
-GradientProperty.prototype.comparePoints = function (values, points) {
-  var i = 0;
-  var len = this.o.length / 2;
-  var diff;
-  while (i < len) {
-    diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
-    if (diff > 0.01) {
-      return false;
-    }
-    i += 1;
-  }
-  return true;
-};
-
-GradientProperty.prototype.checkCollapsable = function () {
-  if (this.o.length / 2 !== this.c.length / 4) {
-    return false;
-  }
-  if (this.data.k.k[0].s) {
-    var i = 0;
-    var len = this.data.k.k.length;
-    while (i < len) {
-      if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
-        return false;
-      }
-      i += 1;
-    }
-  } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
-    return false;
-  }
-  return true;
-};
-
-GradientProperty.prototype.getValue = function (forceRender) {
-  this.prop.getValue();
-  this._mdf = false;
-  this._cmdf = false;
-  this._omdf = false;
-  if (this.prop._mdf || forceRender) {
-    var i;
-    var len = this.data.p * 4;
-    var mult;
-    var val;
-    for (i = 0; i < len; i += 1) {
-      mult = i % 4 === 0 ? 100 : 255;
-      val = Math.round(this.prop.v[i] * mult);
-      if (this.c[i] !== val) {
-        this.c[i] = val;
-        this._cmdf = !forceRender;
-      }
-    }
-    if (this.o.length) {
-      len = this.prop.v.length;
-      for (i = this.data.p * 4; i < len; i += 1) {
-        mult = i % 2 === 0 ? 100 : 1;
-        val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
-        if (this.o[i - this.data.p * 4] !== val) {
-          this.o[i - this.data.p * 4] = val;
-          this._omdf = !forceRender;
-        }
-      }
-    }
-    this._mdf = !forceRender;
-  }
-};
-
-extendPrototype([DynamicPropertyContainer], GradientProperty);
-
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
-  if (length === 0) {
-    return '';
-  }
-  var _o = pathNodes.o;
-  var _i = pathNodes.i;
-  var _v = pathNodes.v;
-  var i;
-  var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
-  for (i = 1; i < length; i += 1) {
-    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]);
-  }
-  if (closed && length) {
-    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]);
-    shapeString += 'z';
-  }
-  return shapeString;
-};
-
-/* global Howl */
-/* exported audioControllerFactory */
-
-var audioControllerFactory = (function () {
-  function AudioController(audioFactory) {
-    this.audios = [];
-    this.audioFactory = audioFactory;
-    this._volume = 1;
-    this._isMuted = false;
-  }
-
-  AudioController.prototype = {
-    addAudio: function (audio) {
-      this.audios.push(audio);
-    },
-    pause: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].pause();
-      }
-    },
-    resume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].resume();
-      }
-    },
-    setRate: function (rateValue) {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].setRate(rateValue);
-      }
-    },
-    createAudio: function (assetPath) {
-      if (this.audioFactory) {
-        return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
-          src: [assetPath],
-        });
-      }
-      return {
-        isPlaying: false,
-        play: function () { this.isPlaying = true; },
-        seek: function () { this.isPlaying = false; },
-        playing: function () {},
-        rate: function () {},
-        setVolume: function () {},
+    function createProcess(onComplete, onError) {
+      _counterId += 1;
+      var id = 'processId_' + _counterId;
+      processes[id] = {
+        onComplete: onComplete,
+        onError: onError
       };
-    },
-    setAudioFactory: function (audioFactory) {
-      this.audioFactory = audioFactory;
-    },
-    setVolume: function (value) {
-      this._volume = value;
-      this._updateVolume();
-    },
-    mute: function () {
-      this._isMuted = true;
-      this._updateVolume();
-    },
-    unmute: function () {
-      this._isMuted = false;
-      this._updateVolume();
-    },
-    getVolume: function () {
-      return this._volume;
-    },
-    _updateVolume: function () {
-      var i;
-      var len = this.audios.length;
-      for (i = 0; i < len; i += 1) {
-        this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));
-      }
-    },
-  };
+      return id;
+    }
 
-  return function () {
-    return new AudioController();
-  };
-}());
+    function loadAnimation(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadAnimation',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+    function loadData(path, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'loadData',
+        path: path,
+        fullPath: window.location.origin + window.location.pathname,
+        id: processId
+      });
+    }
 
-var ImagePreloader = (function () {
-  var proxyImage = (function () {
-    var canvas = createTag('canvas');
-    canvas.width = 1;
-    canvas.height = 1;
-    var ctx = canvas.getContext('2d');
-    ctx.fillStyle = 'rgba(0,0,0,0)';
-    ctx.fillRect(0, 0, 1, 1);
-    return canvas;
-  }());
+    function completeAnimation(anim, onComplete, onError) {
+      setupWorker();
+      var processId = createProcess(onComplete, onError);
+      workerInstance.postMessage({
+        type: 'complete',
+        animation: anim,
+        id: processId
+      });
+    }
 
-  function imageLoaded() {
-    this.loadedAssets += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+    return {
+      loadAnimation: loadAnimation,
+      loadData: loadData,
+      completeAnimation: completeAnimation
+    };
+  }();
+
+  var ImagePreloader = function () {
+    var proxyImage = function () {
+      var canvas = createTag('canvas');
+      canvas.width = 1;
+      canvas.height = 1;
+      var ctx = canvas.getContext('2d');
+      ctx.fillStyle = 'rgba(0,0,0,0)';
+      ctx.fillRect(0, 0, 1, 1);
+      return canvas;
+    }();
+
+    function imageLoaded() {
+      this.loadedAssets += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
-  function footageLoaded() {
-    this.loadedFootagesCount += 1;
-    if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
-      if (this.imagesLoadedCb) {
-        this.imagesLoadedCb(null);
+
+    function footageLoaded() {
+      this.loadedFootagesCount += 1;
+
+      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {
+        if (this.imagesLoadedCb) {
+          this.imagesLoadedCb(null);
+        }
       }
     }
-  }
 
-  function getAssetsPath(assetData, assetsPath, originalPath) {
-    var path = '';
-    if (assetData.e) {
-      path = assetData.p;
-    } else if (assetsPath) {
-      var imagePath = assetData.p;
-      if (imagePath.indexOf('images/') !== -1) {
-        imagePath = imagePath.split('/')[1];
+    function getAssetsPath(assetData, assetsPath, originalPath) {
+      var path = '';
+
+      if (assetData.e) {
+        path = assetData.p;
+      } else if (assetsPath) {
+        var imagePath = assetData.p;
+
+        if (imagePath.indexOf('images/') !== -1) {
+          imagePath = imagePath.split('/')[1];
+        }
+
+        path = assetsPath + imagePath;
+      } else {
+        path = originalPath;
+        path += assetData.u ? assetData.u : '';
+        path += assetData.p;
       }
-      path = assetsPath + imagePath;
-    } else {
-      path = originalPath;
-      path += assetData.u ? assetData.u : '';
-      path += assetData.p;
-    }
-    return path;
-  }
 
-  function testImageLoaded(img) {
-    var _count = 0;
-    var intervalId = setInterval(function () {
-      var box = img.getBBox();
-      if (box.width || _count > 500) {
+      return path;
+    }
+
+    function testImageLoaded(img) {
+      var _count = 0;
+      var intervalId = setInterval(function () {
+        var box = img.getBBox();
+
+        if (box.width || _count > 500) {
+          this._imageLoaded();
+
+          clearInterval(intervalId);
+        }
+
+        _count += 1;
+      }.bind(this), 50);
+    }
+
+    function createImageData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createNS('image');
+
+      if (isSafari) {
+        this.testImageLoaded(img);
+      } else {
+        img.addEventListener('load', this._imageLoaded, false);
+      }
+
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
         this._imageLoaded();
-        clearInterval(intervalId);
+      }.bind(this), false);
+      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+
+      if (this._elementHelper.append) {
+        this._elementHelper.append(img);
+      } else {
+        this._elementHelper.appendChild(img);
       }
-      _count += 1;
-    }.bind(this), 50);
-  }
 
-  function createImageData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createNS('image');
-    if (isSafari) {
-      this.testImageLoaded(img);
-    } else {
-      img.addEventListener('load', this._imageLoaded, false);
-    }
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
-    if (this._elementHelper.append) {
-      this._elementHelper.append(img);
-    } else {
-      this._elementHelper.appendChild(img);
-    }
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createImgData(assetData) {
-    var path = getAssetsPath(assetData, this.assetsPath, this.path);
-    var img = createTag('img');
-    img.crossOrigin = 'anonymous';
-    img.addEventListener('load', this._imageLoaded, false);
-    img.addEventListener('error', function () {
-      ob.img = proxyImage;
-      this._imageLoaded();
-    }.bind(this), false);
-    img.src = path;
-    var ob = {
-      img: img,
-      assetData: assetData,
-    };
-    return ob;
-  }
-
-  function createFootageData(data) {
-    var ob = {
-      assetData: data,
-    };
-    var path = getAssetsPath(data, this.assetsPath, this.path);
-    dataManager.loadData(path, function (footageData) {
-      ob.img = footageData;
-      this._footageLoaded();
-    }.bind(this), function () {
-      ob.img = {};
-      this._footageLoaded();
-    }.bind(this));
-    return ob;
-  }
-
-  function loadAssets(assets, cb) {
-    this.imagesLoadedCb = cb;
-    var i;
-    var len = assets.length;
-    for (i = 0; i < len; i += 1) {
-      if (!assets[i].layers) {
-        if (!assets[i].t || assets[i].t === 'seq') {
-          this.totalImages += 1;
-          this.images.push(this._createImageData(assets[i]));
-        } else if (assets[i].t === 3) {
-          this.totalFootages += 1;
-          this.images.push(this.createFootageData(assets[i]));
-        }
-      }
-    }
-  }
-
-  function setPath(path) {
-    this.path = path || '';
-  }
-
-  function setAssetsPath(path) {
-    this.assetsPath = path || '';
-  }
-
-  function getAsset(assetData) {
-    var i = 0;
-    var len = this.images.length;
-    while (i < len) {
-      if (this.images[i].assetData === assetData) {
-        return this.images[i].img;
-      }
-      i += 1;
-    }
-    return null;
-  }
-
-  function destroy() {
-    this.imagesLoadedCb = null;
-    this.images.length = 0;
-  }
-
-  function loadedImages() {
-    return this.totalImages === this.loadedAssets;
-  }
-
-  function loadedFootages() {
-    return this.totalFootages === this.loadedFootagesCount;
-  }
-
-  function setCacheType(type, elementHelper) {
-    if (type === 'svg') {
-      this._elementHelper = elementHelper;
-      this._createImageData = this.createImageData.bind(this);
-    } else {
-      this._createImageData = this.createImgData.bind(this);
-    }
-  }
-
-  function ImagePreloaderFactory() {
-    this._imageLoaded = imageLoaded.bind(this);
-    this._footageLoaded = footageLoaded.bind(this);
-    this.testImageLoaded = testImageLoaded.bind(this);
-    this.createFootageData = createFootageData.bind(this);
-    this.assetsPath = '';
-    this.path = '';
-    this.totalImages = 0;
-    this.totalFootages = 0;
-    this.loadedAssets = 0;
-    this.loadedFootagesCount = 0;
-    this.imagesLoadedCb = null;
-    this.images = [];
-  }
-
-  ImagePreloaderFactory.prototype = {
-    loadAssets: loadAssets,
-    setAssetsPath: setAssetsPath,
-    setPath: setPath,
-    loadedImages: loadedImages,
-    loadedFootages: loadedFootages,
-    destroy: destroy,
-    getAsset: getAsset,
-    createImgData: createImgData,
-    createImageData: createImageData,
-    imageLoaded: imageLoaded,
-    footageLoaded: footageLoaded,
-    setCacheType: setCacheType,
-  };
-
-  return ImagePreloaderFactory;
-}());
-
-/* exported featureSupport */
-
-var featureSupport = (function () {
-  var ob = {
-    maskType: true,
-  };
-  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)) {
-    ob.maskType = false;
-  }
-  return ob;
-}());
-
-/* global createNS */
-/* exported filtersFactory */
-
-var filtersFactory = (function () {
-  var ob = {};
-  ob.createFilter = createFilter;
-  ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
-
-  function createFilter(filId, skipCoordinates) {
-    var fil = createNS('filter');
-    fil.setAttribute('id', filId);
-    if (skipCoordinates !== true) {
-      fil.setAttribute('filterUnits', 'objectBoundingBox');
-      fil.setAttribute('x', '0%');
-      fil.setAttribute('y', '0%');
-      fil.setAttribute('width', '100%');
-      fil.setAttribute('height', '100%');
-    }
-    return fil;
-  }
-
-  function createAlphaToLuminanceFilter() {
-    var feColorMatrix = createNS('feColorMatrix');
-    feColorMatrix.setAttribute('type', 'matrix');
-    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-    feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
-    return feColorMatrix;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
-
-function TextAnimatorProperty(textData, renderType, elem) {
-  this._isFirstFrame = true;
-  this._hasMaskedPath = false;
-  this._frameId = -1;
-  this._textData = textData;
-  this._renderType = renderType;
-  this._elem = elem;
-  this._animatorsData = createSizedArray(this._textData.a.length);
-  this._pathData = {};
-  this._moreOptions = {
-    alignment: {},
-  };
-  this.renderedLetters = [];
-  this.lettersChangedFlag = false;
-  this.initDynamicPropertyContainer(elem);
-}
-
-TextAnimatorProperty.prototype.searchProperties = function () {
-  var i;
-  var len = this._textData.a.length;
-  var animatorProps;
-  var getProp = PropertyFactory.getProp;
-  for (i = 0; i < len; i += 1) {
-    animatorProps = this._textData.a[i];
-    this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
-  }
-  if (this._textData.p && 'm' in this._textData.p) {
-    this._pathData = {
-      a: getProp(this._elem, this._textData.p.a, 0, 0, this),
-      f: getProp(this._elem, this._textData.p.f, 0, 0, this),
-      l: getProp(this._elem, this._textData.p.l, 0, 0, this),
-      r: getProp(this._elem, this._textData.p.r, 0, 0, this),
-      p: getProp(this._elem, this._textData.p.p, 0, 0, this),
-      m: this._elem.maskManager.getMaskProperty(this._textData.p.m),
-    };
-    this._hasMaskedPath = true;
-  } else {
-    this._hasMaskedPath = false;
-  }
-  this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
-};
-
-TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
-  this.lettersChangedFlag = lettersChangedFlag;
-  if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
-    return;
-  }
-  this._isFirstFrame = false;
-  var alignment = this._moreOptions.alignment.v;
-  var animators = this._animatorsData;
-  var textData = this._textData;
-  var matrixHelper = this.mHelper;
-  var renderType = this._renderType;
-  var renderedLettersCount = this.renderedLetters.length;
-  var xPos;
-  var yPos;
-  var i;
-  var len;
-  var letters = documentData.l;
-  var pathInfo;
-  var currentLength;
-  var currentPoint;
-  var segmentLength;
-  var flag;
-  var pointInd;
-  var segmentInd;
-  var prevPoint;
-  var points;
-  var segments;
-  var partialLength;
-  var totalLength;
-  var perc;
-  var tanAngle;
-  var mask;
-  if (this._hasMaskedPath) {
-    mask = this._pathData.m;
-    if (!this._pathData.n || this._pathData._mdf) {
-      var paths = mask.v;
-      if (this._pathData.r.v) {
-        paths = paths.reverse();
-      }
-      // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-      pathInfo = {
-        tLength: 0,
-        segments: [],
+      var ob = {
+        img: img,
+        assetData: assetData
       };
-      len = paths._length - 1;
-      var bezierData;
-      totalLength = 0;
+      return ob;
+    }
+
+    function createImgData(assetData) {
+      var path = getAssetsPath(assetData, this.assetsPath, this.path);
+      var img = createTag('img');
+      img.crossOrigin = 'anonymous';
+      img.addEventListener('load', this._imageLoaded, false);
+      img.addEventListener('error', function () {
+        ob.img = proxyImage;
+
+        this._imageLoaded();
+      }.bind(this), false);
+      img.src = path;
+      var ob = {
+        img: img,
+        assetData: assetData
+      };
+      return ob;
+    }
+
+    function createFootageData(data) {
+      var ob = {
+        assetData: data
+      };
+      var path = getAssetsPath(data, this.assetsPath, this.path);
+      dataManager.loadData(path, function (footageData) {
+        ob.img = footageData;
+
+        this._footageLoaded();
+      }.bind(this), function () {
+        ob.img = {};
+
+        this._footageLoaded();
+      }.bind(this));
+      return ob;
+    }
+
+    function loadAssets(assets, cb) {
+      this.imagesLoadedCb = cb;
+      var i;
+      var len = assets.length;
+
       for (i = 0; i < len; i += 1) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[i + 1],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      i = len;
-      if (mask.v.c) {
-        bezierData = bez.buildBezierData(paths.v[i],
-          paths.v[0],
-          [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]],
-          [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
-        pathInfo.tLength += bezierData.segmentLength;
-        pathInfo.segments.push(bezierData);
-        totalLength += bezierData.segmentLength;
-      }
-      this._pathData.pi = pathInfo;
-    }
-    pathInfo = this._pathData.pi;
-
-    currentLength = this._pathData.f.v;
-    segmentInd = 0;
-    pointInd = 1;
-    segmentLength = 0;
-    flag = true;
-    segments = pathInfo.segments;
-    if (currentLength < 0 && mask.v.c) {
-      if (pathInfo.tLength < Math.abs(currentLength)) {
-        currentLength = -Math.abs(currentLength) % pathInfo.tLength;
-      }
-      segmentInd = segments.length - 1;
-      points = segments[segmentInd].points;
-      pointInd = points.length - 1;
-      while (currentLength < 0) {
-        currentLength += points[pointInd].partialLength;
-        pointInd -= 1;
-        if (pointInd < 0) {
-          segmentInd -= 1;
-          points = segments[segmentInd].points;
-          pointInd = points.length - 1;
+        if (!assets[i].layers) {
+          if (!assets[i].t || assets[i].t === 'seq') {
+            this.totalImages += 1;
+            this.images.push(this._createImageData(assets[i]));
+          } else if (assets[i].t === 3) {
+            this.totalFootages += 1;
+            this.images.push(this.createFootageData(assets[i]));
+          }
         }
       }
     }
-    points = segments[segmentInd].points;
-    prevPoint = points[pointInd - 1];
-    currentPoint = points[pointInd];
-    partialLength = currentPoint.partialLength;
-  }
 
-  len = letters.length;
-  xPos = 0;
-  yPos = 0;
-  var yOff = documentData.finalSize * 1.2 * 0.714;
-  var firstLine = true;
-  var animatorProps;
-  var animatorSelector;
-  var j;
-  var jLen;
-  var letterValue;
-
-  jLen = animators.length;
-
-  var mult;
-  var ind = -1;
-  var offf;
-  var xPathPos;
-  var yPathPos;
-  var initPathPos = currentLength;
-  var initSegmentInd = segmentInd;
-  var initPointInd = pointInd;
-  var currentLine = -1;
-  var elemOpacity;
-  var sc;
-  var sw;
-  var fc;
-  var k;
-  var letterSw;
-  var letterSc;
-  var letterFc;
-  var letterM = '';
-  var letterP = this.defaultPropsArray;
-  var letterO;
-
-  //
-  if (documentData.j === 2 || documentData.j === 1) {
-    var animatorJustifyOffset = 0;
-    var animatorFirstCharOffset = 0;
-    var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
-    var lastIndex = 0;
-    var isNewLine = true;
-
-    for (i = 0; i < len; i += 1) {
-      if (letters[i].n) {
-        if (animatorJustifyOffset) {
-          animatorJustifyOffset += animatorFirstCharOffset;
-        }
-        while (lastIndex < i) {
-          letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-          lastIndex += 1;
-        }
-        animatorJustifyOffset = 0;
-        isNewLine = true;
-      } else {
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.t.propType) {
-            if (isNewLine && documentData.j === 2) {
-              animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
-            }
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
-            } else {
-              animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
-            }
-          }
-        }
-        isNewLine = false;
-      }
-    }
-    if (animatorJustifyOffset) {
-      animatorJustifyOffset += animatorFirstCharOffset;
-    }
-    while (lastIndex < i) {
-      letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
-      lastIndex += 1;
-    }
-  }
-  //
-
-  for (i = 0; i < len; i += 1) {
-    matrixHelper.reset();
-    elemOpacity = 1;
-    if (letters[i].n) {
-      xPos = 0;
-      yPos += documentData.yOffset;
-      yPos += firstLine ? 1 : 0;
-      currentLength = initPathPos;
-      firstLine = false;
-      if (this._hasMaskedPath) {
-        segmentInd = initSegmentInd;
-        pointInd = initPointInd;
-        points = segments[segmentInd].points;
-        prevPoint = points[pointInd - 1];
-        currentPoint = points[pointInd];
-        partialLength = currentPoint.partialLength;
-        segmentLength = 0;
-      }
-      letterM = '';
-      letterFc = '';
-      letterSw = '';
-      letterO = '';
-      letterP = this.defaultPropsArray;
-    } else {
-      if (this._hasMaskedPath) {
-        if (currentLine !== letters[i].line) {
-          switch (documentData.j) {
-            case 1:
-              currentLength += totalLength - documentData.lineWidths[letters[i].line];
-              break;
-            case 2:
-              currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
-              break;
-            default:
-              break;
-          }
-          currentLine = letters[i].line;
-        }
-        if (ind !== letters[i].ind) {
-          if (letters[ind]) {
-            currentLength += letters[ind].extra;
-          }
-          currentLength += letters[i].an / 2;
-          ind = letters[i].ind;
-        }
-        currentLength += (alignment[0] * letters[i].an) * 0.005;
-        var animatorOffset = 0;
-        for (j = 0; j < jLen; j += 1) {
-          animatorProps = animators[j].a;
-          if (animatorProps.p.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.p.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.p.v[0] * mult;
-            }
-          }
-          if (animatorProps.a.propType) {
-            animatorSelector = animators[j].s;
-            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-            if (mult.length) {
-              animatorOffset += animatorProps.a.v[0] * mult[0];
-            } else {
-              animatorOffset += animatorProps.a.v[0] * mult;
-            }
-          }
-        }
-        flag = true;
-        // Force alignment only works with a single line for now
-        if (this._pathData.a.v) {
-          currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1);
-          currentLength += this._pathData.f.v;
-        }
-        while (flag) {
-          if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
-            perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
-            xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
-            yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
-            matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01);
-            flag = false;
-          } else if (points) {
-            segmentLength += currentPoint.partialLength;
-            pointInd += 1;
-            if (pointInd >= points.length) {
-              pointInd = 0;
-              segmentInd += 1;
-              if (!segments[segmentInd]) {
-                if (mask.v.c) {
-                  pointInd = 0;
-                  segmentInd = 0;
-                  points = segments[segmentInd].points;
-                } else {
-                  segmentLength -= currentPoint.partialLength;
-                  points = null;
-                }
-              } else {
-                points = segments[segmentInd].points;
-              }
-            }
-            if (points) {
-              prevPoint = currentPoint;
-              currentPoint = points[pointInd];
-              partialLength = currentPoint.partialLength;
-            }
-          }
-        }
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-      } else {
-        offf = letters[i].an / 2 - letters[i].add;
-        matrixHelper.translate(-offf, 0, 0);
-
-        // Grouping alignment
-        matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0);
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.t.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
-          if (xPos !== 0 || documentData.j !== 0) {
-            if (this._hasMaskedPath) {
-              if (mult.length) {
-                currentLength += animatorProps.t.v * mult[0];
-              } else {
-                currentLength += animatorProps.t.v * mult;
-              }
-            } else if (mult.length) {
-              xPos += animatorProps.t.v * mult[0];
-            } else {
-              xPos += animatorProps.t.v * mult;
-            }
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        sw = documentData.sw || 0;
-      }
-      if (documentData.strokeColorAnim) {
-        if (documentData.sc) {
-          sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
-        } else {
-          sc = [0, 0, 0];
-        }
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.a.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-
-          if (mult.length) {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        if (animatorProps.s.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (mult.length) {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1);
-          } else {
-            matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1);
-          }
-        }
-      }
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-        animatorSelector = animators[j].s;
-        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-        if (animatorProps.sk.propType) {
-          if (mult.length) {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
-          } else {
-            matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
-          }
-        }
-        if (animatorProps.r.propType) {
-          if (mult.length) {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
-          } else {
-            matrixHelper.rotateZ(-animatorProps.r.v * mult);
-          }
-        }
-        if (animatorProps.ry.propType) {
-          if (mult.length) {
-            matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
-          } else {
-            matrixHelper.rotateY(animatorProps.ry.v * mult);
-          }
-        }
-        if (animatorProps.rx.propType) {
-          if (mult.length) {
-            matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
-          } else {
-            matrixHelper.rotateX(animatorProps.rx.v * mult);
-          }
-        }
-        if (animatorProps.o.propType) {
-          if (mult.length) {
-            elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0];
-          } else {
-            elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult;
-          }
-        }
-        if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
-          if (mult.length) {
-            sw += animatorProps.sw.v * mult[0];
-          } else {
-            sw += animatorProps.sw.v * mult;
-          }
-        }
-        if (documentData.strokeColorAnim && animatorProps.sc.propType) {
-          for (k = 0; k < 3; k += 1) {
-            if (mult.length) {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
-            } else {
-              sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
-            }
-          }
-        }
-        if (documentData.fillColorAnim && documentData.fc) {
-          if (animatorProps.fc.propType) {
-            for (k = 0; k < 3; k += 1) {
-              if (mult.length) {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
-              } else {
-                fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
-              }
-            }
-          }
-          if (animatorProps.fh.propType) {
-            if (mult.length) {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
-            } else {
-              fc = addHueToRGB(fc, animatorProps.fh.v * mult);
-            }
-          }
-          if (animatorProps.fs.propType) {
-            if (mult.length) {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
-            } else {
-              fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
-            }
-          }
-          if (animatorProps.fb.propType) {
-            if (mult.length) {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
-            } else {
-              fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
-            }
-          }
-        }
-      }
-
-      for (j = 0; j < jLen; j += 1) {
-        animatorProps = animators[j].a;
-
-        if (animatorProps.p.propType) {
-          animatorSelector = animators[j].s;
-          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
-          if (this._hasMaskedPath) {
-            if (mult.length) {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
-            } else {
-              matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-            }
-          } else if (mult.length) {
-            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
-          } else {
-            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
-          }
-        }
-      }
-      if (documentData.strokeWidthAnim) {
-        letterSw = sw < 0 ? 0 : sw;
-      }
-      if (documentData.strokeColorAnim) {
-        letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
-      }
-      if (documentData.fillColorAnim && documentData.fc) {
-        letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
-      }
-
-      if (this._hasMaskedPath) {
-        matrixHelper.translate(0, -documentData.ls);
-
-        matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0);
-        if (this._pathData.p.v) {
-          tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
-          var rot = (Math.atan(tanAngle) * 180) / Math.PI;
-          if (currentPoint.point[0] < prevPoint.point[0]) {
-            rot += 180;
-          }
-          matrixHelper.rotate((-rot * Math.PI) / 180);
-        }
-        matrixHelper.translate(xPathPos, yPathPos, 0);
-        currentLength -= (alignment[0] * letters[i].an) * 0.005;
-        if (letters[i + 1] && ind !== letters[i + 1].ind) {
-          currentLength += letters[i].an / 2;
-          currentLength += (documentData.tr * 0.001) * documentData.finalSize;
-        }
-      } else {
-        matrixHelper.translate(xPos, yPos, 0);
-
-        if (documentData.ps) {
-          // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
-          matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-        }
-        switch (documentData.j) {
-          case 1:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
-            break;
-          case 2:
-            matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
-            break;
-          default:
-            break;
-        }
-        matrixHelper.translate(0, -documentData.ls);
-        matrixHelper.translate(offf, 0, 0);
-        matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0);
-        xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize;
-      }
-      if (renderType === 'html') {
-        letterM = matrixHelper.toCSS();
-      } else if (renderType === 'svg') {
-        letterM = matrixHelper.to2dCSS();
-      } else {
-        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]];
-      }
-      letterO = elemOpacity;
+    function setPath(path) {
+      this.path = path || '';
     }
 
-    if (renderedLettersCount <= i) {
-      letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
-      this.renderedLetters.push(letterValue);
-      renderedLettersCount += 1;
-      this.lettersChangedFlag = true;
-    } else {
-      letterValue = this.renderedLetters[i];
-      this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+    function setAssetsPath(path) {
+      this.assetsPath = path || '';
     }
-  }
-};
 
-TextAnimatorProperty.prototype.getValue = function () {
-  if (this._elem.globalData.frameId === this._frameId) {
-    return;
-  }
-  this._frameId = this._elem.globalData.frameId;
-  this.iterateDynamicProperties();
-};
+    function getAsset(assetData) {
+      var i = 0;
+      var len = this.images.length;
 
-TextAnimatorProperty.prototype.mHelper = new Matrix();
-TextAnimatorProperty.prototype.defaultPropsArray = [];
-extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
-
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
-
-function TextAnimatorDataProperty(elem, animatorProps, container) {
-  var defaultData = { propType: false };
-  var getProp = PropertyFactory.getProp;
-  var textAnimatorAnimatables = animatorProps.a;
-  this.a = {
-    r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
-    rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
-    ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
-    sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
-    sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
-    s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
-    a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
-    o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
-    p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
-    sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
-    sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
-    fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
-    fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
-    fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
-    fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
-    t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData,
-  };
-
-  this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
-  this.s.t = animatorProps.s.t;
-}
-
-function LetterProps(o, sw, sc, fc, m, p) {
-  this.o = o;
-  this.sw = sw;
-  this.sc = sc;
-  this.fc = fc;
-  this.m = m;
-  this.p = p;
-  this._mdf = {
-    o: true,
-    sw: !!sw,
-    sc: !!sc,
-    fc: !!fc,
-    m: true,
-    p: true,
-  };
-}
-
-LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
-  this._mdf.o = false;
-  this._mdf.sw = false;
-  this._mdf.sc = false;
-  this._mdf.fc = false;
-  this._mdf.m = false;
-  this._mdf.p = false;
-  var updated = false;
-
-  if (this.o !== o) {
-    this.o = o;
-    this._mdf.o = true;
-    updated = true;
-  }
-  if (this.sw !== sw) {
-    this.sw = sw;
-    this._mdf.sw = true;
-    updated = true;
-  }
-  if (this.sc !== sc) {
-    this.sc = sc;
-    this._mdf.sc = true;
-    updated = true;
-  }
-  if (this.fc !== fc) {
-    this.fc = fc;
-    this._mdf.fc = true;
-    updated = true;
-  }
-  if (this.m !== m) {
-    this.m = m;
-    this._mdf.m = true;
-    updated = true;
-  }
-  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])) {
-    this.p = p;
-    this._mdf.p = true;
-    updated = true;
-  }
-  return updated;
-};
-
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
-
-function TextProperty(elem, data) {
-  this._frameId = initialDefaultFrame;
-  this.pv = '';
-  this.v = '';
-  this.kf = false;
-  this._isFirstFrame = true;
-  this._mdf = false;
-  this.data = data;
-  this.elem = elem;
-  this.comp = this.elem.comp;
-  this.keysIndex = 0;
-  this.canResize = false;
-  this.minimumFontSize = 1;
-  this.effectsSequence = [];
-  this.currentData = {
-    ascent: 0,
-    boxWidth: this.defaultBoxWidth,
-    f: '',
-    fStyle: '',
-    fWeight: '',
-    fc: '',
-    j: '',
-    justifyOffset: '',
-    l: [],
-    lh: 0,
-    lineWidths: [],
-    ls: '',
-    of: '',
-    s: '',
-    sc: '',
-    sw: 0,
-    t: 0,
-    tr: 0,
-    sz: 0,
-    ps: null,
-    fillColorAnim: false,
-    strokeColorAnim: false,
-    strokeWidthAnim: false,
-    yOffset: 0,
-    finalSize: 0,
-    finalText: [],
-    finalLineHeight: 0,
-    __complete: false,
-
-  };
-  this.copyData(this.currentData, this.data.d.k[0].s);
-
-  if (!this.searchProperty()) {
-    this.completeTextData(this.currentData);
-  }
-}
-
-TextProperty.prototype.defaultBoxWidth = [0, 0];
-
-TextProperty.prototype.copyData = function (obj, data) {
-  for (var s in data) {
-    if (Object.prototype.hasOwnProperty.call(data, s)) {
-      obj[s] = data[s];
-    }
-  }
-  return obj;
-};
-
-TextProperty.prototype.setCurrentData = function (data) {
-  if (!data.__complete) {
-    this.completeTextData(data);
-  }
-  this.currentData = data;
-  this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
-  this._mdf = true;
-};
-
-TextProperty.prototype.searchProperty = function () {
-  return this.searchKeyframes();
-};
-
-TextProperty.prototype.searchKeyframes = function () {
-  this.kf = this.data.d.k.length > 1;
-  if (this.kf) {
-    this.addEffect(this.getKeyframeValue.bind(this));
-  }
-  return this.kf;
-};
-
-TextProperty.prototype.addEffect = function (effectFunction) {
-  this.effectsSequence.push(effectFunction);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.getValue = function (_finalValue) {
-  if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
-    return;
-  }
-  this.currentData.t = this.data.d.k[this.keysIndex].s.t;
-  var currentValue = this.currentData;
-  var currentIndex = this.keysIndex;
-  if (this.lock) {
-    this.setCurrentData(this.currentData);
-    return;
-  }
-  this.lock = true;
-  this._mdf = false;
-  var i; var
-    len = this.effectsSequence.length;
-  var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
-  for (i = 0; i < len; i += 1) {
-    // Checking if index changed to prevent creating a new object every time the expression updates.
-    if (currentIndex !== this.keysIndex) {
-      finalValue = this.effectsSequence[i](finalValue, finalValue.t);
-    } else {
-      finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
-    }
-  }
-  if (currentValue !== finalValue) {
-    this.setCurrentData(finalValue);
-  }
-  this.v = this.currentData;
-  this.pv = this.v;
-  this.lock = false;
-  this.frameId = this.elem.globalData.frameId;
-};
-
-TextProperty.prototype.getKeyframeValue = function () {
-  var textKeys = this.data.d.k;
-  var frameNum = this.elem.comp.renderedFrame;
-  var i = 0; var
-    len = textKeys.length;
-  while (i <= len - 1) {
-    if (i === len - 1 || textKeys[i + 1].t > frameNum) {
-      break;
-    }
-    i += 1;
-  }
-  if (this.keysIndex !== i) {
-    this.keysIndex = i;
-  }
-  return this.data.d.k[this.keysIndex].s;
-};
-
-TextProperty.prototype.buildFinalText = function (text) {
-  var charactersArray = [];
-  var i = 0;
-  var len = text.length;
-  var charCode;
-  var secondCharCode;
-  var shouldCombine = false;
-  while (i < len) {
-    charCode = text.charCodeAt(i);
-    if (FontManager.isCombinedCharacter(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-    } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
-        if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
-          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-          shouldCombine = false;
-        } else {
-          charactersArray.push(text.substr(i, 2));
+      while (i < len) {
+        if (this.images[i].assetData === assetData) {
+          return this.images[i].img;
         }
+
         i += 1;
+      }
+
+      return null;
+    }
+
+    function destroy() {
+      this.imagesLoadedCb = null;
+      this.images.length = 0;
+    }
+
+    function loadedImages() {
+      return this.totalImages === this.loadedAssets;
+    }
+
+    function loadedFootages() {
+      return this.totalFootages === this.loadedFootagesCount;
+    }
+
+    function setCacheType(type, elementHelper) {
+      if (type === 'svg') {
+        this._elementHelper = elementHelper;
+        this._createImageData = this.createImageData.bind(this);
       } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (charCode > 0xDBFF) {
-      secondCharCode = text.charCodeAt(i + 1);
-      if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
-        shouldCombine = true;
-        charactersArray[charactersArray.length - 1] += text.substr(i, 2);
-        i += 1;
-      } else {
-        charactersArray.push(text.charAt(i));
-      }
-    } else if (FontManager.isZeroWidthJoiner(charCode)) {
-      charactersArray[charactersArray.length - 1] += text.charAt(i);
-      shouldCombine = true;
-    } else {
-      charactersArray.push(text.charAt(i));
-    }
-    i += 1;
-  }
-  return charactersArray;
-};
-
-TextProperty.prototype.completeTextData = function (documentData) {
-  documentData.__complete = true;
-  var fontManager = this.elem.globalData.fontManager;
-  var data = this.data;
-  var letters = [];
-  var i; var
-    len;
-  var newLineFlag; var index = 0; var
-    val;
-  var anchorGrouping = data.m.g;
-  var currentSize = 0; var currentPos = 0; var currentLine = 0; var
-    lineWidths = [];
-  var lineWidth = 0;
-  var maxLineWidth = 0;
-  var j; var
-    jLen;
-  var fontData = fontManager.getFontByName(documentData.f);
-  var charData; var
-    cLength = 0;
-
-  var fontProps = getFontProperties(fontData);
-  documentData.fWeight = fontProps.weight;
-  documentData.fStyle = fontProps.style;
-  documentData.finalSize = documentData.s;
-  documentData.finalText = this.buildFinalText(documentData.t);
-  len = documentData.finalText.length;
-  documentData.finalLineHeight = documentData.lh;
-  var trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-  var charCode;
-  if (documentData.sz) {
-    var flag = true;
-    var boxWidth = documentData.sz[0];
-    var boxHeight = documentData.sz[1];
-    var currentHeight; var
-      finalText;
-    while (flag) {
-      finalText = this.buildFinalText(documentData.t);
-      currentHeight = 0;
-      lineWidth = 0;
-      len = finalText.length;
-      trackingOffset = (documentData.tr / 1000) * documentData.finalSize;
-      var lastSpaceIndex = -1;
-      for (i = 0; i < len; i += 1) {
-        charCode = finalText[i].charCodeAt(0);
-        newLineFlag = false;
-        if (finalText[i] === ' ') {
-          lastSpaceIndex = i;
-        } else if (charCode === 13 || charCode === 3) {
-          lineWidth = 0;
-          newLineFlag = true;
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-        }
-        if (fontManager.chars) {
-          charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
-          cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-        } else {
-          // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-          cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
-        }
-        if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
-          if (lastSpaceIndex === -1) {
-            len += 1;
-          } else {
-            i = lastSpaceIndex;
-          }
-          currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
-          finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r');
-          // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
-          lastSpaceIndex = -1;
-          lineWidth = 0;
-        } else {
-          lineWidth += cLength;
-          lineWidth += trackingOffset;
-        }
-      }
-      currentHeight += (fontData.ascent * documentData.finalSize) / 100;
-      if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
-        documentData.finalSize -= 1;
-        documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s;
-      } else {
-        documentData.finalText = finalText;
-        len = documentData.finalText.length;
-        flag = false;
+        this._createImageData = this.createImgData.bind(this);
       }
     }
-  }
-  lineWidth = -trackingOffset;
-  cLength = 0;
-  var uncollapsedSpaces = 0;
-  var currentChar;
-  for (i = 0; i < len; i += 1) {
-    newLineFlag = false;
-    currentChar = documentData.finalText[i];
-    charCode = currentChar.charCodeAt(0);
-    if (charCode === 13 || charCode === 3) {
-      uncollapsedSpaces = 0;
-      lineWidths.push(lineWidth);
-      maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-      lineWidth = -2 * trackingOffset;
-      val = '';
-      newLineFlag = true;
-      currentLine += 1;
-    } else {
-      val = currentChar;
-    }
-    if (fontManager.chars) {
-      charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
-      cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100;
-    } else {
-      // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
-      // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
-      cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+
+    function ImagePreloaderFactory() {
+      this._imageLoaded = imageLoaded.bind(this);
+      this._footageLoaded = footageLoaded.bind(this);
+      this.testImageLoaded = testImageLoaded.bind(this);
+      this.createFootageData = createFootageData.bind(this);
+      this.assetsPath = '';
+      this.path = '';
+      this.totalImages = 0;
+      this.totalFootages = 0;
+      this.loadedAssets = 0;
+      this.loadedFootagesCount = 0;
+      this.imagesLoadedCb = null;
+      this.images = [];
     }
 
-    //
-    if (currentChar === ' ') {
-      uncollapsedSpaces += cLength + trackingOffset;
-    } else {
-      lineWidth += cLength + trackingOffset + uncollapsedSpaces;
-      uncollapsedSpaces = 0;
-    }
-    letters.push({
-      l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0,
-    });
-    if (anchorGrouping == 2) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || val === ' ' || i === len - 1) {
-        if (val === '' || val === ' ') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        index += 1;
-        currentSize = 0;
-      }
-    } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq
-      currentSize += cLength;
-      if (val === '' || i === len - 1) {
-        if (val === '') {
-          currentSize -= cLength;
-        }
-        while (currentPos <= i) {
-          letters[currentPos].an = currentSize;
-          letters[currentPos].ind = index;
-          letters[currentPos].extra = cLength;
-          currentPos += 1;
-        }
-        currentSize = 0;
-        index += 1;
-      }
-    } else {
-      letters[index].ind = index;
-      letters[index].extra = 0;
-      index += 1;
-    }
-  }
-  documentData.l = letters;
-  maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
-  lineWidths.push(lineWidth);
-  if (documentData.sz) {
-    documentData.boxWidth = documentData.sz[0];
-    documentData.justifyOffset = 0;
-  } else {
-    documentData.boxWidth = maxLineWidth;
-    switch (documentData.j) {
-      case 1:
-        documentData.justifyOffset = -documentData.boxWidth;
-        break;
-      case 2:
-        documentData.justifyOffset = -documentData.boxWidth / 2;
-        break;
-      default:
-        documentData.justifyOffset = 0;
-    }
-  }
-  documentData.lineWidths = lineWidths;
+    ImagePreloaderFactory.prototype = {
+      loadAssets: loadAssets,
+      setAssetsPath: setAssetsPath,
+      setPath: setPath,
+      loadedImages: loadedImages,
+      loadedFootages: loadedFootages,
+      destroy: destroy,
+      getAsset: getAsset,
+      createImgData: createImgData,
+      createImageData: createImageData,
+      imageLoaded: imageLoaded,
+      footageLoaded: footageLoaded,
+      setCacheType: setCacheType
+    };
+    return ImagePreloaderFactory;
+  }();
 
-  var animators = data.a; var animatorData; var
-    letterData;
-  jLen = animators.length;
-  var based; var ind; var
-    indexes = [];
-  for (j = 0; j < jLen; j += 1) {
-    animatorData = animators[j];
-    if (animatorData.a.sc) {
-      documentData.strokeColorAnim = true;
-    }
-    if (animatorData.a.sw) {
-      documentData.strokeWidthAnim = true;
-    }
-    if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
-      documentData.fillColorAnim = true;
-    }
-    ind = 0;
-    based = animatorData.s.b;
-    for (i = 0; i < len; i += 1) {
-      letterData = letters[i];
-      letterData.anIndexes[j] = ind;
-      if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq
-        if (animatorData.s.rn === 1) {
-          indexes.push(ind);
-        }
-        ind += 1;
-      }
-    }
-    data.a[j].s.totalChars = ind;
-    var currentInd = -1; var
-      newInd;
-    if (animatorData.s.rn === 1) {
-      for (i = 0; i < len; i += 1) {
-        letterData = letters[i];
-        if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq
-          currentInd = letterData.anIndexes[j];
-          newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
-        }
-        letterData.anIndexes[j] = newInd;
-      }
-    }
-  }
-  documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
-  documentData.ls = documentData.ls || 0;
-  documentData.ascent = (fontData.ascent * documentData.finalSize) / 100;
-};
+  function BaseEvent() {}
 
-TextProperty.prototype.updateDocumentData = function (newData, index) {
-  index = index === undefined ? this.keysIndex : index;
-  var dData = this.copyData({}, this.data.d.k[index].s);
-  dData = this.copyData(dData, newData);
-  this.data.d.k[index].s = dData;
-  this.recalculate(index);
-  this.elem.addDynamicProperty(this);
-};
+  BaseEvent.prototype = {
+    triggerEvent: function triggerEvent(eventName, args) {
+      if (this._cbs[eventName]) {
+        var callbacks = this._cbs[eventName];
 
-TextProperty.prototype.recalculate = function (index) {
-  var dData = this.data.d.k[index].s;
-  dData.__complete = false;
-  this.keysIndex = 0;
-  this._isFirstFrame = true;
-  this.getValue(dData);
-};
-
-TextProperty.prototype.canResizeFont = function (_canResize) {
-  this.canResize = _canResize;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
-  this.minimumFontSize = Math.floor(_fontValue) || 1;
-  this.recalculate(this.keysIndex);
-  this.elem.addDynamicProperty(this);
-};
-
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
-
-var TextSelectorProp = (function () {
-  var max = Math.max;
-  var min = Math.min;
-  var floor = Math.floor;
-
-  function TextSelectorPropFactory(elem, data) {
-    this._currentTextLength = -1;
-    this.k = false;
-    this.data = data;
-    this.elem = elem;
-    this.comp = elem.comp;
-    this.finalS = 0;
-    this.finalE = 0;
-    this.initDynamicPropertyContainer(elem);
-    this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this);
-    if ('e' in data) {
-      this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
-    } else {
-      this.e = { v: 100 };
-    }
-    this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this);
-    this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this);
-    this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this);
-    this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this);
-    this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
-    if (!this.dynamicProperties.length) {
-      this.getValue();
-    }
-  }
-
-  TextSelectorPropFactory.prototype = {
-    getMult: function (ind) {
-      if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
-        this.getValue();
-      }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
-      var x1 = 0;
-      var y1 = 0;
-      var x2 = 1;
-      var y2 = 1;
-      if (this.ne.v > 0) {
-        x1 = this.ne.v / 100.0;
-      } else {
-        y1 = -this.ne.v / 100.0;
-      }
-      if (this.xe.v > 0) {
-        x2 = 1.0 - this.xe.v / 100.0;
-      } else {
-        y2 = 1.0 + this.xe.v / 100.0;
-      }
-      var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
-
-      var mult = 0;
-      var s = this.finalS;
-      var e = this.finalE;
-      var type = this.data.sh;
-      if (type === 2) {
-        if (e === s) {
-          mult = ind >= e ? 1 : 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-        mult = easer(mult);
-      } else if (type === 3) {
-        if (e === s) {
-          mult = ind >= e ? 0 : 1;
-        } else {
-          mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-        }
-
-        mult = easer(mult);
-      } else if (type === 4) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
-          if (mult < 0.5) {
-            mult *= 2;
-          } else {
-            mult = 1 - 2 * (mult - 0.5);
-          }
-        }
-        mult = easer(mult);
-      } else if (type === 5) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          var tot = e - s;
-          /* ind += 0.5;
-                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          var x = -tot / 2 + ind;
-          var a = tot / 2;
-          mult = Math.sqrt(1 - (x * x) / (a * a));
-        }
-        mult = easer(mult);
-      } else if (type === 6) {
-        if (e === s) {
-          mult = 0;
-        } else {
-          ind = min(max(0, ind + 0.5 - s), e - s);
-          mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line
-        }
-        mult = easer(mult);
-      } else {
-        if (ind >= floor(s)) {
-          if (ind - s < 0) {
-            mult = max(0, min(min(e, 1) - (s - ind), 1));
-          } else {
-            mult = max(0, min(e - ind, 1));
-          }
-        }
-        mult = easer(mult);
-      }
-      // Smoothness implementation.
-      // The smoothness represents a reduced range of the original [0; 1] range.
-      // if smoothness is 25%, the new range will be [0.375; 0.625]
-      // Steps are:
-      // - find the lower value of the new range (threshold)
-      // - if multiplier is smaller than that value, floor it to 0
-      // - if it is larger,
-      //     - subtract the threshold
-      //     - divide it by the smoothness (this will return the range to [0; 1])
-      // Note: If it doesn't work on some scenarios, consider applying it before the easer.
-      if (this.sm.v !== 100) {
-        var smoothness = this.sm.v * 0.01;
-        if (smoothness === 0) {
-          smoothness = 0.00000001;
-        }
-        var threshold = 0.5 - smoothness * 0.5;
-        if (mult < threshold) {
-          mult = 0;
-        } else {
-          mult = (mult - threshold) / smoothness;
-          if (mult > 1) {
-            mult = 1;
-          }
+        for (var i = 0; i < callbacks.length; i += 1) {
+          callbacks[i](args);
         }
       }
-      return mult * this.a.v;
     },
-    getValue: function (newCharsFlag) {
-      this.iterateDynamicProperties();
-      this._mdf = newCharsFlag || this._mdf;
-      this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
-      if (newCharsFlag && this.data.r === 2) {
-        this.e.v = this._currentTextLength;
+    addEventListener: function addEventListener(eventName, callback) {
+      if (!this._cbs[eventName]) {
+        this._cbs[eventName] = [];
       }
-      var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
-      var o = this.o.v / divisor;
-      var s = this.s.v / divisor + o;
-      var e = (this.e.v / divisor) + o;
-      if (s > e) {
-        var _s = s;
-        s = e;
-        e = _s;
-      }
-      this.finalS = s;
-      this.finalE = e;
+
+      this._cbs[eventName].push(callback);
+
+      return function () {
+        this.removeEventListener(eventName, callback);
+      }.bind(this);
     },
-  };
-  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+    removeEventListener: function removeEventListener(eventName, callback) {
+      if (!callback) {
+        this._cbs[eventName] = null;
+      } else if (this._cbs[eventName]) {
+        var i = 0;
+        var len = this._cbs[eventName].length;
 
-  function getTextSelectorProp(elem, data, arr) {
-    return new TextSelectorPropFactory(elem, data, arr);
-  }
+        while (i < len) {
+          if (this._cbs[eventName][i] === callback) {
+            this._cbs[eventName].splice(i, 1);
 
-  return {
-    getTextSelectorProp: getTextSelectorProp,
-  };
-}());
+            i -= 1;
+            len -= 1;
+          }
 
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+          i += 1;
+        }
 
-var poolFactory = (function () {
-  return function (initialLength, _create, _release) {
-    var _length = 0;
-    var _maxLength = initialLength;
-    var pool = createSizedArray(_maxLength);
-
-    var ob = {
-      newElement: newElement,
-      release: release,
-    };
-
-    function newElement() {
-      var element;
-      if (_length) {
-        _length -= 1;
-        element = pool[_length];
-      } else {
-        element = _create();
+        if (!this._cbs[eventName].length) {
+          this._cbs[eventName] = null;
+        }
       }
-      return element;
     }
-
-    function release(element) {
-      if (_length === _maxLength) {
-        pool = pooling.double(pool);
-        _maxLength *= 2;
-      }
-      if (_release) {
-        _release(element);
-      }
-      pool[_length] = element;
-      _length += 1;
-    }
-
-    return ob;
-  };
-}());
-
-/* global createSizedArray */
-/* exported pooling */
-
-var pooling = (function () {
-  function double(arr) {
-    return arr.concat(createSizedArray(arr.length));
-  }
-
-  return {
-    double: double,
-  };
-}());
-
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
-
-var pointPool = (function () {
-  function create() {
-    return createTypedArray('float32', 2);
-  }
-  return poolFactory(8, create);
-}());
-
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
-
-var shapePool = (function () {
-  function create() {
-    return new ShapePath();
-  }
-
-  function release(shapePath) {
-    var len = shapePath._length;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      pointPool.release(shapePath.v[i]);
-      pointPool.release(shapePath.i[i]);
-      pointPool.release(shapePath.o[i]);
-      shapePath.v[i] = null;
-      shapePath.i[i] = null;
-      shapePath.o[i] = null;
-    }
-    shapePath._length = 0;
-    shapePath.c = false;
-  }
-
-  function clone(shape) {
-    var cloned = factory.newElement();
-    var i;
-    var len = shape._length === undefined ? shape.v.length : shape._length;
-    cloned.setLength(len);
-    cloned.c = shape.c;
-
-    for (i = 0; i < len; i += 1) {
-      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);
-    }
-    return cloned;
-  }
-
-  var factory = poolFactory(4, create, release);
-  factory.clone = clone;
-
-  return factory;
-}());
-
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
-
-var shapeCollectionPool = (function () {
-  var ob = {
-    newShapeCollection: newShapeCollection,
-    release: release,
   };
 
-  var _length = 0;
-  var _maxLength = 4;
-  var pool = createSizedArray(_maxLength);
-
-  function newShapeCollection() {
-    var shapeCollection;
-    if (_length) {
-      _length -= 1;
-      shapeCollection = pool[_length];
-    } else {
-      shapeCollection = new ShapeCollection();
-    }
-    return shapeCollection;
-  }
-
-  function release(shapeCollection) {
-    var i;
-    var len = shapeCollection._length;
-    for (i = 0; i < len; i += 1) {
-      shapePool.release(shapeCollection.shapes[i]);
-    }
-    shapeCollection._length = 0;
-
-    if (_length === _maxLength) {
-      pool = pooling.double(pool);
-      _maxLength *= 2;
-    }
-    pool[_length] = shapeCollection;
-    _length += 1;
-  }
-
-  return ob;
-}());
-
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
-
-var segmentsLengthPool = (function () {
-  function create() {
-    return {
-      lengths: [],
-      totalLength: 0,
-    };
-  }
-
-  function release(element) {
-    var i;
-    var len = element.lengths.length;
-    for (i = 0; i < len; i += 1) {
-      bezierLengthPool.release(element.lengths[i]);
-    }
-    element.lengths.length = 0;
-  }
-
-  return poolFactory(8, create, release);
-}());
-
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
-
-var bezierLengthPool = (function () {
-  function create() {
-    return {
-      addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
-    };
-  }
-  return poolFactory(8, create);
-}());
-
-/* exported markerParser */
-
-var markerParser = (
-
-  function () {
+  var markerParser = function () {
     function parsePayloadLines(payload) {
       var lines = payload.split('\r\n');
       var keys = {};
       var line;
       var keysCount = 0;
+
       for (var i = 0; i < lines.length; i += 1) {
         line = lines[i].split(':');
+
         if (line.length === 2) {
           keys[line[0]] = line[1].trim();
           keysCount += 1;
         }
       }
+
       if (keysCount === 0) {
         throw new Error();
       }
+
       return keys;
     }
 
     return function (_markers) {
       var markers = [];
+
       for (var i = 0; i < _markers.length; i += 1) {
         var _marker = _markers[i];
         var markerData = {
           time: _marker.tm,
-          duration: _marker.dr,
+          duration: _marker.dr
         };
+
         try {
           markerData.payload = JSON.parse(_markers[i].cm);
         } catch (_) {
@@ -6884,6785 +1748,6062 @@
             markerData.payload = parsePayloadLines(_markers[i].cm);
           } catch (__) {
             markerData.payload = {
-              name: _markers[i],
+              name: _markers[i]
             };
           }
         }
+
         markers.push(markerData);
       }
+
       return markers;
     };
-  }());
+  }();
 
-/* global AudioElement, FootageElement, FontManager */
-
-function BaseRenderer() {}
-BaseRenderer.prototype.checkLayers = function (num) {
-  var i;
-  var len = this.layers.length;
-  var data;
-  this.completeLayers = true;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (!this.elements[i]) {
-      data = this.layers[i];
-      if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) {
-        this.buildItem(i);
-      }
+  var ProjectInterface = function () {
+    function registerComposition(comp) {
+      this.compositions.push(comp);
     }
-    this.completeLayers = this.elements[i] ? this.completeLayers : false;
-  }
-  this.checkPendingElements();
-};
 
-BaseRenderer.prototype.createItem = function (layer) {
-  switch (layer.ty) {
-    case 2:
-      return this.createImage(layer);
-    case 0:
-      return this.createComp(layer);
-    case 1:
-      return this.createSolid(layer);
-    case 3:
-      return this.createNull(layer);
-    case 4:
-      return this.createShape(layer);
-    case 5:
-      return this.createText(layer);
-    case 6:
-      return this.createAudio(layer);
-    case 13:
-      return this.createCamera(layer);
-    case 15:
-      return this.createFootage(layer);
-    default:
-      return this.createNull(layer);
-  }
-};
+    return function () {
+      function _thisProjectFunction(name) {
+        var i = 0;
+        var len = this.compositions.length;
 
-BaseRenderer.prototype.createCamera = function () {
-  throw new Error('You\'re using a 3d camera. Try the html renderer.');
-};
+        while (i < len) {
+          if (this.compositions[i].data && this.compositions[i].data.nm === name) {
+            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
+              this.compositions[i].prepareFrame(this.currentFrame);
+            }
 
-BaseRenderer.prototype.createAudio = function (data) {
-  return new AudioElement(data, this.globalData, this);
-};
+            return this.compositions[i].compInterface;
+          }
 
-BaseRenderer.prototype.createFootage = function (data) {
-  return new FootageElement(data, this.globalData, this);
-};
-
-BaseRenderer.prototype.buildAllItems = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    this.buildItem(i);
-  }
-  this.checkPendingElements();
-};
-
-BaseRenderer.prototype.includeLayers = function (newLayers) {
-  this.completeLayers = false;
-  var i;
-  var len = newLayers.length;
-  var j;
-  var jLen = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    j = 0;
-    while (j < jLen) {
-      if (this.layers[j].id === newLayers[i].id) {
-        this.layers[j] = newLayers[i];
-        break;
-      }
-      j += 1;
-    }
-  }
-};
-
-BaseRenderer.prototype.setProjectInterface = function (pInterface) {
-  this.globalData.projectInterface = pInterface;
-};
-
-BaseRenderer.prototype.initItems = function () {
-  if (!this.globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-};
-BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
-  var elements = this.elements;
-  var layers = this.layers;
-  var i = 0;
-  var len = layers.length;
-  while (i < len) {
-    if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq
-      if (!elements[i] || elements[i] === true) {
-        this.buildItem(i);
-        this.addPendingElement(element);
-      } else {
-        hierarchy.push(elements[i]);
-        elements[i].setAsParent();
-        if (layers[i].parent !== undefined) {
-          this.buildElementParenting(element, layers[i].parent, hierarchy);
-        } else {
-          element.setHierarchy(hierarchy);
+          i += 1;
         }
+
+        return null;
+      }
+
+      _thisProjectFunction.compositions = [];
+      _thisProjectFunction.currentFrame = 0;
+      _thisProjectFunction.registerComposition = registerComposition;
+      return _thisProjectFunction;
+    };
+  }();
+
+  var renderers = {};
+
+  var registerRenderer = function registerRenderer(key, value) {
+    renderers[key] = value;
+  };
+
+  function getRenderer(key) {
+    return renderers[key];
+  }
+
+  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
+
+  var AnimationItem = function AnimationItem() {
+    this._cbs = [];
+    this.name = '';
+    this.path = '';
+    this.isLoaded = false;
+    this.currentFrame = 0;
+    this.currentRawFrame = 0;
+    this.firstFrame = 0;
+    this.totalFrames = 0;
+    this.frameRate = 0;
+    this.frameMult = 0;
+    this.playSpeed = 1;
+    this.playDirection = 1;
+    this.playCount = 0;
+    this.animationData = {};
+    this.assets = [];
+    this.isPaused = true;
+    this.autoplay = false;
+    this.loop = true;
+    this.renderer = null;
+    this.animationID = createElementID();
+    this.assetsPath = '';
+    this.timeCompleted = 0;
+    this.segmentPos = 0;
+    this.isSubframeEnabled = getSubframeEnabled();
+    this.segments = [];
+    this._idle = true;
+    this._completedLoop = false;
+    this.projectInterface = ProjectInterface();
+    this.imagePreloader = new ImagePreloader();
+    this.audioController = audioControllerFactory();
+    this.markers = [];
+    this.configAnimation = this.configAnimation.bind(this);
+    this.onSetupError = this.onSetupError.bind(this);
+    this.onSegmentComplete = this.onSegmentComplete.bind(this);
+  };
+
+  extendPrototype([BaseEvent], AnimationItem);
+
+  AnimationItem.prototype.setParams = function (params) {
+    if (params.wrapper || params.container) {
+      this.wrapper = params.wrapper || params.container;
+    }
+
+    var animType = 'svg';
+
+    if (params.animType) {
+      animType = params.animType;
+    } else if (params.renderer) {
+      animType = params.renderer;
+    }
+
+    var RendererClass = getRenderer(animType);
+    this.renderer = new RendererClass(this, params.rendererSettings);
+    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
+    this.renderer.setProjectInterface(this.projectInterface);
+    this.animType = animType;
+
+    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {
+      this.loop = true;
+    } else if (params.loop === false) {
+      this.loop = false;
+    } else {
+      this.loop = parseInt(params.loop, 10);
+    }
+
+    this.autoplay = 'autoplay' in params ? params.autoplay : true;
+    this.name = params.name ? params.name : '';
+    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
+    this.assetsPath = params.assetsPath;
+    this.initialSegment = params.initialSegment;
+
+    if (params.audioFactory) {
+      this.audioController.setAudioFactory(params.audioFactory);
+    }
+
+    if (params.animationData) {
+      this.setupAnimation(params.animationData);
+    } else if (params.path) {
+      if (params.path.lastIndexOf('\\') !== -1) {
+        this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
+      } else {
+        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
+      }
+
+      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
+      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
+      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);
+    }
+  };
+
+  AnimationItem.prototype.onSetupError = function () {
+    this.trigger('data_failed');
+  };
+
+  AnimationItem.prototype.setupAnimation = function (data) {
+    dataManager.completeAnimation(data, this.configAnimation);
+  };
+
+  AnimationItem.prototype.setData = function (wrapper, animationData) {
+    if (animationData) {
+      if (_typeof$4(animationData) !== 'object') {
+        animationData = JSON.parse(animationData);
       }
     }
-    i += 1;
-  }
-};
 
-BaseRenderer.prototype.addPendingElement = function (element) {
-  this.pendingElements.push(element);
-};
+    var params = {
+      wrapper: wrapper,
+      animationData: animationData
+    };
+    var wrapperAttributes = wrapper.attributes;
+    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
+    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
+    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
 
-BaseRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i]);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
+    if (loop === 'false') {
+      params.loop = false;
+    } else if (loop === 'true') {
+      params.loop = true;
+    } else if (loop !== '') {
+      params.loop = parseInt(loop, 10);
     }
-  }
-};
 
-BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
-  this.globalData.fontManager = new FontManager();
-  this.globalData.fontManager.addChars(animData.chars);
-  this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
-  this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
-  this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
-  this.globalData.imageLoader = this.animationItem.imagePreloader;
-  this.globalData.audioController = this.animationItem.audioController;
-  this.globalData.frameId = 0;
-  this.globalData.frameRate = animData.fr;
-  this.globalData.nm = animData.nm;
-  this.globalData.compSize = {
-    w: animData.w,
-    h: animData.h,
-  };
-};
+    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
+    params.autoplay = autoplay !== 'false';
+    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';
+    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
+    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
 
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+    if (prerender === 'false') {
+      params.prerender = false;
+    }
 
-function SVGRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.layers = null;
-  this.renderedFrame = -1;
-  this.svgElement = createNS('svg');
-  var ariaLabel = '';
-  if (config && config.title) {
-    var titleElement = createNS('title');
-    var titleId = createElementID();
-    titleElement.setAttribute('id', titleId);
-    titleElement.textContent = config.title;
-    this.svgElement.appendChild(titleElement);
-    ariaLabel += titleId;
-  }
-  if (config && config.description) {
-    var descElement = createNS('desc');
-    var descId = createElementID();
-    descElement.setAttribute('id', descId);
-    descElement.textContent = config.description;
-    this.svgElement.appendChild(descElement);
-    ariaLabel += ' ' + descId;
-  }
-  if (ariaLabel) {
-    this.svgElement.setAttribute('aria-labelledby', ariaLabel);
-  }
-  var defs = createNS('defs');
-  this.svgElement.appendChild(defs);
-  var maskElement = createNS('g');
-  this.svgElement.appendChild(maskElement);
-  this.layerElement = maskElement;
-  this.renderConfig = {
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    hideOnTransparent: !((config && config.hideOnTransparent === false)),
-    viewBoxOnly: (config && config.viewBoxOnly) || false,
-    viewBoxSize: (config && config.viewBoxSize) || false,
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
-    focusable: config && config.focusable,
-    filterSize: {
-      width: (config && config.filterSize && config.filterSize.width) || '100%',
-      height: (config && config.filterSize && config.filterSize.height) || '100%',
-      x: (config && config.filterSize && config.filterSize.x) || '0%',
-      y: (config && config.filterSize && config.filterSize.y) || '0%',
-    },
+    this.setParams(params);
   };
 
-  this.globalData = {
-    _mdf: false,
-    frameNum: -1,
-    defs: defs,
-    renderConfig: this.renderConfig,
-  };
-  this.elements = [];
-  this.pendingElements = [];
-  this.destroyed = false;
-  this.rendererType = 'svg';
-}
-
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createComp = function (data) {
-  return new SVGCompElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
+  AnimationItem.prototype.includeLayers = function (data) {
+    if (data.op > this.animationData.op) {
+      this.animationData.op = data.op;
+      this.totalFrames = Math.floor(data.op - this.animationData.ip);
     }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
 
-SVGRenderer.prototype.updateContainerSize = function () {
-};
+    var layers = this.animationData.layers;
+    var i;
+    var len = layers.length;
+    var newLayers = data.layers;
+    var j;
+    var jLen = newLayers.length;
 
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
+    for (j = 0; j < jLen; j += 1) {
+      i = 0;
 
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
       while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
+        if (layers[i].id === newLayers[j].id) {
+          layers[i] = newLayers[j];
           break;
         }
+
         i += 1;
       }
     }
-  }
-};
 
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
+    if (data.chars || data.fonts) {
+      this.renderer.globalData.fontManager.addChars(data.chars);
+      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
+
+    if (data.assets) {
+      len = data.assets.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.animationData.assets.push(data.assets[i]);
       }
     }
-  }
-};
 
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
-
-/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,
-CVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */
-
-function CanvasRenderer(animationItem, config) {
-  this.animationItem = animationItem;
-  this.renderConfig = {
-    clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
-    context: (config && config.context) || null,
-    progressiveLoad: (config && config.progressiveLoad) || false,
-    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
-    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
-    contentVisibility: (config && config.contentVisibility) || 'visible',
-    className: (config && config.className) || '',
-    id: (config && config.id) || '',
+    this.animationData.__complete = false;
+    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);
   };
-  this.renderConfig.dpr = (config && config.dpr) || 1;
-  if (this.animationItem.wrapper) {
-    this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
-  }
-  this.renderedFrame = -1;
-  this.globalData = {
-    frameNum: -1,
-    _mdf: false,
-    renderConfig: this.renderConfig,
-    currentGlobalAlpha: -1,
+
+  AnimationItem.prototype.onSegmentComplete = function (data) {
+    this.animationData = data;
+    var expressionsPlugin = getExpressionsPlugin();
+
+    if (expressionsPlugin) {
+      expressionsPlugin.initExpressions(this);
+    }
+
+    this.loadNextSegment();
   };
-  this.contextData = new CVContextData();
-  this.elements = [];
-  this.pendingElements = [];
-  this.transformMat = new Matrix();
-  this.completeLayers = false;
-  this.rendererType = 'canvas';
-}
-extendPrototype([BaseRenderer], CanvasRenderer);
 
-CanvasRenderer.prototype.createShape = function (data) {
-  return new CVShapeElement(data, this.globalData, this);
-};
+  AnimationItem.prototype.loadNextSegment = function () {
+    var segments = this.animationData.segments;
 
-CanvasRenderer.prototype.createText = function (data) {
-  return new CVTextElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createImage = function (data) {
-  return new CVImageElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createComp = function (data) {
-  return new CVCompElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createSolid = function (data) {
-  return new CVSolidElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-CanvasRenderer.prototype.ctxTransform = function (props) {
-  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
-    return;
-  }
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
-    return;
-  }
-  this.transformMat.cloneFromProps(props);
-  var cProps = this.contextData.cTr.props;
-  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]);
-  // 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]);
-  this.contextData.cTr.cloneFromProps(this.transformMat.props);
-  var trProps = this.contextData.cTr.props;
-  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
-};
-
-CanvasRenderer.prototype.ctxOpacity = function (op) {
-  /* if(op === 1){
-        return;
-    } */
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-    return;
-  }
-  this.contextData.cO *= op < 0 ? 0 : op;
-  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
-    this.canvasContext.globalAlpha = this.contextData.cO;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-  }
-};
-
-CanvasRenderer.prototype.reset = function () {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  this.contextData.reset();
-};
-
-CanvasRenderer.prototype.save = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.save();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.save();
-  }
-  var props = this.contextData.cTr.props;
-  if (this.contextData._length <= this.contextData.cArrPos) {
-    this.contextData.duplicate();
-  }
-  var i;
-  var arr = this.contextData.saved[this.contextData.cArrPos];
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = props[i];
-  }
-  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
-  this.contextData.cArrPos += 1;
-};
-
-CanvasRenderer.prototype.restore = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.restore();
-    this.globalData.blendMode = 'source-over';
-  }
-  this.contextData.cArrPos -= 1;
-  var popped = this.contextData.saved[this.contextData.cArrPos];
-  var i;
-  var arr = this.contextData.cTr.props;
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = popped[i];
-  }
-  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
-  popped = this.contextData.savedOp[this.contextData.cArrPos];
-  this.contextData.cO = popped;
-  if (this.globalData.currentGlobalAlpha !== popped) {
-    this.canvasContext.globalAlpha = popped;
-    this.globalData.currentGlobalAlpha = popped;
-  }
-};
-
-CanvasRenderer.prototype.configAnimation = function (animData) {
-  if (this.animationItem.wrapper) {
-    this.animationItem.container = createTag('canvas');
-    var containerStyle = this.animationItem.container.style;
-    containerStyle.width = '100%';
-    containerStyle.height = '100%';
-    var origin = '0px 0px 0px';
-    containerStyle.transformOrigin = origin;
-    containerStyle.mozTransformOrigin = origin;
-    containerStyle.webkitTransformOrigin = origin;
-    containerStyle['-webkit-transform'] = origin;
-    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
-    this.animationItem.wrapper.appendChild(this.animationItem.container);
-    this.canvasContext = this.animationItem.container.getContext('2d');
-    if (this.renderConfig.className) {
-      this.animationItem.container.setAttribute('class', this.renderConfig.className);
+    if (!segments || segments.length === 0 || !this.autoloadSegments) {
+      this.trigger('data_ready');
+      this.timeCompleted = this.totalFrames;
+      return;
     }
-    if (this.renderConfig.id) {
-      this.animationItem.container.setAttribute('id', this.renderConfig.id);
-    }
-  } else {
-    this.canvasContext = this.renderConfig.context;
-  }
-  this.data = animData;
-  this.layers = animData.layers;
-  this.transformCanvas = {
-    w: animData.w,
-    h: animData.h,
-    sx: 0,
-    sy: 0,
-    tx: 0,
-    ty: 0,
+
+    var segment = segments.shift();
+    this.timeCompleted = segment.time * this.frameRate;
+    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
+    this.segmentPos += 1;
+    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
+      this.trigger('data_failed');
+    }.bind(this));
   };
-  this.setupGlobalData(animData, document.body);
-  this.globalData.canvasContext = this.canvasContext;
-  this.globalData.renderer = this;
-  this.globalData.isDashed = false;
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.globalData.transformCanvas = this.transformCanvas;
-  this.elements = createSizedArray(animData.layers.length);
 
-  this.updateContainerSize();
-};
+  AnimationItem.prototype.loadSegments = function () {
+    var segments = this.animationData.segments;
 
-CanvasRenderer.prototype.updateContainerSize = function () {
-  this.reset();
-  var elementWidth;
-  var elementHeight;
-  if (this.animationItem.wrapper && this.animationItem.container) {
-    elementWidth = this.animationItem.wrapper.offsetWidth;
-    elementHeight = this.animationItem.wrapper.offsetHeight;
-    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
-    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
-  } else {
-    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
-    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
-  }
-  var elementRel;
-  var animationRel;
-  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
-    var par = this.renderConfig.preserveAspectRatio.split(' ');
-    var fillType = par[1] || 'meet';
-    var pos = par[0] || 'xMidYMid';
-    var xPos = pos.substr(0, 4);
-    var yPos = pos.substr(4);
-    elementRel = elementWidth / elementHeight;
-    animationRel = this.transformCanvas.w / this.transformCanvas.h;
-    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
-      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    } else {
-      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+    if (!segments) {
+      this.timeCompleted = this.totalFrames;
     }
 
-    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
-    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.tx = 0;
-    }
-    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
-    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.ty = 0;
-    }
-  } else if (this.renderConfig.preserveAspectRatio === 'none') {
-    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  } else {
-    this.transformCanvas.sx = this.renderConfig.dpr;
-    this.transformCanvas.sy = this.renderConfig.dpr;
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  }
-  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];
-  /* var i, len = this.elements.length;
-    for(i=0;i<len;i+=1){
-        if(this.elements[i] && this.elements[i].data.ty === 0){
-            this.elements[i].resize(this.globalData.transformCanvas);
-        }
-    } */
-  this.ctxTransform(this.transformCanvas.props);
-  this.canvasContext.beginPath();
-  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-  this.canvasContext.closePath();
-  this.canvasContext.clip();
+    this.loadNextSegment();
+  };
 
-  this.renderFrame(this.renderedFrame, true);
-};
+  AnimationItem.prototype.imagesLoaded = function () {
+    this.trigger('loaded_images');
+    this.checkLoaded();
+  };
 
-CanvasRenderer.prototype.destroy = function () {
-  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.globalData.canvasContext = null;
-  this.animationItem.container = null;
-  this.destroyed = true;
-};
+  AnimationItem.prototype.preloadImages = function () {
+    this.imagePreloader.setAssetsPath(this.assetsPath);
+    this.imagePreloader.setPath(this.path);
+    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
+  };
 
-CanvasRenderer.prototype.renderFrame = function (num, forceRender) {
-  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
-    return;
-  }
-  this.renderedFrame = num;
-  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
-  this.globalData.frameId += 1;
-  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
-  this.globalData.projectInterface.currentFrame = num;
-
-  // console.log('--------');
-  // console.log('NEW: ',num);
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    if (this.renderConfig.clearCanvas === true) {
-      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-    } else {
-      this.save();
-    }
-    for (i = len - 1; i >= 0; i -= 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-    if (this.renderConfig.clearCanvas !== true) {
-      this.restore();
-    }
-  }
-};
-
-CanvasRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  var element = this.createItem(this.layers[pos], this, this.globalData);
-  elements[pos] = element;
-  element.initExpressions();
-  /* if(this.layers[pos].ty === 0){
-        element.resize(this.globalData.transformCanvas);
-    } */
-};
-
-CanvasRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-CanvasRenderer.prototype.hide = function () {
-  this.animationItem.container.style.display = 'none';
-};
-
-CanvasRenderer.prototype.show = function () {
-  this.animationItem.container.style.display = 'block';
-};
-
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
-
-function MaskElement(data, element, globalData) {
-  this.data = data;
-  this.element = element;
-  this.globalData = globalData;
-  this.storedData = [];
-  this.masksProperties = this.data.masksProperties || [];
-  this.maskElement = null;
-  var defs = this.globalData.defs;
-  var i;
-  var len = this.masksProperties ? this.masksProperties.length : 0;
-  this.viewData = createSizedArray(len);
-  this.solidPath = '';
-
-  var path;
-  var properties = this.masksProperties;
-  var count = 0;
-  var currentMasks = [];
-  var j;
-  var jLen;
-  var layerId = createElementID();
-  var rect;
-  var expansor;
-  var feMorph;
-  var x;
-  var maskType = 'clipPath';
-  var maskRef = 'clip-path';
-  for (i = 0; i < len; i += 1) {
-    if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
-      maskType = 'mask';
-      maskRef = 'mask';
+  AnimationItem.prototype.configAnimation = function (animData) {
+    if (!this.renderer) {
+      return;
     }
 
-    if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
-      rect = createNS('rect');
-      rect.setAttribute('fill', '#ffffff');
-      rect.setAttribute('width', this.element.comp.data.w || 0);
-      rect.setAttribute('height', this.element.comp.data.h || 0);
-      currentMasks.push(rect);
-    } else {
-      rect = null;
-    }
+    try {
+      this.animationData = animData;
 
-    path = createNS('path');
-    if (properties[i].mode === 'n') {
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        elem: path,
-        lastPath: '',
-      };
-      defs.appendChild(path);
-    } else {
-      count += 1;
-
-      path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
-      path.setAttribute('clip-rule', 'nonzero');
-      var filterID;
-
-      if (properties[i].x.k !== 0) {
-        maskType = 'mask';
-        maskRef = 'mask';
-        x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
-        filterID = createElementID();
-        expansor = createNS('filter');
-        expansor.setAttribute('id', filterID);
-        feMorph = createNS('feMorphology');
-        feMorph.setAttribute('operator', 'erode');
-        feMorph.setAttribute('in', 'SourceGraphic');
-        feMorph.setAttribute('radius', '0');
-        expansor.appendChild(feMorph);
-        defs.appendChild(expansor);
-        path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+      if (this.initialSegment) {
+        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
+        this.firstFrame = Math.round(this.initialSegment[0]);
       } else {
-        feMorph = null;
-        x = null;
+        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
+        this.firstFrame = Math.round(this.animationData.ip);
       }
 
-      // TODO move this to a factory or to a constructor
-      this.storedData[i] = {
-        elem: path,
-        x: x,
-        expan: feMorph,
-        lastPath: '',
-        lastOperator: '',
-        filterId: filterID,
-        lastRadius: 0,
-      };
-      if (properties[i].mode === 'i') {
-        jLen = currentMasks.length;
-        var g = createNS('g');
-        for (j = 0; j < jLen; j += 1) {
-          g.appendChild(currentMasks[j]);
-        }
-        var mask = createNS('mask');
-        mask.setAttribute('mask-type', 'alpha');
-        mask.setAttribute('id', layerId + '_' + count);
-        mask.appendChild(path);
-        defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+      this.renderer.configAnimation(animData);
 
-        currentMasks.length = 0;
-        currentMasks.push(g);
-      } else {
-        currentMasks.push(path);
+      if (!animData.assets) {
+        animData.assets = [];
       }
-      if (properties[i].inv && !this.solidPath) {
-        this.solidPath = this.createLayerSolidPath();
+
+      this.assets = this.animationData.assets;
+      this.frameRate = this.animationData.fr;
+      this.frameMult = this.animationData.fr / 1000;
+      this.renderer.searchExtraCompositions(animData.assets);
+      this.markers = markerParser(animData.markers || []);
+      this.trigger('config_ready');
+      this.preloadImages();
+      this.loadSegments();
+      this.updaFrameModifier();
+      this.waitForFontsLoaded();
+
+      if (this.isPaused) {
+        this.audioController.pause();
       }
-      // TODO move this to a factory or to a constructor
-      this.viewData[i] = {
-        elem: path,
-        lastPath: '',
-        op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
-        prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
-        invRect: rect,
-      };
-      if (!this.viewData[i].prop.k) {
-        this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+    } catch (error) {
+      this.triggerConfigError(error);
+    }
+  };
+
+  AnimationItem.prototype.waitForFontsLoaded = function () {
+    if (!this.renderer) {
+      return;
+    }
+
+    if (this.renderer.globalData.fontManager.isLoaded) {
+      this.checkLoaded();
+    } else {
+      setTimeout(this.waitForFontsLoaded.bind(this), 20);
+    }
+  };
+
+  AnimationItem.prototype.checkLoaded = function () {
+    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {
+      this.isLoaded = true;
+      var expressionsPlugin = getExpressionsPlugin();
+
+      if (expressionsPlugin) {
+        expressionsPlugin.initExpressions(this);
+      }
+
+      this.renderer.initItems();
+      setTimeout(function () {
+        this.trigger('DOMLoaded');
+      }.bind(this), 0);
+      this.gotoFrame();
+
+      if (this.autoplay) {
+        this.play();
       }
     }
-  }
+  };
 
-  this.maskElement = createNS(maskType);
+  AnimationItem.prototype.resize = function () {
+    this.renderer.updateContainerSize();
+  };
 
-  len = currentMasks.length;
-  for (i = 0; i < len; i += 1) {
-    this.maskElement.appendChild(currentMasks[i]);
-  }
+  AnimationItem.prototype.setSubframe = function (flag) {
+    this.isSubframeEnabled = !!flag;
+  };
 
-  if (count > 0) {
-    this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
-    defs.appendChild(this.maskElement);
-  }
-  if (this.viewData.length) {
-    this.element.addRenderableComponent(this);
-  }
-}
+  AnimationItem.prototype.gotoFrame = function () {
+    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
 
-MaskElement.prototype.getMaskProperty = function (pos) {
-  return this.viewData[pos].prop;
-};
-
-MaskElement.prototype.renderFrame = function (isFirstFrame) {
-  var finalMat = this.element.finalTransform.mat;
-  var i;
-  var len = this.masksProperties.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.viewData[i].prop._mdf || isFirstFrame) {
-      this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
+      this.currentFrame = this.timeCompleted;
     }
-    if (this.viewData[i].op._mdf || isFirstFrame) {
-      this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+
+    this.trigger('enterFrame');
+    this.renderFrame();
+    this.trigger('drawnFrame');
+  };
+
+  AnimationItem.prototype.renderFrame = function () {
+    if (this.isLoaded === false || !this.renderer) {
+      return;
     }
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
-        this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+
+    try {
+      this.renderer.renderFrame(this.currentFrame + this.firstFrame);
+    } catch (error) {
+      this.triggerRenderFrameError(error);
+    }
+  };
+
+  AnimationItem.prototype.play = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.isPaused = false;
+      this.audioController.resume();
+
+      if (this._idle) {
+        this._idle = false;
+        this.trigger('_active');
       }
-      if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
-        var feMorph = this.storedData[i].expan;
-        if (this.storedData[i].x.v < 0) {
-          if (this.storedData[i].lastOperator !== 'erode') {
-            this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
-          }
-          feMorph.setAttribute('radius', -this.storedData[i].x.v);
+    }
+  };
+
+  AnimationItem.prototype.pause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === false) {
+      this.isPaused = true;
+      this._idle = true;
+      this.trigger('_idle');
+      this.audioController.pause();
+    }
+  };
+
+  AnimationItem.prototype.togglePause = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    if (this.isPaused === true) {
+      this.play();
+    } else {
+      this.pause();
+    }
+  };
+
+  AnimationItem.prototype.stop = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.pause();
+    this.playCount = 0;
+    this._completedLoop = false;
+    this.setCurrentRawFrameValue(0);
+  };
+
+  AnimationItem.prototype.getMarkerData = function (markerName) {
+    var marker;
+
+    for (var i = 0; i < this.markers.length; i += 1) {
+      marker = this.markers[i];
+
+      if (marker.payload && marker.payload.name === markerName) {
+        return marker;
+      }
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        this.goToAndStop(marker.time, true);
+      }
+    } else if (isFrame) {
+      this.setCurrentRawFrameValue(value);
+    } else {
+      this.setCurrentRawFrameValue(value * this.frameModifier);
+    }
+
+    this.pause();
+  };
+
+  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    var numValue = Number(value);
+
+    if (isNaN(numValue)) {
+      var marker = this.getMarkerData(value);
+
+      if (marker) {
+        if (!marker.duration) {
+          this.goToAndStop(marker.time, true);
         } else {
-          if (this.storedData[i].lastOperator !== 'dilate') {
-            this.storedData[i].lastOperator = 'dilate';
-            this.storedData[i].elem.setAttribute('filter', null);
+          this.playSegments([marker.time, marker.time + marker.duration], true);
+        }
+      }
+    } else {
+      this.goToAndStop(numValue, isFrame, name);
+    }
+
+    this.play();
+  };
+
+  AnimationItem.prototype.advanceTime = function (value) {
+    if (this.isPaused === true || this.isLoaded === false) {
+      return;
+    }
+
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
+    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
+
+    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
+      if (!this.loop || this.playCount === this.loop) {
+        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
+          _isComplete = true;
+          nextValue = this.totalFrames - 1;
+        }
+      } else if (nextValue >= this.totalFrames) {
+        this.playCount += 1;
+
+        if (!this.checkSegments(nextValue % this.totalFrames)) {
+          this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+          this._completedLoop = true;
+          this.trigger('loopComplete');
+        }
+      } else {
+        this.setCurrentRawFrameValue(nextValue);
+      }
+    } else if (nextValue < 0) {
+      if (!this.checkSegments(nextValue % this.totalFrames)) {
+        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+          // eslint-disable-line no-plusplus
+          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);
+
+          if (!this._completedLoop) {
+            this._completedLoop = true;
+          } else {
+            this.trigger('loopComplete');
           }
-          this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+        } else {
+          _isComplete = true;
+          nextValue = 0;
+        }
+      }
+    } else {
+      this.setCurrentRawFrameValue(nextValue);
+    }
+
+    if (_isComplete) {
+      this.setCurrentRawFrameValue(nextValue);
+      this.pause();
+      this.trigger('complete');
+    }
+  };
+
+  AnimationItem.prototype.adjustSegment = function (arr, offset) {
+    this.playCount = 0;
+
+    if (arr[1] < arr[0]) {
+      if (this.frameModifier > 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(-1);
+        }
+      }
+
+      this.totalFrames = arr[0] - arr[1];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[1];
+      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
+    } else if (arr[1] > arr[0]) {
+      if (this.frameModifier < 0) {
+        if (this.playSpeed < 0) {
+          this.setSpeed(-this.playSpeed);
+        } else {
+          this.setDirection(1);
+        }
+      }
+
+      this.totalFrames = arr[1] - arr[0];
+      this.timeCompleted = this.totalFrames;
+      this.firstFrame = arr[0];
+      this.setCurrentRawFrameValue(0.001 + offset);
+    }
+
+    this.trigger('segmentStart');
+  };
+
+  AnimationItem.prototype.setSegment = function (init, end) {
+    var pendingFrame = -1;
+
+    if (this.isPaused) {
+      if (this.currentRawFrame + this.firstFrame < init) {
+        pendingFrame = init;
+      } else if (this.currentRawFrame + this.firstFrame > end) {
+        pendingFrame = end - init;
+      }
+    }
+
+    this.firstFrame = init;
+    this.totalFrames = end - init;
+    this.timeCompleted = this.totalFrames;
+
+    if (pendingFrame !== -1) {
+      this.goToAndStop(pendingFrame, true);
+    }
+  };
+
+  AnimationItem.prototype.playSegments = function (arr, forceFlag) {
+    if (forceFlag) {
+      this.segments.length = 0;
+    }
+
+    if (_typeof$4(arr[0]) === 'object') {
+      var i;
+      var len = arr.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.segments.push(arr[i]);
+      }
+    } else {
+      this.segments.push(arr);
+    }
+
+    if (this.segments.length && forceFlag) {
+      this.adjustSegment(this.segments.shift(), 0);
+    }
+
+    if (this.isPaused) {
+      this.play();
+    }
+  };
+
+  AnimationItem.prototype.resetSegments = function (forceFlag) {
+    this.segments.length = 0;
+    this.segments.push([this.animationData.ip, this.animationData.op]);
+
+    if (forceFlag) {
+      this.checkSegments(0);
+    }
+  };
+
+  AnimationItem.prototype.checkSegments = function (offset) {
+    if (this.segments.length) {
+      this.adjustSegment(this.segments.shift(), offset);
+      return true;
+    }
+
+    return false;
+  };
+
+  AnimationItem.prototype.destroy = function (name) {
+    if (name && this.name !== name || !this.renderer) {
+      return;
+    }
+
+    this.renderer.destroy();
+    this.imagePreloader.destroy();
+    this.trigger('destroy');
+    this._cbs = null;
+    this.onEnterFrame = null;
+    this.onLoopComplete = null;
+    this.onComplete = null;
+    this.onSegmentStart = null;
+    this.onDestroy = null;
+    this.renderer = null;
+    this.renderer = null;
+    this.imagePreloader = null;
+    this.projectInterface = null;
+  };
+
+  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
+    this.currentRawFrame = value;
+    this.gotoFrame();
+  };
+
+  AnimationItem.prototype.setSpeed = function (val) {
+    this.playSpeed = val;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setDirection = function (val) {
+    this.playDirection = val < 0 ? -1 : 1;
+    this.updaFrameModifier();
+  };
+
+  AnimationItem.prototype.setVolume = function (val, name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.setVolume(val);
+  };
+
+  AnimationItem.prototype.getVolume = function () {
+    return this.audioController.getVolume();
+  };
+
+  AnimationItem.prototype.mute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.mute();
+  };
+
+  AnimationItem.prototype.unmute = function (name) {
+    if (name && this.name !== name) {
+      return;
+    }
+
+    this.audioController.unmute();
+  };
+
+  AnimationItem.prototype.updaFrameModifier = function () {
+    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
+    this.audioController.setRate(this.playSpeed * this.playDirection);
+  };
+
+  AnimationItem.prototype.getPath = function () {
+    return this.path;
+  };
+
+  AnimationItem.prototype.getAssetsPath = function (assetData) {
+    var path = '';
+
+    if (assetData.e) {
+      path = assetData.p;
+    } else if (this.assetsPath) {
+      var imagePath = assetData.p;
+
+      if (imagePath.indexOf('images/') !== -1) {
+        imagePath = imagePath.split('/')[1];
+      }
+
+      path = this.assetsPath + imagePath;
+    } else {
+      path = this.path;
+      path += assetData.u ? assetData.u : '';
+      path += assetData.p;
+    }
+
+    return path;
+  };
+
+  AnimationItem.prototype.getAssetData = function (id) {
+    var i = 0;
+    var len = this.assets.length;
+
+    while (i < len) {
+      if (id === this.assets[i].id) {
+        return this.assets[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  AnimationItem.prototype.hide = function () {
+    this.renderer.hide();
+  };
+
+  AnimationItem.prototype.show = function () {
+    this.renderer.show();
+  };
+
+  AnimationItem.prototype.getDuration = function (isFrame) {
+    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
+  };
+
+  AnimationItem.prototype.trigger = function (name) {
+    if (this._cbs && this._cbs[name]) {
+      switch (name) {
+        case 'enterFrame':
+        case 'drawnFrame':
+          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
+          break;
+
+        case 'loopComplete':
+          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+          break;
+
+        case 'complete':
+          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
+          break;
+
+        case 'segmentStart':
+          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+          break;
+
+        case 'destroy':
+          this.triggerEvent(name, new BMDestroyEvent(name, this));
+          break;
+
+        default:
+          this.triggerEvent(name);
+      }
+    }
+
+    if (name === 'enterFrame' && this.onEnterFrame) {
+      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
+    }
+
+    if (name === 'loopComplete' && this.onLoopComplete) {
+      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
+    }
+
+    if (name === 'complete' && this.onComplete) {
+      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
+    }
+
+    if (name === 'segmentStart' && this.onSegmentStart) {
+      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
+    }
+
+    if (name === 'destroy' && this.onDestroy) {
+      this.onDestroy.call(this, new BMDestroyEvent(name, this));
+    }
+  };
+
+  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
+    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  AnimationItem.prototype.triggerConfigError = function (nativeError) {
+    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
+    this.triggerEvent('error', error);
+
+    if (this.onError) {
+      this.onError.call(this, error);
+    }
+  };
+
+  var animationManager = function () {
+    var moduleOb = {};
+    var registeredAnimations = [];
+    var initTime = 0;
+    var len = 0;
+    var playingAnimationsNum = 0;
+    var _stopped = true;
+    var _isFrozen = false;
+
+    function removeElement(ev) {
+      var i = 0;
+      var animItem = ev.target;
+
+      while (i < len) {
+        if (registeredAnimations[i].animation === animItem) {
+          registeredAnimations.splice(i, 1);
+          i -= 1;
+          len -= 1;
+
+          if (!animItem.isPaused) {
+            subtractPlayingCount();
+          }
+        }
+
+        i += 1;
+      }
+    }
+
+    function registerAnimation(element, animationData) {
+      if (!element) {
+        return null;
+      }
+
+      var i = 0;
+
+      while (i < len) {
+        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
+          return registeredAnimations[i].animation;
+        }
+
+        i += 1;
+      }
+
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, element);
+      animItem.setData(element, animationData);
+      return animItem;
+    }
+
+    function getRegisteredAnimations() {
+      var i;
+      var lenAnims = registeredAnimations.length;
+      var animations = [];
+
+      for (i = 0; i < lenAnims; i += 1) {
+        animations.push(registeredAnimations[i].animation);
+      }
+
+      return animations;
+    }
+
+    function addPlayingCount() {
+      playingAnimationsNum += 1;
+      activate();
+    }
+
+    function subtractPlayingCount() {
+      playingAnimationsNum -= 1;
+    }
+
+    function setupAnimation(animItem, element) {
+      animItem.addEventListener('destroy', removeElement);
+      animItem.addEventListener('_active', addPlayingCount);
+      animItem.addEventListener('_idle', subtractPlayingCount);
+      registeredAnimations.push({
+        elem: element,
+        animation: animItem
+      });
+      len += 1;
+    }
+
+    function loadAnimation(params) {
+      var animItem = new AnimationItem();
+      setupAnimation(animItem, null);
+      animItem.setParams(params);
+      return animItem;
+    }
+
+    function setSpeed(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setSpeed(val, animation);
+      }
+    }
+
+    function setDirection(val, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setDirection(val, animation);
+      }
+    }
+
+    function play(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.play(animation);
+      }
+    }
+
+    function resume(nowTime) {
+      var elapsedTime = nowTime - initTime;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.advanceTime(elapsedTime);
+      }
+
+      initTime = nowTime;
+
+      if (playingAnimationsNum && !_isFrozen) {
+        window.requestAnimationFrame(resume);
+      } else {
+        _stopped = true;
+      }
+    }
+
+    function first(nowTime) {
+      initTime = nowTime;
+      window.requestAnimationFrame(resume);
+    }
+
+    function pause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.pause(animation);
+      }
+    }
+
+    function goToAndStop(value, isFrame, animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
+      }
+    }
+
+    function stop(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.stop(animation);
+      }
+    }
+
+    function togglePause(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.togglePause(animation);
+      }
+    }
+
+    function destroy(animation) {
+      var i;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        registeredAnimations[i].animation.destroy(animation);
+      }
+    }
+
+    function searchAnimations(animationData, standalone, renderer) {
+      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));
+      var i;
+      var lenAnims = animElements.length;
+
+      for (i = 0; i < lenAnims; i += 1) {
+        if (renderer) {
+          animElements[i].setAttribute('data-bm-type', renderer);
+        }
+
+        registerAnimation(animElements[i], animationData);
+      }
+
+      if (standalone && lenAnims === 0) {
+        if (!renderer) {
+          renderer = 'svg';
+        }
+
+        var body = document.getElementsByTagName('body')[0];
+        body.innerText = '';
+        var div = createTag('div');
+        div.style.width = '100%';
+        div.style.height = '100%';
+        div.setAttribute('data-bm-type', renderer);
+        body.appendChild(div);
+        registerAnimation(div, animationData);
+      }
+    }
+
+    function resize() {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.resize();
+      }
+    }
+
+    function activate() {
+      if (!_isFrozen && playingAnimationsNum) {
+        if (_stopped) {
+          window.requestAnimationFrame(first);
+          _stopped = false;
         }
       }
     }
-  }
-};
 
-MaskElement.prototype.getMaskelement = function () {
-  return this.maskElement;
-};
+    function freeze() {
+      _isFrozen = true;
+    }
 
-MaskElement.prototype.createLayerSolidPath = function () {
-  var path = 'M0,0 ';
-  path += ' h' + this.globalData.compSize.w;
-  path += ' v' + this.globalData.compSize.h;
-  path += ' h-' + this.globalData.compSize.w;
-  path += ' v-' + this.globalData.compSize.h + ' ';
-  return path;
-};
+    function unfreeze() {
+      _isFrozen = false;
+      activate();
+    }
 
-MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
-  var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
-  var i;
-  var len;
-  len = pathNodes._length;
-  for (i = 1; i < len; i += 1) {
-    // 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];
-    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];
-  }
-  // 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];
-  if (pathNodes.c && len > 1) {
-    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];
-  }
-  // pathNodes.__renderedString = pathString;
+    function setVolume(val, animation) {
+      var i;
 
-  if (viewData.lastPath !== pathString) {
-    var pathShapeValue = '';
-    if (viewData.elem) {
-      if (pathNodes.c) {
-        pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.setVolume(val, animation);
       }
-      viewData.elem.setAttribute('d', pathShapeValue);
     }
-    viewData.lastPath = pathString;
+
+    function mute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.mute(animation);
+      }
+    }
+
+    function unmute(animation) {
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        registeredAnimations[i].animation.unmute(animation);
+      }
+    }
+
+    moduleOb.registerAnimation = registerAnimation;
+    moduleOb.loadAnimation = loadAnimation;
+    moduleOb.setSpeed = setSpeed;
+    moduleOb.setDirection = setDirection;
+    moduleOb.play = play;
+    moduleOb.pause = pause;
+    moduleOb.stop = stop;
+    moduleOb.togglePause = togglePause;
+    moduleOb.searchAnimations = searchAnimations;
+    moduleOb.resize = resize; // moduleOb.start = start;
+
+    moduleOb.goToAndStop = goToAndStop;
+    moduleOb.destroy = destroy;
+    moduleOb.freeze = freeze;
+    moduleOb.unfreeze = unfreeze;
+    moduleOb.setVolume = setVolume;
+    moduleOb.mute = mute;
+    moduleOb.unmute = unmute;
+    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
+    return moduleOb;
+  }();
+
+  /* eslint-disable */
+  var BezierFactory = function () {
+    /**
+       * BezierEasing - use bezier curve for transition easing function
+       * by Gaëtan Renaudeau 2014 - 2015 – MIT License
+       *
+       * Credits: is based on Firefox's nsSMILKeySpline.cpp
+       * Usage:
+       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
+       * spline.get(x) => returns the easing value | x must be in [0, 1] range
+       *
+       */
+    var ob = {};
+    ob.getBezierEasing = getBezierEasing;
+    var beziers = {};
+
+    function getBezierEasing(a, b, c, d, nm) {
+      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p');
+
+      if (beziers[str]) {
+        return beziers[str];
+      }
+
+      var bezEasing = new BezierEasing([a, b, c, d]);
+      beziers[str] = bezEasing;
+      return bezEasing;
+    } // These values are established by empiricism with tests (tradeoff: performance VS precision)
+
+
+    var NEWTON_ITERATIONS = 4;
+    var NEWTON_MIN_SLOPE = 0.001;
+    var SUBDIVISION_PRECISION = 0.0000001;
+    var SUBDIVISION_MAX_ITERATIONS = 10;
+    var kSplineTableSize = 11;
+    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
+    var float32ArraySupported = typeof Float32Array === 'function';
+
+    function A(aA1, aA2) {
+      return 1.0 - 3.0 * aA2 + 3.0 * aA1;
+    }
+
+    function B(aA1, aA2) {
+      return 3.0 * aA2 - 6.0 * aA1;
+    }
+
+    function C(aA1) {
+      return 3.0 * aA1;
+    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+
+
+    function calcBezier(aT, aA1, aA2) {
+      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
+    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+
+
+    function getSlope(aT, aA1, aA2) {
+      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+    }
+
+    function binarySubdivide(aX, aA, aB, mX1, mX2) {
+      var currentX,
+          currentT,
+          i = 0;
+
+      do {
+        currentT = aA + (aB - aA) / 2.0;
+        currentX = calcBezier(currentT, mX1, mX2) - aX;
+
+        if (currentX > 0.0) {
+          aB = currentT;
+        } else {
+          aA = currentT;
+        }
+      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
+
+      return currentT;
+    }
+
+    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
+      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
+        var currentSlope = getSlope(aGuessT, mX1, mX2);
+        if (currentSlope === 0.0) return aGuessT;
+        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
+        aGuessT -= currentX / currentSlope;
+      }
+
+      return aGuessT;
+    }
+    /**
+       * points is an array of [ mX1, mY1, mX2, mY2 ]
+       */
+
+
+    function BezierEasing(points) {
+      this._p = points;
+      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
+      this._precomputed = false;
+      this.get = this.get.bind(this);
+    }
+
+    BezierEasing.prototype = {
+      get: function get(x) {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        if (!this._precomputed) this._precompute();
+        if (mX1 === mY1 && mX2 === mY2) return x; // linear
+        // Because JavaScript number are imprecise, we should guarantee the extremes are right.
+
+        if (x === 0) return 0;
+        if (x === 1) return 1;
+        return calcBezier(this._getTForX(x), mY1, mY2);
+      },
+      // Private part
+      _precompute: function _precompute() {
+        var mX1 = this._p[0],
+            mY1 = this._p[1],
+            mX2 = this._p[2],
+            mY2 = this._p[3];
+        this._precomputed = true;
+
+        if (mX1 !== mY1 || mX2 !== mY2) {
+          this._calcSampleValues();
+        }
+      },
+      _calcSampleValues: function _calcSampleValues() {
+        var mX1 = this._p[0],
+            mX2 = this._p[2];
+
+        for (var i = 0; i < kSplineTableSize; ++i) {
+          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
+        }
+      },
+
+      /**
+           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
+           */
+      _getTForX: function _getTForX(aX) {
+        var mX1 = this._p[0],
+            mX2 = this._p[2],
+            mSampleValues = this._mSampleValues;
+        var intervalStart = 0.0;
+        var currentSample = 1;
+        var lastSample = kSplineTableSize - 1;
+
+        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
+          intervalStart += kSampleStepSize;
+        }
+
+        --currentSample; // Interpolate to provide an initial guess for t
+
+        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
+        var guessForT = intervalStart + dist * kSampleStepSize;
+        var initialSlope = getSlope(guessForT, mX1, mX2);
+
+        if (initialSlope >= NEWTON_MIN_SLOPE) {
+          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
+        }
+
+        if (initialSlope === 0.0) {
+          return guessForT;
+        }
+
+        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
+      }
+    };
+    return ob;
+  }();
+
+  var pooling = function () {
+    function _double(arr) {
+      return arr.concat(createSizedArray(arr.length));
+    }
+
+    return {
+      "double": _double
+    };
+  }();
+
+  var poolFactory = function () {
+    return function (initialLength, _create, _release) {
+      var _length = 0;
+      var _maxLength = initialLength;
+      var pool = createSizedArray(_maxLength);
+      var ob = {
+        newElement: newElement,
+        release: release
+      };
+
+      function newElement() {
+        var element;
+
+        if (_length) {
+          _length -= 1;
+          element = pool[_length];
+        } else {
+          element = _create();
+        }
+
+        return element;
+      }
+
+      function release(element) {
+        if (_length === _maxLength) {
+          pool = pooling["double"](pool);
+          _maxLength *= 2;
+        }
+
+        if (_release) {
+          _release(element);
+        }
+
+        pool[_length] = element;
+        _length += 1;
+      }
+
+      return ob;
+    };
+  }();
+
+  var bezierLengthPool = function () {
+    function create() {
+      return {
+        addedLength: 0,
+        percents: createTypedArray('float32', getDefaultCurveSegments()),
+        lengths: createTypedArray('float32', getDefaultCurveSegments())
+      };
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  var segmentsLengthPool = function () {
+    function create() {
+      return {
+        lengths: [],
+        totalLength: 0
+      };
+    }
+
+    function release(element) {
+      var i;
+      var len = element.lengths.length;
+
+      for (i = 0; i < len; i += 1) {
+        bezierLengthPool.release(element.lengths[i]);
+      }
+
+      element.lengths.length = 0;
+    }
+
+    return poolFactory(8, create, release);
+  }();
+
+  function bezFunction() {
+    var math = Math;
+
+    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {
+      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;
+      return det1 > -0.001 && det1 < 0.001;
+    }
+
+    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {
+      if (z1 === 0 && z2 === 0 && z3 === 0) {
+        return pointOnLine2D(x1, y1, x2, y2, x3, y3);
+      }
+
+      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));
+      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));
+      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));
+      var diffDist;
+
+      if (dist1 > dist2) {
+        if (dist1 > dist3) {
+          diffDist = dist1 - dist2 - dist3;
+        } else {
+          diffDist = dist3 - dist2 - dist1;
+        }
+      } else if (dist3 > dist2) {
+        diffDist = dist3 - dist2 - dist1;
+      } else {
+        diffDist = dist2 - dist1 - dist3;
+      }
+
+      return diffDist > -0.0001 && diffDist < 0.0001;
+    }
+
+    var getBezierLength = function () {
+      return function (pt1, pt2, pt3, pt4) {
+        var curveSegments = getDefaultCurveSegments();
+        var k;
+        var i;
+        var len;
+        var ptCoord;
+        var perc;
+        var addedLength = 0;
+        var ptDistance;
+        var point = [];
+        var lastPoint = [];
+        var lengthData = bezierLengthPool.newElement();
+        len = pt3.length;
+
+        for (k = 0; k < curveSegments; k += 1) {
+          perc = k / (curveSegments - 1);
+          ptDistance = 0;
+
+          for (i = 0; i < len; i += 1) {
+            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];
+            point[i] = ptCoord;
+
+            if (lastPoint[i] !== null) {
+              ptDistance += bmPow(point[i] - lastPoint[i], 2);
+            }
+
+            lastPoint[i] = point[i];
+          }
+
+          if (ptDistance) {
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+          }
+
+          lengthData.percents[k] = perc;
+          lengthData.lengths[k] = addedLength;
+        }
+
+        lengthData.addedLength = addedLength;
+        return lengthData;
+      };
+    }();
+
+    function getSegmentsLength(shapeData) {
+      var segmentsLength = segmentsLengthPool.newElement();
+      var closed = shapeData.c;
+      var pathV = shapeData.v;
+      var pathO = shapeData.o;
+      var pathI = shapeData.i;
+      var i;
+      var len = shapeData._length;
+      var lengths = segmentsLength.lengths;
+      var totalLength = 0;
+
+      for (i = 0; i < len - 1; i += 1) {
+        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      if (closed && len) {
+        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);
+        totalLength += lengths[i].addedLength;
+      }
+
+      segmentsLength.totalLength = totalLength;
+      return segmentsLength;
+    }
+
+    function BezierData(length) {
+      this.segmentLength = 0;
+      this.points = new Array(length);
+    }
+
+    function PointData(partial, point) {
+      this.partialLength = partial;
+      this.point = point;
+    }
+
+    var buildBezierData = function () {
+      var storedData = {};
+      return function (pt1, pt2, pt3, pt4) {
+        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
+
+        if (!storedData[bezierName]) {
+          var curveSegments = getDefaultCurveSegments();
+          var k;
+          var i;
+          var len;
+          var ptCoord;
+          var perc;
+          var addedLength = 0;
+          var ptDistance;
+          var point;
+          var lastPoint = null;
+
+          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])) {
+            curveSegments = 2;
+          }
+
+          var bezierData = new BezierData(curveSegments);
+          len = pt3.length;
+
+          for (k = 0; k < curveSegments; k += 1) {
+            point = createSizedArray(len);
+            perc = k / (curveSegments - 1);
+            ptDistance = 0;
+
+            for (i = 0; i < len; i += 1) {
+              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];
+              point[i] = ptCoord;
+
+              if (lastPoint !== null) {
+                ptDistance += bmPow(point[i] - lastPoint[i], 2);
+              }
+            }
+
+            ptDistance = bmSqrt(ptDistance);
+            addedLength += ptDistance;
+            bezierData.points[k] = new PointData(ptDistance, point);
+            lastPoint = point;
+          }
+
+          bezierData.segmentLength = addedLength;
+          storedData[bezierName] = bezierData;
+        }
+
+        return storedData[bezierName];
+      };
+    }();
+
+    function getDistancePerc(perc, bezierData) {
+      var percents = bezierData.percents;
+      var lengths = bezierData.lengths;
+      var len = percents.length;
+      var initPos = bmFloor((len - 1) * perc);
+      var lengthPos = perc * bezierData.addedLength;
+      var lPerc = 0;
+
+      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {
+        return percents[initPos];
+      }
+
+      var dir = lengths[initPos] > lengthPos ? -1 : 1;
+      var flag = true;
+
+      while (flag) {
+        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {
+          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);
+          flag = false;
+        } else {
+          initPos += dir;
+        }
+
+        if (initPos < 0 || initPos >= len - 1) {
+          // FIX for TypedArrays that don't store floating point values with enough accuracy
+          if (initPos === len - 1) {
+            return percents[initPos];
+          }
+
+          flag = false;
+        }
+      }
+
+      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;
+    }
+
+    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
+      var t1 = getDistancePerc(percent, bezierData);
+      var u1 = 1 - t1;
+      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;
+      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;
+      return [ptX, ptY];
+    }
+
+    var bezierSegmentPoints = createTypedArray('float32', 8);
+
+    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {
+      if (startPerc < 0) {
+        startPerc = 0;
+      } else if (startPerc > 1) {
+        startPerc = 1;
+      }
+
+      var t0 = getDistancePerc(startPerc, bezierData);
+      endPerc = endPerc > 1 ? 1 : endPerc;
+      var t1 = getDistancePerc(endPerc, bezierData);
+      var i;
+      var len = pt1.length;
+      var u0 = 1 - t0;
+      var u1 = 1 - t1;
+      var u0u0u0 = u0 * u0 * u0;
+      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase
+
+      var t0t0t0 = t0 * t0 * t0; //
+
+      var u0u0u1 = u0 * u0 * u1;
+      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase
+
+      var t0t0t1 = t0 * t0 * t1; //
+
+      var u0u1u1 = u0 * u1 * u1;
+      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase
+
+      var t0t1t1 = t0 * t1 * t1; //
+
+      var u1u1u1 = u1 * u1 * u1;
+      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase
+
+      var t1t1t1 = t1 * t1 * t1;
+
+      for (i = 0; i < len; i += 1) {
+        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+
+        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase
+      }
+
+      return bezierSegmentPoints;
+    }
+
+    return {
+      getSegmentsLength: getSegmentsLength,
+      getNewSegment: getNewSegment,
+      getPointInSegment: getPointInSegment,
+      buildBezierData: buildBezierData,
+      pointOnLine2D: pointOnLine2D,
+      pointOnLine3D: pointOnLine3D
+    };
   }
-};
 
-MaskElement.prototype.destroy = function () {
-  this.element = null;
-  this.globalData = null;
-  this.maskElement = null;
-  this.data = null;
-  this.masksProperties = null;
-};
+  var bez = bezFunction();
 
-/**
- * @file
- * Handles AE's layer parenting property.
- *
- */
+  var PropertyFactory = function () {
+    var initFrame = initialDefaultFrame;
+    var mathAbs = Math.abs;
 
-function HierarchyElement() {}
+    function interpolateValue(frameNum, caching) {
+      var offsetTime = this.offsetTime;
+      var newValue;
 
-HierarchyElement.prototype = {
-  /**
-     * @function
-     * Initializes hierarchy properties
-     *
-     */
-  initHierarchy: function () {
-    // element's parent list
-    this.hierarchy = [];
-    // if element is parent of another layer _isParent will be true
-    this._isParent = false;
-    this.checkParenting();
-  },
-  /**
-     * @function
-     * Sets layer's hierarchy.
-     * @param {array} hierarch
-     * layer's parent list
-     *
-     */
-  setHierarchy: function (hierarchy) {
-    this.hierarchy = hierarchy;
-  },
-  /**
-     * @function
-     * Sets layer as parent.
-     *
-     */
-  setAsParent: function () {
-    this._isParent = true;
-  },
-  /**
-     * @function
-     * Searches layer's parenting chain
-     *
-     */
-  checkParenting: function () {
-    if (this.data.parent !== undefined) {
-      this.comp.buildElementParenting(this, this.data.parent, []);
+      if (this.propType === 'multidimensional') {
+        newValue = createTypedArray('float32', this.pv.length);
+      }
+
+      var iterationIndex = caching.lastIndex;
+      var i = iterationIndex;
+      var len = this.keyframes.length - 1;
+      var flag = true;
+      var keyData;
+      var nextKeyData;
+      var keyframeMetadata;
+
+      while (flag) {
+        keyData = this.keyframes[i];
+        nextKeyData = this.keyframes[i + 1];
+
+        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {
+          if (keyData.h) {
+            keyData = nextKeyData;
+          }
+
+          iterationIndex = 0;
+          break;
+        }
+
+        if (nextKeyData.t - offsetTime > frameNum) {
+          iterationIndex = i;
+          break;
+        }
+
+        if (i < len - 1) {
+          i += 1;
+        } else {
+          iterationIndex = 0;
+          flag = false;
+        }
+      }
+
+      keyframeMetadata = this.keyframesMetadata[i] || {};
+      var k;
+      var kLen;
+      var perc;
+      var jLen;
+      var j;
+      var fnc;
+      var nextKeyTime = nextKeyData.t - offsetTime;
+      var keyTime = keyData.t - offsetTime;
+      var endValue;
+
+      if (keyData.to) {
+        if (!keyframeMetadata.bezierData) {
+          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
+        }
+
+        var bezierData = keyframeMetadata.bezierData;
+
+        if (frameNum >= nextKeyTime || frameNum < keyTime) {
+          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
+          kLen = bezierData.points[ind].point.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            newValue[k] = bezierData.points[ind].point[k];
+          } // caching._lastKeyframeIndex = -1;
+
+        } else {
+          if (keyframeMetadata.__fnct) {
+            fnc = keyframeMetadata.__fnct;
+          } else {
+            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
+            keyframeMetadata.__fnct = fnc;
+          }
+
+          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+          var distanceInLine = bezierData.segmentLength * perc;
+          var segmentPerc;
+          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;
+          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;
+          flag = true;
+          jLen = bezierData.points.length;
+
+          while (flag) {
+            addedLength += bezierData.points[j].partialLength;
+
+            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k];
+              }
+
+              break;
+            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
+              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
+              kLen = bezierData.points[j].point.length;
+
+              for (k = 0; k < kLen; k += 1) {
+                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
+              }
+
+              break;
+            }
+
+            if (j < jLen - 1) {
+              j += 1;
+            } else {
+              flag = false;
+            }
+          }
+
+          caching._lastPoint = j;
+          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
+          caching._lastKeyframeIndex = i;
+        }
+      } else {
+        var outX;
+        var outY;
+        var inX;
+        var inY;
+        var keyValue;
+        len = keyData.s.length;
+        endValue = nextKeyData.s || keyData.e;
+
+        if (this.sh && keyData.h !== 1) {
+          if (frameNum >= nextKeyTime) {
+            newValue[0] = endValue[0];
+            newValue[1] = endValue[1];
+            newValue[2] = endValue[2];
+          } else if (frameNum <= keyTime) {
+            newValue[0] = keyData.s[0];
+            newValue[1] = keyData.s[1];
+            newValue[2] = keyData.s[2];
+          } else {
+            var quatStart = createQuaternion(keyData.s);
+            var quatEnd = createQuaternion(endValue);
+            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
+            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
+          }
+        } else {
+          for (i = 0; i < len; i += 1) {
+            if (keyData.h !== 1) {
+              if (frameNum >= nextKeyTime) {
+                perc = 1;
+              } else if (frameNum < keyTime) {
+                perc = 0;
+              } else {
+                if (keyData.o.x.constructor === Array) {
+                  if (!keyframeMetadata.__fnct) {
+                    keyframeMetadata.__fnct = [];
+                  }
+
+                  if (!keyframeMetadata.__fnct[i]) {
+                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];
+                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];
+                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];
+                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];
+                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                    keyframeMetadata.__fnct[i] = fnc;
+                  } else {
+                    fnc = keyframeMetadata.__fnct[i];
+                  }
+                } else if (!keyframeMetadata.__fnct) {
+                  outX = keyData.o.x;
+                  outY = keyData.o.y;
+                  inX = keyData.i.x;
+                  inY = keyData.i.y;
+                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
+                  keyData.keyframeMetadata = fnc;
+                } else {
+                  fnc = keyframeMetadata.__fnct;
+                }
+
+                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
+              }
+            }
+
+            endValue = nextKeyData.s || keyData.e;
+            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
+
+            if (this.propType === 'multidimensional') {
+              newValue[i] = keyValue;
+            } else {
+              newValue = keyValue;
+            }
+          }
+        }
+      }
+
+      caching.lastIndex = iterationIndex;
+      return newValue;
+    } // based on @Toji's https://github.com/toji/gl-matrix/
+
+
+    function slerp(a, b, t) {
+      var out = [];
+      var ax = a[0];
+      var ay = a[1];
+      var az = a[2];
+      var aw = a[3];
+      var bx = b[0];
+      var by = b[1];
+      var bz = b[2];
+      var bw = b[3];
+      var omega;
+      var cosom;
+      var sinom;
+      var scale0;
+      var scale1;
+      cosom = ax * bx + ay * by + az * bz + aw * bw;
+
+      if (cosom < 0.0) {
+        cosom = -cosom;
+        bx = -bx;
+        by = -by;
+        bz = -bz;
+        bw = -bw;
+      }
+
+      if (1.0 - cosom > 0.000001) {
+        omega = Math.acos(cosom);
+        sinom = Math.sin(omega);
+        scale0 = Math.sin((1.0 - t) * omega) / sinom;
+        scale1 = Math.sin(t * omega) / sinom;
+      } else {
+        scale0 = 1.0 - t;
+        scale1 = t;
+      }
+
+      out[0] = scale0 * ax + scale1 * bx;
+      out[1] = scale0 * ay + scale1 * by;
+      out[2] = scale0 * az + scale1 * bz;
+      out[3] = scale0 * aw + scale1 * bw;
+      return out;
     }
-  },
-};
 
-/**
- * @file
- * Handles element's layer frame update.
- * Checks layer in point and out point
- *
- */
+    function quaternionToEuler(out, quat) {
+      var qx = quat[0];
+      var qy = quat[1];
+      var qz = quat[2];
+      var qw = quat[3];
+      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);
+      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);
+      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);
+      out[0] = heading / degToRads;
+      out[1] = attitude / degToRads;
+      out[2] = bank / degToRads;
+    }
 
-function FrameElement() {}
+    function createQuaternion(values) {
+      var heading = values[0] * degToRads;
+      var attitude = values[1] * degToRads;
+      var bank = values[2] * degToRads;
+      var c1 = Math.cos(heading / 2);
+      var c2 = Math.cos(attitude / 2);
+      var c3 = Math.cos(bank / 2);
+      var s1 = Math.sin(heading / 2);
+      var s2 = Math.sin(attitude / 2);
+      var s3 = Math.sin(bank / 2);
+      var w = c1 * c2 * c3 - s1 * s2 * s3;
+      var x = s1 * s2 * c3 + c1 * c2 * s3;
+      var y = s1 * c2 * c3 + c1 * s2 * s3;
+      var z = c1 * s2 * c3 - s1 * c2 * s3;
+      return [x, y, z, w];
+    }
 
-FrameElement.prototype = {
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     */
-  initFrame: function () {
-    // set to true when inpoint is rendered
-    this._isFirstFrame = false;
-    // list of animated properties
-    this.dynamicProperties = [];
-    // If layer has been modified in current tick this will be true
-    this._mdf = false;
-  },
-  /**
-     * @function
-     * Calculates all dynamic values
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     * @param {boolean} isVisible
-     * if layers is currently in range
-     *
-     */
-  prepareProperties: function (num, isVisible) {
-    var i;
-    var len = this.dynamicProperties.length;
-    for (i = 0; i < len; i += 1) {
-      if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
-        this.dynamicProperties[i].getValue();
-        if (this.dynamicProperties[i]._mdf) {
-          this.globalData._mdf = true;
+    function getValueAtCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+
+      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {
+        if (this._caching.lastFrame >= frameNum) {
+          this._caching._lastKeyframeIndex = -1;
+          this._caching.lastIndex = 0;
+        }
+
+        var renderResult = this.interpolateValue(frameNum, this._caching);
+        this.pv = renderResult;
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function setVValue(val) {
+      var multipliedValue;
+
+      if (this.propType === 'unidimensional') {
+        multipliedValue = val * this.mult;
+
+        if (mathAbs(this.v - multipliedValue) > 0.00001) {
+          this.v = multipliedValue;
           this._mdf = true;
         }
-      }
-    }
-  },
-  addDynamicProperty: function (prop) {
-    if (this.dynamicProperties.indexOf(prop) === -1) {
-      this.dynamicProperties.push(prop);
-    }
-  },
-};
+      } else {
+        var i = 0;
+        var len = this.v.length;
 
-/* global TransformPropertyFactory, Matrix */
-
-function TransformElement() {}
-
-TransformElement.prototype = {
-  initTransform: function () {
-    this.finalTransform = {
-      mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 },
-      _matMdf: false,
-      _opMdf: false,
-      mat: new Matrix(),
-    };
-    if (this.data.ao) {
-      this.finalTransform.mProp.autoOriented = true;
-    }
-
-    // TODO: check TYPE 11: Guided elements
-    if (this.data.ty !== 11) {
-      // this.createElements();
-    }
-  },
-  renderTransform: function () {
-    this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
-    this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
-
-    if (this.hierarchy) {
-      var mat;
-      var finalMat = this.finalTransform.mat;
-      var i = 0;
-      var len = this.hierarchy.length;
-      // Checking if any of the transformation matrices in the hierarchy chain has changed.
-      if (!this.finalTransform._matMdf) {
         while (i < len) {
-          if (this.hierarchy[i].finalTransform.mProp._mdf) {
-            this.finalTransform._matMdf = true;
-            break;
+          multipliedValue = val[i] * this.mult;
+
+          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {
+            this.v[i] = multipliedValue;
+            this._mdf = true;
           }
+
           i += 1;
         }
       }
+    }
 
-      if (this.finalTransform._matMdf) {
-        mat = this.finalTransform.mProp.v.props;
-        finalMat.cloneFromProps(mat);
-        for (i = 0; i < len; i += 1) {
-          mat = this.hierarchy[i].finalTransform.mProp.v.props;
-          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]);
-        }
-      }
-    }
-  },
-  globalToLocal: function (pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-      if (comp.finalTransform) {
-        if (comp.data.hasMask) {
-          transforms.splice(0, 0, comp.finalTransform);
-        }
-        comp = comp.comp;
-      } else {
-        flag = false;
-      }
-    }
-    var i;
-    var len = transforms.length;
-    var ptNew;
-    for (i = 0; i < len; i += 1) {
-      ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
-      // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
-      pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
-  },
-  mHelper: new Matrix(),
-};
-
-function RenderableElement() {
-
-}
-
-RenderableElement.prototype = {
-  initRenderable: function () {
-    // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-    this.isInRange = false;
-    // layer's display state
-    this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-    // list of animated components
-    this.renderableComponents = [];
-  },
-  addRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) === -1) {
-      this.renderableComponents.push(component);
-    }
-  },
-  removeRenderableComponent: function (component) {
-    if (this.renderableComponents.indexOf(component) !== -1) {
-      this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
-    }
-  },
-  prepareRenderableFrame: function (num) {
-    this.checkLayerLimits(num);
-  },
-  checkTransparency: function () {
-    if (this.finalTransform.mProp.o.v <= 0) {
-      if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
-        this.isTransparent = true;
-        this.hide();
-      }
-    } else if (this.isTransparent) {
-      this.isTransparent = false;
-      this.show();
-    }
-  },
-  /**
-     * @function
-     * Initializes frame related properties.
-     *
-     * @param {number} num
-     * current frame number in Layer's time
-     *
-     */
-  checkLayerLimits: function (num) {
-    if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
-      if (this.isInRange !== true) {
-        this.globalData._mdf = true;
-        this._mdf = true;
-        this.isInRange = true;
-        this.show();
-      }
-    } else if (this.isInRange !== false) {
-      this.globalData._mdf = true;
-      this.isInRange = false;
-      this.hide();
-    }
-  },
-  renderRenderable: function () {
-    var i;
-    var len = this.renderableComponents.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderableComponents[i].renderFrame(this._isFirstFrame);
-    }
-    /* this.maskManager.renderFrame(this.finalTransform.mat);
-        this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
-  },
-  sourceRectAtTime: function () {
-    return {
-      top: 0,
-      left: 0,
-      width: 100,
-      height: 100,
-    };
-  },
-  getLayerSize: function () {
-    if (this.data.ty === 5) {
-      return { w: this.data.textData.width, h: this.data.textData.height };
-    }
-    return { w: this.data.width, h: this.data.height };
-  },
-};
-
-/* global extendPrototype, RenderableElement, createProxyFunction */
-
-function RenderableDOMElement() {}
-
-(function () {
-  var _prototype = {
-    initElement: function (data, globalData, comp) {
-      this.initFrame();
-      this.initBaseData(data, globalData, comp);
-      this.initTransform(data, globalData, comp);
-      this.initHierarchy();
-      this.initRenderable();
-      this.initRendererElement();
-      this.createContainerElements();
-      this.createRenderableComponents();
-      this.createContent();
-      this.hide();
-    },
-    hide: function () {
-      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        var elem = this.baseElement || this.layerElement;
-        elem.style.display = 'none';
-        this.hidden = true;
-      }
-    },
-    show: function () {
-      if (this.isInRange && !this.isTransparent) {
-        if (!this.data.hd) {
-          var elem = this.baseElement || this.layerElement;
-          elem.style.display = 'block';
-        }
-        this.hidden = false;
-        this._isFirstFrame = true;
-      }
-    },
-    renderFrame: function () {
-      // If it is exported as hidden (data.hd === true) no need to render
-      // If it is not visible no need to render
-      if (this.data.hd || this.hidden) {
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
         return;
       }
-      this.renderTransform();
-      this.renderRenderable();
-      this.renderElement();
-      this.renderInnerContent();
-      if (this._isFirstFrame) {
-        this._isFirstFrame = false;
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
       }
-    },
-    renderInnerContent: function () {},
-    prepareFrame: function (num) {
+
+      this.lock = true;
+      this._mdf = this._isFirstFrame;
+      var i;
+      var len = this.effectsSequence.length;
+      var finalValue = this.kf ? this.pv : this.data.k;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this._isFirstFrame = false;
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    function ValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this.v = mult ? data.k * mult : data.k;
+      this.pv = data.k;
       this._mdf = false;
-      this.prepareRenderableFrame(num);
-      this.prepareProperties(num, this.isInRange);
-      this.checkTransparency();
-    },
-    destroy: function () {
-      this.innerElem = null;
-      this.destroyBaseElement();
-    },
-  };
-  extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
-}());
-
-/* exported ProcessedElement */
-
-function ProcessedElement(element, position) {
-  this.elem = element;
-  this.pos = position;
-}
-
-/* global createNS */
-
-function SVGStyleData(data, level) {
-  this.data = data;
-  this.type = data.ty;
-  this.d = '';
-  this.lvl = level;
-  this._mdf = false;
-  this.closed = data.hd === true;
-  this.pElem = createNS('path');
-  this.msElem = null;
-}
-
-SVGStyleData.prototype.reset = function () {
-  this.d = '';
-  this._mdf = false;
-};
-
-function SVGShapeData(transformers, level, shape) {
-  this.caches = [];
-  this.styles = [];
-  this.transformers = transformers;
-  this.lStr = '';
-  this.sh = shape;
-  this.lvl = level;
-  // TODO find if there are some cases where _isAnimated can be false.
-  // For now, since shapes add up with other shapes. They have to be calculated every time.
-  // One way of finding out is checking if all styles associated to this shape depend only of this shape
-  this._isAnimated = !!shape.k;
-  // TODO: commenting this for now since all shapes are animated
-  var i = 0;
-  var len = transformers.length;
-  while (i < len) {
-    if (transformers[i].mProps.dynamicProperties.length) {
-      this._isAnimated = true;
-      break;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.vel = 0;
+      this.effectsSequence = [];
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    i += 1;
-  }
-}
 
-SVGShapeData.prototype.setAsAnimated = function () {
-  this._isAnimated = true;
-};
+    function MultiDimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      this.mult = mult || 1;
+      this.data = data;
+      this._mdf = false;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.k = false;
+      this.kf = false;
+      this.frameId = -1;
+      var i;
+      var len = data.k.length;
+      this.v = createTypedArray('float32', len);
+      this.pv = createTypedArray('float32', len);
+      this.vel = createTypedArray('float32', len);
 
-/* exported SVGTransformData */
+      for (i = 0; i < len; i += 1) {
+        this.v[i] = data.k[i] * this.mult;
+        this.pv[i] = data.k[i];
+      }
 
-function SVGTransformData(mProps, op, container) {
-  this.transform = {
-    mProps: mProps,
-    op: op,
-    container: container,
-  };
-  this.elements = [];
-  this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
-}
-
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-  this._isAnimated = !!this._isAnimated;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
-
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
-
-function SVGFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
-  this.style = styleOb;
-}
-
-extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
-
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
-
-function SVGGradientFillStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.initGradientData(elem, data, styleOb);
-}
-
-SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
-  this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
-  this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
-  this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
-  this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this);
-  this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this);
-  this.g = new GradientProperty(elem, data.g, this);
-  this.style = styleOb;
-  this.stops = [];
-  this.setGradientData(styleOb.pElem, data);
-  this.setGradientOpacity(data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-};
-
-SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
-  var gradientId = createElementID();
-  var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-  gfill.setAttribute('id', gradientId);
-  gfill.setAttribute('spreadMethod', 'pad');
-  gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
-  var stops = [];
-  var stop;
-  var j;
-  var jLen;
-  jLen = data.g.p * 4;
-  for (j = 0; j < jLen; j += 4) {
-    stop = createNS('stop');
-    gfill.appendChild(stop);
-    stops.push(stop);
-  }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
-  this.gf = gfill;
-  this.cst = stops;
-};
-
-SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
-  if (this.g._hasOpacity && !this.g._collapsable) {
-    var stop;
-    var j;
-    var jLen;
-    var mask = createNS('mask');
-    var maskElement = createNS('path');
-    mask.appendChild(maskElement);
-    var opacityId = createElementID();
-    var maskId = createElementID();
-    mask.setAttribute('id', maskId);
-    var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
-    opFill.setAttribute('id', opacityId);
-    opFill.setAttribute('spreadMethod', 'pad');
-    opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
-    jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
-    var stops = this.stops;
-    for (j = data.g.p * 4; j < jLen; j += 2) {
-      stop = createNS('stop');
-      stop.setAttribute('stop-color', 'rgb(255,255,255)');
-      opFill.appendChild(stop);
-      stops.push(stop);
+      this._isFirstFrame = true;
+      this.effectsSequence = [];
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.addEffect = addEffect;
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
-    if (data.ty === 'gs') {
-      maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-      maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-      if (data.lj === 1) {
-        maskElement.setAttribute('stroke-miterlimit', data.ml);
+
+    function KeyframedValueProperty(elem, data, mult, container) {
+      this.propType = 'unidimensional';
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.frameId = -1;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: 0,
+        _lastKeyframeIndex: -1
+      };
+      this.k = true;
+      this.kf = true;
+      this.data = data;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.v = initFrame;
+      this.pv = initFrame;
+      this._isFirstFrame = true;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.addEffect = addEffect;
+    }
+
+    function KeyframedMultidimensionalProperty(elem, data, mult, container) {
+      this.propType = 'multidimensional';
+      var i;
+      var len = data.k.length;
+      var s;
+      var e;
+      var to;
+      var ti;
+
+      for (i = 0; i < len - 1; i += 1) {
+        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {
+          s = data.k[i].s;
+          e = data.k[i + 1].s;
+          to = data.k[i].to;
+          ti = data.k[i].ti;
+
+          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])) {
+            data.k[i].to = null;
+            data.k[i].ti = null;
+          }
+
+          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
+            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {
+              data.k[i].to = null;
+              data.k[i].ti = null;
+            }
+          }
+        }
+      }
+
+      this.effectsSequence = [getValueAtCurrentTime.bind(this)];
+      this.data = data;
+      this.keyframes = data.k;
+      this.keyframesMetadata = [];
+      this.offsetTime = elem.data.st;
+      this.k = true;
+      this.kf = true;
+      this._isFirstFrame = true;
+      this.mult = mult || 1;
+      this.elem = elem;
+      this.container = container;
+      this.comp = elem.comp;
+      this.getValue = processEffectsSequence;
+      this.setVValue = setVValue;
+      this.interpolateValue = interpolateValue;
+      this.frameId = -1;
+      var arrLen = data.k[0].s.length;
+      this.v = createTypedArray('float32', arrLen);
+      this.pv = createTypedArray('float32', arrLen);
+
+      for (i = 0; i < arrLen; i += 1) {
+        this.v[i] = initFrame;
+        this.pv[i] = initFrame;
+      }
+
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0,
+        value: createTypedArray('float32', arrLen)
+      };
+      this.addEffect = addEffect;
+    }
+
+    function getProp(elem, data, type, mult, container) {
+      var p;
+
+      if (!data.k.length) {
+        p = new ValueProperty(elem, data, mult, container);
+      } else if (typeof data.k[0] === 'number') {
+        p = new MultiDimensionalProperty(elem, data, mult, container);
+      } else {
+        switch (type) {
+          case 0:
+            p = new KeyframedValueProperty(elem, data, mult, container);
+            break;
+
+          case 1:
+            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);
+            break;
+
+          default:
+            break;
+        }
+      }
+
+      if (p.effectsSequence.length) {
+        container.addDynamicProperty(p);
+      }
+
+      return p;
+    }
+
+    var ob = {
+      getProp: getProp
+    };
+    return ob;
+  }();
+
+  function DynamicPropertyContainer() {}
+
+  DynamicPropertyContainer.prototype = {
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+        this.container.addDynamicProperty(this);
+        this._isAnimated = true;
+      }
+    },
+    iterateDynamicProperties: function iterateDynamicProperties() {
+      this._mdf = false;
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.dynamicProperties[i].getValue();
+
+        if (this.dynamicProperties[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    },
+    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {
+      this.container = container;
+      this.dynamicProperties = [];
+      this._mdf = false;
+      this._isAnimated = false;
+    }
+  };
+
+  var pointPool = function () {
+    function create() {
+      return createTypedArray('float32', 2);
+    }
+
+    return poolFactory(8, create);
+  }();
+
+  function ShapePath() {
+    this.c = false;
+    this._length = 0;
+    this._maxLength = 8;
+    this.v = createSizedArray(this._maxLength);
+    this.o = createSizedArray(this._maxLength);
+    this.i = createSizedArray(this._maxLength);
+  }
+
+  ShapePath.prototype.setPathData = function (closed, len) {
+    this.c = closed;
+    this.setLength(len);
+    var i = 0;
+
+    while (i < len) {
+      this.v[i] = pointPool.newElement();
+      this.o[i] = pointPool.newElement();
+      this.i[i] = pointPool.newElement();
+      i += 1;
+    }
+  };
+
+  ShapePath.prototype.setLength = function (len) {
+    while (this._maxLength < len) {
+      this.doubleArrayLength();
+    }
+
+    this._length = len;
+  };
+
+  ShapePath.prototype.doubleArrayLength = function () {
+    this.v = this.v.concat(createSizedArray(this._maxLength));
+    this.i = this.i.concat(createSizedArray(this._maxLength));
+    this.o = this.o.concat(createSizedArray(this._maxLength));
+    this._maxLength *= 2;
+  };
+
+  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {
+    var arr;
+    this._length = Math.max(this._length, pos + 1);
+
+    if (this._length >= this._maxLength) {
+      this.doubleArrayLength();
+    }
+
+    switch (type) {
+      case 'v':
+        arr = this.v;
+        break;
+
+      case 'i':
+        arr = this.i;
+        break;
+
+      case 'o':
+        arr = this.o;
+        break;
+
+      default:
+        arr = [];
+        break;
+    }
+
+    if (!arr[pos] || arr[pos] && !replace) {
+      arr[pos] = pointPool.newElement();
+    }
+
+    arr[pos][0] = x;
+    arr[pos][1] = y;
+  };
+
+  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {
+    this.setXYAt(vX, vY, 'v', pos, replace);
+    this.setXYAt(oX, oY, 'o', pos, replace);
+    this.setXYAt(iX, iY, 'i', pos, replace);
+  };
+
+  ShapePath.prototype.reverse = function () {
+    var newPath = new ShapePath();
+    newPath.setPathData(this.c, this._length);
+    var vertices = this.v;
+    var outPoints = this.o;
+    var inPoints = this.i;
+    var init = 0;
+
+    if (this.c) {
+      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+      init = 1;
+    }
+
+    var cnt = this._length - 1;
+    var len = this._length;
+    var i;
+
+    for (i = init; i < len; i += 1) {
+      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+      cnt -= 1;
+    }
+
+    return newPath;
+  };
+
+  var shapePool = function () {
+    function create() {
+      return new ShapePath();
+    }
+
+    function release(shapePath) {
+      var len = shapePath._length;
+      var i;
+
+      for (i = 0; i < len; i += 1) {
+        pointPool.release(shapePath.v[i]);
+        pointPool.release(shapePath.i[i]);
+        pointPool.release(shapePath.o[i]);
+        shapePath.v[i] = null;
+        shapePath.i[i] = null;
+        shapePath.o[i] = null;
+      }
+
+      shapePath._length = 0;
+      shapePath.c = false;
+    }
+
+    function clone(shape) {
+      var cloned = factory.newElement();
+      var i;
+      var len = shape._length === undefined ? shape.v.length : shape._length;
+      cloned.setLength(len);
+      cloned.c = shape.c;
+
+      for (i = 0; i < len; i += 1) {
+        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);
+      }
+
+      return cloned;
+    }
+
+    var factory = poolFactory(4, create, release);
+    factory.clone = clone;
+    return factory;
+  }();
+
+  function ShapeCollection() {
+    this._length = 0;
+    this._maxLength = 4;
+    this.shapes = createSizedArray(this._maxLength);
+  }
+
+  ShapeCollection.prototype.addShape = function (shapeData) {
+    if (this._length === this._maxLength) {
+      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
+      this._maxLength *= 2;
+    }
+
+    this.shapes[this._length] = shapeData;
+    this._length += 1;
+  };
+
+  ShapeCollection.prototype.releaseShapes = function () {
+    var i;
+
+    for (i = 0; i < this._length; i += 1) {
+      shapePool.release(this.shapes[i]);
+    }
+
+    this._length = 0;
+  };
+
+  var shapeCollectionPool = function () {
+    var ob = {
+      newShapeCollection: newShapeCollection,
+      release: release
+    };
+    var _length = 0;
+    var _maxLength = 4;
+    var pool = createSizedArray(_maxLength);
+
+    function newShapeCollection() {
+      var shapeCollection;
+
+      if (_length) {
+        _length -= 1;
+        shapeCollection = pool[_length];
+      } else {
+        shapeCollection = new ShapeCollection();
+      }
+
+      return shapeCollection;
+    }
+
+    function release(shapeCollection) {
+      var i;
+      var len = shapeCollection._length;
+
+      for (i = 0; i < len; i += 1) {
+        shapePool.release(shapeCollection.shapes[i]);
+      }
+
+      shapeCollection._length = 0;
+
+      if (_length === _maxLength) {
+        pool = pooling["double"](pool);
+        _maxLength *= 2;
+      }
+
+      pool[_length] = shapeCollection;
+      _length += 1;
+    }
+
+    return ob;
+  }();
+
+  var ShapePropertyFactory = function () {
+    var initFrame = -999999;
+
+    function interpolateShape(frameNum, previousValue, caching) {
+      var iterationIndex = caching.lastIndex;
+      var keyPropS;
+      var keyPropE;
+      var isHold;
+      var j;
+      var k;
+      var jLen;
+      var kLen;
+      var perc;
+      var vertexValue;
+      var kf = this.keyframes;
+
+      if (frameNum < kf[0].t - this.offsetTime) {
+        keyPropS = kf[0].s[0];
+        isHold = true;
+        iterationIndex = 0;
+      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {
+        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
+        /* if(kf[kf.length - 1].s){
+                  keyPropS = kf[kf.length - 1].s[0];
+              }else{
+                  keyPropS = kf[kf.length - 2].e[0];
+              } */
+
+        isHold = true;
+      } else {
+        var i = iterationIndex;
+        var len = kf.length - 1;
+        var flag = true;
+        var keyData;
+        var nextKeyData;
+        var keyframeMetadata;
+
+        while (flag) {
+          keyData = kf[i];
+          nextKeyData = kf[i + 1];
+
+          if (nextKeyData.t - this.offsetTime > frameNum) {
+            break;
+          }
+
+          if (i < len - 1) {
+            i += 1;
+          } else {
+            flag = false;
+          }
+        }
+
+        keyframeMetadata = this.keyframesMetadata[i] || {};
+        isHold = keyData.h === 1;
+        iterationIndex = i;
+
+        if (!isHold) {
+          if (frameNum >= nextKeyData.t - this.offsetTime) {
+            perc = 1;
+          } else if (frameNum < keyData.t - this.offsetTime) {
+            perc = 0;
+          } else {
+            var fnc;
+
+            if (keyframeMetadata.__fnct) {
+              fnc = keyframeMetadata.__fnct;
+            } else {
+              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;
+              keyframeMetadata.__fnct = fnc;
+            }
+
+            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));
+          }
+
+          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
+        }
+
+        keyPropS = keyData.s[0];
+      }
+
+      jLen = previousValue._length;
+      kLen = keyPropS.i[0].length;
+      caching.lastIndex = iterationIndex;
+
+      for (j = 0; j < jLen; j += 1) {
+        for (k = 0; k < kLen; k += 1) {
+          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;
+          previousValue.i[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;
+          previousValue.o[j][k] = vertexValue;
+          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;
+          previousValue.v[j][k] = vertexValue;
+        }
       }
     }
-    this.of = opFill;
-    this.ms = mask;
-    this.ost = stops;
-    this.maskId = maskId;
-    styleOb.msElem = maskElement;
+
+    function interpolateShapeCurrentTime() {
+      var frameNum = this.comp.renderedFrame - this.offsetTime;
+      var initTime = this.keyframes[0].t - this.offsetTime;
+      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
+      var lastFrame = this._caching.lastFrame;
+
+      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {
+        /// /
+        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
+        this.interpolateShape(frameNum, this.pv, this._caching); /// /
+      }
+
+      this._caching.lastFrame = frameNum;
+      return this.pv;
+    }
+
+    function resetShape() {
+      this.paths = this.localShapeCollection;
+    }
+
+    function shapesEqual(shape1, shape2) {
+      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {
+        return false;
+      }
+
+      var i;
+      var len = shape1._length;
+
+      for (i = 0; i < len; i += 1) {
+        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    function setVValue(newPath) {
+      if (!shapesEqual(this.v, newPath)) {
+        this.v = shapePool.clone(newPath);
+        this.localShapeCollection.releaseShapes();
+        this.localShapeCollection.addShape(this.v);
+        this._mdf = true;
+        this.paths = this.localShapeCollection;
+      }
+    }
+
+    function processEffectsSequence() {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (!this.effectsSequence.length) {
+        this._mdf = false;
+        return;
+      }
+
+      if (this.lock) {
+        this.setVValue(this.pv);
+        return;
+      }
+
+      this.lock = true;
+      this._mdf = false;
+      var finalValue;
+
+      if (this.kf) {
+        finalValue = this.pv;
+      } else if (this.data.ks) {
+        finalValue = this.data.ks.k;
+      } else {
+        finalValue = this.data.pt.k;
+      }
+
+      var i;
+      var len = this.effectsSequence.length;
+
+      for (i = 0; i < len; i += 1) {
+        finalValue = this.effectsSequence[i](finalValue);
+      }
+
+      this.setVValue(finalValue);
+      this.lock = false;
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function ShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.container = elem;
+      this.elem = elem;
+      this.data = data;
+      this.k = false;
+      this.kf = false;
+      this._mdf = false;
+      var pathData = type === 3 ? data.pt.k : data.ks.k;
+      this.v = shapePool.clone(pathData);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.reset = resetShape;
+      this.effectsSequence = [];
+    }
+
+    function addEffect(effectFunction) {
+      this.effectsSequence.push(effectFunction);
+      this.container.addDynamicProperty(this);
+    }
+
+    ShapeProperty.prototype.interpolateShape = interpolateShape;
+    ShapeProperty.prototype.getValue = processEffectsSequence;
+    ShapeProperty.prototype.setVValue = setVValue;
+    ShapeProperty.prototype.addEffect = addEffect;
+
+    function KeyframedShapeProperty(elem, data, type) {
+      this.propType = 'shape';
+      this.comp = elem.comp;
+      this.elem = elem;
+      this.container = elem;
+      this.offsetTime = elem.data.st;
+      this.keyframes = type === 3 ? data.pt.k : data.ks.k;
+      this.keyframesMetadata = [];
+      this.k = true;
+      this.kf = true;
+      var len = this.keyframes[0].s[0].i.length;
+      this.v = shapePool.newElement();
+      this.v.setPathData(this.keyframes[0].s[0].c, len);
+      this.pv = shapePool.clone(this.v);
+      this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+      this.paths = this.localShapeCollection;
+      this.paths.addShape(this.v);
+      this.lastFrame = initFrame;
+      this.reset = resetShape;
+      this._caching = {
+        lastFrame: initFrame,
+        lastIndex: 0
+      };
+      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
+    }
+
+    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
+    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
+    KeyframedShapeProperty.prototype.setVValue = setVValue;
+    KeyframedShapeProperty.prototype.addEffect = addEffect;
+
+    var EllShapeProperty = function () {
+      var cPoint = roundCorner;
+
+      function EllShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 4);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.paths = this.localShapeCollection;
+        this.localShapeCollection.addShape(this.v);
+        this.d = data.d;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertEllToPath();
+        }
+      }
+
+      EllShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertEllToPath();
+          }
+        },
+        convertEllToPath: function convertEllToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var s0 = this.s.v[0] / 2;
+          var s1 = this.s.v[1] / 2;
+
+          var _cw = this.d !== 3;
+
+          var _v = this.v;
+          _v.v[0][0] = p0;
+          _v.v[0][1] = p1 - s1;
+          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.v[1][1] = p1;
+          _v.v[2][0] = p0;
+          _v.v[2][1] = p1 + s1;
+          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.v[3][1] = p1;
+          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.i[0][1] = p1 - s1;
+          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.i[1][1] = p1 - s1 * cPoint;
+          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.i[2][1] = p1 + s1;
+          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.i[3][1] = p1 + s1 * cPoint;
+          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
+          _v.o[0][1] = p1 - s1;
+          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
+          _v.o[1][1] = p1 + s1 * cPoint;
+          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
+          _v.o[2][1] = p1 + s1;
+          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
+          _v.o[3][1] = p1 - s1 * cPoint;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);
+      return EllShapePropertyFactory;
+    }();
+
+    var StarShapeProperty = function () {
+      function StarShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.setPathData(true, 0);
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.data = data;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+
+        if (data.sy === 1) {
+          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);
+          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);
+          this.convertToPath = this.convertStarToPath;
+        } else {
+          this.convertToPath = this.convertPolygonToPath;
+        }
+
+        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);
+        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);
+        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertToPath();
+        }
+      }
+
+      StarShapePropertyFactory.prototype = {
+        reset: resetShape,
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertToPath();
+          }
+        },
+        convertStarToPath: function convertStarToPath() {
+          var numPts = Math.floor(this.pt.v) * 2;
+          var angle = Math.PI * 2 / numPts;
+          /* this.v.v.length = numPts;
+                  this.v.i.length = numPts;
+                  this.v.o.length = numPts; */
+
+          var longFlag = true;
+          var longRad = this.or.v;
+          var shortRad = this.ir.v;
+          var longRound = this.os.v;
+          var shortRound = this.is.v;
+          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);
+          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);
+          var i;
+          var rad;
+          var roundness;
+          var perimSegment;
+          var currentAng = -Math.PI / 2;
+          currentAng += this.r.v;
+          var dir = this.data.d === 3 ? -1 : 1;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            rad = longFlag ? longRad : shortRad;
+            roundness = longFlag ? longRound : shortRound;
+            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            /* this.v.v[i] = [x,y];
+                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
+                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
+                      this.v._length = numPts; */
+
+            longFlag = !longFlag;
+            currentAng += angle * dir;
+          }
+        },
+        convertPolygonToPath: function convertPolygonToPath() {
+          var numPts = Math.floor(this.pt.v);
+          var angle = Math.PI * 2 / numPts;
+          var rad = this.or.v;
+          var roundness = this.os.v;
+          var perimSegment = 2 * Math.PI * rad / (numPts * 4);
+          var i;
+          var currentAng = -Math.PI * 0.5;
+          var dir = this.data.d === 3 ? -1 : 1;
+          currentAng += this.r.v;
+          this.v._length = 0;
+
+          for (i = 0; i < numPts; i += 1) {
+            var x = rad * Math.cos(currentAng);
+            var y = rad * Math.sin(currentAng);
+            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);
+            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);
+            x += +this.p.v[0];
+            y += +this.p.v[1];
+            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);
+            currentAng += angle * dir;
+          }
+
+          this.paths.length = 0;
+          this.paths[0] = this.v;
+        }
+      };
+      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);
+      return StarShapePropertyFactory;
+    }();
+
+    var RectShapeProperty = function () {
+      function RectShapePropertyFactory(elem, data) {
+        this.v = shapePool.newElement();
+        this.v.c = true;
+        this.localShapeCollection = shapeCollectionPool.newShapeCollection();
+        this.localShapeCollection.addShape(this.v);
+        this.paths = this.localShapeCollection;
+        this.elem = elem;
+        this.comp = elem.comp;
+        this.frameId = -1;
+        this.d = data.d;
+        this.initDynamicPropertyContainer(elem);
+        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);
+        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);
+        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);
+
+        if (this.dynamicProperties.length) {
+          this.k = true;
+        } else {
+          this.k = false;
+          this.convertRectToPath();
+        }
+      }
+
+      RectShapePropertyFactory.prototype = {
+        convertRectToPath: function convertRectToPath() {
+          var p0 = this.p.v[0];
+          var p1 = this.p.v[1];
+          var v0 = this.s.v[0] / 2;
+          var v1 = this.s.v[1] / 2;
+          var round = bmMin(v0, v1, this.r.v);
+          var cPoint = round * (1 - roundCorner);
+          this.v._length = 0;
+
+          if (this.d === 2 || this.d === 1) {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);
+            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);
+            }
+          } else {
+            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);
+
+            if (round !== 0) {
+              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);
+              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);
+              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);
+              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);
+            } else {
+              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);
+              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);
+              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);
+            }
+          }
+        },
+        getValue: function getValue() {
+          if (this.elem.globalData.frameId === this.frameId) {
+            return;
+          }
+
+          this.frameId = this.elem.globalData.frameId;
+          this.iterateDynamicProperties();
+
+          if (this._mdf) {
+            this.convertRectToPath();
+          }
+        },
+        reset: resetShape
+      };
+      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);
+      return RectShapePropertyFactory;
+    }();
+
+    function getShapeProp(elem, data, type) {
+      var prop;
+
+      if (type === 3 || type === 4) {
+        var dataProp = type === 3 ? data.pt : data.ks;
+        var keys = dataProp.k;
+
+        if (keys.length) {
+          prop = new KeyframedShapeProperty(elem, data, type);
+        } else {
+          prop = new ShapeProperty(elem, data, type);
+        }
+      } else if (type === 5) {
+        prop = new RectShapeProperty(elem, data);
+      } else if (type === 6) {
+        prop = new EllShapeProperty(elem, data);
+      } else if (type === 7) {
+        prop = new StarShapeProperty(elem, data);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    }
+
+    function getConstructorFunction() {
+      return ShapeProperty;
+    }
+
+    function getKeyframedConstructorFunction() {
+      return KeyframedShapeProperty;
+    }
+
+    var ob = {};
+    ob.getShapeProp = getShapeProp;
+    ob.getConstructorFunction = getConstructorFunction;
+    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
+    return ob;
+  }();
+
+  /*!
+   Transformation Matrix v2.0
+   (c) Epistemex 2014-2015
+   www.epistemex.com
+   By Ken Fyrstenberg
+   Contributions by leeoniya.
+   License: MIT, header required.
+   */
+
+  /**
+   * 2D transformation matrix object initialized with identity matrix.
+   *
+   * The matrix can synchronize a canvas context by supplying the context
+   * as an argument, or later apply current absolute transform to an
+   * existing context.
+   *
+   * All values are handled as floating point values.
+   *
+   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
+   * @prop {number} a - scale x
+   * @prop {number} b - shear y
+   * @prop {number} c - shear x
+   * @prop {number} d - scale y
+   * @prop {number} e - translate x
+   * @prop {number} f - translate y
+   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
+   * @constructor
+   */
+
+  var Matrix = function () {
+    var _cos = Math.cos;
+    var _sin = Math.sin;
+    var _tan = Math.tan;
+    var _rnd = Math.round;
+
+    function reset() {
+      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;
+      return this;
+    }
+
+    function rotate(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function rotateX(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateY(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);
+    }
+
+    function rotateZ(angle) {
+      if (angle === 0) {
+        return this;
+      }
+
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    }
+
+    function shear(sx, sy) {
+      return this._t(1, sy, sx, 1, 0, 0);
+    }
+
+    function skew(ax, ay) {
+      return this.shear(_tan(ax), _tan(ay));
+    }
+
+    function skewFromAxis(ax, angle) {
+      var mCos = _cos(angle);
+
+      var mSin = _sin(angle);
+
+      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
+    }
+
+    function scale(sx, sy, sz) {
+      if (!sz && sz !== 0) {
+        sz = 1;
+      }
+
+      if (sx === 1 && sy === 1 && sz === 1) {
+        return this;
+      }
+
+      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
+    }
+
+    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
+      this.props[0] = a;
+      this.props[1] = b;
+      this.props[2] = c;
+      this.props[3] = d;
+      this.props[4] = e;
+      this.props[5] = f;
+      this.props[6] = g;
+      this.props[7] = h;
+      this.props[8] = i;
+      this.props[9] = j;
+      this.props[10] = k;
+      this.props[11] = l;
+      this.props[12] = m;
+      this.props[13] = n;
+      this.props[14] = o;
+      this.props[15] = p;
+      return this;
+    }
+
+    function translate(tx, ty, tz) {
+      tz = tz || 0;
+
+      if (tx !== 0 || ty !== 0 || tz !== 0) {
+        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);
+      }
+
+      return this;
+    }
+
+    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
+      var _p = this.props;
+
+      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) {
+        // NOTE: commenting this condition because TurboFan deoptimizes code when present
+        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){
+        _p[12] = _p[12] * a2 + _p[15] * m2;
+        _p[13] = _p[13] * f2 + _p[15] * n2;
+        _p[14] = _p[14] * k2 + _p[15] * o2;
+        _p[15] *= p2; // }
+
+        this._identityCalculated = false;
+        return this;
+      }
+
+      var a1 = _p[0];
+      var b1 = _p[1];
+      var c1 = _p[2];
+      var d1 = _p[3];
+      var e1 = _p[4];
+      var f1 = _p[5];
+      var g1 = _p[6];
+      var h1 = _p[7];
+      var i1 = _p[8];
+      var j1 = _p[9];
+      var k1 = _p[10];
+      var l1 = _p[11];
+      var m1 = _p[12];
+      var n1 = _p[13];
+      var o1 = _p[14];
+      var p1 = _p[15];
+      /* matrix order (canvas compatible):
+           * ace
+           * bdf
+           * 001
+           */
+
+      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;
+      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;
+      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;
+      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;
+      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;
+      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;
+      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;
+      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;
+      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;
+      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;
+      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;
+      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;
+      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;
+      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;
+      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;
+      this._identityCalculated = false;
+      return this;
+    }
+
+    function isIdentity() {
+      if (!this._identityCalculated) {
+        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);
+        this._identityCalculated = true;
+      }
+
+      return this._identity;
+    }
+
+    function equals(matr) {
+      var i = 0;
+
+      while (i < 16) {
+        if (matr.props[i] !== this.props[i]) {
+          return false;
+        }
+
+        i += 1;
+      }
+
+      return true;
+    }
+
+    function clone(matr) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        matr.props[i] = this.props[i];
+      }
+
+      return matr;
+    }
+
+    function cloneFromProps(props) {
+      var i;
+
+      for (i = 0; i < 16; i += 1) {
+        this.props[i] = props[i];
+      }
+    }
+
+    function applyToPoint(x, y, z) {
+      return {
+        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
+        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
+        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
+      };
+      /* return {
+           x: x * me.a + y * me.c + me.e,
+           y: x * me.b + y * me.d + me.f
+           }; */
+    }
+
+    function applyToX(x, y, z) {
+      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
+    }
+
+    function applyToY(x, y, z) {
+      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
+    }
+
+    function applyToZ(x, y, z) {
+      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
+    }
+
+    function getInverseMatrix() {
+      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
+      var a = this.props[5] / determinant;
+      var b = -this.props[1] / determinant;
+      var c = -this.props[4] / determinant;
+      var d = this.props[0] / determinant;
+      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;
+      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;
+      var inverseMatrix = new Matrix();
+      inverseMatrix.props[0] = a;
+      inverseMatrix.props[1] = b;
+      inverseMatrix.props[4] = c;
+      inverseMatrix.props[5] = d;
+      inverseMatrix.props[12] = e;
+      inverseMatrix.props[13] = f;
+      return inverseMatrix;
+    }
+
+    function inversePoint(pt) {
+      var inverseMatrix = this.getInverseMatrix();
+      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);
+    }
+
+    function inversePoints(pts) {
+      var i;
+      var len = pts.length;
+      var retPts = [];
+
+      for (i = 0; i < len; i += 1) {
+        retPts[i] = inversePoint(pts[i]);
+      }
+
+      return retPts;
+    }
+
+    function applyToTriplePoints(pt1, pt2, pt3) {
+      var arr = createTypedArray('float32', 6);
+
+      if (this.isIdentity()) {
+        arr[0] = pt1[0];
+        arr[1] = pt1[1];
+        arr[2] = pt2[0];
+        arr[3] = pt2[1];
+        arr[4] = pt3[0];
+        arr[5] = pt3[1];
+      } else {
+        var p0 = this.props[0];
+        var p1 = this.props[1];
+        var p4 = this.props[4];
+        var p5 = this.props[5];
+        var p12 = this.props[12];
+        var p13 = this.props[13];
+        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
+      }
+
+      return arr;
+    }
+
+    function applyToPointArray(x, y, z) {
+      var arr;
+
+      if (this.isIdentity()) {
+        arr = [x, y, z];
+      } else {
+        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]];
+      }
+
+      return arr;
+    }
+
+    function applyToPointStringified(x, y) {
+      if (this.isIdentity()) {
+        return x + ',' + y;
+      }
+
+      var _p = this.props;
+      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;
+    }
+
+    function toCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var i = 0;
+      var props = this.props;
+      var cssValue = 'matrix3d(';
+      var v = 10000;
+
+      while (i < 16) {
+        cssValue += _rnd(props[i] * v) / v;
+        cssValue += i === 15 ? ')' : ',';
+        i += 1;
+      }
+
+      return cssValue;
+    }
+
+    function roundMatrixProperty(val) {
+      var v = 10000;
+
+      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {
+        return _rnd(val * v) / v;
+      }
+
+      return val;
+    }
+
+    function to2dCSS() {
+      // 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.
+
+      /* if(this.isIdentity()) {
+              return '';
+          } */
+      var props = this.props;
+
+      var _a = roundMatrixProperty(props[0]);
+
+      var _b = roundMatrixProperty(props[1]);
+
+      var _c = roundMatrixProperty(props[4]);
+
+      var _d = roundMatrixProperty(props[5]);
+
+      var _e = roundMatrixProperty(props[12]);
+
+      var _f = roundMatrixProperty(props[13]);
+
+      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';
+    }
+
+    return function () {
+      this.reset = reset;
+      this.rotate = rotate;
+      this.rotateX = rotateX;
+      this.rotateY = rotateY;
+      this.rotateZ = rotateZ;
+      this.skew = skew;
+      this.skewFromAxis = skewFromAxis;
+      this.shear = shear;
+      this.scale = scale;
+      this.setTransform = setTransform;
+      this.translate = translate;
+      this.transform = transform;
+      this.applyToPoint = applyToPoint;
+      this.applyToX = applyToX;
+      this.applyToY = applyToY;
+      this.applyToZ = applyToZ;
+      this.applyToPointArray = applyToPointArray;
+      this.applyToTriplePoints = applyToTriplePoints;
+      this.applyToPointStringified = applyToPointStringified;
+      this.toCSS = toCSS;
+      this.to2dCSS = to2dCSS;
+      this.clone = clone;
+      this.cloneFromProps = cloneFromProps;
+      this.equals = equals;
+      this.inversePoints = inversePoints;
+      this.inversePoint = inversePoint;
+      this.getInverseMatrix = getInverseMatrix;
+      this._t = this.transform;
+      this.isIdentity = isIdentity;
+      this._identity = true;
+      this._identityCalculated = false;
+      this.props = createTypedArray('float32', 16);
+      this.reset();
+    };
+  }();
+
+  function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
+  var lottie = {};
+  var standalone = '__[STANDALONE]__';
+  var animationData = '__[ANIMATIONDATA]__';
+  var renderer = '';
+
+  function setLocation(href) {
+    setLocationHref(href);
   }
-};
 
-extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+  function searchAnimations() {
+    if (standalone === true) {
+      animationManager.searchAnimations(animationData, standalone, renderer);
+    } else {
+      animationManager.searchAnimations();
+    }
+  }
 
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+  function setSubframeRendering(flag) {
+    setSubframeEnabled(flag);
+  }
 
-function SVGGradientStrokeStyleData(elem, data, styleOb) {
-  this.initDynamicPropertyContainer(elem);
-  this.getValue = this.iterateDynamicProperties;
-  this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
-  this.d = new DashProperty(elem, data.d || {}, 'svg', this);
-  this.initGradientData(elem, data, styleOb);
-  this._isAnimated = !!this._isAnimated;
-}
+  function setPrefix(prefix) {
+    setIdPrefix(prefix);
+  }
 
-extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+  function loadAnimation(params) {
+    if (standalone === true) {
+      params.animationData = JSON.parse(animationData);
+    }
 
-/* global createNS */
-/* exported ShapeGroupData */
+    return animationManager.loadAnimation(params);
+  }
 
-function ShapeGroupData() {
-  this.it = [];
-  this.prevViewData = [];
-  this.gr = createNS('g');
-}
+  function setQuality(value) {
+    if (typeof value === 'string') {
+      switch (value) {
+        case 'high':
+          setDefaultCurveSegments(200);
+          break;
 
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+        default:
+        case 'medium':
+          setDefaultCurveSegments(50);
+          break;
 
-var SVGElementsRenderer = (function () {
-  var _identityMatrix = new Matrix();
-  var _matrixHelper = new Matrix();
+        case 'low':
+          setDefaultCurveSegments(10);
+          break;
+      }
+    } else if (!isNaN(value) && value > 1) {
+      setDefaultCurveSegments(value);
+    }
 
-  var ob = {
-    createRenderFunction: createRenderFunction,
-  };
+    if (getDefaultCurveSegments() >= 50) {
+      roundValues(false);
+    } else {
+      roundValues(true);
+    }
+  }
 
-  function createRenderFunction(data) {
-    switch (data.ty) {
-      case 'fl':
-        return renderFill;
-      case 'gf':
-        return renderGradient;
-      case 'gs':
-        return renderGradientStroke;
-      case 'st':
-        return renderStroke;
-      case 'sh':
-      case 'el':
-      case 'rc':
-      case 'sr':
-        return renderPath;
-      case 'tr':
-        return renderContentTransform;
+  function inBrowser() {
+    return typeof navigator !== 'undefined';
+  }
+
+  function installPlugin(type, plugin) {
+    if (type === 'expressions') {
+      setExpressionsPlugin(plugin);
+    }
+  }
+
+  function getFactory(name) {
+    switch (name) {
+      case 'propertyFactory':
+        return PropertyFactory;
+
+      case 'shapePropertyFactory':
+        return ShapePropertyFactory;
+
+      case 'matrix':
+        return Matrix;
+
       default:
         return null;
     }
   }
 
-  function renderContentTransform(styleData, itemData, isFirstFrame) {
-    if (isFirstFrame || itemData.transform.op._mdf) {
-      itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
-    }
-    if (isFirstFrame || itemData.transform.mProps._mdf) {
-      itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
-    }
-  }
+  lottie.play = animationManager.play;
+  lottie.pause = animationManager.pause;
+  lottie.setLocationHref = setLocation;
+  lottie.togglePause = animationManager.togglePause;
+  lottie.setSpeed = animationManager.setSpeed;
+  lottie.setDirection = animationManager.setDirection;
+  lottie.stop = animationManager.stop;
+  lottie.searchAnimations = searchAnimations;
+  lottie.registerAnimation = animationManager.registerAnimation;
+  lottie.loadAnimation = loadAnimation;
+  lottie.setSubframeRendering = setSubframeRendering;
+  lottie.resize = animationManager.resize; // lottie.start = start;
 
-  function renderPath(styleData, itemData, isFirstFrame) {
-    var j;
-    var jLen;
-    var pathStringTransformed;
-    var redraw;
-    var pathNodes;
-    var l;
-    var lLen = itemData.styles.length;
-    var lvl = itemData.lvl;
-    var paths;
-    var mat;
-    var props;
-    var iterations;
-    var k;
-    for (l = 0; l < lLen; l += 1) {
-      redraw = itemData.sh._mdf || isFirstFrame;
-      if (itemData.styles[l].lvl < lvl) {
-        mat = _matrixHelper.reset();
-        iterations = lvl - itemData.styles[l].lvl;
-        k = itemData.transformers.length - 1;
-        while (!redraw && iterations > 0) {
-          redraw = itemData.transformers[k].mProps._mdf || redraw;
-          iterations -= 1;
-          k -= 1;
-        }
-        if (redraw) {
-          iterations = lvl - itemData.styles[l].lvl;
-          k = itemData.transformers.length - 1;
-          while (iterations > 0) {
-            props = itemData.transformers[k].mProps.v.props;
-            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]);
-            iterations -= 1;
-            k -= 1;
-          }
-        }
-      } else {
-        mat = _identityMatrix;
-      }
-      paths = itemData.sh.paths;
-      jLen = paths._length;
-      if (redraw) {
-        pathStringTransformed = '';
-        for (j = 0; j < jLen; j += 1) {
-          pathNodes = paths.shapes[j];
-          if (pathNodes && pathNodes._length) {
-            pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
-          }
-        }
-        itemData.caches[l] = pathStringTransformed;
-      } else {
-        pathStringTransformed = itemData.caches[l];
-      }
-      itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
-      itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
-    }
-  }
-
-  function renderFill(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
+  lottie.goToAndStop = animationManager.goToAndStop;
+  lottie.destroy = animationManager.destroy;
+  lottie.setQuality = setQuality;
+  lottie.inBrowser = inBrowser;
+  lottie.installPlugin = installPlugin;
+  lottie.freeze = animationManager.freeze;
+  lottie.unfreeze = animationManager.unfreeze;
+  lottie.setVolume = animationManager.setVolume;
+  lottie.mute = animationManager.mute;
+  lottie.unmute = animationManager.unmute;
+  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+  lottie.useWebWorker = setWebWorker;
+  lottie.setIDPrefix = setPrefix;
+  lottie.__getFactory = getFactory;
+  lottie.version = '5.9.1';
 
-    if (itemData.c._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+  function checkReady() {
+    if (document.readyState === 'complete') {
+      clearInterval(readyStateCheckInterval);
+      searchAnimations();
     }
   }
 
-  function renderGradientStroke(styleData, itemData, isFirstFrame) {
-    renderGradient(styleData, itemData, isFirstFrame);
-    renderStroke(styleData, itemData, isFirstFrame);
-  }
+  function getQueryVariable(variable) {
+    var vars = queryString.split('&');
 
-  function renderGradient(styleData, itemData, isFirstFrame) {
-    var gfill = itemData.gf;
-    var hasOpacity = itemData.g._hasOpacity;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
+    for (var i = 0; i < vars.length; i += 1) {
+      var pair = vars[i].split('=');
 
-    if (itemData.o._mdf || isFirstFrame) {
-      var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
-      itemData.style.pElem.setAttribute(attr, itemData.o.v);
-    }
-    if (itemData.s._mdf || isFirstFrame) {
-      var attr1 = styleData.t === 1 ? 'x1' : 'cx';
-      var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
-      gfill.setAttribute(attr1, pt1[0]);
-      gfill.setAttribute(attr2, pt1[1]);
-      if (hasOpacity && !itemData.g._collapsable) {
-        itemData.of.setAttribute(attr1, pt1[0]);
-        itemData.of.setAttribute(attr2, pt1[1]);
-      }
-    }
-    var stops;
-    var i;
-    var len;
-    var stop;
-    if (itemData.g._cmdf || isFirstFrame) {
-      stops = itemData.cst;
-      var cValues = itemData.g.c;
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        stop.setAttribute('offset', cValues[i * 4] + '%');
-        stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
-      }
-    }
-    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
-      var oValues = itemData.g.o;
-      if (itemData.g._collapsable) {
-        stops = itemData.cst;
-      } else {
-        stops = itemData.ost;
-      }
-      len = stops.length;
-      for (i = 0; i < len; i += 1) {
-        stop = stops[i];
-        if (!itemData.g._collapsable) {
-          stop.setAttribute('offset', oValues[i * 2] + '%');
-        }
-        stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
-      }
-    }
-    if (styleData.t === 1) {
-      if (itemData.e._mdf || isFirstFrame) {
-        gfill.setAttribute('x2', pt2[0]);
-        gfill.setAttribute('y2', pt2[1]);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('x2', pt2[0]);
-          itemData.of.setAttribute('y2', pt2[1]);
-        }
-      }
-    } else {
-      var rad;
-      if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
-        rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        gfill.setAttribute('r', rad);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('r', rad);
-        }
-      }
-      if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
-        if (!rad) {
-          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-        }
-        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-        var percent = itemData.h.v;
-        if (percent >= 1) {
-          percent = 0.99;
-        } else if (percent <= -1) {
-          percent = -0.99;
-        }
-        var dist = rad * percent;
-        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-        gfill.setAttribute('fx', x);
-        gfill.setAttribute('fy', y);
-        if (hasOpacity && !itemData.g._collapsable) {
-          itemData.of.setAttribute('fx', x);
-          itemData.of.setAttribute('fy', y);
-        }
-      }
-      // gfill.setAttribute('fy','200');
-    }
-  }
-
-  function renderStroke(styleData, itemData, isFirstFrame) {
-    var styleElem = itemData.style;
-    var d = itemData.d;
-    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
-      styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
-      styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
-    }
-    if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
-      styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
-    }
-    if (itemData.o._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
-    }
-    if (itemData.w._mdf || isFirstFrame) {
-      styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
-      if (styleElem.msElem) {
-        styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
-      }
-    }
-  }
-
-  return ob;
-}());
-
-/* global Matrix */
-
-function ShapeTransformManager() {
-  this.sequences = {};
-  this.sequenceList = [];
-  this.transform_key_count = 0;
-}
-
-ShapeTransformManager.prototype = {
-  addTransformSequence: function (transforms) {
-    var i;
-    var len = transforms.length;
-    var key = '_';
-    for (i = 0; i < len; i += 1) {
-      key += transforms[i].transform.key + '_';
-    }
-    var sequence = this.sequences[key];
-    if (!sequence) {
-      sequence = {
-        transforms: [].concat(transforms),
-        finalTransform: new Matrix(),
-        _mdf: false,
-      };
-      this.sequences[key] = sequence;
-      this.sequenceList.push(sequence);
-    }
-    return sequence;
-  },
-  processSequence: function (sequence, isFirstFrame) {
-    var i = 0;
-    var len = sequence.transforms.length;
-    var _mdf = isFirstFrame;
-    while (i < len && !isFirstFrame) {
-      if (sequence.transforms[i].transform.mProps._mdf) {
-        _mdf = true;
-        break;
-      }
-      i += 1;
-    }
-    if (_mdf) {
-      var props;
-      sequence.finalTransform.reset();
-      for (i = len - 1; i >= 0; i -= 1) {
-        props = sequence.transforms[i].transform.mProps.v.props;
-        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]);
-      }
-    }
-    sequence._mdf = _mdf;
-  },
-  processSequences: function (isFirstFrame) {
-    var i;
-    var len = this.sequenceList.length;
-    for (i = 0; i < len; i += 1) {
-      this.processSequence(this.sequenceList[i], isFirstFrame);
-    }
-  },
-  getNewKey: function () {
-    this.transform_key_count += 1;
-    return '_' + this.transform_key_count;
-  },
-};
-
-/* global ShapePropertyFactory, SVGShapeData */
-
-function CVShapeData(element, data, styles, transformsManager) {
-  this.styledShapes = [];
-  this.tr = [0, 0, 0, 0, 0, 0];
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
-  var i;
-  var len = styles.length;
-  var styledShape;
-  for (i = 0; i < len; i += 1) {
-    if (!styles[i].closed) {
-      styledShape = {
-        transforms: transformsManager.addTransformSequence(styles[i].transforms),
-        trNodes: [],
-      };
-      this.styledShapes.push(styledShape);
-      styles[i].elements.push(styledShape);
-    }
-  }
-}
-
-CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
-
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
-
-function BaseElement() {
-}
-
-BaseElement.prototype = {
-  checkMasks: function () {
-    if (!this.data.hasMask) {
-      return false;
-    }
-    var i = 0;
-    var len = this.data.masksProperties.length;
-    while (i < len) {
-      if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
-        return true;
-      }
-      i += 1;
-    }
-    return false;
-  },
-  initExpressions: function () {
-    this.layerInterface = LayerExpressionInterface(this);
-    if (this.data.hasMask && this.maskManager) {
-      this.layerInterface.registerMaskInterface(this.maskManager);
-    }
-    var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
-    this.layerInterface.registerEffectsInterface(effectsInterface);
-
-    if (this.data.ty === 0 || this.data.xt) {
-      this.compInterface = CompExpressionInterface(this);
-    } else if (this.data.ty === 4) {
-      this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
-      this.layerInterface.content = this.layerInterface.shapeInterface;
-    } else if (this.data.ty === 5) {
-      this.layerInterface.textInterface = TextExpressionInterface(this);
-      this.layerInterface.text = this.layerInterface.textInterface;
-    }
-  },
-  setBlendMode: function () {
-    var blendModeValue = getBlendMode(this.data.bm);
-    var elem = this.baseElement || this.layerElement;
-
-    elem.style['mix-blend-mode'] = blendModeValue;
-  },
-  initBaseData: function (data, globalData, comp) {
-    this.globalData = globalData;
-    this.comp = comp;
-    this.data = data;
-    this.layerId = createElementID();
-
-    // Stretch factor for old animations missing this property.
-    if (!this.data.sr) {
-      this.data.sr = 1;
-    }
-    // effects manager
-    this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
-  },
-  getType: function () {
-    return this.type;
-  },
-  sourceRectAtTime: function () {},
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
-
-function NullElement(data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initFrame();
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-}
-
-NullElement.prototype.prepareFrame = function (num) {
-  this.prepareProperties(num, true);
-};
-
-NullElement.prototype.renderFrame = function () {
-};
-
-NullElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-NullElement.prototype.destroy = function () {
-};
-
-NullElement.prototype.sourceRectAtTime = function () {
-};
-
-NullElement.prototype.hide = function () {
-};
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
-
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
-
-function SVGBaseElement() {
-}
-
-SVGBaseElement.prototype = {
-  initRendererElement: function () {
-    this.layerElement = createNS('g');
-  },
-  createContainerElements: function () {
-    this.matteElement = createNS('g');
-    this.transformedElement = this.layerElement;
-    this.maskedElement = this.layerElement;
-    this._sizeChanged = false;
-    var layerElementParent = null;
-    // If this layer acts as a mask for the following layer
-    var filId;
-    var fil;
-    var gg;
-    if (this.data.td) {
-      if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq
-        var masker = createNS('mask');
-        masker.setAttribute('id', this.layerId);
-        masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
-        masker.appendChild(this.layerElement);
-        layerElementParent = masker;
-        this.globalData.defs.appendChild(masker);
-        // This is only for IE and Edge when mask if of type alpha
-        if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq
-          masker.setAttribute('mask-type', 'luminance');
-          filId = createElementID();
-          fil = filtersFactory.createFilter(filId);
-          this.globalData.defs.appendChild(fil);
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        }
-      } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
-        var maskGroup = createNS('mask');
-        maskGroup.setAttribute('id', this.layerId);
-        maskGroup.setAttribute('mask-type', 'alpha');
-        var maskGrouper = createNS('g');
-        maskGroup.appendChild(maskGrouper);
-        filId = createElementID();
-        fil = filtersFactory.createFilter(filId);
-        /// /
-
-        // This solution doesn't work on Android when meta tag with viewport attribute is set
-        /* var feColorMatrix = createNS('feColorMatrix');
-                feColorMatrix.setAttribute('type', 'matrix');
-                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-                fil.appendChild(feColorMatrix); */
-        /// /
-        var feCTr = createNS('feComponentTransfer');
-        feCTr.setAttribute('in', 'SourceGraphic');
-        fil.appendChild(feCTr);
-        var feFunc = createNS('feFuncA');
-        feFunc.setAttribute('type', 'table');
-        feFunc.setAttribute('tableValues', '1.0 0.0');
-        feCTr.appendChild(feFunc);
-        /// /
-        this.globalData.defs.appendChild(fil);
-        var alphaRect = createNS('rect');
-        alphaRect.setAttribute('width', this.comp.data.w);
-        alphaRect.setAttribute('height', this.comp.data.h);
-        alphaRect.setAttribute('x', '0');
-        alphaRect.setAttribute('y', '0');
-        alphaRect.setAttribute('fill', '#ffffff');
-        alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-        maskGrouper.appendChild(alphaRect);
-        maskGrouper.appendChild(this.layerElement);
-        layerElementParent = maskGrouper;
-        if (!featureSupport.maskType) {
-          maskGroup.setAttribute('mask-type', 'luminance');
-          fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-          gg = createNS('g');
-          maskGrouper.appendChild(alphaRect);
-          gg.appendChild(this.layerElement);
-          layerElementParent = gg;
-          maskGrouper.appendChild(gg);
-        }
-        this.globalData.defs.appendChild(maskGroup);
-      }
-    } else if (this.data.tt) {
-      this.matteElement.appendChild(this.layerElement);
-      layerElementParent = this.matteElement;
-      this.baseElement = this.matteElement;
-    } else {
-      this.baseElement = this.layerElement;
-    }
-    if (this.data.ln) {
-      this.layerElement.setAttribute('id', this.data.ln);
-    }
-    if (this.data.cl) {
-      this.layerElement.setAttribute('class', this.data.cl);
-    }
-    // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-      var cp = createNS('clipPath');
-      var pt = createNS('path');
-      pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-      var clipId = createElementID();
-      cp.setAttribute('id', clipId);
-      cp.appendChild(pt);
-      this.globalData.defs.appendChild(cp);
-
-      if (this.checkMasks()) {
-        var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-        cpGroup.appendChild(this.layerElement);
-        this.transformedElement = cpGroup;
-        if (layerElementParent) {
-          layerElementParent.appendChild(this.transformedElement);
-        } else {
-          this.baseElement = this.transformedElement;
-        }
-      } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
-      }
-    }
-    if (this.data.bm !== 0) {
-      this.setBlendMode();
-    }
-  },
-  renderElement: function () {
-    if (this.finalTransform._matMdf) {
-      this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform._opMdf) {
-      this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
-    }
-  },
-  destroyBaseElement: function () {
-    this.layerElement = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-  },
-  getBaseElement: function () {
-    if (this.data.hd) {
-      return null;
-    }
-    return this.baseElement;
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new MaskElement(this.data, this, this.globalData);
-    this.renderableEffectsManager = new SVGEffects(this);
-  },
-  setMatte: function (id) {
-    if (!this.matteElement) {
-      return;
-    }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-  },
-};
-
-/* global ProcessedElement */
-
-function IShapeElement() {
-}
-
-IShapeElement.prototype = {
-  addShapeToModifiers: function (data) {
-    var i;
-    var len = this.shapeModifiers.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapeModifiers[i].addShape(data);
-    }
-  },
-  isShapeInAnimatedModifiers: function (data) {
-    var i = 0;
-    var len = this.shapeModifiers.length;
-    while (i < len) {
-      if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
-        return true;
-      }
-    }
-    return false;
-  },
-  renderModifiers: function () {
-    if (!this.shapeModifiers.length) {
-      return;
-    }
-    var i;
-    var len = this.shapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.shapes[i].sh.reset();
-    }
-
-    len = this.shapeModifiers.length;
-    var shouldBreakProcess;
-    for (i = len - 1; i >= 0; i -= 1) {
-      shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame);
-      // workaround to fix cases where a repeater resets the shape so the following processes get called twice
-      // TODO: find a better solution for this
-      if (shouldBreakProcess) {
-        break;
-      }
-    }
-  },
-
-  searchProcessedElement: function (elem) {
-    var elements = this.processedElements;
-    var i = 0;
-    var len = elements.length;
-    while (i < len) {
-      if (elements[i].elem === elem) {
-        return elements[i].pos;
-      }
-      i += 1;
-    }
-    return 0;
-  },
-  addProcessedElement: function (elem, pos) {
-    var elements = this.processedElements;
-    var i = elements.length;
-    while (i) {
-      i -= 1;
-      if (elements[i].elem === elem) {
-        elements[i].pos = pos;
-        return;
-      }
-    }
-    elements.push(new ProcessedElement(elem, pos));
-  },
-  prepareFrame: function (num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-  },
-};
-
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
-
-function ITextElement() {
-}
-
-ITextElement.prototype.initElement = function (data, globalData, comp) {
-  this.lettersChangedFlag = true;
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
-  this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
-  this.initTransform(data, globalData, comp);
-  this.initHierarchy();
-  this.initRenderable();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  this.createContent();
-  this.hide();
-  this.textAnimator.searchProperties(this.dynamicProperties);
-};
-
-ITextElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
-    this.buildNewText();
-    this.textProperty._isFirstFrame = false;
-    this.textProperty._mdf = false;
-  }
-};
-
-ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
-  var j;
-  var jLen = shapes.length;
-  var pathNodes;
-  var shapeStr = '';
-  for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
-  }
-  return shapeStr;
-};
-
-ITextElement.prototype.updateDocumentData = function (newData, index) {
-  this.textProperty.updateDocumentData(newData, index);
-};
-
-ITextElement.prototype.canResizeFont = function (_canResize) {
-  this.textProperty.canResizeFont(_canResize);
-};
-
-ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
-  this.textProperty.setMinimumFontSize(_fontSize);
-};
-
-ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
-  if (documentData.ps) {
-    matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
-  }
-  matrixHelper.translate(0, -documentData.ls, 0);
-  switch (documentData.j) {
-    case 1:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
-      break;
-    case 2:
-      matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
-      break;
-    default:
-      break;
-  }
-  matrixHelper.translate(xPos, yPos, 0);
-};
-
-ITextElement.prototype.buildColor = function (colorData) {
-  return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
-};
-
-ITextElement.prototype.emptyProp = new LetterProps();
-
-ITextElement.prototype.destroy = function () {
-
-};
-
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
-
-function ICompElement() {}
-
-extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
-
-ICompElement.prototype.initElement = function (data, globalData, comp) {
-  this.initFrame();
-  this.initBaseData(data, globalData, comp);
-  this.initTransform(data, globalData, comp);
-  this.initRenderable();
-  this.initHierarchy();
-  this.initRendererElement();
-  this.createContainerElements();
-  this.createRenderableComponents();
-  if (this.data.xt || !globalData.progressiveLoad) {
-    this.buildAllItems();
-  }
-  this.hide();
-};
-
-/* ICompElement.prototype.hide = function(){
-    if(!this.hidden){
-        this.hideElement();
-        var i,len = this.elements.length;
-        for( i = 0; i < len; i+=1 ){
-            if(this.elements[i]){
-                this.elements[i].hide();
-            }
-        }
-    }
-}; */
-
-ICompElement.prototype.prepareFrame = function (num) {
-  this._mdf = false;
-  this.prepareRenderableFrame(num);
-  this.prepareProperties(num, this.isInRange);
-  if (!this.isInRange && !this.data.xt) {
-    return;
-  }
-
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    if (timeRemapped === this.data.op) {
-      timeRemapped = this.data.op - 1;
-    }
-    this.renderedFrame = timeRemapped;
-  } else {
-    this.renderedFrame = num / this.data.sr;
-  }
-  var i;
-  var len = this.elements.length;
-  if (!this.completeLayers) {
-    this.checkLayers(this.renderedFrame);
-  }
-  // This iteration needs to be backwards because of how expressions connect between each other
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
-      if (this.elements[i]._mdf) {
-        this._mdf = true;
-      }
-    }
-  }
-};
-
-ICompElement.prototype.renderInnerContent = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-ICompElement.prototype.setElements = function (elems) {
-  this.elements = elems;
-};
-
-ICompElement.prototype.getElements = function () {
-  return this.elements;
-};
-
-ICompElement.prototype.destroyElements = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-};
-
-ICompElement.prototype.destroy = function () {
-  this.destroyElements();
-  this.destroyBaseElement();
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
-
-function IImageElement(data, globalData, comp) {
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initElement(data, globalData, comp);
-  this.sourceRect = {
-    top: 0, left: 0, width: this.assetData.w, height: this.assetData.h,
-  };
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
-
-IImageElement.prototype.createContent = function () {
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-
-  this.innerElem = createNS('image');
-  this.innerElem.setAttribute('width', this.assetData.w + 'px');
-  this.innerElem.setAttribute('height', this.assetData.h + 'px');
-  this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
-  this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
-
-  this.layerElement.appendChild(this.innerElem);
-};
-
-IImageElement.prototype.sourceRectAtTime = function () {
-  return this.sourceRect;
-};
-
-/* global extendPrototype, IImageElement, createNS */
-
-function ISolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([IImageElement], ISolidElement);
-
-ISolidElement.prototype.createContent = function () {
-  var rect = createNS('rect');
-  /// /rect.style.width = this.data.sw;
-  /// /rect.style.height = this.data.sh;
-  /// /rect.style.fill = this.data.sc;
-  rect.setAttribute('width', this.data.sw);
-  rect.setAttribute('height', this.data.sh);
-  rect.setAttribute('fill', this.data.sc);
-  this.layerElement.appendChild(rect);
-};
-
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
-
-function AudioElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.initBaseData(data, globalData, comp);
-  this._isPlaying = false;
-  this._canPlay = false;
-  var assetPath = this.globalData.getAssetsPath(this.assetData);
-  this.audio = this.globalData.audioController.createAudio(assetPath);
-  this._currentTime = 0;
-  this.globalData.audioController.addAudio(this);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-AudioElement.prototype.prepareFrame = function (num) {
-  this.prepareRenderableFrame(num, true);
-  this.prepareProperties(num, true);
-  if (!this.tm._placeholder) {
-    var timeRemapped = this.tm.v;
-    this._currentTime = timeRemapped;
-  } else {
-    this._currentTime = num / this.data.sr;
-  }
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
-
-AudioElement.prototype.renderFrame = function () {
-  if (this.isInRange && this._canPlay) {
-    if (!this._isPlaying) {
-      this.audio.play();
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-      this._isPlaying = true;
-    } else if (!this.audio.playing()
-      || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1
-    ) {
-      this.audio.seek(this._currentTime / this.globalData.frameRate);
-    }
-  }
-};
-
-AudioElement.prototype.show = function () {
-  // this.audio.play()
-};
-
-AudioElement.prototype.hide = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-};
-
-AudioElement.prototype.pause = function () {
-  this.audio.pause();
-  this._isPlaying = false;
-  this._canPlay = false;
-};
-
-AudioElement.prototype.resume = function () {
-  this._canPlay = true;
-};
-
-AudioElement.prototype.setRate = function (rateValue) {
-  this.audio.rate(rateValue);
-};
-
-AudioElement.prototype.volume = function (volumeValue) {
-  this.audio.volume(volumeValue);
-};
-
-AudioElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-AudioElement.prototype.destroy = function () {
-};
-
-AudioElement.prototype.sourceRectAtTime = function () {
-};
-
-AudioElement.prototype.initExpressions = function () {
-};
-
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
-
-function FootageElement(data, globalData, comp) {
-  this.initFrame();
-  this.initRenderable();
-  this.assetData = globalData.getAssetData(data.refId);
-  this.footageData = globalData.imageLoader.getAsset(this.assetData);
-  this.initBaseData(data, globalData, comp);
-}
-
-FootageElement.prototype.prepareFrame = function () {
-};
-
-extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
-
-FootageElement.prototype.getBaseElement = function () {
-  return null;
-};
-
-FootageElement.prototype.renderFrame = function () {
-};
-
-FootageElement.prototype.destroy = function () {
-};
-
-FootageElement.prototype.initExpressions = function () {
-  this.layerInterface = FootageInterface(this);
-};
-
-FootageElement.prototype.getFootageData = function () {
-  return this.footageData;
-};
-
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
-
-function SVGCompElement(data, globalData, comp) {
-  this.layers = data.layers;
-  this.supports3d = true;
-  this.completeLayers = false;
-  this.pendingElements = [];
-  this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
-
-function SVGTextLottieElement(data, globalData, comp) {
-  this.textSpans = [];
-  this.renderType = 'svg';
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
-
-SVGTextLottieElement.prototype.createContent = function () {
-  if (this.data.singleShape && !this.globalData.fontManager.chars) {
-    this.textContainer = createNS('text');
-  }
-};
-
-SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
-  var i = 0;
-  var len = textArray.length;
-  var textContents = [];
-  var currentTextContent = '';
-  while (i < len) {
-    if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
-      textContents.push(currentTextContent);
-      currentTextContent = '';
-    } else {
-      currentTextContent += textArray[i];
-    }
-    i += 1;
-  }
-  textContents.push(currentTextContent);
-  return textContents;
-};
-
-SVGTextLottieElement.prototype.buildNewText = function () {
-  var i;
-  var len;
-
-  var documentData = this.textProperty.currentData;
-  this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
-  if (documentData.fc) {
-    this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
-  } else {
-    this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
-  }
-  if (documentData.sc) {
-    this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
-    this.layerElement.setAttribute('stroke-width', documentData.sw);
-  }
-  this.layerElement.setAttribute('font-size', documentData.finalSize);
-  var fontData = this.globalData.fontManager.getFontByName(documentData.f);
-  if (fontData.fClass) {
-    this.layerElement.setAttribute('class', fontData.fClass);
-  } else {
-    this.layerElement.setAttribute('font-family', fontData.fFamily);
-    var fWeight = documentData.fWeight;
-    var fStyle = documentData.fStyle;
-    this.layerElement.setAttribute('font-style', fStyle);
-    this.layerElement.setAttribute('font-weight', fWeight);
-  }
-  this.layerElement.setAttribute('aria-label', documentData.t);
-
-  var letters = documentData.l || [];
-  var usesGlyphs = !!this.globalData.fontManager.chars;
-  len = letters.length;
-
-  var tSpan;
-  var matrixHelper = this.mHelper;
-  var shapes;
-  var shapeStr = '';
-  var singleShape = this.data.singleShape;
-  var xPos = 0;
-  var yPos = 0;
-  var firstLine = true;
-  var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
-  if (singleShape && !usesGlyphs && !documentData.sz) {
-    var tElement = this.textContainer;
-    var justify = 'start';
-    switch (documentData.j) {
-      case 1:
-        justify = 'end';
-        break;
-      case 2:
-        justify = 'middle';
-        break;
-      default:
-        justify = 'start';
-        break;
-    }
-    tElement.setAttribute('text-anchor', justify);
-    tElement.setAttribute('letter-spacing', trackingOffset);
-    var textContent = this.buildTextContents(documentData.finalText);
-    len = textContent.length;
-    yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
-    for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
-      tSpan.textContent = textContent[i];
-      tSpan.setAttribute('x', 0);
-      tSpan.setAttribute('y', yPos);
-      tSpan.style.display = 'inherit';
-      tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
-      yPos += documentData.finalLineHeight;
-    }
-
-    this.layerElement.appendChild(tElement);
-  } else {
-    var cachedSpansLength = this.textSpans.length;
-    var shapeData;
-    var charData;
-    for (i = 0; i < len; i += 1) {
-      if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
-        if (cachedSpansLength <= i) {
-          tSpan.setAttribute('stroke-linecap', 'butt');
-          tSpan.setAttribute('stroke-linejoin', 'round');
-          tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
-          this.layerElement.appendChild(tSpan);
-        }
-        tSpan.style.display = 'inherit';
-      }
-
-      matrixHelper.reset();
-      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
-      if (singleShape) {
-        if (letters[i].n) {
-          xPos = -trackingOffset;
-          yPos += documentData.yOffset;
-          yPos += firstLine ? 1 : 0;
-          firstLine = false;
-        }
-        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-        xPos += letters[i].l || 0;
-        // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-        xPos += trackingOffset;
-      }
-      if (usesGlyphs) {
-        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
-        } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
-        }
-      } else {
-        if (singleShape) {
-          tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
-        }
-        tSpan.textContent = letters[i].val;
-        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
-      }
-      //
-    }
-    if (singleShape && tSpan) {
-      tSpan.setAttribute('d', shapeStr);
-    }
-  }
-  while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
-    i += 1;
-  }
-
-  this._sizeChanged = true;
-};
-
-SVGTextLottieElement.prototype.sourceRectAtTime = function () {
-  this.prepareFrame(this.comp.renderedFrame - this.data.st);
-  this.renderInnerContent();
-  if (this._sizeChanged) {
-    this._sizeChanged = false;
-    var textBox = this.layerElement.getBBox();
-    this.bbox = {
-      top: textBox.y,
-      left: textBox.x,
-      width: textBox.width,
-      height: textBox.height,
-    };
-  }
-  return this.bbox;
-};
-
-SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
-    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
-    if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
-      this._sizeChanged = true;
-      var i;
-      var len;
-      var renderedLetters = this.textAnimator.renderedLetters;
-
-      var letters = this.textProperty.currentData.l;
-
-      len = letters.length;
-      var renderedLetter;
-      var textSpan;
-      for (i = 0; i < len; i += 1) {
-        if (!letters[i].n) {
-          renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
-          if (renderedLetter._mdf.m) {
-            textSpan.setAttribute('transform', renderedLetter.m);
-          }
-          if (renderedLetter._mdf.o) {
-            textSpan.setAttribute('opacity', renderedLetter.o);
-          }
-          if (renderedLetter._mdf.sw) {
-            textSpan.setAttribute('stroke-width', renderedLetter.sw);
-          }
-          if (renderedLetter._mdf.sc) {
-            textSpan.setAttribute('stroke', renderedLetter.sc);
-          }
-          if (renderedLetter._mdf.fc) {
-            textSpan.setAttribute('fill', renderedLetter.fc);
-          }
-        }
-      }
-    }
-  }
-};
-
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
-
-function SVGShapeElement(data, globalData, comp) {
-  // List of drawable elements
-  this.shapes = [];
-  // Full shape data
-  this.shapesData = data.shapes;
-  // List of styles that will be applied to shapes
-  this.stylesList = [];
-  // List of modifiers that will be applied to shapes
-  this.shapeModifiers = [];
-  // List of items in shape tree
-  this.itemsData = [];
-  // List of items in previous shape tree
-  this.processedElements = [];
-  // List of animated components
-  this.animatedContents = [];
-  this.initElement(data, globalData, comp);
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-  // List of elements that have been created
-  this.prevViewData = [];
-  // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
-}
-
-extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
-
-SVGShapeElement.prototype.initSecondaryElement = function () {
-};
-
-SVGShapeElement.prototype.identityMatrix = new Matrix();
-
-SVGShapeElement.prototype.buildExpressionInterface = function () {};
-
-SVGShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-};
-
-/*
-This method searches for multiple shapes that affect a single element and one of them is animated
-*/
-SVGShapeElement.prototype.filterUniqueShapes = function () {
-  var i;
-  var len = this.shapes.length;
-  var shape;
-  var j;
-  var jLen = this.stylesList.length;
-  var style;
-  var tempShapes = [];
-  var areAnimated = false;
-  for (j = 0; j < jLen; j += 1) {
-    style = this.stylesList[j];
-    areAnimated = false;
-    tempShapes.length = 0;
-    for (i = 0; i < len; i += 1) {
-      shape = this.shapes[i];
-      if (shape.styles.indexOf(style) !== -1) {
-        tempShapes.push(shape);
-        areAnimated = shape._isAnimated || areAnimated;
-      }
-    }
-    if (tempShapes.length > 1 && areAnimated) {
-      this.setShapesAsAnimated(tempShapes);
-    }
-  }
-};
-
-SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
-  var i;
-  var len = shapes.length;
-  for (i = 0; i < len; i += 1) {
-    shapes[i].setAsAnimated();
-  }
-};
-
-SVGShapeElement.prototype.createStyleElement = function (data, level) {
-  // TODO: prevent drawing of hidden styles
-  var elementData;
-  var styleOb = new SVGStyleData(data, level);
-
-  var pathElement = styleOb.pElem;
-  if (data.ty === 'st') {
-    elementData = new SVGStrokeStyleData(this, data, styleOb);
-  } else if (data.ty === 'fl') {
-    elementData = new SVGFillStyleData(this, data, styleOb);
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
-    elementData = new GradientConstructor(this, data, styleOb);
-    this.globalData.defs.appendChild(elementData.gf);
-    if (elementData.maskId) {
-      this.globalData.defs.appendChild(elementData.ms);
-      this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
-    }
-  }
-
-  if (data.ty === 'st' || data.ty === 'gs') {
-    pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
-    pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
-    pathElement.setAttribute('fill-opacity', '0');
-    if (data.lj === 1) {
-      pathElement.setAttribute('stroke-miterlimit', data.ml);
-    }
-  }
-
-  if (data.r === 2) {
-    pathElement.setAttribute('fill-rule', 'evenodd');
-  }
-
-  if (data.ln) {
-    pathElement.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    pathElement.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  this.stylesList.push(styleOb);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createGroupElement = function (data) {
-  var elementData = new ShapeGroupData();
-  if (data.ln) {
-    elementData.gr.setAttribute('id', data.ln);
-  }
-  if (data.cl) {
-    elementData.gr.setAttribute('class', data.cl);
-  }
-  if (data.bm) {
-    elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
-  }
-  return elementData;
-};
-
-SVGShapeElement.prototype.createTransformElement = function (data, container) {
-  var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
-  var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
-  var ty = 4;
-  if (data.ty === 'rc') {
-    ty = 5;
-  } else if (data.ty === 'el') {
-    ty = 6;
-  } else if (data.ty === 'sr') {
-    ty = 7;
-  }
-  var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
-  var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  this.addToAnimatedContents(data, elementData);
-  return elementData;
-};
-
-SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
-  var i = 0;
-  var len = this.animatedContents.length;
-  while (i < len) {
-    if (this.animatedContents[i].element === element) {
-      return;
-    }
-    i += 1;
-  }
-  this.animatedContents.push({
-    fn: SVGElementsRenderer.createRenderFunction(data),
-    element: element,
-    data: data,
-  });
-};
-
-SVGShapeElement.prototype.setElementStyles = function (elementData) {
-  var arr = elementData.styles;
-  var j;
-  var jLen = this.stylesList.length;
-  for (j = 0; j < jLen; j += 1) {
-    if (!this.stylesList[j].closed) {
-      arr.push(this.stylesList[j]);
-    }
-  }
-};
-
-SVGShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
-  this.filterUniqueShapes();
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-};
-
-SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
-  var ownTransformers = [].concat(transformers);
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var currentTransform;
-  var modifier;
-  var processedPos;
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._render = render;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], level);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-      if (arr[i]._render) {
-        if (itemsData[i].style.pElem.parentNode !== container) {
-          container.appendChild(itemsData[i].style.pElem);
-        }
-      }
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
-      if (arr[i]._render) {
-        if (itemsData[i].gr.parentNode !== container) {
-          container.appendChild(itemsData[i].gr);
-        }
-      }
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        itemsData[i] = this.createTransformElement(arr[i], container);
-      }
-      currentTransform = itemsData[i].transform;
-      ownTransformers.push(currentTransform);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
-      }
-      this.setElementStyles(itemsData[i]);
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        render = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  len = ownStyles.length;
-  for (i = 0; i < len; i += 1) {
-    ownStyles[i].closed = true;
-  }
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-SVGShapeElement.prototype.renderInnerContent = function () {
-  this.renderModifiers();
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    this.stylesList[i].reset();
-  }
-  this.renderShape();
-
-  for (i = 0; i < len; i += 1) {
-    if (this.stylesList[i]._mdf || this._isFirstFrame) {
-      if (this.stylesList[i].msElem) {
-        this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
-        // Adding M0 0 fixes same mask bug on all browsers
-        this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
-      }
-      this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
-    }
-  }
-};
-
-SVGShapeElement.prototype.renderShape = function () {
-  var i;
-  var len = this.animatedContents.length;
-  var animatedContent;
-  for (i = 0; i < len; i += 1) {
-    animatedContent = this.animatedContents[i];
-    if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
-      animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
-    }
-  }
-};
-
-SVGShapeElement.prototype.destroy = function () {
-  this.destroyBaseElement();
-  this.shapesData = null;
-  this.itemsData = null;
-};
-
-/* global createNS */
-
-function SVGTintFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  feColorMatrix.setAttribute('result', 'f2');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-  if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
-    var feMerge = createNS('feMerge');
-    filter.appendChild(feMerge);
-    var feMergeNode;
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'SourceGraphic');
-    feMerge.appendChild(feMergeNode);
-    feMergeNode = createNS('feMergeNode');
-    feMergeNode.setAttribute('in', 'f2');
-    feMerge.appendChild(feMergeNode);
-  }
-}
-
-SVGTintFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var colorBlack = this.filterManager.effectElements[0].p.v;
-    var colorWhite = this.filterManager.effectElements[1].p.v;
-    var opacity = this.filterManager.effectElements[2].p.v / 100;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGFillFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-  feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
-  filter.appendChild(feColorMatrix);
-  this.matrixFilter = feColorMatrix;
-}
-SVGFillFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color = this.filterManager.effectElements[2].p.v;
-    var opacity = this.filterManager.effectElements[6].p.v;
-    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');
-  }
-};
-
-/* global createNS */
-
-function SVGGaussianBlurEffect(filter, filterManager) {
-  // Outset the filter region by 100% on all sides to accommodate blur expansion.
-  filter.setAttribute('x', '-100%');
-  filter.setAttribute('y', '-100%');
-  filter.setAttribute('width', '300%');
-  filter.setAttribute('height', '300%');
-
-  this.filterManager = filterManager;
-  var feGaussianBlur = createNS('feGaussianBlur');
-  filter.appendChild(feGaussianBlur);
-  this.feGaussianBlur = feGaussianBlur;
-}
-
-SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    // Empirical value, matching AE's blur appearance.
-    var kBlurrinessToSigma = 0.3;
-    var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
-
-    // Dimensions mapping:
-    //
-    //   1 -> horizontal & vertical
-    //   2 -> horizontal only
-    //   3 -> vertical only
-    //
-    var dimensions = this.filterManager.effectElements[1].p.v;
-    var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq
-    var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq
-
-    this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY);
-
-    // Repeat edges mapping:
-    //
-    //   0 -> off -> duplicate
-    //   1 -> on  -> wrap
-    var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
-    this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
-  }
-};
-
-/* global createNS, createElementID, locationHref, bmFloor */
-
-function SVGStrokeEffect(elem, filterManager) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.elem = elem;
-  this.paths = [];
-}
-
-SVGStrokeEffect.prototype.initialize = function () {
-  var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-  var path;
-  var groupPath;
-  var i;
-  var len;
-  if (this.filterManager.effectElements[1].p.v === 1) {
-    len = this.elem.maskManager.masksProperties.length;
-    i = 0;
-  } else {
-    i = this.filterManager.effectElements[0].p.v - 1;
-    len = i + 1;
-  }
-  groupPath = createNS('g');
-  groupPath.setAttribute('fill', 'none');
-  groupPath.setAttribute('stroke-linecap', 'round');
-  groupPath.setAttribute('stroke-dashoffset', 1);
-  for (i; i < len; i += 1) {
-    path = createNS('path');
-    groupPath.appendChild(path);
-    this.paths.push({ p: path, m: i });
-  }
-  if (this.filterManager.effectElements[10].p.v === 3) {
-    var mask = createNS('mask');
-    var id = createElementID();
-    mask.setAttribute('id', id);
-    mask.setAttribute('mask-type', 'alpha');
-    mask.appendChild(groupPath);
-    this.elem.globalData.defs.appendChild(mask);
-    var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
-    while (elemChildren[0]) {
-      g.appendChild(elemChildren[0]);
-    }
-    this.elem.layerElement.appendChild(g);
-    this.masker = mask;
-    groupPath.setAttribute('stroke', '#fff');
-  } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (this.filterManager.effectElements[10].p.v === 2) {
-      elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
-      while (elemChildren.length) {
-        this.elem.layerElement.removeChild(elemChildren[0]);
-      }
-    }
-    this.elem.layerElement.appendChild(groupPath);
-    this.elem.layerElement.removeAttribute('mask');
-    groupPath.setAttribute('stroke', '#fff');
-  }
-  this.initialized = true;
-  this.pathMasker = groupPath;
-};
-
-SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
-  if (!this.initialized) {
-    this.initialize();
-  }
-  var i;
-  var len = this.paths.length;
-  var mask;
-  var path;
-  for (i = 0; i < len; i += 1) {
-    if (this.paths[i].m !== -1) {
-      mask = this.elem.maskManager.viewData[this.paths[i].m];
-      path = this.paths[i].p;
-      if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
-        path.setAttribute('d', mask.lastPath);
-      }
-      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) {
-        var dasharrayValue;
-        if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
-          var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
-          var l = path.getTotalLength();
-          dasharrayValue = '0 0 0 ' + l * s + ' ';
-          var lineLength = l * (e - s);
-          var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-          var units = Math.floor(lineLength / segment);
-          var j;
-          for (j = 0; j < units; j += 1) {
-            dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
-          }
-          dasharrayValue += '0 ' + l * 10 + ' 0 0';
-        } else {
-          dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
-        }
-        path.setAttribute('stroke-dasharray', dasharrayValue);
-      }
-    }
-  }
-  if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-    this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
-  }
-
-  if (forceRender || this.filterManager.effectElements[6].p._mdf) {
-    this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
-  }
-  if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
-    if (forceRender || this.filterManager.effectElements[3].p._mdf) {
-      var color = this.filterManager.effectElements[3].p.v;
-      this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
-    }
-  }
-};
-
-/* global createNS */
-
-function SVGTritoneFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var feColorMatrix = createNS('feColorMatrix');
-  feColorMatrix.setAttribute('type', 'matrix');
-  feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
-  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');
-  feColorMatrix.setAttribute('result', 'f1');
-  filter.appendChild(feColorMatrix);
-  var feComponentTransfer = createNS('feComponentTransfer');
-  feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-  filter.appendChild(feComponentTransfer);
-  this.matrixFilter = feComponentTransfer;
-  var feFuncR = createNS('feFuncR');
-  feFuncR.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncR);
-  this.feFuncR = feFuncR;
-  var feFuncG = createNS('feFuncG');
-  feFuncG.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncG);
-  this.feFuncG = feFuncG;
-  var feFuncB = createNS('feFuncB');
-  feFuncB.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFuncB);
-  this.feFuncB = feFuncB;
-}
-
-SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var color1 = this.filterManager.effectElements[0].p.v;
-    var color2 = this.filterManager.effectElements[1].p.v;
-    var color3 = this.filterManager.effectElements[2].p.v;
-    var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
-    var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
-    var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
-    this.feFuncR.setAttribute('tableValues', tableR);
-    this.feFuncG.setAttribute('tableValues', tableG);
-    this.feFuncB.setAttribute('tableValues', tableB);
-    // var opacity = this.filterManager.effectElements[2].p.v/100;
-    // 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');
-  }
-};
-
-/* global createNS */
-
-function SVGProLevelsFilter(filter, filterManager) {
-  this.filterManager = filterManager;
-  var effectElements = this.filterManager.effectElements;
-  var feComponentTransfer = createNS('feComponentTransfer');
-
-  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) {
-    this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
-  }
-  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) {
-    this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
-  }
-  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) {
-    this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-  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) {
-    this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
-  }
-
-  if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    feComponentTransfer = createNS('feComponentTransfer');
-  }
-
-  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) {
-    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
-    filter.appendChild(feComponentTransfer);
-    this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
-    this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
-    this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
-  }
-}
-
-SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
-  var feFunc = createNS(type);
-  feFunc.setAttribute('type', 'table');
-  feComponentTransfer.appendChild(feFunc);
-  return feFunc;
-};
-
-SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
-  var cnt = 0;
-  var segments = 256;
-  var perc;
-  var min = Math.min(inputBlack, inputWhite);
-  var max = Math.max(inputBlack, inputWhite);
-  var table = Array.call(null, { length: segments });
-  var colorValue;
-  var pos = 0;
-  var outputDelta = outputWhite - outputBlack;
-  var inputDelta = inputWhite - inputBlack;
-  while (cnt <= 256) {
-    perc = cnt / 256;
-    if (perc <= min) {
-      colorValue = inputDelta < 0 ? outputWhite : outputBlack;
-    } else if (perc >= max) {
-      colorValue = inputDelta < 0 ? outputBlack : outputWhite;
-    } else {
-      colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
-    }
-    table[pos] = colorValue;
-    pos += 1;
-    cnt += 256 / (segments - 1);
-  }
-  return table.join(' ');
-};
-
-SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    var val;
-    var effectElements = this.filterManager.effectElements;
-    if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
-      val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
-      this.feFuncRComposed.setAttribute('tableValues', val);
-      this.feFuncGComposed.setAttribute('tableValues', val);
-      this.feFuncBComposed.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
-      val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
-      this.feFuncR.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
-      val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
-      this.feFuncG.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
-      val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
-      this.feFuncB.setAttribute('tableValues', val);
-    }
-
-    if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
-      val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
-      this.feFuncA.setAttribute('tableValues', val);
-    }
-  }
-};
-
-/* global createNS, rgbToHex, degToRads */
-
-function SVGDropShadowEffect(filter, filterManager) {
-  var filterSize = filterManager.container.globalData.renderConfig.filterSize;
-  filter.setAttribute('x', filterSize.x);
-  filter.setAttribute('y', filterSize.y);
-  filter.setAttribute('width', filterSize.width);
-  filter.setAttribute('height', filterSize.height);
-  this.filterManager = filterManager;
-
-  var feGaussianBlur = createNS('feGaussianBlur');
-  feGaussianBlur.setAttribute('in', 'SourceAlpha');
-  feGaussianBlur.setAttribute('result', 'drop_shadow_1');
-  feGaussianBlur.setAttribute('stdDeviation', '0');
-  this.feGaussianBlur = feGaussianBlur;
-  filter.appendChild(feGaussianBlur);
-
-  var feOffset = createNS('feOffset');
-  feOffset.setAttribute('dx', '25');
-  feOffset.setAttribute('dy', '0');
-  feOffset.setAttribute('in', 'drop_shadow_1');
-  feOffset.setAttribute('result', 'drop_shadow_2');
-  this.feOffset = feOffset;
-  filter.appendChild(feOffset);
-  var feFlood = createNS('feFlood');
-  feFlood.setAttribute('flood-color', '#00ff00');
-  feFlood.setAttribute('flood-opacity', '1');
-  feFlood.setAttribute('result', 'drop_shadow_3');
-  this.feFlood = feFlood;
-  filter.appendChild(feFlood);
-
-  var feComposite = createNS('feComposite');
-  feComposite.setAttribute('in', 'drop_shadow_3');
-  feComposite.setAttribute('in2', 'drop_shadow_2');
-  feComposite.setAttribute('operator', 'in');
-  feComposite.setAttribute('result', 'drop_shadow_4');
-  filter.appendChild(feComposite);
-
-  var feMerge = createNS('feMerge');
-  filter.appendChild(feMerge);
-  var feMergeNode;
-  feMergeNode = createNS('feMergeNode');
-  feMerge.appendChild(feMergeNode);
-  feMergeNode = createNS('feMergeNode');
-  feMergeNode.setAttribute('in', 'SourceGraphic');
-  this.feMergeNode = feMergeNode;
-  this.feMerge = feMerge;
-  this.originalNodeAdded = false;
-  feMerge.appendChild(feMergeNode);
-}
-
-SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
-  if (forceRender || this.filterManager._mdf) {
-    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
-      this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
-    }
-    if (forceRender || this.filterManager.effectElements[0].p._mdf) {
-      var col = this.filterManager.effectElements[0].p.v;
-      this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
-    }
-    if (forceRender || this.filterManager.effectElements[1].p._mdf) {
-      this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
-    }
-    if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
-      var distance = this.filterManager.effectElements[3].p.v;
-      var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
-      var x = distance * Math.cos(angle);
-      var y = distance * Math.sin(angle);
-      this.feOffset.setAttribute('dx', x);
-      this.feOffset.setAttribute('dy', y);
-    }
-    /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
-            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
-                this.feMerge.removeChild(this.feMergeNode);
-                this.originalNodeAdded = false;
-            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
-                this.feMerge.appendChild(this.feMergeNode);
-                this.originalNodeAdded = true;
-            }
-        } */
-  }
-};
-
-/* global createElementID, createNS */
-
-var _svgMatteSymbols = [];
-
-function SVGMatte3Effect(filterElem, filterManager, elem) {
-  this.initialized = false;
-  this.filterManager = filterManager;
-  this.filterElem = filterElem;
-  this.elem = elem;
-  elem.matteElement = createNS('g');
-  elem.matteElement.appendChild(elem.layerElement);
-  elem.matteElement.appendChild(elem.transformedElement);
-  elem.baseElement = elem.matteElement;
-}
-
-SVGMatte3Effect.prototype.findSymbol = function (mask) {
-  var i = 0;
-  var len = _svgMatteSymbols.length;
-  while (i < len) {
-    if (_svgMatteSymbols[i] === mask) {
-      return _svgMatteSymbols[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
-  var parentNode = mask.layerElement.parentNode;
-  if (!parentNode) {
-    return;
-  }
-  var children = parentNode.children;
-  var i = 0;
-  var len = children.length;
-  while (i < len) {
-    if (children[i] === mask.layerElement) {
-      break;
-    }
-    i += 1;
-  }
-  var nextChild;
-  if (i <= len - 2) {
-    nextChild = children[i + 1];
-  }
-  var useElem = createNS('use');
-  useElem.setAttribute('href', '#' + symbolId);
-  if (nextChild) {
-    parentNode.insertBefore(useElem, nextChild);
-  } else {
-    parentNode.appendChild(useElem);
-  }
-};
-
-SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
-  if (!this.findSymbol(mask)) {
-    var symbolId = createElementID();
-    var masker = createNS('mask');
-    masker.setAttribute('id', mask.layerId);
-    masker.setAttribute('mask-type', 'alpha');
-    _svgMatteSymbols.push(mask);
-    var defs = elem.globalData.defs;
-    defs.appendChild(masker);
-    var symbol = createNS('symbol');
-    symbol.setAttribute('id', symbolId);
-    this.replaceInParent(mask, symbolId);
-    symbol.appendChild(mask.layerElement);
-    defs.appendChild(symbol);
-    var useElem = createNS('use');
-    useElem.setAttribute('href', '#' + symbolId);
-    masker.appendChild(useElem);
-    mask.data.hd = false;
-    mask.show();
-  }
-  elem.setMatte(mask.layerId);
-};
-
-SVGMatte3Effect.prototype.initialize = function () {
-  var ind = this.filterManager.effectElements[0].p.v;
-  var elements = this.elem.comp.elements;
-  var i = 0;
-  var len = elements.length;
-  while (i < len) {
-    if (elements[i] && elements[i].data.ind === ind) {
-      this.setElementAsMask(this.elem, elements[i]);
-    }
-    i += 1;
-  }
-  this.initialized = true;
-};
-
-SVGMatte3Effect.prototype.renderFrame = function () {
-  if (!this.initialized) {
-    this.initialize();
-  }
-};
-
-/* global createElementID, filtersFactory, SVGTintFilter, SVGFillFilter, SVGStrokeEffect, SVGTritoneFilter,
-SVGProLevelsFilter, SVGDropShadowEffect, SVGMatte3Effect, SVGGaussianBlurEffect, locationHref */
-
-function SVGEffects(elem) {
-  var i;
-  var len = elem.data.ef ? elem.data.ef.length : 0;
-  var filId = createElementID();
-  var fil = filtersFactory.createFilter(filId, true);
-  var count = 0;
-  this.filters = [];
-  var filterManager;
-  for (i = 0; i < len; i += 1) {
-    filterManager = null;
-    if (elem.data.ef[i].ty === 20) {
-      count += 1;
-      filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 21) {
-      count += 1;
-      filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 22) {
-      filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 23) {
-      count += 1;
-      filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 24) {
-      count += 1;
-      filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 25) {
-      count += 1;
-      filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
-    } else if (elem.data.ef[i].ty === 28) {
-      // count += 1;
-      filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
-    } else if (elem.data.ef[i].ty === 29) {
-      count += 1;
-      filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
-    }
-    if (filterManager) {
-      this.filters.push(filterManager);
-    }
-  }
-  if (count) {
-    elem.globalData.defs.appendChild(fil);
-    elem.layerElement.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
-  }
-  if (this.filters.length) {
-    elem.addRenderableComponent(this);
-  }
-}
-
-SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
-  var i;
-  var len = this.filters.length;
-  for (i = 0; i < len; i += 1) {
-    this.filters[i].renderFrame(_isFirstFrame);
-  }
-};
-
-/* global Matrix, createTypedArray */
-
-function CVContextData() {
-  this.saved = [];
-  this.cArrPos = 0;
-  this.cTr = new Matrix();
-  this.cO = 1;
-  var i;
-  var len = 15;
-  this.savedOp = createTypedArray('float32', len);
-  for (i = 0; i < len; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = len;
-}
-
-CVContextData.prototype.duplicate = function () {
-  var newLength = this._length * 2;
-  var currentSavedOp = this.savedOp;
-  this.savedOp = createTypedArray('float32', newLength);
-  this.savedOp.set(currentSavedOp);
-  var i = 0;
-  for (i = this._length; i < newLength; i += 1) {
-    this.saved[i] = createTypedArray('float32', 16);
-  }
-  this._length = newLength;
-};
-
-CVContextData.prototype.reset = function () {
-  this.cArrPos = 0;
-  this.cTr.reset();
-  this.cO = 1;
-};
-
-/* global CVEffects, getBlendMode, CVMaskElement, Matrix */
-
-function CVBaseElement() {
-}
-
-CVBaseElement.prototype = {
-  createElements: function () {},
-  initRendererElement: function () {},
-  createContainerElements: function () {
-    this.canvasContext = this.globalData.canvasContext;
-    this.renderableEffectsManager = new CVEffects(this);
-  },
-  createContent: function () {},
-  setBlendMode: function () {
-    var globalData = this.globalData;
-    if (globalData.blendMode !== this.data.bm) {
-      globalData.blendMode = this.data.bm;
-      var blendModeValue = getBlendMode(this.data.bm);
-      globalData.canvasContext.globalCompositeOperation = blendModeValue;
-    }
-  },
-  createRenderableComponents: function () {
-    this.maskManager = new CVMaskElement(this.data, this);
-  },
-  hideElement: function () {
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-      this.hidden = true;
-    }
-  },
-  showElement: function () {
-    if (this.isInRange && !this.isTransparent) {
-      this.hidden = false;
-      this._isFirstFrame = true;
-      this.maskManager._isFirstFrame = true;
-    }
-  },
-  renderFrame: function () {
-    if (this.hidden || this.data.hd) {
-      return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.setBlendMode();
-    var forceRealStack = this.data.ty === 0;
-    this.globalData.renderer.save(forceRealStack);
-    this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
-    this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
-    this.renderInnerContent();
-    this.globalData.renderer.restore(forceRealStack);
-    if (this.maskManager.hasMasks) {
-      this.globalData.renderer.restore(true);
-    }
-    if (this._isFirstFrame) {
-      this._isFirstFrame = false;
-    }
-  },
-  destroy: function () {
-    this.canvasContext = null;
-    this.data = null;
-    this.globalData = null;
-    this.maskManager.destroy();
-  },
-  mHelper: new Matrix(),
-};
-CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
-CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
-
-/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */
-
-function CVCompElement(data, globalData, comp) {
-  this.completeLayers = false;
-  this.layers = data.layers;
-  this.pendingElements = [];
-  this.elements = createSizedArray(this.layers.length);
-  this.initElement(data, globalData, comp);
-  this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
-}
-
-extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
-
-CVCompElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.beginPath();
-  ctx.moveTo(0, 0);
-  ctx.lineTo(this.data.w, 0);
-  ctx.lineTo(this.data.w, this.data.h);
-  ctx.lineTo(0, this.data.h);
-  ctx.lineTo(0, 0);
-  ctx.clip();
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].renderFrame();
-    }
-  }
-};
-
-CVCompElement.prototype.destroy = function () {
-  var i;
-  var len = this.layers.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.layers = null;
-  this.elements = null;
-};
-
-/* global createSizedArray, ShapePropertyFactory, MaskElement */
-
-function CVMaskElement(data, element) {
-  this.data = data;
-  this.element = element;
-  this.masksProperties = this.data.masksProperties || [];
-  this.viewData = createSizedArray(this.masksProperties.length);
-  var i;
-  var len = this.masksProperties.length;
-  var hasMasks = false;
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      hasMasks = true;
-    }
-    this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
-  }
-  this.hasMasks = hasMasks;
-  if (hasMasks) {
-    this.element.addRenderableComponent(this);
-  }
-}
-
-CVMaskElement.prototype.renderFrame = function () {
-  if (!this.hasMasks) {
-    return;
-  }
-  var transform = this.element.finalTransform.mat;
-  var ctx = this.element.canvasContext;
-  var i;
-  var len = this.masksProperties.length;
-  var pt;
-  var pts;
-  var data;
-  ctx.beginPath();
-  for (i = 0; i < len; i += 1) {
-    if (this.masksProperties[i].mode !== 'n') {
-      if (this.masksProperties[i].inv) {
-        ctx.moveTo(0, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, 0);
-        ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
-        ctx.lineTo(0, this.element.globalData.compSize.h);
-        ctx.lineTo(0, 0);
-      }
-      data = this.viewData[i].v;
-      pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
-      ctx.moveTo(pt[0], pt[1]);
-      var j;
-      var jLen = data._length;
-      for (j = 1; j < jLen; j += 1) {
-        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
-        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-      }
-      pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
-      ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
-    }
-  }
-  this.element.globalData.renderer.save(true);
-  ctx.clip();
-};
-
-CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
-
-CVMaskElement.prototype.destroy = function () {
-  this.element = null;
-};
-
-/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,
-HierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,
-DashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */
-
-function CVShapeElement(data, globalData, comp) {
-  this.shapes = [];
-  this.shapesData = data.shapes;
-  this.stylesList = [];
-  this.itemsData = [];
-  this.prevViewData = [];
-  this.shapeModifiers = [];
-  this.processedElements = [];
-  this.transformsManager = new ShapeTransformManager();
-  this.initElement(data, globalData, comp);
-}
-
-extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
-
-CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
-
-CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false };
-
-CVShapeElement.prototype.dashResetter = [];
-
-CVShapeElement.prototype.createContent = function () {
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-};
-
-CVShapeElement.prototype.createStyleElement = function (data, transforms) {
-  var styleElem = {
-    data: data,
-    type: data.ty,
-    preTransforms: this.transformsManager.addTransformSequence(transforms),
-    transforms: [],
-    elements: [],
-    closed: data.hd === true,
-  };
-  var elementData = {};
-  if (data.ty === 'fl' || data.ty === 'st') {
-    elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
-    if (!elementData.c.k) {
-      styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
-    }
-  } else if (data.ty === 'gf' || data.ty === 'gs') {
-    elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
-    elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
-    elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this);
-    elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this);
-    elementData.g = new GradientProperty(this, data.g, this);
-  }
-  elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
-  if (data.ty === 'st' || data.ty === 'gs') {
-    styleElem.lc = lineCapEnum[data.lc || 2];
-    styleElem.lj = lineJoinEnum[data.lj || 2];
-    if (data.lj == 1) { // eslint-disable-line eqeqeq
-      styleElem.ml = data.ml;
-    }
-    elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
-    if (!elementData.w.k) {
-      styleElem.wi = elementData.w.v;
-    }
-    if (data.d) {
-      var d = new DashProperty(this, data.d, 'canvas', this);
-      elementData.d = d;
-      if (!elementData.d.k) {
-        styleElem.da = elementData.d.dashArray;
-        styleElem.do = elementData.d.dashoffset[0];
-      }
-    }
-  } else {
-    styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
-  }
-  this.stylesList.push(styleElem);
-  elementData.style = styleElem;
-  return elementData;
-};
-
-CVShapeElement.prototype.createGroupElement = function () {
-  var elementData = {
-    it: [],
-    prevViewData: [],
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createTransformElement = function (data) {
-  var elementData = {
-    transform: {
-      opacity: 1,
-      _opMdf: false,
-      key: this.transformsManager.getNewKey(),
-      op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
-      mProps: TransformPropertyFactory.getTransformProperty(this, data, this),
-    },
-  };
-  return elementData;
-};
-
-CVShapeElement.prototype.createShapeElement = function (data) {
-  var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
-
-  this.shapes.push(elementData);
-  this.addShapeToModifiers(elementData);
-  return elementData;
-};
-
-CVShapeElement.prototype.reloadShapes = function () {
-  this._isFirstFrame = true;
-  var i;
-  var len = this.itemsData.length;
-  for (i = 0; i < len; i += 1) {
-    this.prevViewData[i] = this.itemsData[i];
-  }
-  this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
-  len = this.dynamicProperties.length;
-  for (i = 0; i < len; i += 1) {
-    this.dynamicProperties[i].getValue();
-  }
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-};
-
-CVShapeElement.prototype.addTransformToStyleList = function (transform) {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.push(transform);
-    }
-  }
-};
-
-CVShapeElement.prototype.removeTransformFromStyleList = function () {
-  var i;
-  var len = this.stylesList.length;
-  for (i = 0; i < len; i += 1) {
-    if (!this.stylesList[i].closed) {
-      this.stylesList[i].transforms.pop();
-    }
-  }
-};
-
-CVShapeElement.prototype.closeStyles = function (styles) {
-  var i;
-  var len = styles.length;
-  for (i = 0; i < len; i += 1) {
-    styles[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
-  var i;
-  var len = arr.length - 1;
-  var j;
-  var jLen;
-  var ownStyles = [];
-  var ownModifiers = [];
-  var processedPos;
-  var modifier;
-  var currentTransform;
-  var ownTransforms = [].concat(transforms);
-  for (i = len; i >= 0; i -= 1) {
-    processedPos = this.searchProcessedElement(arr[i]);
-    if (!processedPos) {
-      arr[i]._shouldRender = shouldRender;
-    } else {
-      itemsData[i] = prevViewData[processedPos - 1];
-    }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
-      if (!processedPos) {
-        itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
-      } else {
-        itemsData[i].style.closed = false;
-      }
-
-      ownStyles.push(itemsData[i].style);
-    } else if (arr[i].ty === 'gr') {
-      if (!processedPos) {
-        itemsData[i] = this.createGroupElement(arr[i]);
-      } else {
-        jLen = itemsData[i].it.length;
-        for (j = 0; j < jLen; j += 1) {
-          itemsData[i].prevViewData[j] = itemsData[i].it[j];
-        }
-      }
-      this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
-    } else if (arr[i].ty === 'tr') {
-      if (!processedPos) {
-        currentTransform = this.createTransformElement(arr[i]);
-        itemsData[i] = currentTransform;
-      }
-      ownTransforms.push(itemsData[i]);
-      this.addTransformToStyleList(itemsData[i]);
-    } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
-      if (!processedPos) {
-        itemsData[i] = this.createShapeElement(arr[i]);
-      }
-    } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        modifier.init(this, arr[i]);
-        itemsData[i] = modifier;
-        this.shapeModifiers.push(modifier);
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = false;
-      }
-      ownModifiers.push(modifier);
-    } else if (arr[i].ty === 'rp') {
-      if (!processedPos) {
-        modifier = ShapeModifiers.getModifier(arr[i].ty);
-        itemsData[i] = modifier;
-        modifier.init(this, arr, i, itemsData);
-        this.shapeModifiers.push(modifier);
-        shouldRender = false;
-      } else {
-        modifier = itemsData[i];
-        modifier.closed = true;
-      }
-      ownModifiers.push(modifier);
-    }
-    this.addProcessedElement(arr[i], i + 1);
-  }
-  this.removeTransformFromStyleList();
-  this.closeStyles(ownStyles);
-  len = ownModifiers.length;
-  for (i = 0; i < len; i += 1) {
-    ownModifiers[i].closed = true;
-  }
-};
-
-CVShapeElement.prototype.renderInnerContent = function () {
-  this.transformHelper.opacity = 1;
-  this.transformHelper._opMdf = false;
-  this.renderModifiers();
-  this.transformsManager.processSequences(this._isFirstFrame);
-  this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
-};
-
-CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
-  if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
-    groupTransform.opacity = parentTransform.opacity;
-    groupTransform.opacity *= groupTransform.op.v;
-    groupTransform._opMdf = true;
-  }
-};
-
-CVShapeElement.prototype.drawLayer = function () {
-  var i;
-  var len = this.stylesList.length;
-  var j;
-  var jLen;
-  var k;
-  var kLen;
-  var elems;
-  var nodes;
-  var renderer = this.globalData.renderer;
-  var ctx = this.globalData.canvasContext;
-  var type;
-  var currentStyle;
-  for (i = 0; i < len; i += 1) {
-    currentStyle = this.stylesList[i];
-    type = currentStyle.type;
-
-    // Skipping style when
-    // Stroke width equals 0
-    // style should not be rendered (extra unused repeaters)
-    // current opacity equals 0
-    // global opacity equals 0
-    if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
-      renderer.save();
-      elems = currentStyle.elements;
-      if (type === 'st' || type === 'gs') {
-        ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
-        ctx.lineWidth = currentStyle.wi;
-        ctx.lineCap = currentStyle.lc;
-        ctx.lineJoin = currentStyle.lj;
-        ctx.miterLimit = currentStyle.ml || 0;
-      } else {
-        ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
-      }
-      renderer.ctxOpacity(currentStyle.coOp);
-      if (type !== 'st' && type !== 'gs') {
-        ctx.beginPath();
-      }
-      renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
-      jLen = elems.length;
-      for (j = 0; j < jLen; j += 1) {
-        if (type === 'st' || type === 'gs') {
-          ctx.beginPath();
-          if (currentStyle.da) {
-            ctx.setLineDash(currentStyle.da);
-            ctx.lineDashOffset = currentStyle.do;
-          }
-        }
-        nodes = elems[j].trNodes;
-        kLen = nodes.length;
-
-        for (k = 0; k < kLen; k += 1) {
-          if (nodes[k].t === 'm') {
-            ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
-          } else if (nodes[k].t === 'c') {
-            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]);
-          } else {
-            ctx.closePath();
-          }
-        }
-        if (type === 'st' || type === 'gs') {
-          ctx.stroke();
-          if (currentStyle.da) {
-            ctx.setLineDash(this.dashResetter);
-          }
-        }
-      }
-      if (type !== 'st' && type !== 'gs') {
-        ctx.fill(currentStyle.r);
-      }
-      renderer.restore();
-    }
-  }
-};
-
-CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
-  var i;
-  var len = items.length - 1;
-  var groupTransform;
-  groupTransform = parentTransform;
-  for (i = len; i >= 0; i -= 1) {
-    if (items[i].ty === 'tr') {
-      groupTransform = data[i].transform;
-      this.renderShapeTransform(parentTransform, groupTransform);
-    } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
-      this.renderPath(items[i], data[i]);
-    } else if (items[i].ty === 'fl') {
-      this.renderFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'st') {
-      this.renderStroke(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
-      this.renderGradientFill(items[i], data[i], groupTransform);
-    } else if (items[i].ty === 'gr') {
-      this.renderShape(groupTransform, items[i].it, data[i].it);
-    } else if (items[i].ty === 'tm') {
-      //
-    }
-  }
-  if (isMain) {
-    this.drawLayer();
-  }
-};
-
-CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
-  if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
-    var shapeNodes = styledShape.trNodes;
-    var paths = shape.paths;
-    var i;
-    var len;
-    var j;
-    var jLen = paths._length;
-    shapeNodes.length = 0;
-    var groupTransformMat = styledShape.transforms.finalTransform;
-    for (j = 0; j < jLen; j += 1) {
-      var pathNodes = paths.shapes[j];
-      if (pathNodes && pathNodes.v) {
-        len = pathNodes._length;
-        for (i = 1; i < len; i += 1) {
-          if (i === 1) {
-            shapeNodes.push({
-              t: 'm',
-              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-            });
-          }
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]),
-          });
-        }
-        if (len === 1) {
-          shapeNodes.push({
-            t: 'm',
-            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0),
-          });
-        }
-        if (pathNodes.c && len) {
-          shapeNodes.push({
-            t: 'c',
-            pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]),
-          });
-          shapeNodes.push({
-            t: 'z',
-          });
-        }
-      }
-    }
-    styledShape.trNodes = shapeNodes;
-  }
-};
-
-CVShapeElement.prototype.renderPath = function (pathData, itemData) {
-  if (pathData.hd !== true && pathData._shouldRender) {
-    var i;
-    var len = itemData.styledShapes.length;
-    for (i = 0; i < len; i += 1) {
-      this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
-    }
-  }
-};
-
-CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb('
-        + bmFloor(itemData.c.v[0]) + ','
-        + bmFloor(itemData.c.v[1]) + ','
-        + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-};
-
-CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var grd;
-  if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {
-    var ctx = this.globalData.canvasContext;
-    var pt1 = itemData.s.v;
-    var pt2 = itemData.e.v;
-    if (styleData.t === 1) {
-      grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
-    } else {
-      var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
-      var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
-
-      var percent = itemData.h.v;
-      if (percent >= 1) {
-        percent = 0.99;
-      } else if (percent <= -1) {
-        percent = -0.99;
-      }
-      var dist = rad * percent;
-      var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
-      var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
-      grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
-    }
-
-    var i;
-    var len = styleData.g.p;
-    var cValues = itemData.g.c;
-    var opacity = 1;
-
-    for (i = 0; i < len; i += 1) {
-      if (itemData.g._hasOpacity && itemData.g._collapsable) {
-        opacity = itemData.g.o[i * 2 + 1];
-      }
-      grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
-    }
-    styleElem.grd = grd;
-  }
-  styleElem.coOp = itemData.o.v * groupTransform.opacity;
-};
-
-CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
-  var styleElem = itemData.style;
-  var d = itemData.d;
-  if (d && (d._mdf || this._isFirstFrame)) {
-    styleElem.da = d.dashArray;
-    styleElem.do = d.dashoffset[0];
-  }
-  if (itemData.c._mdf || this._isFirstFrame) {
-    styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
-  }
-  if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
-    styleElem.coOp = itemData.o.v * groupTransform.opacity;
-  }
-  if (itemData.w._mdf || this._isFirstFrame) {
-    styleElem.wi = itemData.w.v;
-  }
-};
-
-CVShapeElement.prototype.destroy = function () {
-  this.shapesData = null;
-  this.globalData = null;
-  this.canvasContext = null;
-  this.stylesList.length = 0;
-  this.itemsData.length = 0;
-};
-
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,
-SVGShapeElement, IImageElement */
-
-function CVSolidElement(data, globalData, comp) {
-  this.initElement(data, globalData, comp);
-}
-extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
-
-CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
-CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
-
-CVSolidElement.prototype.renderInnerContent = function () {
-  var ctx = this.canvasContext;
-  ctx.fillStyle = this.data.sc;
-  ctx.fillRect(0, 0, this.data.sw, this.data.sh);
-  //
-};
-
-function CVEffects() {
-
-}
-CVEffects.prototype.renderFrame = function () {};
-
-/* global createTag, AnimationItem */
-/* exported animationManager */
-
-var animationManager = (function () {
-  var moduleOb = {};
-  var registeredAnimations = [];
-  var initTime = 0;
-  var len = 0;
-  var playingAnimationsNum = 0;
-  var _stopped = true;
-  var _isFrozen = false;
-
-  function removeElement(ev) {
-    var i = 0;
-    var animItem = ev.target;
-    while (i < len) {
-      if (registeredAnimations[i].animation === animItem) {
-        registeredAnimations.splice(i, 1);
-        i -= 1;
-        len -= 1;
-        if (!animItem.isPaused) {
-          subtractPlayingCount();
-        }
-      }
-      i += 1;
-    }
-  }
-
-  function registerAnimation(element, animationData) {
-    if (!element) {
-      return null;
-    }
-    var i = 0;
-    while (i < len) {
-      if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {
-        return registeredAnimations[i].animation;
-      }
-      i += 1;
-    }
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, element);
-    animItem.setData(element, animationData);
-    return animItem;
-  }
-
-  function getRegisteredAnimations() {
-    var i;
-    var lenAnims = registeredAnimations.length;
-    var animations = [];
-    for (i = 0; i < lenAnims; i += 1) {
-      animations.push(registeredAnimations[i].animation);
-    }
-    return animations;
-  }
-
-  function addPlayingCount() {
-    playingAnimationsNum += 1;
-    activate();
-  }
-
-  function subtractPlayingCount() {
-    playingAnimationsNum -= 1;
-  }
-
-  function setupAnimation(animItem, element) {
-    animItem.addEventListener('destroy', removeElement);
-    animItem.addEventListener('_active', addPlayingCount);
-    animItem.addEventListener('_idle', subtractPlayingCount);
-    registeredAnimations.push({ elem: element, animation: animItem });
-    len += 1;
-  }
-
-  function loadAnimation(params) {
-    var animItem = new AnimationItem();
-    setupAnimation(animItem, null);
-    animItem.setParams(params);
-    return animItem;
-  }
-
-  function setSpeed(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setSpeed(val, animation);
-    }
-  }
-
-  function setDirection(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setDirection(val, animation);
-    }
-  }
-
-  function play(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.play(animation);
-    }
-  }
-  function resume(nowTime) {
-    var elapsedTime = nowTime - initTime;
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.advanceTime(elapsedTime);
-    }
-    initTime = nowTime;
-    if (playingAnimationsNum && !_isFrozen) {
-      window.requestAnimationFrame(resume);
-    } else {
-      _stopped = true;
-    }
-  }
-
-  function first(nowTime) {
-    initTime = nowTime;
-    window.requestAnimationFrame(resume);
-  }
-
-  function pause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.pause(animation);
-    }
-  }
-
-  function goToAndStop(value, isFrame, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);
-    }
-  }
-
-  function stop(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.stop(animation);
-    }
-  }
-
-  function togglePause(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.togglePause(animation);
-    }
-  }
-
-  function destroy(animation) {
-    var i;
-    for (i = (len - 1); i >= 0; i -= 1) {
-      registeredAnimations[i].animation.destroy(animation);
-    }
-  }
-
-  function searchAnimations(animationData, standalone, renderer) {
-    var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
-      [].slice.call(document.getElementsByClassName('bodymovin')));
-    var i;
-    var lenAnims = animElements.length;
-    for (i = 0; i < lenAnims; i += 1) {
-      if (renderer) {
-        animElements[i].setAttribute('data-bm-type', renderer);
-      }
-      registerAnimation(animElements[i], animationData);
-    }
-    if (standalone && lenAnims === 0) {
-      if (!renderer) {
-        renderer = 'svg';
-      }
-      var body = document.getElementsByTagName('body')[0];
-      body.innerText = '';
-      var div = createTag('div');
-      div.style.width = '100%';
-      div.style.height = '100%';
-      div.setAttribute('data-bm-type', renderer);
-      body.appendChild(div);
-      registerAnimation(div, animationData);
-    }
-  }
-
-  function resize() {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.resize();
-    }
-  }
-
-  function activate() {
-    if (!_isFrozen && playingAnimationsNum) {
-      if (_stopped) {
-        window.requestAnimationFrame(first);
-        _stopped = false;
-      }
-    }
-  }
-
-  function freeze() {
-    _isFrozen = true;
-  }
-
-  function unfreeze() {
-    _isFrozen = false;
-    activate();
-  }
-
-  function setVolume(val, animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.setVolume(val, animation);
-    }
-  }
-
-  function mute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.mute(animation);
-    }
-  }
-
-  function unmute(animation) {
-    var i;
-    for (i = 0; i < len; i += 1) {
-      registeredAnimations[i].animation.unmute(animation);
-    }
-  }
-
-  moduleOb.registerAnimation = registerAnimation;
-  moduleOb.loadAnimation = loadAnimation;
-  moduleOb.setSpeed = setSpeed;
-  moduleOb.setDirection = setDirection;
-  moduleOb.play = play;
-  moduleOb.pause = pause;
-  moduleOb.stop = stop;
-  moduleOb.togglePause = togglePause;
-  moduleOb.searchAnimations = searchAnimations;
-  moduleOb.resize = resize;
-  // moduleOb.start = start;
-  moduleOb.goToAndStop = goToAndStop;
-  moduleOb.destroy = destroy;
-  moduleOb.freeze = freeze;
-  moduleOb.unfreeze = unfreeze;
-  moduleOb.setVolume = setVolume;
-  moduleOb.mute = mute;
-  moduleOb.unmute = unmute;
-  moduleOb.getRegisteredAnimations = getRegisteredAnimations;
-  return moduleOb;
-}());
-
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
-
-var AnimationItem = function () {
-  this._cbs = [];
-  this.name = '';
-  this.path = '';
-  this.isLoaded = false;
-  this.currentFrame = 0;
-  this.currentRawFrame = 0;
-  this.firstFrame = 0;
-  this.totalFrames = 0;
-  this.frameRate = 0;
-  this.frameMult = 0;
-  this.playSpeed = 1;
-  this.playDirection = 1;
-  this.playCount = 0;
-  this.animationData = {};
-  this.assets = [];
-  this.isPaused = true;
-  this.autoplay = false;
-  this.loop = true;
-  this.renderer = null;
-  this.animationID = createElementID();
-  this.assetsPath = '';
-  this.timeCompleted = 0;
-  this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
-  this.segments = [];
-  this._idle = true;
-  this._completedLoop = false;
-  this.projectInterface = ProjectInterface();
-  this.imagePreloader = new ImagePreloader();
-  this.audioController = audioControllerFactory();
-  this.markers = [];
-  this.configAnimation = this.configAnimation.bind(this);
-  this.onSetupError = this.onSetupError.bind(this);
-  this.onSegmentComplete = this.onSegmentComplete.bind(this);
-};
-
-extendPrototype([BaseEvent], AnimationItem);
-
-AnimationItem.prototype.setParams = function (params) {
-  if (params.wrapper || params.container) {
-    this.wrapper = params.wrapper || params.container;
-  }
-  var animType = 'svg';
-  if (params.animType) {
-    animType = params.animType;
-  } else if (params.renderer) {
-    animType = params.renderer;
-  }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
-  this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
-  this.renderer.setProjectInterface(this.projectInterface);
-  this.animType = animType;
-  if (params.loop === ''
-        || params.loop === null
-        || params.loop === undefined
-        || params.loop === true) {
-    this.loop = true;
-  } else if (params.loop === false) {
-    this.loop = false;
-  } else {
-    this.loop = parseInt(params.loop, 10);
-  }
-  this.autoplay = 'autoplay' in params ? params.autoplay : true;
-  this.name = params.name ? params.name : '';
-  this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;
-  this.assetsPath = params.assetsPath;
-  this.initialSegment = params.initialSegment;
-  if (params.audioFactory) {
-    this.audioController.setAudioFactory(params.audioFactory);
-  }
-  if (params.animationData) {
-    this.setupAnimation(params.animationData);
-  } else if (params.path) {
-    if (params.path.lastIndexOf('\\') !== -1) {
-      this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1);
-    } else {
-      this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);
-    }
-    this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);
-    this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));
-    dataManager.loadAnimation(
-      params.path,
-      this.configAnimation,
-      this.onSetupError
-    );
-  }
-};
-
-AnimationItem.prototype.onSetupError = function () {
-  this.trigger('data_failed');
-};
-
-AnimationItem.prototype.setupAnimation = function (data) {
-  dataManager.completeAnimation(
-    data,
-    this.configAnimation
-  );
-};
-
-AnimationItem.prototype.setData = function (wrapper, animationData) {
-  if (animationData) {
-    if (typeof animationData !== 'object') {
-      animationData = JSON.parse(animationData);
-    }
-  }
-  var params = {
-    wrapper: wrapper,
-    animationData: animationData,
-  };
-  var wrapperAttributes = wrapper.attributes;
-
-  params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-animation-path').value
-    : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-path').value
-      : wrapperAttributes.getNamedItem('bm-path')
-        ? wrapperAttributes.getNamedItem('bm-path').value
-        : '';
-  params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-type').value
-    : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-type').value
-      : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary
-        ? wrapperAttributes.getNamedItem('bm-type').value
-        : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary
-          ? wrapperAttributes.getNamedItem('data-bm-renderer').value
-          : wrapperAttributes.getNamedItem('bm-renderer')
-            ? wrapperAttributes.getNamedItem('bm-renderer').value
-            : 'canvas';
-
-  var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-loop').value
-    : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-loop').value
-      : wrapperAttributes.getNamedItem('bm-loop')
-        ? wrapperAttributes.getNamedItem('bm-loop').value
-        : '';
-  if (loop === 'false') {
-    params.loop = false;
-  } else if (loop === 'true') {
-    params.loop = true;
-  } else if (loop !== '') {
-    params.loop = parseInt(loop, 10);
-  }
-  var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value
-    : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-autoplay').value
-      : wrapperAttributes.getNamedItem('bm-autoplay')
-        ? wrapperAttributes.getNamedItem('bm-autoplay').value
-        : true;
-  params.autoplay = autoplay !== 'false';
-
-  params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-name').value
-    : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-name').value
-      : wrapperAttributes.getNamedItem('bm-name')
-        ? wrapperAttributes.getNamedItem('bm-name').value
-        : '';
-  var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary
-    ? wrapperAttributes.getNamedItem('data-anim-prerender').value
-    : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary
-      ? wrapperAttributes.getNamedItem('data-bm-prerender').value
-      : wrapperAttributes.getNamedItem('bm-prerender')
-        ? wrapperAttributes.getNamedItem('bm-prerender').value
-        : '';
-
-  if (prerender === 'false') {
-    params.prerender = false;
-  }
-  this.setParams(params);
-};
-
-AnimationItem.prototype.includeLayers = function (data) {
-  if (data.op > this.animationData.op) {
-    this.animationData.op = data.op;
-    this.totalFrames = Math.floor(data.op - this.animationData.ip);
-  }
-  var layers = this.animationData.layers;
-  var i;
-  var len = layers.length;
-  var newLayers = data.layers;
-  var j;
-  var jLen = newLayers.length;
-  for (j = 0; j < jLen; j += 1) {
-    i = 0;
-    while (i < len) {
-      if (layers[i].id === newLayers[j].id) {
-        layers[i] = newLayers[j];
-        break;
-      }
-      i += 1;
-    }
-  }
-  if (data.chars || data.fonts) {
-    this.renderer.globalData.fontManager.addChars(data.chars);
-    this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
-  }
-  if (data.assets) {
-    len = data.assets.length;
-    for (i = 0; i < len; i += 1) {
-      this.animationData.assets.push(data.assets[i]);
-    }
-  }
-  this.animationData.__complete = false;
-  dataManager.completeAnimation(
-    this.animationData,
-    this.onSegmentComplete
-  );
-};
-
-AnimationItem.prototype.onSegmentComplete = function (data) {
-  this.animationData = data;
-  if (expressionsPlugin) {
-    expressionsPlugin.initExpressions(this);
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.loadNextSegment = function () {
-  var segments = this.animationData.segments;
-  if (!segments || segments.length === 0 || !this.autoloadSegments) {
-    this.trigger('data_ready');
-    this.timeCompleted = this.totalFrames;
-    return;
-  }
-  var segment = segments.shift();
-  this.timeCompleted = segment.time * this.frameRate;
-  var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';
-  this.segmentPos += 1;
-  dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {
-    this.trigger('data_failed');
-  }.bind(this));
-};
-
-AnimationItem.prototype.loadSegments = function () {
-  var segments = this.animationData.segments;
-  if (!segments) {
-    this.timeCompleted = this.totalFrames;
-  }
-  this.loadNextSegment();
-};
-
-AnimationItem.prototype.imagesLoaded = function () {
-  this.trigger('loaded_images');
-  this.checkLoaded();
-};
-
-AnimationItem.prototype.preloadImages = function () {
-  this.imagePreloader.setAssetsPath(this.assetsPath);
-  this.imagePreloader.setPath(this.path);
-  this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
-};
-
-AnimationItem.prototype.configAnimation = function (animData) {
-  if (!this.renderer) {
-    return;
-  }
-  try {
-    this.animationData = animData;
-    if (this.initialSegment) {
-      this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);
-      this.firstFrame = Math.round(this.initialSegment[0]);
-    } else {
-      this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
-      this.firstFrame = Math.round(this.animationData.ip);
-    }
-    this.renderer.configAnimation(animData);
-    if (!animData.assets) {
-      animData.assets = [];
-    }
-
-    this.assets = this.animationData.assets;
-    this.frameRate = this.animationData.fr;
-    this.frameMult = this.animationData.fr / 1000;
-    this.renderer.searchExtraCompositions(animData.assets);
-    this.markers = markerParser(animData.markers || []);
-    this.trigger('config_ready');
-    this.preloadImages();
-    this.loadSegments();
-    this.updaFrameModifier();
-    this.waitForFontsLoaded();
-    if (this.isPaused) {
-      this.audioController.pause();
-    }
-  } catch (error) {
-    this.triggerConfigError(error);
-  }
-};
-
-AnimationItem.prototype.waitForFontsLoaded = function () {
-  if (!this.renderer) {
-    return;
-  }
-  if (this.renderer.globalData.fontManager.isLoaded) {
-    this.checkLoaded();
-  } else {
-    setTimeout(this.waitForFontsLoaded.bind(this), 20);
-  }
-};
-
-AnimationItem.prototype.checkLoaded = function () {
-  if (!this.isLoaded
-        && this.renderer.globalData.fontManager.isLoaded
-        && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas')
-        && (this.imagePreloader.loadedFootages())
-  ) {
-    this.isLoaded = true;
-    if (expressionsPlugin) {
-      expressionsPlugin.initExpressions(this);
-    }
-    this.renderer.initItems();
-    setTimeout(function () {
-      this.trigger('DOMLoaded');
-    }.bind(this), 0);
-    this.gotoFrame();
-    if (this.autoplay) {
-      this.play();
-    }
-  }
-};
-
-AnimationItem.prototype.resize = function () {
-  this.renderer.updateContainerSize();
-};
-
-AnimationItem.prototype.setSubframe = function (flag) {
-  this.isSubframeEnabled = !!flag;
-};
-
-AnimationItem.prototype.gotoFrame = function () {
-  this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise
-
-  if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {
-    this.currentFrame = this.timeCompleted;
-  }
-  this.trigger('enterFrame');
-  this.renderFrame();
-  this.trigger('drawnFrame');
-};
-
-AnimationItem.prototype.renderFrame = function () {
-  if (this.isLoaded === false || !this.renderer) {
-    return;
-  }
-  try {
-    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
-  } catch (error) {
-    this.triggerRenderFrameError(error);
-  }
-};
-
-AnimationItem.prototype.play = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.isPaused = false;
-    this.audioController.resume();
-    if (this._idle) {
-      this._idle = false;
-      this.trigger('_active');
-    }
-  }
-};
-
-AnimationItem.prototype.pause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === false) {
-    this.isPaused = true;
-    this._idle = true;
-    this.trigger('_idle');
-    this.audioController.pause();
-  }
-};
-
-AnimationItem.prototype.togglePause = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  if (this.isPaused === true) {
-    this.play();
-  } else {
-    this.pause();
-  }
-};
-
-AnimationItem.prototype.stop = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.pause();
-  this.playCount = 0;
-  this._completedLoop = false;
-  this.setCurrentRawFrameValue(0);
-};
-
-AnimationItem.prototype.getMarkerData = function (markerName) {
-  var marker;
-  for (var i = 0; i < this.markers.length; i += 1) {
-    marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
-      return marker;
-    }
-  }
-  return null;
-};
-
-AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      this.goToAndStop(marker.time, true);
-    }
-  } else if (isFrame) {
-    this.setCurrentRawFrameValue(value);
-  } else {
-    this.setCurrentRawFrameValue(value * this.frameModifier);
-  }
-  this.pause();
-};
-
-AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  var numValue = Number(value);
-  if (isNaN(numValue)) {
-    var marker = this.getMarkerData(value);
-    if (marker) {
-      if (!marker.duration) {
-        this.goToAndStop(marker.time, true);
-      } else {
-        this.playSegments([marker.time, marker.time + marker.duration], true);
-      }
-    }
-  } else {
-    this.goToAndStop(numValue, isFrame, name);
-  }
-  this.play();
-};
-
-AnimationItem.prototype.advanceTime = function (value) {
-  if (this.isPaused === true || this.isLoaded === false) {
-    return;
-  }
-  var nextValue = this.currentRawFrame + value * this.frameModifier;
-  var _isComplete = false;
-  // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
-  // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
-  if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
-    if (!this.loop || this.playCount === this.loop) {
-      if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {
-        _isComplete = true;
-        nextValue = this.totalFrames - 1;
-      }
-    } else if (nextValue >= this.totalFrames) {
-      this.playCount += 1;
-      if (!this.checkSegments(nextValue % this.totalFrames)) {
-        this.setCurrentRawFrameValue(nextValue % this.totalFrames);
-        this._completedLoop = true;
-        this.trigger('loopComplete');
-      }
-    } else {
-      this.setCurrentRawFrameValue(nextValue);
-    }
-  } else if (nextValue < 0) {
-    if (!this.checkSegments(nextValue % this.totalFrames)) {
-      if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus
-        this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
-        if (!this._completedLoop) {
-          this._completedLoop = true;
-        } else {
-          this.trigger('loopComplete');
-        }
-      } else {
-        _isComplete = true;
-        nextValue = 0;
-      }
-    }
-  } else {
-    this.setCurrentRawFrameValue(nextValue);
-  }
-  if (_isComplete) {
-    this.setCurrentRawFrameValue(nextValue);
-    this.pause();
-    this.trigger('complete');
-  }
-};
-
-AnimationItem.prototype.adjustSegment = function (arr, offset) {
-  this.playCount = 0;
-  if (arr[1] < arr[0]) {
-    if (this.frameModifier > 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(-1);
-      }
-    }
-    this.totalFrames = arr[0] - arr[1];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[1];
-    this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
-  } else if (arr[1] > arr[0]) {
-    if (this.frameModifier < 0) {
-      if (this.playSpeed < 0) {
-        this.setSpeed(-this.playSpeed);
-      } else {
-        this.setDirection(1);
-      }
-    }
-    this.totalFrames = arr[1] - arr[0];
-    this.timeCompleted = this.totalFrames;
-    this.firstFrame = arr[0];
-    this.setCurrentRawFrameValue(0.001 + offset);
-  }
-  this.trigger('segmentStart');
-};
-AnimationItem.prototype.setSegment = function (init, end) {
-  var pendingFrame = -1;
-  if (this.isPaused) {
-    if (this.currentRawFrame + this.firstFrame < init) {
-      pendingFrame = init;
-    } else if (this.currentRawFrame + this.firstFrame > end) {
-      pendingFrame = end - init;
-    }
-  }
-
-  this.firstFrame = init;
-  this.totalFrames = end - init;
-  this.timeCompleted = this.totalFrames;
-  if (pendingFrame !== -1) {
-    this.goToAndStop(pendingFrame, true);
-  }
-};
-
-AnimationItem.prototype.playSegments = function (arr, forceFlag) {
-  if (forceFlag) {
-    this.segments.length = 0;
-  }
-  if (typeof arr[0] === 'object') {
-    var i;
-    var len = arr.length;
-    for (i = 0; i < len; i += 1) {
-      this.segments.push(arr[i]);
-    }
-  } else {
-    this.segments.push(arr);
-  }
-  if (this.segments.length && forceFlag) {
-    this.adjustSegment(this.segments.shift(), 0);
-  }
-  if (this.isPaused) {
-    this.play();
-  }
-};
-
-AnimationItem.prototype.resetSegments = function (forceFlag) {
-  this.segments.length = 0;
-  this.segments.push([this.animationData.ip, this.animationData.op]);
-  if (forceFlag) {
-    this.checkSegments(0);
-  }
-};
-AnimationItem.prototype.checkSegments = function (offset) {
-  if (this.segments.length) {
-    this.adjustSegment(this.segments.shift(), offset);
-    return true;
-  }
-  return false;
-};
-
-AnimationItem.prototype.destroy = function (name) {
-  if ((name && this.name !== name) || !this.renderer) {
-    return;
-  }
-  this.renderer.destroy();
-  this.imagePreloader.destroy();
-  this.trigger('destroy');
-  this._cbs = null;
-  this.onEnterFrame = null;
-  this.onLoopComplete = null;
-  this.onComplete = null;
-  this.onSegmentStart = null;
-  this.onDestroy = null;
-  this.renderer = null;
-  this.renderer = null;
-  this.imagePreloader = null;
-  this.projectInterface = null;
-};
-
-AnimationItem.prototype.setCurrentRawFrameValue = function (value) {
-  this.currentRawFrame = value;
-  this.gotoFrame();
-};
-
-AnimationItem.prototype.setSpeed = function (val) {
-  this.playSpeed = val;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setDirection = function (val) {
-  this.playDirection = val < 0 ? -1 : 1;
-  this.updaFrameModifier();
-};
-
-AnimationItem.prototype.setVolume = function (val, name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.setVolume(val);
-};
-
-AnimationItem.prototype.getVolume = function () {
-  return this.audioController.getVolume();
-};
-
-AnimationItem.prototype.mute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.mute();
-};
-
-AnimationItem.prototype.unmute = function (name) {
-  if (name && this.name !== name) {
-    return;
-  }
-  this.audioController.unmute();
-};
-
-AnimationItem.prototype.updaFrameModifier = function () {
-  this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
-  this.audioController.setRate(this.playSpeed * this.playDirection);
-};
-
-AnimationItem.prototype.getPath = function () {
-  return this.path;
-};
-
-AnimationItem.prototype.getAssetsPath = function (assetData) {
-  var path = '';
-  if (assetData.e) {
-    path = assetData.p;
-  } else if (this.assetsPath) {
-    var imagePath = assetData.p;
-    if (imagePath.indexOf('images/') !== -1) {
-      imagePath = imagePath.split('/')[1];
-    }
-    path = this.assetsPath + imagePath;
-  } else {
-    path = this.path;
-    path += assetData.u ? assetData.u : '';
-    path += assetData.p;
-  }
-  return path;
-};
-
-AnimationItem.prototype.getAssetData = function (id) {
-  var i = 0;
-  var len = this.assets.length;
-  while (i < len) {
-    if (id === this.assets[i].id) {
-      return this.assets[i];
-    }
-    i += 1;
-  }
-  return null;
-};
-
-AnimationItem.prototype.hide = function () {
-  this.renderer.hide();
-};
-
-AnimationItem.prototype.show = function () {
-  this.renderer.show();
-};
-
-AnimationItem.prototype.getDuration = function (isFrame) {
-  return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
-};
-
-AnimationItem.prototype.trigger = function (name) {
-  if (this._cbs && this._cbs[name]) {
-    switch (name) {
-      case 'enterFrame':
-      case 'drawnFrame':
-        this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));
-        break;
-      case 'loopComplete':
-        this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-        break;
-      case 'complete':
-        this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));
-        break;
-      case 'segmentStart':
-        this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-        break;
-      case 'destroy':
-        this.triggerEvent(name, new BMDestroyEvent(name, this));
-        break;
-      default:
-        this.triggerEvent(name);
-    }
-  }
-  if (name === 'enterFrame' && this.onEnterFrame) {
-    this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));
-  }
-  if (name === 'loopComplete' && this.onLoopComplete) {
-    this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));
-  }
-  if (name === 'complete' && this.onComplete) {
-    this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));
-  }
-  if (name === 'segmentStart' && this.onSegmentStart) {
-    this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));
-  }
-  if (name === 'destroy' && this.onDestroy) {
-    this.onDestroy.call(this, new BMDestroyEvent(name, this));
-  }
-};
-
-AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {
-  var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-AnimationItem.prototype.triggerConfigError = function (nativeError) {
-  var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
-  this.triggerEvent('error', error);
-
-  if (this.onError) {
-    this.onError.call(this, error);
-  }
-};
-
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
-
-var Expressions = (function () {
-  var ob = {};
-  ob.initExpressions = initExpressions;
-
-  function initExpressions(animation) {
-    var stackCount = 0;
-    var registers = [];
-
-    function pushExpression() {
-      stackCount += 1;
-    }
-
-    function popExpression() {
-      stackCount -= 1;
-      if (stackCount === 0) {
-        releaseInstances();
-      }
-    }
-
-    function registerExpressionProperty(expression) {
-      if (registers.indexOf(expression) === -1) {
-        registers.push(expression);
-      }
-    }
-
-    function releaseInstances() {
-      var i;
-      var len = registers.length;
-      for (i = 0; i < len; i += 1) {
-        registers[i].release();
-      }
-      registers.length = 0;
-    }
-
-    animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-    animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
-    animation.renderer.globalData.pushExpression = pushExpression;
-    animation.renderer.globalData.popExpression = popExpression;
-    animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
-  }
-  return ob;
-}());
-
-expressionsPlugin = Expressions;
-
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
-
-var ExpressionManager = (function () {
-  'use strict';
-
-  var ob = {};
-  var Math = BMMath;
-  var window = null;
-  var document = null;
-  var XMLHttpRequest = null;
-  var fetch = null;
-  var frames = null;
-
-  function $bm_isInstanceOfArray(arr) {
-    return arr.constructor === Array || arr.constructor === Float32Array;
-  }
-
-  function isNumerable(tOfV, v) {
-    return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
-  }
-
-  function $bm_neg(a) {
-    var tOfA = typeof a;
-    if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
-      return -a;
-    }
-    if ($bm_isInstanceOfArray(a)) {
-      var i;
-      var lenA = a.length;
-      var retArr = [];
-      for (i = 0; i < lenA; i += 1) {
-        retArr[i] = -a[i];
-      }
-      return retArr;
-    }
-    if (a.propType) {
-      return a.v;
-    }
-    return -a;
-  }
-
-  var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
-  var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
-  var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
-
-  function sum(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (tOfA === 'string' || tOfB === 'string') {
-      return a + b;
-    }
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a + b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] += b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a + b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] + b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-  var add = sum;
-
-  function sub(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      if (tOfA === 'string') {
-        a = parseInt(a, 10);
-      }
-      if (tOfB === 'string') {
-        b = parseInt(b, 10);
-      }
-      return a - b;
-    }
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      a = a.slice(0);
-      a[0] -= b;
-      return a;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      b = b.slice(0);
-      b[0] = a - b[0];
-      return b;
-    }
-    if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
-      var i = 0;
-      var lenA = a.length;
-      var lenB = b.length;
-      var retArr = [];
-      while (i < lenA || i < lenB) {
-        if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
-          retArr[i] = a[i] - b[i];
-        } else {
-          retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
-        }
-        i += 1;
-      }
-      return retArr;
-    }
-    return 0;
-  }
-
-  function mul(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a * b;
-    }
-
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] * b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a * b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-
-  function div(a, b) {
-    var tOfA = typeof a;
-    var tOfB = typeof b;
-    var arr;
-    if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
-      return a / b;
-    }
-    var i;
-    var len;
-    if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
-      len = a.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a[i] / b;
-      }
-      return arr;
-    }
-    if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
-      len = b.length;
-      arr = createTypedArray('float32', len);
-      for (i = 0; i < len; i += 1) {
-        arr[i] = a / b[i];
-      }
-      return arr;
-    }
-    return 0;
-  }
-  function mod(a, b) {
-    if (typeof a === 'string') {
-      a = parseInt(a, 10);
-    }
-    if (typeof b === 'string') {
-      b = parseInt(b, 10);
-    }
-    return a % b;
-  }
-  var $bm_sum = sum;
-  var $bm_sub = sub;
-  var $bm_mul = mul;
-  var $bm_div = div;
-  var $bm_mod = mod;
-
-  function clamp(num, min, max) {
-    if (min > max) {
-      var mm = max;
-      max = min;
-      min = mm;
-    }
-    return Math.min(Math.max(num, min), max);
-  }
-
-  function radiansToDegrees(val) {
-    return val / degToRads;
-  }
-  var radians_to_degrees = radiansToDegrees;
-
-  function degreesToRadians(val) {
-    return val * degToRads;
-  }
-  var degrees_to_radians = radiansToDegrees;
-
-  var helperLengthArray = [0, 0, 0, 0, 0, 0];
-
-  function length(arr1, arr2) {
-    if (typeof arr1 === 'number' || arr1 instanceof Number) {
-      arr2 = arr2 || 0;
-      return Math.abs(arr1 - arr2);
-    }
-    if (!arr2) {
-      arr2 = helperLengthArray;
-    }
-    var i;
-    var len = Math.min(arr1.length, arr2.length);
-    var addedLength = 0;
-    for (i = 0; i < len; i += 1) {
-      addedLength += Math.pow(arr2[i] - arr1[i], 2);
-    }
-    return Math.sqrt(addedLength);
-  }
-
-  function normalize(vec) {
-    return div(vec, length(vec));
-  }
-
-  function rgbToHsl(val) {
-    var r = val[0]; var g = val[1]; var b = val[2];
-    var max = Math.max(r, g, b);
-    var min = Math.min(r, g, b);
-    var h;
-    var s;
-    var l = (max + min) / 2;
-
-    if (max === min) {
-      h = 0; // achromatic
-      s = 0; // achromatic
-    } else {
-      var d = max - min;
-      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
-      switch (max) {
-        case r: h = (g - b) / d + (g < b ? 6 : 0); break;
-        case g: h = (b - r) / d + 2; break;
-        case b: h = (r - g) / d + 4; break;
-        default: break;
-      }
-      h /= 6;
-    }
-
-    return [h, s, l, val[3]];
-  }
-
-  function hue2rgb(p, q, t) {
-    if (t < 0) t += 1;
-    if (t > 1) t -= 1;
-    if (t < 1 / 6) return p + (q - p) * 6 * t;
-    if (t < 1 / 2) return q;
-    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
-    return p;
-  }
-
-  function hslToRgb(val) {
-    var h = val[0];
-    var s = val[1];
-    var l = val[2];
-
-    var r;
-    var g;
-    var b;
-
-    if (s === 0) {
-      r = l; // achromatic
-      b = l; // achromatic
-      g = l; // achromatic
-    } else {
-      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-      var p = 2 * l - q;
-      r = hue2rgb(p, q, h + 1 / 3);
-      g = hue2rgb(p, q, h);
-      b = hue2rgb(p, q, h - 1 / 3);
-    }
-
-    return [r, g, b, val[3]];
-  }
-
-  function linear(t, tMin, tMax, value1, value2) {
-    if (value1 === undefined || value2 === undefined) {
-      value1 = tMin;
-      value2 = tMax;
-      tMin = 0;
-      tMax = 1;
-    }
-    if (tMax < tMin) {
-      var _tMin = tMax;
-      tMax = tMin;
-      tMin = _tMin;
-    }
-    if (t <= tMin) {
-      return value1;
-    } if (t >= tMax) {
-      return value2;
-    }
-    var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
-    if (!value1.length) {
-      return value1 + (value2 - value1) * perc;
-    }
-    var i;
-    var len = value1.length;
-    var arr = createTypedArray('float32', len);
-    for (i = 0; i < len; i += 1) {
-      arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
-    }
-    return arr;
-  }
-  function random(min, max) {
-    if (max === undefined) {
-      if (min === undefined) {
-        min = 0;
-        max = 1;
-      } else {
-        max = min;
-        min = undefined;
-      }
-    }
-    if (max.length) {
-      var i;
-      var len = max.length;
-      if (!min) {
-        min = createTypedArray('float32', len);
-      }
-      var arr = createTypedArray('float32', len);
-      var rnd = BMMath.random();
-      for (i = 0; i < len; i += 1) {
-        arr[i] = min[i] + rnd * (max[i] - min[i]);
-      }
-      return arr;
-    }
-    if (min === undefined) {
-      min = 0;
-    }
-    var rndm = BMMath.random();
-    return min + rndm * (max - min);
-  }
-
-  function createPath(points, inTangents, outTangents, closed) {
-    var i;
-    var len = points.length;
-    var path = shapePool.newElement();
-    path.setPathData(!!closed, len);
-    var arrPlaceholder = [0, 0];
-    var inVertexPoint;
-    var outVertexPoint;
-    for (i = 0; i < len; i += 1) {
-      inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
-      outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
-      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);
-    }
-    return path;
-  }
-
-  function initiateExpression(elem, data, property) {
-    var val = data.x;
-    var needsVelocity = /velocity(?![\w\d])/.test(val);
-    var _needsRandom = val.indexOf('random') !== -1;
-    var elemType = elem.data.ty;
-    var transform;
-    var $bm_transform;
-    var content;
-    var effect;
-    var thisProperty = property;
-    thisProperty.valueAtTime = thisProperty.getValueAtTime;
-    Object.defineProperty(thisProperty, 'value', {
-      get: function () {
-        return thisProperty.v;
-      },
-    });
-    elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
-    elem.comp.displayStartTime = 0;
-    var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    var outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    var width = elem.data.sw ? elem.data.sw : 0;
-    var height = elem.data.sh ? elem.data.sh : 0;
-    var name = elem.data.nm;
-    var loopIn;
-    var loop_in;
-    var loopOut;
-    var loop_out;
-    var smooth;
-    var toWorld;
-    var fromWorld;
-    var fromComp;
-    var toComp;
-    var fromCompToSurface;
-    var position;
-    var rotation;
-    var anchorPoint;
-    var scale;
-    var thisLayer;
-    var thisComp;
-    var mask;
-    var valueAtTime;
-    var velocityAtTime;
-
-    var scoped_bm_rt;
-    // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
-    var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
-    var numKeys = property.kf ? data.k.length : 0;
-
-    var active = !this.data || this.data.hd !== true;
-
-    var wiggle = function wiggle(freq, amp) {
-      var iWiggle;
-      var j;
-      var lenWiggle = this.pv.length ? this.pv.length : 1;
-      var addedAmps = createTypedArray('float32', lenWiggle);
-      freq = 5;
-      var iterations = Math.floor(time * freq);
-      iWiggle = 0;
-      j = 0;
-      while (iWiggle < iterations) {
-        // var rnd = BMMath.random();
-        for (j = 0; j < lenWiggle; j += 1) {
-          addedAmps[j] += -amp + amp * 2 * BMMath.random();
-          // addedAmps[j] += -amp + amp*2*rnd;
-        }
-        iWiggle += 1;
-      }
-      // var rnd2 = BMMath.random();
-      var periods = time * freq;
-      var perc = periods - Math.floor(periods);
-      var arr = createTypedArray('float32', lenWiggle);
-      if (lenWiggle > 1) {
-        for (j = 0; j < lenWiggle; j += 1) {
-          arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc;
-          // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
-          // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
-        }
-        return arr;
-      }
-      return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
-    }.bind(this);
-
-    if (thisProperty.loopIn) {
-      loopIn = thisProperty.loopIn.bind(thisProperty);
-      loop_in = loopIn;
-    }
-
-    if (thisProperty.loopOut) {
-      loopOut = thisProperty.loopOut.bind(thisProperty);
-      loop_out = loopOut;
-    }
-
-    if (thisProperty.smooth) {
-      smooth = thisProperty.smooth.bind(thisProperty);
-    }
-
-    function loopInDuration(type, duration) {
-      return loopIn(type, duration, true);
-    }
-
-    function loopOutDuration(type, duration) {
-      return loopOut(type, duration, true);
-    }
-
-    if (this.getValueAtTime) {
-      valueAtTime = this.getValueAtTime.bind(this);
-    }
-
-    if (this.getVelocityAtTime) {
-      velocityAtTime = this.getVelocityAtTime.bind(this);
-    }
-
-    var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
-
-    function lookAt(elem1, elem2) {
-      var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
-      var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
-      var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
-      return [yaw, pitch, 0];
-    }
-
-    function easeOut(t, tMin, tMax, val1, val2) {
-      return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function easeIn(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInBez, t, tMin, tMax, val1, val2);
-    }
-
-    function ease(t, tMin, tMax, val1, val2) {
-      return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
-    }
-
-    function applyEase(fn, t, tMin, tMax, val1, val2) {
-      if (val1 === undefined) {
-        val1 = tMin;
-        val2 = tMax;
-      } else {
-        t = (t - tMin) / (tMax - tMin);
-      }
-      if (t > 1) {
-        t = 1;
-      } else if (t < 0) {
-        t = 0;
-      }
-      var mult = fn(t);
-      if ($bm_isInstanceOfArray(val1)) {
-        var iKey;
-        var lenKey = val1.length;
-        var arr = createTypedArray('float32', lenKey);
-        for (iKey = 0; iKey < lenKey; iKey += 1) {
-          arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
-        }
-        return arr;
-      }
-      return (val2 - val1) * mult + val1;
-    }
-
-    function nearestKey(time) {
-      var iKey;
-      var lenKey = data.k.length;
-      var index;
-      var keyTime;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        index = 0;
-        keyTime = 0;
-      } else {
-        index = -1;
-        time *= elem.comp.globalData.frameRate;
-        if (time < data.k[0].t) {
-          index = 1;
-          keyTime = data.k[0].t;
-        } else {
-          for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
-            if (time === data.k[iKey].t) {
-              index = iKey + 1;
-              keyTime = data.k[iKey].t;
-              break;
-            } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
-              if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
-                index = iKey + 2;
-                keyTime = data.k[iKey + 1].t;
-              } else {
-                index = iKey + 1;
-                keyTime = data.k[iKey].t;
-              }
-              break;
-            }
-          }
-          if (index === -1) {
-            index = iKey + 1;
-            keyTime = data.k[iKey].t;
-          }
-        }
-      }
-      var obKey = {};
-      obKey.index = index;
-      obKey.time = keyTime / elem.comp.globalData.frameRate;
-      return obKey;
-    }
-
-    function key(ind) {
-      var obKey;
-      var iKey;
-      var lenKey;
-      if (!data.k.length || typeof (data.k[0]) === 'number') {
-        throw new Error('The property has no keyframe at index ' + ind);
-      }
-      ind -= 1;
-      obKey = {
-        time: data.k[ind].t / elem.comp.globalData.frameRate,
-        value: [],
-      };
-      var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
-
-      lenKey = arr.length;
-      for (iKey = 0; iKey < lenKey; iKey += 1) {
-        obKey[iKey] = arr[iKey];
-        obKey.value[iKey] = arr[iKey];
-      }
-      return obKey;
-    }
-
-    function framesToTime(fr, fps) {
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return fr / fps;
-    }
-
-    function timeToFrames(t, fps) {
-      if (!t && t !== 0) {
-        t = time;
-      }
-      if (!fps) {
-        fps = elem.comp.globalData.frameRate;
-      }
-      return t * fps;
-    }
-
-    function seedRandom(seed) {
-      BMMath.seedrandom(randSeed + seed);
-    }
-
-    function sourceRectAtTime() {
-      return elem.sourceRectAtTime();
-    }
-
-    function substring(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substring(init);
-        }
-        return value.substring(init, end);
-      }
-      return '';
-    }
-
-    function substr(init, end) {
-      if (typeof value === 'string') {
-        if (end === undefined) {
-          return value.substr(init);
-        }
-        return value.substr(init, end);
-      }
-      return '';
-    }
-
-    function posterizeTime(framesPerSecond) {
-      time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
-      value = valueAtTime(time);
-    }
-
-    var time;
-    var velocity;
-    var value;
-    var text;
-    var textIndex;
-    var textTotal;
-    var selectorValue;
-    var index = elem.data.ind;
-    var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-    var parent;
-    var randSeed = Math.floor(Math.random() * 1000000);
-    var globalData = elem.globalData;
-    function executeExpression(_value) {
-      // globalData.pushExpression();
-      value = _value;
-      if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
-        return value;
-      }
-      if (this.propType === 'textSelector') {
-        textIndex = this.textIndex;
-        textTotal = this.textTotal;
-        selectorValue = this.selectorValue;
-      }
-      if (!thisLayer) {
-        text = elem.layerInterface.text;
-        thisLayer = elem.layerInterface;
-        thisComp = elem.comp.compInterface;
-        toWorld = thisLayer.toWorld.bind(thisLayer);
-        fromWorld = thisLayer.fromWorld.bind(thisLayer);
-        fromComp = thisLayer.fromComp.bind(thisLayer);
-        toComp = thisLayer.toComp.bind(thisLayer);
-        mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
-        fromCompToSurface = fromComp;
-      }
-      if (!transform) {
-        transform = elem.layerInterface('ADBE Transform Group');
-        $bm_transform = transform;
-        if (transform) {
-          anchorPoint = transform.anchorPoint;
-          /* position = transform.position;
-                    rotation = transform.rotation;
-                    scale = transform.scale; */
-        }
-      }
-
-      if (elemType === 4 && !content) {
-        content = thisLayer('ADBE Root Vectors Group');
-      }
-      if (!effect) {
-        effect = thisLayer(4);
-      }
-      hasParent = !!(elem.hierarchy && elem.hierarchy.length);
-      if (hasParent && !parent) {
-        parent = elem.hierarchy[0].layerInterface;
-      }
-      time = this.comp.renderedFrame / this.comp.globalData.frameRate;
-      if (_needsRandom) {
-        seedRandom(randSeed + time);
-      }
-      if (needsVelocity) {
-        velocity = velocityAtTime(time);
-      }
-      expression_function();
-      this.frameExpressionId = elem.globalData.frameId;
-
-      // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
-      return scoped_bm_rt;
-    }
-    return executeExpression;
-  }
-
-  ob.initiateExpression = initiateExpression;
-  return ob;
-}());
-
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
-
-var expressionHelpers = (function () {
-  function searchExpressions(elem, data, prop) {
-    if (data.x) {
-      prop.k = true;
-      prop.x = true;
-      prop.initiateExpression = ExpressionManager.initiateExpression;
-      prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
-    }
-  }
-
-  function getValueAtTime(frameNum) {
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastFrame) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
-      this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
-      this._cachingAtTime.lastFrame = frameNum;
-    }
-    return this._cachingAtTime.value;
-  }
-
-  function getSpeedAtTime(frameNum) {
-    var delta = -0.01;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var speed = 0;
-    if (v1.length) {
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        speed += Math.pow(v2[i] - v1[i], 2);
-      }
-      speed = Math.sqrt(speed) * 100;
-    } else {
-      speed = 0;
-    }
-    return speed;
-  }
-
-  function getVelocityAtTime(frameNum) {
-    if (this.vel !== undefined) {
-      return this.vel;
-    }
-    var delta = -0.001;
-    // frameNum += this.elem.data.st;
-    var v1 = this.getValueAtTime(frameNum);
-    var v2 = this.getValueAtTime(frameNum + delta);
-    var velocity;
-    if (v1.length) {
-      velocity = createTypedArray('float32', v1.length);
-      var i;
-      for (i = 0; i < v1.length; i += 1) {
-        // removing frameRate
-        // if needed, don't add it here
-        // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
-        velocity[i] = (v2[i] - v1[i]) / delta;
-      }
-    } else {
-      velocity = (v2 - v1) / delta;
-    }
-    return velocity;
-  }
-
-  function getStaticValueAtTime() {
-    return this.pv;
-  }
-
-  function setGroupProperty(propertyGroup) {
-    this.propertyGroup = propertyGroup;
-  }
-
-  return {
-    searchExpressions: searchExpressions,
-    getSpeedAtTime: getSpeedAtTime,
-    getVelocityAtTime: getVelocityAtTime,
-    getValueAtTime: getValueAtTime,
-    getStaticValueAtTime: getStaticValueAtTime,
-    setGroupProperty: setGroupProperty,
-  };
-}());
-
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
-
-(function addPropertyDecorator() {
-  function loopOut(type, duration, durationFlag) {
-    if (!this.k || !this.keyframes) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var lastKeyFrame = keyframes[keyframes.length - 1].t;
-    if (currentFrame <= lastKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var firstKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
-      } else {
-        cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
-      }
-      firstKeyFrame = lastKeyFrame - cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (iterations % 2 !== 0) {
-          return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = (endV[i] - initV[i]) * repeats + current[i];
-        }
-        return ret;
-      }
-      return (endV - initV) * repeats + current;
-    } else if (type === 'continue') {
-      var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(lastValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
-        }
-        return ret;
-      }
-      return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001);
-    }
-      return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function loopIn(type, duration, durationFlag) {
-    if (!this.k) {
-      return this.pv;
-    }
-    type = type ? type.toLowerCase() : '';
-    var currentFrame = this.comp.renderedFrame;
-    var keyframes = this.keyframes;
-    var firstKeyFrame = keyframes[0].t;
-    if (currentFrame >= firstKeyFrame) {
-      return this.pv;
-    }
-    var cycleDuration;
-    var lastKeyFrame;
-    if (!durationFlag) {
-      if (!duration || duration > keyframes.length - 1) {
-        duration = keyframes.length - 1;
-      }
-      lastKeyFrame = keyframes[duration].t;
-      cycleDuration = lastKeyFrame - firstKeyFrame;
-    } else {
-      if (!duration) {
-        cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
-      } else {
-        cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
-      }
-      lastKeyFrame = firstKeyFrame + cycleDuration;
-    }
-    var i;
-    var len;
-    var ret;
-    if (type === 'pingpong') {
-      var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
-      if (iterations % 2 === 0) {
-          return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-      }
-    } else if (type === 'offset') {
-      var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
-      var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0);
-      var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
-      if (this.pv.length) {
-        ret = new Array(initV.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
-        }
-        return ret;
-      }
-      return current - (endV - initV) * repeats;
-    } else if (type === 'continue') {
-      var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
-      var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
-      if (this.pv.length) {
-        ret = new Array(firstValue.length);
-        len = ret.length;
-        for (i = 0; i < len; i += 1) {
-          ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001;
-        }
-        return ret;
-      }
-      return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001;
-    }
-      return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line
-
-  }
-
-  function smooth(width, samples) {
-    if (!this.k) {
-      return this.pv;
-    }
-    width = (width || 0.4) * 0.5;
-    samples = Math.floor(samples || 5);
-    if (samples <= 1) {
-      return this.pv;
-    }
-    var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
-    var initFrame = currentTime - width;
-    var endFrame = currentTime + width;
-    var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
-    var i = 0;
-    var j = 0;
-    var value;
-    if (this.pv.length) {
-      value = createTypedArray('float32', this.pv.length);
-    } else {
-      value = 0;
-    }
-    var sampleValue;
-    while (i < samples) {
-      sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
-      if (this.pv.length) {
-        for (j = 0; j < this.pv.length; j += 1) {
-          value[j] += sampleValue[j];
-        }
-      } else {
-        value += sampleValue;
-      }
-      i += 1;
-    }
-    if (this.pv.length) {
-      for (j = 0; j < this.pv.length; j += 1) {
-        value[j] /= samples;
-      }
-    } else {
-      value /= samples;
-    }
-    return value;
-  }
-
-  function getTransformValueAtTime(time) {
-    if (!this._transformCachingAtTime) {
-      this._transformCachingAtTime = {
-        v: new Matrix(),
-      };
-    }
-    /// /
-    var matrix = this._transformCachingAtTime.v;
-    matrix.cloneFromProps(this.pre.props);
-    if (this.appliedTransformations < 1) {
-      var anchor = this.a.getValueAtTime(time);
-      matrix.translate(
-        -anchor[0] * this.a.mult,
-        -anchor[1] * this.a.mult,
-        anchor[2] * this.a.mult
-      );
-    }
-    if (this.appliedTransformations < 2) {
-      var scale = this.s.getValueAtTime(time);
-      matrix.scale(
-        scale[0] * this.s.mult,
-        scale[1] * this.s.mult,
-        scale[2] * this.s.mult
-      );
-    }
-    if (this.sk && this.appliedTransformations < 3) {
-      var skew = this.sk.getValueAtTime(time);
-      var skewAxis = this.sa.getValueAtTime(time);
-      matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
-    }
-    if (this.r && this.appliedTransformations < 4) {
-      var rotation = this.r.getValueAtTime(time);
-      matrix.rotate(-rotation * this.r.mult);
-    } else if (!this.r && this.appliedTransformations < 4) {
-      var rotationZ = this.rz.getValueAtTime(time);
-      var rotationY = this.ry.getValueAtTime(time);
-      var rotationX = this.rx.getValueAtTime(time);
-      var orientation = this.or.getValueAtTime(time);
-      matrix.rotateZ(-rotationZ * this.rz.mult)
-        .rotateY(rotationY * this.ry.mult)
-        .rotateX(rotationX * this.rx.mult)
-        .rotateZ(-orientation[2] * this.or.mult)
-        .rotateY(orientation[1] * this.or.mult)
-        .rotateX(orientation[0] * this.or.mult);
-    }
-    if (this.data.p && this.data.p.s) {
-      var positionX = this.px.getValueAtTime(time);
-      var positionY = this.py.getValueAtTime(time);
-      if (this.data.p.z) {
-        var positionZ = this.pz.getValueAtTime(time);
-        matrix.translate(
-          positionX * this.px.mult,
-          positionY * this.py.mult,
-          -positionZ * this.pz.mult
-        );
-      } else {
-        matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
-      }
-    } else {
-      var position = this.p.getValueAtTime(time);
-      matrix.translate(
-        position[0] * this.p.mult,
-        position[1] * this.p.mult,
-        -position[2] * this.p.mult
-      );
-    }
-    return matrix;
-    /// /
-  }
-
-  function getTransformStaticValueAtTime() {
-    return this.v.clone(new Matrix());
-  }
-
-  var getTransformProperty = TransformPropertyFactory.getTransformProperty;
-  TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
-    var prop = getTransformProperty(elem, data, container);
-    if (prop.dynamicProperties.length) {
-      prop.getValueAtTime = getTransformValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    return prop;
-  };
-
-  var propertyGetProp = PropertyFactory.getProp;
-  PropertyFactory.getProp = function (elem, data, type, mult, container) {
-    var prop = propertyGetProp(elem, data, type, mult, container);
-    // prop.getVelocityAtTime = getVelocityAtTime;
-    // prop.loopOut = loopOut;
-    // prop.loopIn = loopIn;
-    if (prop.kf) {
-      prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
-    } else {
-      prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
-    }
-    prop.setGroupProperty = expressionHelpers.setGroupProperty;
-    prop.loopOut = loopOut;
-    prop.loopIn = loopIn;
-    prop.smooth = smooth;
-    prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
-    prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
-    prop.numKeys = data.a === 1 ? data.k.length : 0;
-    prop.propertyIndex = data.ix;
-    var value = 0;
-    if (type !== 0) {
-      value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
-    }
-    prop._cachingAtTime = {
-      lastFrame: initialDefaultFrame,
-      lastIndex: 0,
-      value: value,
-    };
-    expressionHelpers.searchExpressions(elem, data, prop);
-    if (prop.k) {
-      container.addDynamicProperty(prop);
-    }
-
-    return prop;
-  };
-
-  function getShapeValueAtTime(frameNum) {
-    // For now this caching object is created only when needed instead of creating it when the shape is initialized.
-    if (!this._cachingAtTime) {
-      this._cachingAtTime = {
-        shapeValue: shapePool.clone(this.pv),
-        lastIndex: 0,
-        lastTime: initialDefaultFrame,
-      };
-    }
-
-    frameNum *= this.elem.globalData.frameRate;
-    frameNum -= this.offsetTime;
-    if (frameNum !== this._cachingAtTime.lastTime) {
-      this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
-      this._cachingAtTime.lastTime = frameNum;
-      this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
-    }
-    return this._cachingAtTime.shapeValue;
-  }
-
-  var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
-  var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
-
-  function ShapeExpressions() {}
-  ShapeExpressions.prototype = {
-    vertices: function (prop, time) {
-      if (this.k) {
-        this.getValue();
-      }
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      var i;
-      var len = shapePath._length;
-      var vertices = shapePath[prop];
-      var points = shapePath.v;
-      var arr = createSizedArray(len);
-      for (i = 0; i < len; i += 1) {
-        if (prop === 'i' || prop === 'o') {
-          arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
-        } else {
-          arr[i] = [vertices[i][0], vertices[i][1]];
-        }
-      }
-      return arr;
-    },
-    points: function (time) {
-      return this.vertices('v', time);
-    },
-    inTangents: function (time) {
-      return this.vertices('i', time);
-    },
-    outTangents: function (time) {
-      return this.vertices('o', time);
-    },
-    isClosed: function () {
-      return this.v.c;
-    },
-    pointOnPath: function (perc, time) {
-      var shapePath = this.v;
-      if (time !== undefined) {
-        shapePath = this.getValueAtTime(time, 0);
-      }
-      if (!this._segmentsLength) {
-        this._segmentsLength = bez.getSegmentsLength(shapePath);
-      }
-
-      var segmentsLength = this._segmentsLength;
-      var lengths = segmentsLength.lengths;
-      var lengthPos = segmentsLength.totalLength * perc;
-      var i = 0;
-      var len = lengths.length;
-      var accumulatedLength = 0;
-      var pt;
-      while (i < len) {
-        if (accumulatedLength + lengths[i].addedLength > lengthPos) {
-          var initIndex = i;
-          var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
-          var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
-          pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
-          break;
-        } else {
-          accumulatedLength += lengths[i].addedLength;
-        }
-        i += 1;
-      }
-      if (!pt) {
-        pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
-      }
-      return pt;
-    },
-    vectorOnPath: function (perc, time, vectorType) {
-      // perc doesn't use triple equality because it can be a Number object as well as a primitive.
-      if (perc == 1) { // eslint-disable-line eqeqeq
-        perc = this.v.c;
-      } else if (perc == 0) { // eslint-disable-line eqeqeq
-        perc = 0.999;
-      }
-      var pt1 = this.pointOnPath(perc, time);
-      var pt2 = this.pointOnPath(perc + 0.001, time);
-      var xLength = pt2[0] - pt1[0];
-      var yLength = pt2[1] - pt1[1];
-      var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
-      if (magnitude === 0) {
-        return [0, 0];
+      if (decodeURIComponent(pair[0]) == variable) {
+        // eslint-disable-line eqeqeq
+        return decodeURIComponent(pair[1]);
       }
-      var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
-      return unitVector;
-    },
-    tangentOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'tangent');
-    },
-    normalOnPath: function (perc, time) {
-      return this.vectorOnPath(perc, time, 'normal');
-    },
-    setGroupProperty: expressionHelpers.setGroupProperty,
-    getValueAtTime: expressionHelpers.getStaticValueAtTime,
-  };
-  extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
-  extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-  KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
-  KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
-
-  var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
-  ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
-    var prop = propertyGetShapeProp(elem, data, type, arr, trims);
-    prop.propertyIndex = data.ix;
-    prop.lock = false;
-    if (type === 3) {
-      expressionHelpers.searchExpressions(elem, data.pt, prop);
-    } else if (type === 4) {
-      expressionHelpers.searchExpressions(elem, data.ks, prop);
-    }
-    if (prop.k) {
-      elem.addDynamicProperty(prop);
     }
-    return prop;
-  };
-}());
 
-/* global ExpressionManager, TextProperty */
-
-(function addDecorator() {
-  function searchExpressions() {
-    if (this.data.d.x) {
-      this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
-      this.addEffect(this.getExpressionValue.bind(this));
-      return true;
-    }
     return null;
   }
 
-  TextProperty.prototype.getExpressionValue = function (currentValue, text) {
-    var newValue = this.calculateExpression(text);
-    if (currentValue.t !== newValue) {
-      var newData = {};
-      this.copyData(newData, currentValue);
-      newData.t = newValue.toString();
-      newData.__complete = false;
-      return newData;
+  var queryString;
+
+  if (standalone) {
+    var scripts = document.getElementsByTagName('script');
+    var index = scripts.length - 1;
+    var myScript = scripts[index] || {
+      src: ''
+    };
+    queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+
+    renderer = getQueryVariable('renderer');
+  }
+
+  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility
+
+  try {
+    if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+    ) {
+      window.bodymovin = lottie;
     }
-    return currentValue;
+  } catch (err) {//
+  }
+
+  var ShapeModifiers = function () {
+    var ob = {};
+    var modifiers = {};
+    ob.registerModifier = registerModifier;
+    ob.getModifier = getModifier;
+
+    function registerModifier(nm, factory) {
+      if (!modifiers[nm]) {
+        modifiers[nm] = factory;
+      }
+    }
+
+    function getModifier(nm, elem, data) {
+      return new modifiers[nm](elem, data);
+    }
+
+    return ob;
+  }();
+
+  function ShapeModifier() {}
+
+  ShapeModifier.prototype.initModifierProperties = function () {};
+
+  ShapeModifier.prototype.addShapeToModifier = function () {};
+
+  ShapeModifier.prototype.addShape = function (data) {
+    if (!this.closed) {
+      // 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.
+      data.sh.container.addDynamicProperty(data.sh);
+      var shapeData = {
+        shape: data.sh,
+        data: data,
+        localShapeCollection: shapeCollectionPool.newShapeCollection()
+      };
+      this.shapes.push(shapeData);
+      this.addShapeToModifier(shapeData);
+
+      if (this._isAnimated) {
+        data.setAsAnimated();
+      }
+    }
   };
 
-  TextProperty.prototype.searchProperty = function () {
-    var isKeyframed = this.searchKeyframes();
-    var hasExpressions = this.searchExpressions();
-    this.kf = isKeyframed || hasExpressions;
-    return this.kf;
+  ShapeModifier.prototype.init = function (elem, data) {
+    this.shapes = [];
+    this.elem = elem;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, data);
+    this.frameId = initialDefaultFrame;
+    this.closed = false;
+    this.k = false;
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
   };
 
-  TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+  ShapeModifier.prototype.processKeys = function () {
+    if (this.elem.globalData.frameId === this.frameId) {
+      return;
+    }
 
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
 
-var ShapePathInterface = (
+  extendPrototype([DynamicPropertyContainer], ShapeModifier);
 
-  function () {
+  function TrimModifier() {}
+
+  extendPrototype([ShapeModifier], TrimModifier);
+
+  TrimModifier.prototype.initModifierProperties = function (elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
+    this.sValue = 0;
+    this.eValue = 0;
+    this.getValue = this.processKeys;
+    this.m = data.m;
+    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
+  };
+
+  TrimModifier.prototype.addShapeToModifier = function (shapeData) {
+    shapeData.pathsData = [];
+  };
+
+  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
+
+    if (e <= 1) {
+      segments.push({
+        s: s,
+        e: e
+      });
+    } else if (s >= 1) {
+      segments.push({
+        s: s - 1,
+        e: e - 1
+      });
+    } else {
+      segments.push({
+        s: s,
+        e: 1
+      });
+      segments.push({
+        s: 0,
+        e: e - 1
+      });
+    }
+
+    var shapeSegments = [];
+    var i;
+    var len = segments.length;
+    var segmentOb;
+
+    for (i = 0; i < len; i += 1) {
+      segmentOb = segments[i];
+
+      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {
+        var shapeS;
+        var shapeE;
+
+        if (segmentOb.s * totalModifierLength <= addedLength) {
+          shapeS = 0;
+        } else {
+          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
+          shapeE = 1;
+        } else {
+          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;
+        }
+
+        shapeSegments.push([shapeS, shapeE]);
+      }
+    }
+
+    if (!shapeSegments.length) {
+      shapeSegments.push([0, 0]);
+    }
+
+    return shapeSegments;
+  };
+
+  TrimModifier.prototype.releasePathsData = function (pathsData) {
+    var i;
+    var len = pathsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      segmentsLengthPool.release(pathsData[i]);
+    }
+
+    pathsData.length = 0;
+    return pathsData;
+  };
+
+  TrimModifier.prototype.processShapes = function (_isFirstFrame) {
+    var s;
+    var e;
+
+    if (this._mdf || _isFirstFrame) {
+      var o = this.o.v % 360 / 360;
+
+      if (o < 0) {
+        o += 1;
+      }
+
+      if (this.s.v > 1) {
+        s = 1 + o;
+      } else if (this.s.v < 0) {
+        s = 0 + o;
+      } else {
+        s = this.s.v + o;
+      }
+
+      if (this.e.v > 1) {
+        e = 1 + o;
+      } else if (this.e.v < 0) {
+        e = 0 + o;
+      } else {
+        e = this.e.v + o;
+      }
+
+      if (s > e) {
+        var _s = s;
+        s = e;
+        e = _s;
+      }
+
+      s = Math.round(s * 10000) * 0.0001;
+      e = Math.round(e * 10000) * 0.0001;
+      this.sValue = s;
+      this.eValue = e;
+    } else {
+      s = this.sValue;
+      e = this.eValue;
+    }
+
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var pathsData;
+    var pathData;
+    var totalShapeLength;
+    var totalModifierLength = 0;
+
+    if (e === s) {
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].localShapeCollection.releaseShapes();
+        this.shapes[i].shape._mdf = true;
+        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
+
+        if (this._mdf) {
+          this.shapes[i].pathsData.length = 0;
+        }
+      }
+    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {
+      var segments = [];
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
+
+        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+          shapeData.shape.paths = shapeData.localShapeCollection;
+        } else {
+          shapePaths = shapeData.shape.paths;
+          jLen = shapePaths._length;
+          totalShapeLength = 0;
+
+          if (!shapeData.shape._mdf && shapeData.pathsData.length) {
+            totalShapeLength = shapeData.totalShapeLength;
+          } else {
+            pathsData = this.releasePathsData(shapeData.pathsData);
+
+            for (j = 0; j < jLen; j += 1) {
+              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
+              pathsData.push(pathData);
+              totalShapeLength += pathData.totalLength;
+            }
+
+            shapeData.totalShapeLength = totalShapeLength;
+            shapeData.pathsData = pathsData;
+          }
+
+          totalModifierLength += totalShapeLength;
+          shapeData.shape._mdf = true;
+        }
+      }
+
+      var shapeS = s;
+      var shapeE = e;
+      var addedLength = 0;
+      var edges;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shapeData = this.shapes[i];
+
+        if (shapeData.shape._mdf) {
+          localShapeCollection = shapeData.localShapeCollection;
+          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
+
+          if (this.m === 2 && len > 1) {
+            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+            addedLength += shapeData.totalShapeLength;
+          } else {
+            edges = [[shapeS, shapeE]];
+          }
+
+          jLen = edges.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            shapeS = edges[j][0];
+            shapeE = edges[j][1];
+            segments.length = 0;
+
+            if (shapeE <= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength * shapeE
+              });
+            } else if (shapeS >= 1) {
+              segments.push({
+                s: shapeData.totalShapeLength * (shapeS - 1),
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            } else {
+              segments.push({
+                s: shapeData.totalShapeLength * shapeS,
+                e: shapeData.totalShapeLength
+              });
+              segments.push({
+                s: 0,
+                e: shapeData.totalShapeLength * (shapeE - 1)
+              });
+            }
+
+            var newShapesData = this.addShapes(shapeData, segments[0]);
+
+            if (segments[0].s !== segments[0].e) {
+              if (segments.length > 1) {
+                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
+
+                if (lastShapeInCollection.c) {
+                  var lastShape = newShapesData.pop();
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);
+                } else {
+                  this.addPaths(newShapesData, localShapeCollection);
+                  newShapesData = this.addShapes(shapeData, segments[1]);
+                }
+              }
+
+              this.addPaths(newShapesData, localShapeCollection);
+            }
+          }
+
+          shapeData.shape.paths = localShapeCollection;
+        }
+      }
+    } else if (this._mdf) {
+      for (i = 0; i < len; i += 1) {
+        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
+        // Don't remove this even if it's losing cached info.
+        this.shapes[i].pathsData.length = 0;
+        this.shapes[i].shape._mdf = true;
+      }
+    }
+  };
+
+  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {
+    var i;
+    var len = newPaths.length;
+
+    for (i = 0; i < len; i += 1) {
+      localShapeCollection.addShape(newPaths[i]);
+    }
+  };
+
+  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
+    }
+
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
+
+    if (newShape) {
+      shapePath.setXYAt(points[0], points[4], 'v', pos);
+    }
+
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+  };
+
+  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {
+    var pathsData = shapeData.pathsData;
+    var shapePaths = shapeData.shape.paths.shapes;
+    var i;
+    var len = shapeData.shape.paths._length;
+    var j;
+    var jLen;
+    var addedLength = 0;
+    var currentLengthData;
+    var segmentCount;
+    var lengths;
+    var segment;
+    var shapes = [];
+    var initPos;
+    var newShape = true;
+
+    if (!shapePath) {
+      shapePath = shapePool.newElement();
+      segmentCount = 0;
+      initPos = 0;
+    } else {
+      segmentCount = shapePath._length;
+      initPos = shapePath._length;
+    }
+
+    shapes.push(shapePath);
+
+    for (i = 0; i < len; i += 1) {
+      lengths = pathsData[i].lengths;
+      shapePath.c = shapePaths[i].c;
+      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
+
+      for (j = 1; j < jLen; j += 1) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
+          addedLength += currentLengthData.addedLength;
+          shapePath.c = false;
+        } else if (addedLength > shapeSegment.e) {
+          shapePath.c = false;
+          break;
+        } else {
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+
+          addedLength += currentLengthData.addedLength;
+          segmentCount += 1;
+        }
+      }
+
+      if (shapePaths[i].c && lengths.length) {
+        currentLengthData = lengths[j - 1];
+
+        if (addedLength <= shapeSegment.e) {
+          var segmentLength = lengths[j - 1].addedLength;
+
+          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
+            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
+            newShape = false;
+          } else {
+            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]);
+            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
+
+            newShape = false;
+            shapePath.c = false;
+          }
+        } else {
+          shapePath.c = false;
+        }
+
+        addedLength += currentLengthData.addedLength;
+        segmentCount += 1;
+      }
+
+      if (shapePath._length) {
+        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);
+      }
+
+      if (addedLength > shapeSegment.e) {
+        break;
+      }
+
+      if (i < len - 1) {
+        shapePath = shapePool.newElement();
+        newShape = true;
+        shapes.push(shapePath);
+        segmentCount = 0;
+      }
+    }
+
+    return shapes;
+  };
+
+  function PuckerAndBloatModifier() {}
+
+  extendPrototype([ShapeModifier], PuckerAndBloatModifier);
+
+  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);
+    this._isAnimated = !!this.amount.effectsSequence.length;
+  };
+
+  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {
+    var percent = amount / 100;
+    var centerPoint = [0, 0];
+    var pathLength = path._length;
+    var i = 0;
+
+    for (i = 0; i < pathLength; i += 1) {
+      centerPoint[0] += path.v[i][0];
+      centerPoint[1] += path.v[i][1];
+    }
+
+    centerPoint[0] /= pathLength;
+    centerPoint[1] /= pathLength;
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < pathLength; i += 1) {
+      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;
+      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;
+      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;
+      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;
+      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;
+      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;
+      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);
+    }
+
+    return clonedPath;
+  };
+
+  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var amount = this.amount.v;
+
+    if (amount !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  var TransformPropertyFactory = function () {
+    var defaultVector = [0, 0];
+
+    function applyToMatrix(mat) {
+      var _mdf = this._mdf;
+      this.iterateDynamicProperties();
+      this._mdf = this._mdf || _mdf;
+
+      if (this.a) {
+        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+      }
+
+      if (this.s) {
+        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+      }
+
+      if (this.sk) {
+        mat.skewFromAxis(-this.sk.v, this.sa.v);
+      }
+
+      if (this.r) {
+        mat.rotate(-this.r.v);
+      } else {
+        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]);
+      }
+
+      if (this.data.p.s) {
+        if (this.data.p.z) {
+          mat.translate(this.px.v, this.py.v, -this.pz.v);
+        } else {
+          mat.translate(this.px.v, this.py.v, 0);
+        }
+      } else {
+        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+      }
+    }
+
+    function processKeys(forceRender) {
+      if (this.elem.globalData.frameId === this.frameId) {
+        return;
+      }
+
+      if (this._isDirty) {
+        this.precalculateMatrix();
+        this._isDirty = false;
+      }
+
+      this.iterateDynamicProperties();
+
+      if (this._mdf || forceRender) {
+        var frameRate;
+        this.v.cloneFromProps(this.pre.props);
+
+        if (this.appliedTransformations < 1) {
+          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        }
+
+        if (this.appliedTransformations < 2) {
+          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        }
+
+        if (this.sk && this.appliedTransformations < 3) {
+          this.v.skewFromAxis(-this.sk.v, this.sa.v);
+        }
+
+        if (this.r && this.appliedTransformations < 4) {
+          this.v.rotate(-this.r.v);
+        } else if (!this.r && this.appliedTransformations < 4) {
+          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]);
+        }
+
+        if (this.autoOriented) {
+          var v1;
+          var v2;
+          frameRate = this.elem.globalData.frameRate;
+
+          if (this.p && this.p.keyframes && this.p.getValueAtTime) {
+            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {
+              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);
+              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
+            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);
+              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
+            } else {
+              v1 = this.p.pv;
+              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
+            }
+          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
+            v1 = [];
+            v2 = [];
+            var px = this.px;
+            var py = this.py;
+
+            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {
+              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);
+              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);
+              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);
+              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);
+            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
+              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);
+              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);
+              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);
+              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);
+            } else {
+              v1 = [px.pv, py.pv];
+              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);
+              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);
+            }
+          } else {
+            v2 = defaultVector;
+            v1 = v2;
+          }
+
+          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
+        }
+
+        if (this.data.p && this.data.p.s) {
+          if (this.data.p.z) {
+            this.v.translate(this.px.v, this.py.v, -this.pz.v);
+          } else {
+            this.v.translate(this.px.v, this.py.v, 0);
+          }
+        } else {
+          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
+        }
+      }
+
+      this.frameId = this.elem.globalData.frameId;
+    }
+
+    function precalculateMatrix() {
+      if (!this.a.k) {
+        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
+        this.appliedTransformations = 1;
+      } else {
+        return;
+      }
+
+      if (!this.s.effectsSequence.length) {
+        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
+        this.appliedTransformations = 2;
+      } else {
+        return;
+      }
+
+      if (this.sk) {
+        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
+          this.pre.skewFromAxis(-this.sk.v, this.sa.v);
+          this.appliedTransformations = 3;
+        } else {
+          return;
+        }
+      }
+
+      if (this.r) {
+        if (!this.r.effectsSequence.length) {
+          this.pre.rotate(-this.r.v);
+          this.appliedTransformations = 4;
+        }
+      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
+        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]);
+        this.appliedTransformations = 4;
+      }
+    }
+
+    function autoOrient() {//
+      // var prevP = this.getValueAtTime();
+    }
+
+    function addDynamicProperty(prop) {
+      this._addDynamicProperty(prop);
+
+      this.elem.addDynamicProperty(prop);
+      this._isDirty = true;
+    }
+
+    function TransformProperty(elem, data, container) {
+      this.elem = elem;
+      this.frameId = -1;
+      this.propType = 'transform';
+      this.data = data;
+      this.v = new Matrix(); // Precalculated matrix with non animated properties
+
+      this.pre = new Matrix();
+      this.appliedTransformations = 0;
+      this.initDynamicPropertyContainer(container || elem);
+
+      if (data.p && data.p.s) {
+        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);
+        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);
+
+        if (data.p.z) {
+          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);
+        }
+      } else {
+        this.p = PropertyFactory.getProp(elem, data.p || {
+          k: [0, 0, 0]
+        }, 1, 0, this);
+      }
+
+      if (data.rx) {
+        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
+        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
+        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
+
+        if (data.or.k[0].ti) {
+          var i;
+          var len = data.or.k.length;
+
+          for (i = 0; i < len; i += 1) {
+            data.or.k[i].to = null;
+            data.or.k[i].ti = null;
+          }
+        }
+
+        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180
+
+        this.or.sh = true;
+      } else {
+        this.r = PropertyFactory.getProp(elem, data.r || {
+          k: 0
+        }, 0, degToRads, this);
+      }
+
+      if (data.sk) {
+        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
+        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
+      }
+
+      this.a = PropertyFactory.getProp(elem, data.a || {
+        k: [0, 0, 0]
+      }, 1, 0, this);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: [100, 100, 100]
+      }, 1, 0.01, this); // 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.
+
+      if (data.o) {
+        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);
+      } else {
+        this.o = {
+          _mdf: false,
+          v: 1
+        };
+      }
+
+      this._isDirty = true;
+
+      if (!this.dynamicProperties.length) {
+        this.getValue(true);
+      }
+    }
+
+    TransformProperty.prototype = {
+      applyToMatrix: applyToMatrix,
+      getValue: processKeys,
+      precalculateMatrix: precalculateMatrix,
+      autoOrient: autoOrient
+    };
+    extendPrototype([DynamicPropertyContainer], TransformProperty);
+    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
+    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
+
+    function getTransformProperty(elem, data, container) {
+      return new TransformProperty(elem, data, container);
+    }
+
+    return {
+      getTransformProperty: getTransformProperty
+    };
+  }();
+
+  function RepeaterModifier() {}
+
+  extendPrototype([ShapeModifier], RepeaterModifier);
+
+  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);
+    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);
+    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);
+    this.data = data;
+
+    if (!this.dynamicProperties.length) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = !!this.dynamicProperties.length;
+    this.pMatrix = new Matrix();
+    this.rMatrix = new Matrix();
+    this.sMatrix = new Matrix();
+    this.tMatrix = new Matrix();
+    this.matrix = new Matrix();
+  };
+
+  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {
+    var dir = inv ? -1 : 1;
+    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
+    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
+    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
+    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    rMatrix.rotate(-transform.r.v * dir * perc);
+    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
+    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);
+    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
+  };
+
+  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {
+    this.elem = elem;
+    this.arr = arr;
+    this.pos = pos;
+    this.elemsData = elemsData;
+    this._currentCopies = 0;
+    this._elements = [];
+    this._groups = [];
+    this.frameId = -1;
+    this.initDynamicPropertyContainer(elem);
+    this.initModifierProperties(elem, arr[pos]);
+
+    while (pos > 0) {
+      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);
+
+      this._elements.unshift(arr[pos]);
+    }
+
+    if (this.dynamicProperties.length) {
+      this.k = true;
+    } else {
+      this.getValue(true);
+    }
+  };
+
+  RepeaterModifier.prototype.resetElements = function (elements) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._processed = false;
+
+      if (elements[i].ty === 'gr') {
+        this.resetElements(elements[i].it);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.cloneElements = function (elements) {
+    var newElements = JSON.parse(JSON.stringify(elements));
+    this.resetElements(newElements);
+    return newElements;
+  };
+
+  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {
+    var i;
+    var len = elements.length;
+
+    for (i = 0; i < len; i += 1) {
+      elements[i]._render = renderFlag;
+
+      if (elements[i].ty === 'gr') {
+        this.changeGroupRender(elements[i].it, renderFlag);
+      }
+    }
+  };
+
+  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {
+    var items;
+    var itemsTransform;
+    var i;
+    var dir;
+    var cont;
+    var hasReloaded = false;
+
+    if (this._mdf || _isFirstFrame) {
+      var copies = Math.ceil(this.c.v);
+
+      if (this._groups.length < copies) {
+        while (this._groups.length < copies) {
+          var group = {
+            it: this.cloneElements(this._elements),
+            ty: 'gr'
+          };
+          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'
+          });
+          this.arr.splice(0, 0, group);
+
+          this._groups.splice(0, 0, group);
+
+          this._currentCopies += 1;
+        }
+
+        this.elem.reloadShapes();
+        hasReloaded = true;
+      }
+
+      cont = 0;
+      var renderFlag;
+
+      for (i = 0; i <= this._groups.length - 1; i += 1) {
+        renderFlag = cont < copies;
+        this._groups[i]._render = renderFlag;
+        this.changeGroupRender(this._groups[i].it, renderFlag);
+
+        if (!renderFlag) {
+          var elems = this.elemsData[i].it;
+          var transformData = elems[elems.length - 1];
+
+          if (transformData.transform.op.v !== 0) {
+            transformData.transform.op._mdf = true;
+            transformData.transform.op.v = 0;
+          } else {
+            transformData.transform.op._mdf = false;
+          }
+        }
+
+        cont += 1;
+      }
+
+      this._currentCopies = copies; /// /
+
+      var offset = this.o.v;
+      var offsetModulo = offset % 1;
+      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
+      var pProps = this.pMatrix.props;
+      var rProps = this.rMatrix.props;
+      var sProps = this.sMatrix.props;
+      this.pMatrix.reset();
+      this.rMatrix.reset();
+      this.sMatrix.reset();
+      this.tMatrix.reset();
+      this.matrix.reset();
+      var iteration = 0;
+
+      if (offset > 0) {
+        while (iteration < roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          iteration += 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
+          iteration += offsetModulo;
+        }
+      } else if (offset < 0) {
+        while (iteration > roundOffset) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
+          iteration -= 1;
+        }
+
+        if (offsetModulo) {
+          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);
+          iteration -= offsetModulo;
+        }
+      }
+
+      i = this.data.m === 1 ? 0 : this._currentCopies - 1;
+      dir = this.data.m === 1 ? 1 : -1;
+      cont = this._currentCopies;
+      var j;
+      var jLen;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        jLen = itemsTransform.length;
+        items[items.length - 1].transform.mProps._mdf = true;
+        items[items.length - 1].transform.op._mdf = true;
+        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
+
+        if (iteration !== 0) {
+          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {
+            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
+          }
+
+          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]);
+          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]);
+          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]);
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+
+          this.matrix.reset();
+        } else {
+          this.matrix.reset();
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsTransform[j] = this.matrix.props[j];
+          }
+        }
+
+        iteration += 1;
+        cont -= 1;
+        i += dir;
+      }
+    } else {
+      cont = this._currentCopies;
+      i = 0;
+      dir = 1;
+
+      while (cont) {
+        items = this.elemsData[i].it;
+        itemsTransform = items[items.length - 1].transform.mProps.v.props;
+        items[items.length - 1].transform.mProps._mdf = false;
+        items[items.length - 1].transform.op._mdf = false;
+        cont -= 1;
+        i += dir;
+      }
+    }
+
+    return hasReloaded;
+  };
+
+  RepeaterModifier.prototype.addShape = function () {};
+
+  function RoundCornersModifier() {}
+
+  extendPrototype([ShapeModifier], RoundCornersModifier);
+
+  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);
+    this._isAnimated = !!this.rd.effectsSequence.length;
+  };
+
+  RoundCornersModifier.prototype.processPath = function (path, round) {
+    var clonedPath = shapePool.newElement();
+    clonedPath.c = path.c;
+    var i;
+    var len = path._length;
+    var currentV;
+    var currentI;
+    var currentO;
+    var closerV;
+    var distance;
+    var newPosPerc;
+    var index = 0;
+    var vX;
+    var vY;
+    var oX;
+    var oY;
+    var iX;
+    var iY;
+
+    for (i = 0; i < len; i += 1) {
+      currentV = path.v[i];
+      currentO = path.o[i];
+      currentI = path.i[i];
+
+      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {
+        if ((i === 0 || i === len - 1) && !path.c) {
+          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);
+          /* clonedPath.v[index] = currentV;
+                  clonedPath.o[index] = currentO;
+                  clonedPath.i[index] = currentI; */
+
+          index += 1;
+        } else {
+          if (i === 0) {
+            closerV = path.v[len - 1];
+          } else {
+            closerV = path.v[i - 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = iX;
+          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;
+          vY = iY;
+          oX = vX - (vX - currentV[0]) * roundCorner;
+          oY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+
+          if (i === len - 1) {
+            closerV = path.v[0];
+          } else {
+            closerV = path.v[i + 1];
+          }
+
+          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));
+          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;
+          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;
+          vX = oX;
+          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;
+          vY = oY;
+          iX = vX - (vX - currentV[0]) * roundCorner;
+          iY = vY - (vY - currentV[1]) * roundCorner;
+          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);
+          index += 1;
+        }
+      } else {
+        clonedPath.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);
+        index += 1;
+      }
+    }
+
+    return clonedPath;
+  };
+
+  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {
+    var shapePaths;
+    var i;
+    var len = this.shapes.length;
+    var j;
+    var jLen;
+    var rd = this.rd.v;
+
+    if (rd !== 0) {
+      var shapeData;
+      var localShapeCollection;
+
+      for (i = 0; i < len; i += 1) {
+        shapeData = this.shapes[i];
+        localShapeCollection = shapeData.localShapeCollection;
+
+        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {
+          localShapeCollection.releaseShapes();
+          shapeData.shape._mdf = true;
+          shapePaths = shapeData.shape.paths.shapes;
+          jLen = shapeData.shape.paths._length;
+
+          for (j = 0; j < jLen; j += 1) {
+            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));
+          }
+        }
+
+        shapeData.shape.paths = shapeData.localShapeCollection;
+      }
+    }
+
+    if (!this.dynamicProperties.length) {
+      this._mdf = false;
+    }
+  };
+
+  function getFontProperties(fontData) {
+    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
+    var fWeight = 'normal';
+    var fStyle = 'normal';
+    var len = styles.length;
+    var styleName;
+
+    for (var i = 0; i < len; i += 1) {
+      styleName = styles[i].toLowerCase();
+
+      switch (styleName) {
+        case 'italic':
+          fStyle = 'italic';
+          break;
+
+        case 'bold':
+          fWeight = '700';
+          break;
+
+        case 'black':
+          fWeight = '900';
+          break;
+
+        case 'medium':
+          fWeight = '500';
+          break;
+
+        case 'regular':
+        case 'normal':
+          fWeight = '400';
+          break;
+
+        case 'light':
+        case 'thin':
+          fWeight = '200';
+          break;
+
+        default:
+          break;
+      }
+    }
+
+    return {
+      style: fStyle,
+      weight: fontData.fWeight || fWeight
+    };
+  }
+
+  var FontManager = function () {
+    var maxWaitingTime = 5000;
+    var emptyChar = {
+      w: 0,
+      size: 0,
+      shapes: [],
+      data: {
+        shapes: []
+      }
+    };
+    var combinedCharacters = []; // Hindi characters
+
+    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
+    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
+    var zeroWidthJoiner = [65039, 8205];
+
+    function trimFontOptions(font) {
+      var familyArray = font.split(',');
+      var i;
+      var len = familyArray.length;
+      var enabledFamilies = [];
+
+      for (i = 0; i < len; i += 1) {
+        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {
+          enabledFamilies.push(familyArray[i]);
+        }
+      }
+
+      return enabledFamilies.join(',');
+    }
+
+    function setUpNode(font, family) {
+      var parentNode = createTag('span'); // Node is invisible to screen readers.
+
+      parentNode.setAttribute('aria-hidden', true);
+      parentNode.style.fontFamily = family;
+      var node = createTag('span'); // Characters that vary significantly among different fonts
+
+      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen
+
+      parentNode.style.position = 'absolute';
+      parentNode.style.left = '-10000px';
+      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious
+
+      parentNode.style.fontSize = '300px'; // Reset any font properties
+
+      parentNode.style.fontVariant = 'normal';
+      parentNode.style.fontStyle = 'normal';
+      parentNode.style.fontWeight = 'normal';
+      parentNode.style.letterSpacing = '0';
+      parentNode.appendChild(node);
+      document.body.appendChild(parentNode); // Remember width with no applied web font
+
+      var width = node.offsetWidth;
+      node.style.fontFamily = trimFontOptions(font) + ', ' + family;
+      return {
+        node: node,
+        w: width,
+        parent: parentNode
+      };
+    }
+
+    function checkLoadedFonts() {
+      var i;
+      var len = this.fonts.length;
+      var node;
+      var w;
+      var loadedCount = len;
+
+      for (i = 0; i < len; i += 1) {
+        if (this.fonts[i].loaded) {
+          loadedCount -= 1;
+        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {
+          this.fonts[i].loaded = true;
+        } else {
+          node = this.fonts[i].monoCase.node;
+          w = this.fonts[i].monoCase.w;
+
+          if (node.offsetWidth !== w) {
+            loadedCount -= 1;
+            this.fonts[i].loaded = true;
+          } else {
+            node = this.fonts[i].sansCase.node;
+            w = this.fonts[i].sansCase.w;
+
+            if (node.offsetWidth !== w) {
+              loadedCount -= 1;
+              this.fonts[i].loaded = true;
+            }
+          }
+
+          if (this.fonts[i].loaded) {
+            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
+            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
+          }
+        }
+      }
+
+      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {
+        setTimeout(this.checkLoadedFontsBinded, 20);
+      } else {
+        setTimeout(this.setIsLoadedBinded, 10);
+      }
+    }
+
+    function createHelper(def, fontData) {
+      var tHelper = createNS('text');
+      tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;
+
+      var fontProps = getFontProperties(fontData);
+      tHelper.setAttribute('font-family', fontData.fFamily);
+      tHelper.setAttribute('font-style', fontProps.style);
+      tHelper.setAttribute('font-weight', fontProps.weight);
+      tHelper.textContent = '1';
+
+      if (fontData.fClass) {
+        tHelper.style.fontFamily = 'inherit';
+        tHelper.setAttribute('class', fontData.fClass);
+      } else {
+        tHelper.style.fontFamily = fontData.fFamily;
+      }
+
+      def.appendChild(tHelper);
+      var tCanvasHelper = createTag('canvas').getContext('2d');
+      tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px ' + fontData.fFamily; // tCanvasHelper.font = ' 100px '+ fontData.fFamily;
+
+      return tHelper;
+    }
+
+    function addFonts(fontData, defs) {
+      if (!fontData) {
+        this.isLoaded = true;
+        return;
+      }
+
+      if (this.chars) {
+        this.isLoaded = true;
+        this.fonts = fontData.list;
+        return;
+      }
+
+      var fontArr = fontData.list;
+      var i;
+      var len = fontArr.length;
+      var _pendingFonts = len;
+
+      for (i = 0; i < len; i += 1) {
+        var shouldLoadFont = true;
+        var loadedSelector;
+        var j;
+        fontArr[i].loaded = false;
+        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');
+        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');
+
+        if (!fontArr[i].fPath) {
+          fontArr[i].loaded = true;
+          _pendingFonts -= 1;
+        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {
+          loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]');
+
+          if (loadedSelector.length > 0) {
+            shouldLoadFont = false;
+          }
+
+          if (shouldLoadFont) {
+            var s = createTag('style');
+            s.setAttribute('f-forigin', fontArr[i].fOrigin);
+            s.setAttribute('f-origin', fontArr[i].origin);
+            s.setAttribute('f-family', fontArr[i].fFamily);
+            s.type = 'text/css';
+            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}";
+            defs.appendChild(s);
+          }
+        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {
+          loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var l = createTag('link');
+            l.setAttribute('f-forigin', fontArr[i].fOrigin);
+            l.setAttribute('f-origin', fontArr[i].origin);
+            l.type = 'text/css';
+            l.rel = 'stylesheet';
+            l.href = fontArr[i].fPath;
+            document.body.appendChild(l);
+          }
+        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {
+          loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
+
+          for (j = 0; j < loadedSelector.length; j += 1) {
+            if (fontArr[i].fPath === loadedSelector[j].src) {
+              // Font is already loaded
+              shouldLoadFont = false;
+            }
+          }
+
+          if (shouldLoadFont) {
+            var sc = createTag('link');
+            sc.setAttribute('f-forigin', fontArr[i].fOrigin);
+            sc.setAttribute('f-origin', fontArr[i].origin);
+            sc.setAttribute('rel', 'stylesheet');
+            sc.setAttribute('href', fontArr[i].fPath);
+            defs.appendChild(sc);
+          }
+        }
+
+        fontArr[i].helper = createHelper(defs, fontArr[i]);
+        fontArr[i].cache = {};
+        this.fonts.push(fontArr[i]);
+      }
+
+      if (_pendingFonts === 0) {
+        this.isLoaded = true;
+      } else {
+        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
+        // Adding this timeout seems to fix it
+        setTimeout(this.checkLoadedFonts.bind(this), 100);
+      }
+    }
+
+    function addChars(chars) {
+      if (!chars) {
+        return;
+      }
+
+      if (!this.chars) {
+        this.chars = [];
+      }
+
+      var i;
+      var len = chars.length;
+      var j;
+      var jLen = this.chars.length;
+      var found;
+
+      for (i = 0; i < len; i += 1) {
+        j = 0;
+        found = false;
+
+        while (j < jLen) {
+          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {
+            found = true;
+          }
+
+          j += 1;
+        }
+
+        if (!found) {
+          this.chars.push(chars[i]);
+          jLen += 1;
+        }
+      }
+    }
+
+    function getCharData(_char, style, font) {
+      var i = 0;
+      var len = this.chars.length;
+
+      while (i < len) {
+        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {
+          return this.chars[i];
+        }
+
+        i += 1;
+      }
+
+      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console
+      && !this._warned) {
+        this._warned = true;
+        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console
+      }
+
+      return emptyChar;
+    }
+
+    function measureText(_char2, fontName, size) {
+      var fontData = this.getFontByName(fontName);
+
+      var index = _char2.charCodeAt(0);
+
+      if (!fontData.cache[index + 1]) {
+        var tHelper = fontData.helper; // Canvas version
+        // fontData.cache[index] = tHelper.measureText(char).width / 100;
+        // SVG version
+        // console.log(tHelper.getBBox().width)
+
+        if (_char2 === ' ') {
+          tHelper.textContent = '|' + _char2 + '|';
+          var doubleSize = tHelper.getComputedTextLength();
+          tHelper.textContent = '||';
+          var singleSize = tHelper.getComputedTextLength();
+          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;
+        } else {
+          tHelper.textContent = _char2;
+          fontData.cache[index + 1] = tHelper.getComputedTextLength() / 100;
+        }
+      }
+
+      return fontData.cache[index + 1] * size;
+    }
+
+    function getFontByName(name) {
+      var i = 0;
+      var len = this.fonts.length;
+
+      while (i < len) {
+        if (this.fonts[i].fName === name) {
+          return this.fonts[i];
+        }
+
+        i += 1;
+      }
+
+      return this.fonts[0];
+    }
+
+    function isModifier(firstCharCode, secondCharCode) {
+      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);
+      return surrogateModifiers.indexOf(sum) !== -1;
+    }
+
+    function isZeroWidthJoiner(firstCharCode, secondCharCode) {
+      if (!secondCharCode) {
+        return firstCharCode === zeroWidthJoiner[1];
+      }
+
+      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];
+    }
+
+    function isCombinedCharacter(_char3) {
+      return combinedCharacters.indexOf(_char3) !== -1;
+    }
+
+    function setIsLoaded() {
+      this.isLoaded = true;
+    }
+
+    var Font = function Font() {
+      this.fonts = [];
+      this.chars = null;
+      this.typekitLoaded = 0;
+      this.isLoaded = false;
+      this._warned = false;
+      this.initTime = Date.now();
+      this.setIsLoadedBinded = this.setIsLoaded.bind(this);
+      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
+    };
+
+    Font.isModifier = isModifier;
+    Font.isZeroWidthJoiner = isZeroWidthJoiner;
+    Font.isCombinedCharacter = isCombinedCharacter;
+    var fontPrototype = {
+      addChars: addChars,
+      addFonts: addFonts,
+      getCharData: getCharData,
+      getFontByName: getFontByName,
+      measureText: measureText,
+      checkLoadedFonts: checkLoadedFonts,
+      setIsLoaded: setIsLoaded
+    };
+    Font.prototype = fontPrototype;
+    return Font;
+  }();
+
+  function RenderableElement() {}
+
+  RenderableElement.prototype = {
+    initRenderable: function initRenderable() {
+      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+      this.isInRange = false; // layer's display state
+
+      this.hidden = false; // If layer's transparency equals 0, it can be hidden
+
+      this.isTransparent = false; // list of animated components
+
+      this.renderableComponents = [];
+    },
+    addRenderableComponent: function addRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) === -1) {
+        this.renderableComponents.push(component);
+      }
+    },
+    removeRenderableComponent: function removeRenderableComponent(component) {
+      if (this.renderableComponents.indexOf(component) !== -1) {
+        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
+      }
+    },
+    prepareRenderableFrame: function prepareRenderableFrame(num) {
+      this.checkLayerLimits(num);
+    },
+    checkTransparency: function checkTransparency() {
+      if (this.finalTransform.mProp.o.v <= 0) {
+        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {
+          this.isTransparent = true;
+          this.hide();
+        }
+      } else if (this.isTransparent) {
+        this.isTransparent = false;
+        this.show();
+      }
+    },
+
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       *
+       */
+    checkLayerLimits: function checkLayerLimits(num) {
+      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {
+        if (this.isInRange !== true) {
+          this.globalData._mdf = true;
+          this._mdf = true;
+          this.isInRange = true;
+          this.show();
+        }
+      } else if (this.isInRange !== false) {
+        this.globalData._mdf = true;
+        this.isInRange = false;
+        this.hide();
+      }
+    },
+    renderRenderable: function renderRenderable() {
+      var i;
+      var len = this.renderableComponents.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderableComponents[i].renderFrame(this._isFirstFrame);
+      }
+      /* this.maskManager.renderFrame(this.finalTransform.mat);
+          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */
+
+    },
+    sourceRectAtTime: function sourceRectAtTime() {
+      return {
+        top: 0,
+        left: 0,
+        width: 100,
+        height: 100
+      };
+    },
+    getLayerSize: function getLayerSize() {
+      if (this.data.ty === 5) {
+        return {
+          w: this.data.textData.width,
+          h: this.data.textData.height
+        };
+      }
+
+      return {
+        w: this.data.width,
+        h: this.data.height
+      };
+    }
+  };
+
+  var MaskManagerInterface = function () {
+    function MaskInterface(mask, data) {
+      this._mask = mask;
+      this._data = data;
+    }
+
+    Object.defineProperty(MaskInterface.prototype, 'maskPath', {
+      get: function get() {
+        if (this._mask.prop.k) {
+          this._mask.prop.getValue();
+        }
+
+        return this._mask.prop;
+      }
+    });
+    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
+      get: function get() {
+        if (this._mask.op.k) {
+          this._mask.op.getValue();
+        }
+
+        return this._mask.op.v * 100;
+      }
+    });
+
+    var MaskManager = function MaskManager(maskManager) {
+      var _masksInterfaces = createSizedArray(maskManager.viewData.length);
+
+      var i;
+      var len = maskManager.viewData.length;
+
+      for (i = 0; i < len; i += 1) {
+        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
+      }
+
+      var maskFunction = function maskFunction(name) {
+        i = 0;
+
+        while (i < len) {
+          if (maskManager.masksProperties[i].nm === name) {
+            return _masksInterfaces[i];
+          }
+
+          i += 1;
+        }
+
+        return null;
+      };
+
+      return maskFunction;
+    };
+
+    return MaskManager;
+  }();
+
+  var ExpressionPropertyInterface = function () {
+    var defaultUnidimensionalValue = {
+      pv: 0,
+      v: 0,
+      mult: 1
+    };
+    var defaultMultidimensionalValue = {
+      pv: [0, 0, 0],
+      v: [0, 0, 0],
+      mult: 1
+    };
+
+    function completeProperty(expressionValue, property, type) {
+      Object.defineProperty(expressionValue, 'velocity', {
+        get: function get() {
+          return property.getVelocityAtTime(property.comp.currentFrame);
+        }
+      });
+      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
+
+      expressionValue.key = function (pos) {
+        if (!expressionValue.numKeys) {
+          return 0;
+        }
+
+        var value = '';
+
+        if ('s' in property.keyframes[pos - 1]) {
+          value = property.keyframes[pos - 1].s;
+        } else if ('e' in property.keyframes[pos - 2]) {
+          value = property.keyframes[pos - 2].e;
+        } else {
+          value = property.keyframes[pos - 2].s;
+        }
+
+        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
+
+        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
+        valueProp.value = type === 'unidimensional' ? value[0] : value;
+        return valueProp;
+      };
+
+      expressionValue.valueAtTime = property.getValueAtTime;
+      expressionValue.speedAtTime = property.getSpeedAtTime;
+      expressionValue.velocityAtTime = property.getVelocityAtTime;
+      expressionValue.propertyGroup = property.propertyGroup;
+    }
+
+    function UnidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultUnidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var val = property.pv * mult;
+      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+      expressionValue.value = val;
+      completeProperty(expressionValue, property, 'unidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        val = property.v * mult;
+
+        if (expressionValue.value !== val) {
+          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
+
+          expressionValue.value = val;
+          completeProperty(expressionValue, property, 'unidimensional');
+        }
+
+        return expressionValue;
+      };
+    }
+
+    function MultidimensionalPropertyInterface(property) {
+      if (!property || !('pv' in property)) {
+        property = defaultMultidimensionalValue;
+      }
+
+      var mult = 1 / property.mult;
+      var len = property.data && property.data.l || property.pv.length;
+      var expressionValue = createTypedArray('float32', len);
+      var arrValue = createTypedArray('float32', len);
+      expressionValue.value = arrValue;
+      completeProperty(expressionValue, property, 'multidimensional');
+      return function () {
+        if (property.k) {
+          property.getValue();
+        }
+
+        for (var i = 0; i < len; i += 1) {
+          arrValue[i] = property.v[i] * mult;
+          expressionValue[i] = arrValue[i];
+        }
+
+        return expressionValue;
+      };
+    } // TODO: try to avoid using this getter
+
+
+    function defaultGetter() {
+      return defaultUnidimensionalValue;
+    }
+
+    return function (property) {
+      if (!property) {
+        return defaultGetter;
+      }
+
+      if (property.propType === 'unidimensional') {
+        return UnidimensionalPropertyInterface(property);
+      }
+
+      return MultidimensionalPropertyInterface(property);
+    };
+  }();
+
+  var TransformExpressionInterface = function () {
+    return function (transform) {
+      function _thisFunction(name) {
+        switch (name) {
+          case 'scale':
+          case 'Scale':
+          case 'ADBE Scale':
+          case 6:
+            return _thisFunction.scale;
+
+          case 'rotation':
+          case 'Rotation':
+          case 'ADBE Rotation':
+          case 'ADBE Rotate Z':
+          case 10:
+            return _thisFunction.rotation;
+
+          case 'ADBE Rotate X':
+            return _thisFunction.xRotation;
+
+          case 'ADBE Rotate Y':
+            return _thisFunction.yRotation;
+
+          case 'position':
+          case 'Position':
+          case 'ADBE Position':
+          case 2:
+            return _thisFunction.position;
+
+          case 'ADBE Position_0':
+            return _thisFunction.xPosition;
+
+          case 'ADBE Position_1':
+            return _thisFunction.yPosition;
+
+          case 'ADBE Position_2':
+            return _thisFunction.zPosition;
+
+          case 'anchorPoint':
+          case 'AnchorPoint':
+          case 'Anchor Point':
+          case 'ADBE AnchorPoint':
+          case 1:
+            return _thisFunction.anchorPoint;
+
+          case 'opacity':
+          case 'Opacity':
+          case 11:
+            return _thisFunction.opacity;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'rotation', {
+        get: ExpressionPropertyInterface(transform.r || transform.rz)
+      });
+      Object.defineProperty(_thisFunction, 'zRotation', {
+        get: ExpressionPropertyInterface(transform.rz || transform.r)
+      });
+      Object.defineProperty(_thisFunction, 'xRotation', {
+        get: ExpressionPropertyInterface(transform.rx)
+      });
+      Object.defineProperty(_thisFunction, 'yRotation', {
+        get: ExpressionPropertyInterface(transform.ry)
+      });
+      Object.defineProperty(_thisFunction, 'scale', {
+        get: ExpressionPropertyInterface(transform.s)
+      });
+
+      var _px;
+
+      var _py;
+
+      var _pz;
+
+      var _transformFactory;
+
+      if (transform.p) {
+        _transformFactory = ExpressionPropertyInterface(transform.p);
+      } else {
+        _px = ExpressionPropertyInterface(transform.px);
+        _py = ExpressionPropertyInterface(transform.py);
+
+        if (transform.pz) {
+          _pz = ExpressionPropertyInterface(transform.pz);
+        }
+      }
+
+      Object.defineProperty(_thisFunction, 'position', {
+        get: function get() {
+          if (transform.p) {
+            return _transformFactory();
+          }
+
+          return [_px(), _py(), _pz ? _pz() : 0];
+        }
+      });
+      Object.defineProperty(_thisFunction, 'xPosition', {
+        get: ExpressionPropertyInterface(transform.px)
+      });
+      Object.defineProperty(_thisFunction, 'yPosition', {
+        get: ExpressionPropertyInterface(transform.py)
+      });
+      Object.defineProperty(_thisFunction, 'zPosition', {
+        get: ExpressionPropertyInterface(transform.pz)
+      });
+      Object.defineProperty(_thisFunction, 'anchorPoint', {
+        get: ExpressionPropertyInterface(transform.a)
+      });
+      Object.defineProperty(_thisFunction, 'opacity', {
+        get: ExpressionPropertyInterface(transform.o)
+      });
+      Object.defineProperty(_thisFunction, 'skew', {
+        get: ExpressionPropertyInterface(transform.sk)
+      });
+      Object.defineProperty(_thisFunction, 'skewAxis', {
+        get: ExpressionPropertyInterface(transform.sa)
+      });
+      Object.defineProperty(_thisFunction, 'orientation', {
+        get: ExpressionPropertyInterface(transform.or)
+      });
+      return _thisFunction;
+    };
+  }();
+
+  var LayerExpressionInterface = function () {
+    function getMatrix(time) {
+      var toWorldMat = new Matrix();
+
+      if (time !== undefined) {
+        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
+
+        propMatrix.clone(toWorldMat);
+      } else {
+        var transformMat = this._elem.finalTransform.mProp;
+        transformMat.applyToMatrix(toWorldMat);
+      }
+
+      return toWorldMat;
+    }
+
+    function toWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function toWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.applyPoint(toWorldMat, arr);
+    }
+
+    function fromWorldVec(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      toWorldMat.props[12] = 0;
+      toWorldMat.props[13] = 0;
+      toWorldMat.props[14] = 0;
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function fromWorld(arr, time) {
+      var toWorldMat = this.getMatrix(time);
+      return this.invertPoint(toWorldMat, arr);
+    }
+
+    function applyPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
+    }
+
+    function invertPoint(matrix, arr) {
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
+        }
+      }
+
+      return matrix.inversePoint(arr);
+    }
+
+    function fromComp(arr) {
+      var toWorldMat = new Matrix();
+      toWorldMat.reset();
+
+      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
+
+      if (this._elem.hierarchy && this._elem.hierarchy.length) {
+        var i;
+        var len = this._elem.hierarchy.length;
+
+        for (i = 0; i < len; i += 1) {
+          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+        }
+
+        return toWorldMat.inversePoint(arr);
+      }
+
+      return toWorldMat.inversePoint(arr);
+    }
+
+    function sampleImage() {
+      return [1, 1, 1, 1];
+    }
+
+    return function (elem) {
+      var transformInterface;
+
+      function _registerMaskInterface(maskManager) {
+        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
+      }
+
+      function _registerEffectsInterface(effects) {
+        _thisLayerFunction.effect = effects;
+      }
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Root Vectors Group':
+          case 'Contents':
+          case 2:
+            return _thisLayerFunction.shapeInterface;
+
+          case 1:
+          case 6:
+          case 'Transform':
+          case 'transform':
+          case 'ADBE Transform Group':
+            return transformInterface;
+
+          case 4:
+          case 'ADBE Effect Parade':
+          case 'effects':
+          case 'Effects':
+            return _thisLayerFunction.effect;
+
+          case 'ADBE Text Properties':
+            return _thisLayerFunction.textInterface;
+
+          default:
+            return null;
+        }
+      }
+
+      _thisLayerFunction.getMatrix = getMatrix;
+      _thisLayerFunction.invertPoint = invertPoint;
+      _thisLayerFunction.applyPoint = applyPoint;
+      _thisLayerFunction.toWorld = toWorld;
+      _thisLayerFunction.toWorldVec = toWorldVec;
+      _thisLayerFunction.fromWorld = fromWorld;
+      _thisLayerFunction.fromWorldVec = fromWorldVec;
+      _thisLayerFunction.toComp = toWorld;
+      _thisLayerFunction.fromComp = fromComp;
+      _thisLayerFunction.sampleImage = sampleImage;
+      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+      _thisLayerFunction._elem = elem;
+      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
+      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
+      Object.defineProperties(_thisLayerFunction, {
+        hasParent: {
+          get: function get() {
+            return elem.hierarchy.length;
+          }
+        },
+        parent: {
+          get: function get() {
+            return elem.hierarchy[0].layerInterface;
+          }
+        },
+        rotation: getDescriptor(transformInterface, 'rotation'),
+        scale: getDescriptor(transformInterface, 'scale'),
+        position: getDescriptor(transformInterface, 'position'),
+        opacity: getDescriptor(transformInterface, 'opacity'),
+        anchorPoint: anchorPointDescriptor,
+        anchor_point: anchorPointDescriptor,
+        transform: {
+          get: function get() {
+            return transformInterface;
+          }
+        },
+        active: {
+          get: function get() {
+            return elem.isInRange;
+          }
+        }
+      });
+      _thisLayerFunction.startTime = elem.data.st;
+      _thisLayerFunction.index = elem.data.ind;
+      _thisLayerFunction.source = elem.data.refId;
+      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
+      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      _thisLayerFunction._name = elem.data.nm;
+      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var propertyGroupFactory = function () {
+    return function (interfaceFunction, parentPropertyGroup) {
+      return function (val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return parentPropertyGroup(val - 1);
+      };
+    };
+  }();
+
+  var PropertyInterface = function () {
+    return function (propertyName, propertyGroup) {
+      var interfaceFunction = {
+        _name: propertyName
+      };
+
+      function _propertyGroup(val) {
+        val = val === undefined ? 1 : val;
+
+        if (val <= 0) {
+          return interfaceFunction;
+        }
+
+        return propertyGroup(val - 1);
+      }
+
+      return _propertyGroup;
+    };
+  }();
+
+  var EffectsExpressionInterface = function () {
+    var ob = {
+      createEffectsInterface: createEffectsInterface
+    };
+
+    function createEffectsInterface(elem, propertyGroup) {
+      if (elem.effectsManager) {
+        var effectElements = [];
+        var effectsData = elem.data.ef;
+        var i;
+        var len = elem.effectsManager.effectElements.length;
+
+        for (i = 0; i < len; i += 1) {
+          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+        }
+
+        var effects = elem.data.ef || [];
+
+        var groupInterface = function groupInterface(name) {
+          i = 0;
+          len = effects.length;
+
+          while (i < len) {
+            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+              return effectElements[i];
+            }
+
+            i += 1;
+          }
+
+          return null;
+        };
+
+        Object.defineProperty(groupInterface, 'numProperties', {
+          get: function get() {
+            return effects.length;
+          }
+        });
+        return groupInterface;
+      }
+
+      return null;
+    }
+
+    function createGroupInterface(data, elements, propertyGroup, elem) {
+      function groupInterface(name) {
+        var effects = data.ef;
+        var i = 0;
+        var len = effects.length;
+
+        while (i < len) {
+          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
+            if (effects[i].ty === 5) {
+              return effectElements[i];
+            }
+
+            return effectElements[i]();
+          }
+
+          i += 1;
+        }
+
+        throw new Error();
+      }
+
+      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
+
+      var effectElements = [];
+      var i;
+      var len = data.ef.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (data.ef[i].ty === 5) {
+          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+        } else {
+          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        }
+      }
+
+      if (data.mn === 'ADBE Color Control') {
+        Object.defineProperty(groupInterface, 'color', {
+          get: function get() {
+            return effectElements[0]();
+          }
+        });
+      }
+
+      Object.defineProperties(groupInterface, {
+        numProperties: {
+          get: function get() {
+            return data.np;
+          }
+        },
+        _name: {
+          value: data.nm
+        },
+        propertyGroup: {
+          value: _propertyGroup
+        }
+      });
+      groupInterface.enabled = data.en !== 0;
+      groupInterface.active = groupInterface.enabled;
+      return groupInterface;
+    }
+
+    function createValueInterface(element, type, elem, propertyGroup) {
+      var expressionProperty = ExpressionPropertyInterface(element.p);
+
+      function interfaceFunction() {
+        if (type === 10) {
+          return elem.comp.compInterface(element.p.v);
+        }
+
+        return expressionProperty();
+      }
+
+      if (element.p.setGroupProperty) {
+        element.p.setGroupProperty(PropertyInterface('', propertyGroup));
+      }
+
+      return interfaceFunction;
+    }
+
+    return ob;
+  }();
+
+  var CompExpressionInterface = function () {
+    return function (comp) {
+      function _thisLayerFunction(name) {
+        var i = 0;
+        var len = comp.layers.length;
+
+        while (i < len) {
+          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
+            return comp.elements[i].layerInterface;
+          }
+
+          i += 1;
+        }
+
+        return null; // return {active:false};
+      }
+
+      Object.defineProperty(_thisLayerFunction, '_name', {
+        value: comp.data.nm
+      });
+      _thisLayerFunction.layer = _thisLayerFunction;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
+      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
+      _thisLayerFunction.pixelAspect = 1;
+      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
+      _thisLayerFunction.displayStartTime = 0;
+      _thisLayerFunction.numLayers = comp.layers.length;
+      return _thisLayerFunction;
+    };
+  }();
+
+  var ShapePathInterface = function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
       var prop = view.sh;
 
@@ -13670,1465 +7811,10874 @@
         if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {
           return interfaceFunction.path;
         }
+
         return null;
       }
 
       var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
       prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));
       Object.defineProperties(interfaceFunction, {
         path: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
         shape: {
-          get: function () {
+          get: function get() {
             if (prop.k) {
               prop.getValue();
             }
+
             return prop;
-          },
+          }
         },
-        _name: { value: shape.nm },
-        ix: { value: shape.ix },
-        propertyIndex: { value: shape.ix },
-        mn: { value: shape.mn },
-        propertyGroup: { value: propertyGroup },
+        _name: {
+          value: shape.nm
+        },
+        ix: {
+          value: shape.ix
+        },
+        propertyIndex: {
+          value: shape.ix
+        },
+        mn: {
+          value: shape.mn
+        },
+        propertyGroup: {
+          value: propertyGroup
+        }
       });
       return interfaceFunction;
     };
-  }()
-);
+  }();
 
-/* exported propertyGroupFactory */
+  var ShapeExpressionInterface = function () {
+    function iterateElements(shapes, view, propertyGroup) {
+      var arr = [];
+      var i;
+      var len = shapes ? shapes.length : 0;
 
-var propertyGroupFactory = (function () {
-  return function (interfaceFunction, parentPropertyGroup) {
-    return function (val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return parentPropertyGroup(val - 1);
-    };
-  };
-}());
-
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
-  return function (propertyName, propertyGroup) {
-    var interfaceFunction = {
-      _name: propertyName,
-    };
-
-    function _propertyGroup(val) {
-      val = val === undefined ? 1 : val;
-      if (val <= 0) {
-        return interfaceFunction;
-      }
-      return propertyGroup(val - 1);
-    }
-
-    return _propertyGroup;
-  };
-}());
-
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
-
-var ShapeExpressionInterface = (function () {
-  function iterateElements(shapes, view, propertyGroup) {
-    var arr = [];
-    var i;
-    var len = shapes ? shapes.length : 0;
-    for (i = 0; i < len; i += 1) {
-      if (shapes[i].ty === 'gr') {
-        arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'fl') {
-        arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'st') {
-        arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tm') {
-        arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'tr') {
-        // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
-      } else if (shapes[i].ty === 'el') {
-        arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sr') {
-        arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'sh') {
-        arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rc') {
-        arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rd') {
-        arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'rp') {
-        arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else if (shapes[i].ty === 'gf') {
-        arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
-      } else {
-        arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
-      }
-    }
-    return arr;
-  }
-
-  function contentsInterfaceFactory(shape, view, propertyGroup) {
-    var interfaces;
-    var interfaceFunction = function _interfaceFunction(value) {
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
-          return interfaces[i];
+      for (i = 0; i < len; i += 1) {
+        if (shapes[i].ty === 'gr') {
+          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'fl') {
+          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'st') {
+          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tm') {
+          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
+        } else if (shapes[i].ty === 'el') {
+          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sr') {
+          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'sh') {
+          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rc') {
+          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rd') {
+          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'rp') {
+          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else if (shapes[i].ty === 'gf') {
+          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));
+        } else {
+          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));
         }
-        i += 1;
       }
-      if (typeof value === 'number') {
-        return interfaces[value - 1];
-      }
-      return null;
-    };
 
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
-    interfaceFunction.numProperties = interfaces.length;
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.transform = transformInterface;
-    interfaceFunction.propertyIndex = shape.cix;
-    interfaceFunction._name = shape.nm;
+      return arr;
+    }
 
-    return interfaceFunction;
-  }
+    function contentsInterfaceFactory(shape, view, propertyGroup) {
+      var interfaces;
 
-  function groupInterfaceFactory(shape, view, propertyGroup) {
-    var interfaceFunction = function _interfaceFunction(value) {
-      switch (value) {
-        case 'ADBE Vectors Group':
-        case 'Contents':
-        case 2:
-          return interfaceFunction.content;
+      var interfaceFunction = function _interfaceFunction(value) {
+        var i = 0;
+        var len = interfaces.length;
+
+        while (i < len) {
+          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {
+            return interfaces[i];
+          }
+
+          i += 1;
+        }
+
+        if (typeof value === 'number') {
+          return interfaces[value - 1];
+        }
+
+        return null;
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
+      interfaceFunction.numProperties = interfaces.length;
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.transform = transformInterface;
+      interfaceFunction.propertyIndex = shape.cix;
+      interfaceFunction._name = shape.nm;
+      return interfaceFunction;
+    }
+
+    function groupInterfaceFactory(shape, view, propertyGroup) {
+      var interfaceFunction = function _interfaceFunction(value) {
+        switch (value) {
+          case 'ADBE Vectors Group':
+          case 'Contents':
+          case 2:
+            return interfaceFunction.content;
           // Not necessary for now. Keeping them here in case a new case appears
           // case 'ADBE Vector Transform Group':
           // case 3:
-        default:
-          return interfaceFunction.transform;
-      }
-    };
-    interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
-    var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
-    interfaceFunction.content = content;
-    interfaceFunction.transform = transformInterface;
-    Object.defineProperty(interfaceFunction, '_name', {
-      get: function () {
-        return shape.nm;
-      },
-    });
-    // interfaceFunction.content = interfaceFunction;
-    interfaceFunction.numProperties = shape.np;
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.nm = shape.nm;
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
 
-  function fillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
+          default:
+            return interfaceFunction.transform;
+        }
+      };
+
+      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);
+      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);
+      interfaceFunction.content = content;
+      interfaceFunction.transform = transformInterface;
+      Object.defineProperty(interfaceFunction, '_name', {
+        get: function get() {
+          return shape.nm;
+        }
+      }); // interfaceFunction.content = interfaceFunction;
+
+      interfaceFunction.numProperties = shape.np;
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.nm = shape.nm;
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
     }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
 
-    view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
+    function fillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
 
-  function gradientFillInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === 'Start Point' || val === 'start point') {
-        return interfaceFunction.startPoint;
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      if (val === 'End Point' || val === 'end point') {
-        return interfaceFunction.endPoint;
-      }
-      if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      startPoint: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      endPoint: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      type: {
-        get: function () {
-          return 'a';
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
-    return interfaceFunction;
-  }
-  function defaultInterfaceFactory() {
-    function interfaceFunction() {
-      return null;
-    }
-    return interfaceFunction;
-  }
-
-  function strokeInterfaceFactory(shape, view, propertyGroup) {
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
-    function addPropertyToDashOb(i) {
-      Object.defineProperty(dashOb, shape.d[i].nm, {
-        get: ExpressionPropertyInterface(view.d.dataProps[i].p),
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
       });
-    }
-    var i;
-    var len = shape.d ? shape.d.length : 0;
-    var dashOb = {};
-    for (i = 0; i < len; i += 1) {
-      addPropertyToDashOb(i);
-      view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    function interfaceFunction(val) {
-      if (val === 'Color' || val === 'color') {
-        return interfaceFunction.color;
-      } if (val === 'Opacity' || val === 'opacity') {
-        return interfaceFunction.opacity;
-      } if (val === 'Stroke Width' || val === 'stroke width') {
-        return interfaceFunction.strokeWidth;
+    function gradientFillInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === 'Start Point' || val === 'start point') {
+          return interfaceFunction.startPoint;
+        }
+
+        if (val === 'End Point' || val === 'end point') {
+          return interfaceFunction.endPoint;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        return null;
       }
-      return null;
-    }
-    Object.defineProperties(interfaceFunction, {
-      color: {
-        get: ExpressionPropertyInterface(view.c),
-      },
-      opacity: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      strokeWidth: {
-        get: ExpressionPropertyInterface(view.w),
-      },
-      dash: {
-        get: function () {
-          return dashOb;
+
+      Object.defineProperties(interfaceFunction, {
+        startPoint: {
+          get: ExpressionPropertyInterface(view.s)
         },
-      },
-      _name: { value: shape.nm },
-      mn: { value: shape.mn },
-    });
-
-    view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
-    return interfaceFunction;
-  }
-
-  function trimInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(val) {
-      if (val === shape.e.ix || val === 'End' || val === 'end') {
-        return interfaceFunction.end;
-      }
-      if (val === shape.s.ix) {
-        return interfaceFunction.start;
-      }
-      if (val === shape.o.ix) {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-
-    view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
-    view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
-    view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    interfaceFunction.propertyIndex = shape.ix;
-    interfaceFunction.propertyGroup = propertyGroup;
-
-    Object.defineProperties(interfaceFunction, {
-      start: {
-        get: ExpressionPropertyInterface(view.s),
-      },
-      end: {
-        get: ExpressionPropertyInterface(view.e),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(view.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function transformInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.a.ix === value || value === 'Anchor Point') {
-        return interfaceFunction.anchorPoint;
-      }
-      if (shape.o.ix === value || value === 'Opacity') {
-        return interfaceFunction.opacity;
-      }
-      if (shape.p.ix === value || value === 'Position') {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
-        return interfaceFunction.rotation;
-      }
-      if (shape.s.ix === value || value === 'Scale') {
-        return interfaceFunction.scale;
-      }
-      if ((shape.sk && shape.sk.ix === value) || value === 'Skew') {
-        return interfaceFunction.skew;
-      }
-      if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') {
-        return interfaceFunction.skewAxis;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
-    view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
-    view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (view.transform.mProps.sk) {
-      view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
-      view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
-    }
-    view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      opacity: {
-        get: ExpressionPropertyInterface(view.transform.mProps.o),
-      },
-      position: {
-        get: ExpressionPropertyInterface(view.transform.mProps.p),
-      },
-      anchorPoint: {
-        get: ExpressionPropertyInterface(view.transform.mProps.a),
-      },
-      scale: {
-        get: ExpressionPropertyInterface(view.transform.mProps.s),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(view.transform.mProps.r),
-      },
-      skew: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sk),
-      },
-      skewAxis: {
-        get: ExpressionPropertyInterface(view.transform.mProps.sa),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.ty = 'tr';
-    interfaceFunction.mn = shape.mn;
-    interfaceFunction.propertyGroup = propertyGroup;
-    return interfaceFunction;
-  }
-
-  function ellipseInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.s.ix === value) {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    interfaceFunction.propertyIndex = shape.ix;
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function starInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.rotation;
-      }
-      if (shape.pt.ix === value) {
-        return interfaceFunction.points;
-      }
-      if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
-        return interfaceFunction.outerRadius;
-      }
-      if (shape.os.ix === value) {
-        return interfaceFunction.outerRoundness;
-      }
-      if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
-        return interfaceFunction.innerRadius;
-      }
-      if (shape.is && shape.is.ix === value) {
-        return interfaceFunction.innerRoundness;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
-    prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
-    prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-    if (shape.ir) {
-      prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
-      prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
-    }
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      rotation: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      points: {
-        get: ExpressionPropertyInterface(prop.pt),
-      },
-      outerRadius: {
-        get: ExpressionPropertyInterface(prop.or),
-      },
-      outerRoundness: {
-        get: ExpressionPropertyInterface(prop.os),
-      },
-      innerRadius: {
-        get: ExpressionPropertyInterface(prop.ir),
-      },
-      innerRoundness: {
-        get: ExpressionPropertyInterface(prop.is),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function rectInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.p.ix === value) {
-        return interfaceFunction.position;
-      }
-      if (shape.r.ix === value) {
-        return interfaceFunction.roundness;
-      }
-      if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
-        return interfaceFunction.size;
-      }
-      return null;
-    }
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-
-    var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
-    prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
-    prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      position: {
-        get: ExpressionPropertyInterface(prop.p),
-      },
-      roundness: {
-        get: ExpressionPropertyInterface(prop.r),
-      },
-      size: {
-        get: ExpressionPropertyInterface(prop.s),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function roundedInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.r.ix === value || value === 'Round Corners 1') {
-        return interfaceFunction.radius;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
-
-    Object.defineProperties(interfaceFunction, {
-      radius: {
-        get: ExpressionPropertyInterface(prop.rd),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  function repeaterInterfaceFactory(shape, view, propertyGroup) {
-    function interfaceFunction(value) {
-      if (shape.c.ix === value || value === 'Copies') {
-        return interfaceFunction.copies;
-      } if (shape.o.ix === value || value === 'Offset') {
-        return interfaceFunction.offset;
-      }
-      return null;
-    }
-
-    var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
-    var prop = view;
-    interfaceFunction.propertyIndex = shape.ix;
-    prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
-    prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
-    Object.defineProperties(interfaceFunction, {
-      copies: {
-        get: ExpressionPropertyInterface(prop.c),
-      },
-      offset: {
-        get: ExpressionPropertyInterface(prop.o),
-      },
-      _name: { value: shape.nm },
-    });
-    interfaceFunction.mn = shape.mn;
-    return interfaceFunction;
-  }
-
-  return function (shapes, view, propertyGroup) {
-    var interfaces;
-    function _interfaceFunction(value) {
-      if (typeof value === 'number') {
-        value = value === undefined ? 1 : value;
-        if (value === 0) {
-          return propertyGroup;
-        }
-        return interfaces[value - 1];
-      }
-      var i = 0;
-      var len = interfaces.length;
-      while (i < len) {
-        if (interfaces[i]._name === value) {
-          return interfaces[i];
-        }
-        i += 1;
-      }
-      return null;
-    }
-    function parentGroupWrapper() {
-      return propertyGroup;
-    }
-    _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
-    interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
-    _interfaceFunction.numProperties = interfaces.length;
-    _interfaceFunction._name = 'Contents';
-    return _interfaceFunction;
-  };
-}());
-
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
-  return function (elem) {
-    var _prevValue;
-    var _sourceText;
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Text Document':
-          return _thisLayerFunction.sourceText;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisLayerFunction, 'sourceText', {
-      get: function () {
-        elem.textProperty.getValue();
-        var stringValue = elem.textProperty.currentData.t;
-        if (stringValue !== _prevValue) {
-          elem.textProperty.currentData.t = _prevValue;
-          _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
-          // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
-          _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
-        }
-        return _sourceText;
-      },
-    });
-    return _thisLayerFunction;
-  };
-}());
-
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
-
-var LayerExpressionInterface = (function () {
-  function getMatrix(time) {
-    var toWorldMat = new Matrix();
-    if (time !== undefined) {
-      var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);
-      propMatrix.clone(toWorldMat);
-    } else {
-      var transformMat = this._elem.finalTransform.mProp;
-      transformMat.applyToMatrix(toWorldMat);
-    }
-    return toWorldMat;
-  }
-
-  function toWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function toWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.applyPoint(toWorldMat, arr);
-  }
-
-  function fromWorldVec(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    toWorldMat.props[12] = 0;
-    toWorldMat.props[13] = 0;
-    toWorldMat.props[14] = 0;
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function fromWorld(arr, time) {
-    var toWorldMat = this.getMatrix(time);
-    return this.invertPoint(toWorldMat, arr);
-  }
-
-  function applyPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);
-  }
-
-  function invertPoint(matrix, arr) {
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);
-      }
-    }
-    return matrix.inversePoint(arr);
-  }
-
-  function fromComp(arr) {
-    var toWorldMat = new Matrix();
-    toWorldMat.reset();
-    this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-    if (this._elem.hierarchy && this._elem.hierarchy.length) {
-      var i;
-      var len = this._elem.hierarchy.length;
-      for (i = 0; i < len; i += 1) {
-        this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
-      }
-      return toWorldMat.inversePoint(arr);
-    }
-    return toWorldMat.inversePoint(arr);
-  }
-
-  function sampleImage() {
-    return [1, 1, 1, 1];
-  }
-
-  return function (elem) {
-    var transformInterface;
-
-    function _registerMaskInterface(maskManager) {
-      _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
-    }
-    function _registerEffectsInterface(effects) {
-      _thisLayerFunction.effect = effects;
-    }
-
-    function _thisLayerFunction(name) {
-      switch (name) {
-        case 'ADBE Root Vectors Group':
-        case 'Contents':
-        case 2:
-          return _thisLayerFunction.shapeInterface;
-        case 1:
-        case 6:
-        case 'Transform':
-        case 'transform':
-        case 'ADBE Transform Group':
-          return transformInterface;
-        case 4:
-        case 'ADBE Effect Parade':
-        case 'effects':
-        case 'Effects':
-          return _thisLayerFunction.effect;
-        case 'ADBE Text Properties':
-          return _thisLayerFunction.textInterface;
-        default:
-          return null;
-      }
-    }
-    _thisLayerFunction.getMatrix = getMatrix;
-    _thisLayerFunction.invertPoint = invertPoint;
-    _thisLayerFunction.applyPoint = applyPoint;
-    _thisLayerFunction.toWorld = toWorld;
-    _thisLayerFunction.toWorldVec = toWorldVec;
-    _thisLayerFunction.fromWorld = fromWorld;
-    _thisLayerFunction.fromWorldVec = fromWorldVec;
-    _thisLayerFunction.toComp = toWorld;
-    _thisLayerFunction.fromComp = fromComp;
-    _thisLayerFunction.sampleImage = sampleImage;
-    _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-    _thisLayerFunction._elem = elem;
-    transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
-    var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-    Object.defineProperties(_thisLayerFunction, {
-      hasParent: {
-        get: function () {
-          return elem.hierarchy.length;
+        endPoint: {
+          get: ExpressionPropertyInterface(view.e)
         },
-      },
-      parent: {
-        get: function () {
-          return elem.hierarchy[0].layerInterface;
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
         },
-      },
-      rotation: getDescriptor(transformInterface, 'rotation'),
-      scale: getDescriptor(transformInterface, 'scale'),
-      position: getDescriptor(transformInterface, 'position'),
-      opacity: getDescriptor(transformInterface, 'opacity'),
-      anchorPoint: anchorPointDescriptor,
-      anchor_point: anchorPointDescriptor,
-      transform: {
-        get: function () {
-          return transformInterface;
-        },
-      },
-      active: {
-        get: function () {
-          return elem.isInRange;
-        },
-      },
-    });
-
-    _thisLayerFunction.startTime = elem.data.st;
-    _thisLayerFunction.index = elem.data.ind;
-    _thisLayerFunction.source = elem.data.refId;
-    _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
-    _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
-    _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;
-    _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;
-    _thisLayerFunction._name = elem.data.nm;
-
-    _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
-    _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
-  var outlineInterfaceFactory = (function (elem) {
-    var currentPropertyName = '';
-    var currentProperty = elem.getFootageData();
-    function init() {
-      currentPropertyName = '';
-      currentProperty = elem.getFootageData();
-      return searchProperty;
-    }
-    function searchProperty(value) {
-      if (currentProperty[value]) {
-        currentPropertyName = value;
-        currentProperty = currentProperty[value];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      var propertyNameIndex = value.indexOf(currentPropertyName);
-      if (propertyNameIndex !== -1) {
-        var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
-        currentProperty = currentProperty[index];
-        if (typeof currentProperty === 'object') {
-          return searchProperty;
-        }
-        return currentProperty;
-      }
-      return '';
-    }
-    return init;
-  });
-
-  var dataInterfaceFactory = function (elem) {
-    function interfaceFunction(value) {
-      if (value === 'Outline') {
-        return interfaceFunction.outlineInterface();
-      }
-      return null;
-    }
-
-    interfaceFunction._name = 'Outline';
-    interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
-    return interfaceFunction;
-  };
-
-  return function (elem) {
-    function _interfaceFunction(value) {
-      if (value === 'Data') {
-        return _interfaceFunction.dataInterface;
-      }
-      return null;
-    }
-
-    _interfaceFunction._name = 'Data';
-    _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
-    return _interfaceFunction;
-  };
-}());
-
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
-  return function (comp) {
-    function _thisLayerFunction(name) {
-      var i = 0;
-      var len = comp.layers.length;
-      while (i < len) {
-        if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
-          return comp.elements[i].layerInterface;
-        }
-        i += 1;
-      }
-      return null;
-      // return {active:false};
-    }
-    Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm });
-    _thisLayerFunction.layer = _thisLayerFunction;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
-    _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
-    _thisLayerFunction.pixelAspect = 1;
-    _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
-    _thisLayerFunction.displayStartTime = 0;
-    _thisLayerFunction.numLayers = comp.layers.length;
-    return _thisLayerFunction;
-  };
-}());
-
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
-
-var TransformExpressionInterface = (function () {
-  return function (transform) {
-    function _thisFunction(name) {
-      switch (name) {
-        case 'scale':
-        case 'Scale':
-        case 'ADBE Scale':
-        case 6:
-          return _thisFunction.scale;
-        case 'rotation':
-        case 'Rotation':
-        case 'ADBE Rotation':
-        case 'ADBE Rotate Z':
-        case 10:
-          return _thisFunction.rotation;
-        case 'ADBE Rotate X':
-          return _thisFunction.xRotation;
-        case 'ADBE Rotate Y':
-          return _thisFunction.yRotation;
-        case 'position':
-        case 'Position':
-        case 'ADBE Position':
-        case 2:
-          return _thisFunction.position;
-        case 'ADBE Position_0':
-          return _thisFunction.xPosition;
-        case 'ADBE Position_1':
-          return _thisFunction.yPosition;
-        case 'ADBE Position_2':
-          return _thisFunction.zPosition;
-        case 'anchorPoint':
-        case 'AnchorPoint':
-        case 'Anchor Point':
-        case 'ADBE AnchorPoint':
-        case 1:
-          return _thisFunction.anchorPoint;
-        case 'opacity':
-        case 'Opacity':
-        case 11:
-          return _thisFunction.opacity;
-        default:
-          return null;
-      }
-    }
-    Object.defineProperty(_thisFunction, 'rotation', {
-      get: ExpressionPropertyInterface(transform.r || transform.rz),
-    });
-
-    Object.defineProperty(_thisFunction, 'zRotation', {
-      get: ExpressionPropertyInterface(transform.rz || transform.r),
-    });
-
-    Object.defineProperty(_thisFunction, 'xRotation', {
-      get: ExpressionPropertyInterface(transform.rx),
-    });
-
-    Object.defineProperty(_thisFunction, 'yRotation', {
-      get: ExpressionPropertyInterface(transform.ry),
-    });
-    Object.defineProperty(_thisFunction, 'scale', {
-      get: ExpressionPropertyInterface(transform.s),
-    });
-    var _px;
-    var _py;
-    var _pz;
-    var _transformFactory;
-    if (transform.p) {
-      _transformFactory = ExpressionPropertyInterface(transform.p);
-    } else {
-      _px = ExpressionPropertyInterface(transform.px);
-      _py = ExpressionPropertyInterface(transform.py);
-      if (transform.pz) {
-        _pz = ExpressionPropertyInterface(transform.pz);
-      }
-    }
-    Object.defineProperty(_thisFunction, 'position', {
-      get: function () {
-        if (transform.p) {
-          return _transformFactory();
-        }
-        return [
-          _px(),
-          _py(),
-          _pz ? _pz() : 0];
-      },
-    });
-
-    Object.defineProperty(_thisFunction, 'xPosition', {
-      get: ExpressionPropertyInterface(transform.px),
-    });
-
-    Object.defineProperty(_thisFunction, 'yPosition', {
-      get: ExpressionPropertyInterface(transform.py),
-    });
-
-    Object.defineProperty(_thisFunction, 'zPosition', {
-      get: ExpressionPropertyInterface(transform.pz),
-    });
-
-    Object.defineProperty(_thisFunction, 'anchorPoint', {
-      get: ExpressionPropertyInterface(transform.a),
-    });
-
-    Object.defineProperty(_thisFunction, 'opacity', {
-      get: ExpressionPropertyInterface(transform.o),
-    });
-
-    Object.defineProperty(_thisFunction, 'skew', {
-      get: ExpressionPropertyInterface(transform.sk),
-    });
-
-    Object.defineProperty(_thisFunction, 'skewAxis', {
-      get: ExpressionPropertyInterface(transform.sa),
-    });
-
-    Object.defineProperty(_thisFunction, 'orientation', {
-      get: ExpressionPropertyInterface(transform.or),
-    });
-
-    return _thisFunction;
-  };
-}());
-
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
-  function registerComposition(comp) {
-    this.compositions.push(comp);
-  }
-
-  return function () {
-    function _thisProjectFunction(name) {
-      var i = 0;
-      var len = this.compositions.length;
-      while (i < len) {
-        if (this.compositions[i].data && this.compositions[i].data.nm === name) {
-          if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
-            this.compositions[i].prepareFrame(this.currentFrame);
+        type: {
+          get: function get() {
+            return 'a';
           }
-          return this.compositions[i].compInterface;
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
         }
-        i += 1;
-      }
-      return null;
+      });
+      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));
+      return interfaceFunction;
     }
 
-    _thisProjectFunction.compositions = [];
-    _thisProjectFunction.currentFrame = 0;
-
-    _thisProjectFunction.registerComposition = registerComposition;
-
-    return _thisProjectFunction;
-  };
-}());
-
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
-
-var EffectsExpressionInterface = (function () {
-  var ob = {
-    createEffectsInterface: createEffectsInterface,
-  };
-
-  function createEffectsInterface(elem, propertyGroup) {
-    if (elem.effectsManager) {
-      var effectElements = [];
-      var effectsData = elem.data.ef;
-      var i;
-      var len = elem.effectsManager.effectElements.length;
-      for (i = 0; i < len; i += 1) {
-        effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));
+    function defaultInterfaceFactory() {
+      function interfaceFunction() {
+        return null;
       }
 
-      var effects = elem.data.ef || [];
-      var groupInterface = function (name) {
-        i = 0;
-        len = effects.length;
+      return interfaceFunction;
+    }
+
+    function strokeInterfaceFactory(shape, view, propertyGroup) {
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);
+
+      function addPropertyToDashOb(i) {
+        Object.defineProperty(dashOb, shape.d[i].nm, {
+          get: ExpressionPropertyInterface(view.d.dataProps[i].p)
+        });
+      }
+
+      var i;
+      var len = shape.d ? shape.d.length : 0;
+      var dashOb = {};
+
+      for (i = 0; i < len; i += 1) {
+        addPropertyToDashOb(i);
+        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
+      }
+
+      function interfaceFunction(val) {
+        if (val === 'Color' || val === 'color') {
+          return interfaceFunction.color;
+        }
+
+        if (val === 'Opacity' || val === 'opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (val === 'Stroke Width' || val === 'stroke width') {
+          return interfaceFunction.strokeWidth;
+        }
+
+        return null;
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        color: {
+          get: ExpressionPropertyInterface(view.c)
+        },
+        opacity: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        strokeWidth: {
+          get: ExpressionPropertyInterface(view.w)
+        },
+        dash: {
+          get: function get() {
+            return dashOb;
+          }
+        },
+        _name: {
+          value: shape.nm
+        },
+        mn: {
+          value: shape.mn
+        }
+      });
+      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));
+      return interfaceFunction;
+    }
+
+    function trimInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(val) {
+        if (val === shape.e.ix || val === 'End' || val === 'end') {
+          return interfaceFunction.end;
+        }
+
+        if (val === shape.s.ix) {
+          return interfaceFunction.start;
+        }
+
+        if (val === shape.o.ix) {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));
+      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));
+      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      interfaceFunction.propertyIndex = shape.ix;
+      interfaceFunction.propertyGroup = propertyGroup;
+      Object.defineProperties(interfaceFunction, {
+        start: {
+          get: ExpressionPropertyInterface(view.s)
+        },
+        end: {
+          get: ExpressionPropertyInterface(view.e)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(view.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function transformInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.a.ix === value || value === 'Anchor Point') {
+          return interfaceFunction.anchorPoint;
+        }
+
+        if (shape.o.ix === value || value === 'Opacity') {
+          return interfaceFunction.opacity;
+        }
+
+        if (shape.p.ix === value || value === 'Position') {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.s.ix === value || value === 'Scale') {
+          return interfaceFunction.scale;
+        }
+
+        if (shape.sk && shape.sk.ix === value || value === 'Skew') {
+          return interfaceFunction.skew;
+        }
+
+        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {
+          return interfaceFunction.skewAxis;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));
+      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));
+      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (view.transform.mProps.sk) {
+        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));
+        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));
+      }
+
+      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        opacity: {
+          get: ExpressionPropertyInterface(view.transform.mProps.o)
+        },
+        position: {
+          get: ExpressionPropertyInterface(view.transform.mProps.p)
+        },
+        anchorPoint: {
+          get: ExpressionPropertyInterface(view.transform.mProps.a)
+        },
+        scale: {
+          get: ExpressionPropertyInterface(view.transform.mProps.s)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(view.transform.mProps.r)
+        },
+        skew: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sk)
+        },
+        skewAxis: {
+          get: ExpressionPropertyInterface(view.transform.mProps.sa)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.ty = 'tr';
+      interfaceFunction.mn = shape.mn;
+      interfaceFunction.propertyGroup = propertyGroup;
+      return interfaceFunction;
+    }
+
+    function ellipseInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.s.ix === value) {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      interfaceFunction.propertyIndex = shape.ix;
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function starInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.rotation;
+        }
+
+        if (shape.pt.ix === value) {
+          return interfaceFunction.points;
+        }
+
+        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {
+          return interfaceFunction.outerRadius;
+        }
+
+        if (shape.os.ix === value) {
+          return interfaceFunction.outerRoundness;
+        }
+
+        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {
+          return interfaceFunction.innerRadius;
+        }
+
+        if (shape.is && shape.is.ix === value) {
+          return interfaceFunction.innerRoundness;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));
+      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));
+      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+
+      if (shape.ir) {
+        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));
+        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));
+      }
+
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        rotation: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        points: {
+          get: ExpressionPropertyInterface(prop.pt)
+        },
+        outerRadius: {
+          get: ExpressionPropertyInterface(prop.or)
+        },
+        outerRoundness: {
+          get: ExpressionPropertyInterface(prop.os)
+        },
+        innerRadius: {
+          get: ExpressionPropertyInterface(prop.ir)
+        },
+        innerRoundness: {
+          get: ExpressionPropertyInterface(prop.is)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function rectInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.p.ix === value) {
+          return interfaceFunction.position;
+        }
+
+        if (shape.r.ix === value) {
+          return interfaceFunction.roundness;
+        }
+
+        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {
+          return interfaceFunction.size;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));
+      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));
+      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        position: {
+          get: ExpressionPropertyInterface(prop.p)
+        },
+        roundness: {
+          get: ExpressionPropertyInterface(prop.r)
+        },
+        size: {
+          get: ExpressionPropertyInterface(prop.s)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function roundedInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.r.ix === value || value === 'Round Corners 1') {
+          return interfaceFunction.radius;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        radius: {
+          get: ExpressionPropertyInterface(prop.rd)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    function repeaterInterfaceFactory(shape, view, propertyGroup) {
+      function interfaceFunction(value) {
+        if (shape.c.ix === value || value === 'Copies') {
+          return interfaceFunction.copies;
+        }
+
+        if (shape.o.ix === value || value === 'Offset') {
+          return interfaceFunction.offset;
+        }
+
+        return null;
+      }
+
+      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);
+
+      var prop = view;
+      interfaceFunction.propertyIndex = shape.ix;
+      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));
+      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));
+      Object.defineProperties(interfaceFunction, {
+        copies: {
+          get: ExpressionPropertyInterface(prop.c)
+        },
+        offset: {
+          get: ExpressionPropertyInterface(prop.o)
+        },
+        _name: {
+          value: shape.nm
+        }
+      });
+      interfaceFunction.mn = shape.mn;
+      return interfaceFunction;
+    }
+
+    return function (shapes, view, propertyGroup) {
+      var interfaces;
+
+      function _interfaceFunction(value) {
+        if (typeof value === 'number') {
+          value = value === undefined ? 1 : value;
+
+          if (value === 0) {
+            return propertyGroup;
+          }
+
+          return interfaces[value - 1];
+        }
+
+        var i = 0;
+        var len = interfaces.length;
+
         while (i < len) {
-          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-            return effectElements[i];
+          if (interfaces[i]._name === value) {
+            return interfaces[i];
           }
+
           i += 1;
         }
+
         return null;
-      };
-      Object.defineProperty(groupInterface, 'numProperties', {
-        get: function () {
-          return effects.length;
-        },
-      });
-      return groupInterface;
-    }
-    return null;
-  }
+      }
 
-  function createGroupInterface(data, elements, propertyGroup, elem) {
-    function groupInterface(name) {
-      var effects = data.ef;
-      var i = 0;
-      var len = effects.length;
-      while (i < len) {
-        if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {
-          if (effects[i].ty === 5) {
-            return effectElements[i];
+      function parentGroupWrapper() {
+        return propertyGroup;
+      }
+
+      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);
+      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);
+      _interfaceFunction.numProperties = interfaces.length;
+      _interfaceFunction._name = 'Contents';
+      return _interfaceFunction;
+    };
+  }();
+
+  var TextExpressionInterface = function () {
+    return function (elem) {
+      var _prevValue;
+
+      var _sourceText;
+
+      function _thisLayerFunction(name) {
+        switch (name) {
+          case 'ADBE Text Document':
+            return _thisLayerFunction.sourceText;
+
+          default:
+            return null;
+        }
+      }
+
+      Object.defineProperty(_thisLayerFunction, 'sourceText', {
+        get: function get() {
+          elem.textProperty.getValue();
+          var stringValue = elem.textProperty.currentData.t;
+
+          if (stringValue !== _prevValue) {
+            elem.textProperty.currentData.t = _prevValue;
+            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers
+            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
+
+            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers
           }
-          return effectElements[i]();
+
+          return _sourceText;
         }
+      });
+      return _thisLayerFunction;
+    };
+  }();
+
+  var getBlendMode = function () {
+    var blendModeEnums = {
+      0: 'source-over',
+      1: 'multiply',
+      2: 'screen',
+      3: 'overlay',
+      4: 'darken',
+      5: 'lighten',
+      6: 'color-dodge',
+      7: 'color-burn',
+      8: 'hard-light',
+      9: 'soft-light',
+      10: 'difference',
+      11: 'exclusion',
+      12: 'hue',
+      13: 'saturation',
+      14: 'color',
+      15: 'luminosity'
+    };
+    return function (mode) {
+      return blendModeEnums[mode] || '';
+    };
+  }();
+
+  function SliderEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function AngleEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function ColorEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function PointEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
+  }
+
+  function LayerIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function MaskIndexEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function CheckboxEffect(data, elem, container) {
+    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
+  }
+
+  function NoValueEffect() {
+    this.p = {};
+  }
+
+  function EffectsManager(data, element) {
+    var effects = data.ef || [];
+    this.effectElements = [];
+    var i;
+    var len = effects.length;
+    var effectItem;
+
+    for (i = 0; i < len; i += 1) {
+      effectItem = new GroupEffect(effects[i], element);
+      this.effectElements.push(effectItem);
+    }
+  }
+
+  function GroupEffect(data, element) {
+    this.init(data, element);
+  }
+
+  extendPrototype([DynamicPropertyContainer], GroupEffect);
+  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+
+  GroupEffect.prototype.init = function (data, element) {
+    this.data = data;
+    this.effectElements = [];
+    this.initDynamicPropertyContainer(element);
+    var i;
+    var len = this.data.ef.length;
+    var eff;
+    var effects = this.data.ef;
+
+    for (i = 0; i < len; i += 1) {
+      eff = null;
+
+      switch (effects[i].ty) {
+        case 0:
+          eff = new SliderEffect(effects[i], element, this);
+          break;
+
+        case 1:
+          eff = new AngleEffect(effects[i], element, this);
+          break;
+
+        case 2:
+          eff = new ColorEffect(effects[i], element, this);
+          break;
+
+        case 3:
+          eff = new PointEffect(effects[i], element, this);
+          break;
+
+        case 4:
+        case 7:
+          eff = new CheckboxEffect(effects[i], element, this);
+          break;
+
+        case 10:
+          eff = new LayerIndexEffect(effects[i], element, this);
+          break;
+
+        case 11:
+          eff = new MaskIndexEffect(effects[i], element, this);
+          break;
+
+        case 5:
+          eff = new EffectsManager(effects[i], element, this);
+          break;
+        // case 6:
+
+        default:
+          eff = new NoValueEffect(effects[i], element, this);
+          break;
+      }
+
+      if (eff) {
+        this.effectElements.push(eff);
+      }
+    }
+  };
+
+  function BaseElement() {}
+
+  BaseElement.prototype = {
+    checkMasks: function checkMasks() {
+      if (!this.data.hasMask) {
+        return false;
+      }
+
+      var i = 0;
+      var len = this.data.masksProperties.length;
+
+      while (i < len) {
+        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {
+          return true;
+        }
+
         i += 1;
       }
-      throw new Error();
-    }
-    var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);
 
-    var effectElements = [];
+      return false;
+    },
+    initExpressions: function initExpressions() {
+      this.layerInterface = LayerExpressionInterface(this);
+
+      if (this.data.hasMask && this.maskManager) {
+        this.layerInterface.registerMaskInterface(this.maskManager);
+      }
+
+      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);
+      this.layerInterface.registerEffectsInterface(effectsInterface);
+
+      if (this.data.ty === 0 || this.data.xt) {
+        this.compInterface = CompExpressionInterface(this);
+      } else if (this.data.ty === 4) {
+        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);
+        this.layerInterface.content = this.layerInterface.shapeInterface;
+      } else if (this.data.ty === 5) {
+        this.layerInterface.textInterface = TextExpressionInterface(this);
+        this.layerInterface.text = this.layerInterface.textInterface;
+      }
+    },
+    setBlendMode: function setBlendMode() {
+      var blendModeValue = getBlendMode(this.data.bm);
+      var elem = this.baseElement || this.layerElement;
+      elem.style['mix-blend-mode'] = blendModeValue;
+    },
+    initBaseData: function initBaseData(data, globalData, comp) {
+      this.globalData = globalData;
+      this.comp = comp;
+      this.data = data;
+      this.layerId = createElementID(); // Stretch factor for old animations missing this property.
+
+      if (!this.data.sr) {
+        this.data.sr = 1;
+      } // effects manager
+
+
+      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);
+    },
+    getType: function getType() {
+      return this.type;
+    },
+    sourceRectAtTime: function sourceRectAtTime() {}
+  };
+
+  /**
+   * @file
+   * Handles element's layer frame update.
+   * Checks layer in point and out point
+   *
+   */
+  function FrameElement() {}
+
+  FrameElement.prototype = {
+    /**
+       * @function
+       * Initializes frame related properties.
+       *
+       */
+    initFrame: function initFrame() {
+      // set to true when inpoint is rendered
+      this._isFirstFrame = false; // list of animated properties
+
+      this.dynamicProperties = []; // If layer has been modified in current tick this will be true
+
+      this._mdf = false;
+    },
+
+    /**
+       * @function
+       * Calculates all dynamic values
+       *
+       * @param {number} num
+       * current frame number in Layer's time
+       * @param {boolean} isVisible
+       * if layers is currently in range
+       *
+       */
+    prepareProperties: function prepareProperties(num, isVisible) {
+      var i;
+      var len = this.dynamicProperties.length;
+
+      for (i = 0; i < len; i += 1) {
+        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {
+          this.dynamicProperties[i].getValue();
+
+          if (this.dynamicProperties[i]._mdf) {
+            this.globalData._mdf = true;
+            this._mdf = true;
+          }
+        }
+      }
+    },
+    addDynamicProperty: function addDynamicProperty(prop) {
+      if (this.dynamicProperties.indexOf(prop) === -1) {
+        this.dynamicProperties.push(prop);
+      }
+    }
+  };
+
+  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+
+  var FootageInterface = function () {
+    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {
+      var currentPropertyName = '';
+      var currentProperty = elem.getFootageData();
+
+      function init() {
+        currentPropertyName = '';
+        currentProperty = elem.getFootageData();
+        return searchProperty;
+      }
+
+      function searchProperty(value) {
+        if (currentProperty[value]) {
+          currentPropertyName = value;
+          currentProperty = currentProperty[value];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        var propertyNameIndex = value.indexOf(currentPropertyName);
+
+        if (propertyNameIndex !== -1) {
+          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);
+          currentProperty = currentProperty[index];
+
+          if (_typeof$2(currentProperty) === 'object') {
+            return searchProperty;
+          }
+
+          return currentProperty;
+        }
+
+        return '';
+      }
+
+      return init;
+    };
+
+    var dataInterfaceFactory = function dataInterfaceFactory(elem) {
+      function interfaceFunction(value) {
+        if (value === 'Outline') {
+          return interfaceFunction.outlineInterface();
+        }
+
+        return null;
+      }
+
+      interfaceFunction._name = 'Outline';
+      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);
+      return interfaceFunction;
+    };
+
+    return function (elem) {
+      function _interfaceFunction(value) {
+        if (value === 'Data') {
+          return _interfaceFunction.dataInterface;
+        }
+
+        return null;
+      }
+
+      _interfaceFunction._name = 'Data';
+      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);
+      return _interfaceFunction;
+    };
+  }();
+
+  function FootageElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.footageData = globalData.imageLoader.getAsset(this.assetData);
+    this.initBaseData(data, globalData, comp);
+  }
+
+  FootageElement.prototype.prepareFrame = function () {};
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);
+
+  FootageElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  FootageElement.prototype.renderFrame = function () {};
+
+  FootageElement.prototype.destroy = function () {};
+
+  FootageElement.prototype.initExpressions = function () {
+    this.layerInterface = FootageInterface(this);
+  };
+
+  FootageElement.prototype.getFootageData = function () {
+    return this.footageData;
+  };
+
+  function AudioElement(data, globalData, comp) {
+    this.initFrame();
+    this.initRenderable();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initBaseData(data, globalData, comp);
+    this._isPlaying = false;
+    this._canPlay = false;
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.audio = this.globalData.audioController.createAudio(assetPath);
+    this._currentTime = 0;
+    this.globalData.audioController.addAudio(this);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  AudioElement.prototype.prepareFrame = function (num) {
+    this.prepareRenderableFrame(num, true);
+    this.prepareProperties(num, true);
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+      this._currentTime = timeRemapped;
+    } else {
+      this._currentTime = num / this.data.sr;
+    }
+  };
+
+  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);
+
+  AudioElement.prototype.renderFrame = function () {
+    if (this.isInRange && this._canPlay) {
+      if (!this._isPlaying) {
+        this.audio.play();
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+        this._isPlaying = true;
+      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {
+        this.audio.seek(this._currentTime / this.globalData.frameRate);
+      }
+    }
+  };
+
+  AudioElement.prototype.show = function () {// this.audio.play()
+  };
+
+  AudioElement.prototype.hide = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+  };
+
+  AudioElement.prototype.pause = function () {
+    this.audio.pause();
+    this._isPlaying = false;
+    this._canPlay = false;
+  };
+
+  AudioElement.prototype.resume = function () {
+    this._canPlay = true;
+  };
+
+  AudioElement.prototype.setRate = function (rateValue) {
+    this.audio.rate(rateValue);
+  };
+
+  AudioElement.prototype.volume = function (volumeValue) {
+    this.audio.volume(volumeValue);
+  };
+
+  AudioElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  AudioElement.prototype.destroy = function () {};
+
+  AudioElement.prototype.sourceRectAtTime = function () {};
+
+  AudioElement.prototype.initExpressions = function () {};
+
+  function BaseRenderer() {}
+
+  BaseRenderer.prototype.checkLayers = function (num) {
     var i;
-    var len = data.ef.length;
+    var len = this.layers.length;
+    var data;
+    this.completeLayers = true;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (!this.elements[i]) {
+        data = this.layers[i];
+
+        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {
+          this.buildItem(i);
+        }
+      }
+
+      this.completeLayers = this.elements[i] ? this.completeLayers : false;
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.createItem = function (layer) {
+    switch (layer.ty) {
+      case 2:
+        return this.createImage(layer);
+
+      case 0:
+        return this.createComp(layer);
+
+      case 1:
+        return this.createSolid(layer);
+
+      case 3:
+        return this.createNull(layer);
+
+      case 4:
+        return this.createShape(layer);
+
+      case 5:
+        return this.createText(layer);
+
+      case 6:
+        return this.createAudio(layer);
+
+      case 13:
+        return this.createCamera(layer);
+
+      case 15:
+        return this.createFootage(layer);
+
+      default:
+        return this.createNull(layer);
+    }
+  };
+
+  BaseRenderer.prototype.createCamera = function () {
+    throw new Error('You\'re using a 3d camera. Try the html renderer.');
+  };
+
+  BaseRenderer.prototype.createAudio = function (data) {
+    return new AudioElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.createFootage = function (data) {
+    return new FootageElement(data, this.globalData, this);
+  };
+
+  BaseRenderer.prototype.buildAllItems = function () {
+    var i;
+    var len = this.layers.length;
+
     for (i = 0; i < len; i += 1) {
-      if (data.ef[i].ty === 5) {
-        effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));
+      this.buildItem(i);
+    }
+
+    this.checkPendingElements();
+  };
+
+  BaseRenderer.prototype.includeLayers = function (newLayers) {
+    this.completeLayers = false;
+    var i;
+    var len = newLayers.length;
+    var j;
+    var jLen = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      j = 0;
+
+      while (j < jLen) {
+        if (this.layers[j].id === newLayers[i].id) {
+          this.layers[j] = newLayers[i];
+          break;
+        }
+
+        j += 1;
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setProjectInterface = function (pInterface) {
+    this.globalData.projectInterface = pInterface;
+  };
+
+  BaseRenderer.prototype.initItems = function () {
+    if (!this.globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+  };
+
+  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {
+    var elements = this.elements;
+    var layers = this.layers;
+    var i = 0;
+    var len = layers.length;
+
+    while (i < len) {
+      if (layers[i].ind == parentName) {
+        // eslint-disable-line eqeqeq
+        if (!elements[i] || elements[i] === true) {
+          this.buildItem(i);
+          this.addPendingElement(element);
+        } else {
+          hierarchy.push(elements[i]);
+          elements[i].setAsParent();
+
+          if (layers[i].parent !== undefined) {
+            this.buildElementParenting(element, layers[i].parent, hierarchy);
+          } else {
+            element.setHierarchy(hierarchy);
+          }
+        }
+      }
+
+      i += 1;
+    }
+  };
+
+  BaseRenderer.prototype.addPendingElement = function (element) {
+    this.pendingElements.push(element);
+  };
+
+  BaseRenderer.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i]);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.imageLoader = this.animationItem.imagePreloader;
+    this.globalData.audioController = this.animationItem.audioController;
+    this.globalData.frameId = 0;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize = {
+      w: animData.w,
+      h: animData.h
+    };
+  };
+
+  function TransformElement() {}
+
+  TransformElement.prototype = {
+    initTransform: function initTransform() {
+      this.finalTransform = {
+        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {
+          o: 0
+        },
+        _matMdf: false,
+        _opMdf: false,
+        mat: new Matrix()
+      };
+
+      if (this.data.ao) {
+        this.finalTransform.mProp.autoOriented = true;
+      } // TODO: check TYPE 11: Guided elements
+
+
+      if (this.data.ty !== 11) {// this.createElements();
+      }
+    },
+    renderTransform: function renderTransform() {
+      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+      if (this.hierarchy) {
+        var mat;
+        var finalMat = this.finalTransform.mat;
+        var i = 0;
+        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.
+
+        if (!this.finalTransform._matMdf) {
+          while (i < len) {
+            if (this.hierarchy[i].finalTransform.mProp._mdf) {
+              this.finalTransform._matMdf = true;
+              break;
+            }
+
+            i += 1;
+          }
+        }
+
+        if (this.finalTransform._matMdf) {
+          mat = this.finalTransform.mProp.v.props;
+          finalMat.cloneFromProps(mat);
+
+          for (i = 0; i < len; i += 1) {
+            mat = this.hierarchy[i].finalTransform.mProp.v.props;
+            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]);
+          }
+        }
+      }
+    },
+    globalToLocal: function globalToLocal(pt) {
+      var transforms = [];
+      transforms.push(this.finalTransform);
+      var flag = true;
+      var comp = this.comp;
+
+      while (flag) {
+        if (comp.finalTransform) {
+          if (comp.data.hasMask) {
+            transforms.splice(0, 0, comp.finalTransform);
+          }
+
+          comp = comp.comp;
+        } else {
+          flag = false;
+        }
+      }
+
+      var i;
+      var len = transforms.length;
+      var ptNew;
+
+      for (i = 0; i < len; i += 1) {
+        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+
+        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+      }
+
+      return pt;
+    },
+    mHelper: new Matrix()
+  };
+
+  function MaskElement(data, element, globalData) {
+    this.data = data;
+    this.element = element;
+    this.globalData = globalData;
+    this.storedData = [];
+    this.masksProperties = this.data.masksProperties || [];
+    this.maskElement = null;
+    var defs = this.globalData.defs;
+    var i;
+    var len = this.masksProperties ? this.masksProperties.length : 0;
+    this.viewData = createSizedArray(len);
+    this.solidPath = '';
+    var path;
+    var properties = this.masksProperties;
+    var count = 0;
+    var currentMasks = [];
+    var j;
+    var jLen;
+    var layerId = createElementID();
+    var rect;
+    var expansor;
+    var feMorph;
+    var x;
+    var maskType = 'clipPath';
+    var maskRef = 'clip-path';
+
+    for (i = 0; i < len; i += 1) {
+      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {
+        maskType = 'mask';
+        maskRef = 'mask';
+      }
+
+      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {
+        rect = createNS('rect');
+        rect.setAttribute('fill', '#ffffff');
+        rect.setAttribute('width', this.element.comp.data.w || 0);
+        rect.setAttribute('height', this.element.comp.data.h || 0);
+        currentMasks.push(rect);
       } else {
-        effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));
+        rect = null;
+      }
+
+      path = createNS('path');
+
+      if (properties[i].mode === 'n') {
+        // TODO move this to a factory or to a constructor
+        this.viewData[i] = {
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          elem: path,
+          lastPath: ''
+        };
+        defs.appendChild(path);
+      } else {
+        count += 1;
+        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        path.setAttribute('clip-rule', 'nonzero');
+        var filterID;
+
+        if (properties[i].x.k !== 0) {
+          maskType = 'mask';
+          maskRef = 'mask';
+          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);
+          filterID = createElementID();
+          expansor = createNS('filter');
+          expansor.setAttribute('id', filterID);
+          feMorph = createNS('feMorphology');
+          feMorph.setAttribute('operator', 'erode');
+          feMorph.setAttribute('in', 'SourceGraphic');
+          feMorph.setAttribute('radius', '0');
+          expansor.appendChild(feMorph);
+          defs.appendChild(expansor);
+          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');
+        } else {
+          feMorph = null;
+          x = null;
+        } // TODO move this to a factory or to a constructor
+
+
+        this.storedData[i] = {
+          elem: path,
+          x: x,
+          expan: feMorph,
+          lastPath: '',
+          lastOperator: '',
+          filterId: filterID,
+          lastRadius: 0
+        };
+
+        if (properties[i].mode === 'i') {
+          jLen = currentMasks.length;
+          var g = createNS('g');
+
+          for (j = 0; j < jLen; j += 1) {
+            g.appendChild(currentMasks[j]);
+          }
+
+          var mask = createNS('mask');
+          mask.setAttribute('mask-type', 'alpha');
+          mask.setAttribute('id', layerId + '_' + count);
+          mask.appendChild(path);
+          defs.appendChild(mask);
+          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
+          currentMasks.length = 0;
+          currentMasks.push(g);
+        } else {
+          currentMasks.push(path);
+        }
+
+        if (properties[i].inv && !this.solidPath) {
+          this.solidPath = this.createLayerSolidPath();
+        } // TODO move this to a factory or to a constructor
+
+
+        this.viewData[i] = {
+          elem: path,
+          lastPath: '',
+          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),
+          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),
+          invRect: rect
+        };
+
+        if (!this.viewData[i].prop.k) {
+          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);
+        }
       }
     }
 
-    if (data.mn === 'ADBE Color Control') {
-      Object.defineProperty(groupInterface, 'color', {
-        get: function () {
-          return effectElements[0]();
-        },
+    this.maskElement = createNS(maskType);
+    len = currentMasks.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.maskElement.appendChild(currentMasks[i]);
+    }
+
+    if (count > 0) {
+      this.maskElement.setAttribute('id', layerId);
+      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
+      defs.appendChild(this.maskElement);
+    }
+
+    if (this.viewData.length) {
+      this.element.addRenderableComponent(this);
+    }
+  }
+
+  MaskElement.prototype.getMaskProperty = function (pos) {
+    return this.viewData[pos].prop;
+  };
+
+  MaskElement.prototype.renderFrame = function (isFirstFrame) {
+    var finalMat = this.element.finalTransform.mat;
+    var i;
+    var len = this.masksProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.viewData[i].prop._mdf || isFirstFrame) {
+        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);
+      }
+
+      if (this.viewData[i].op._mdf || isFirstFrame) {
+        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);
+      }
+
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {
+          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());
+        }
+
+        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {
+          var feMorph = this.storedData[i].expan;
+
+          if (this.storedData[i].x.v < 0) {
+            if (this.storedData[i].lastOperator !== 'erode') {
+              this.storedData[i].lastOperator = 'erode';
+              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
+            }
+
+            feMorph.setAttribute('radius', -this.storedData[i].x.v);
+          } else {
+            if (this.storedData[i].lastOperator !== 'dilate') {
+              this.storedData[i].lastOperator = 'dilate';
+              this.storedData[i].elem.setAttribute('filter', null);
+            }
+
+            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);
+          }
+        }
+      }
+    }
+  };
+
+  MaskElement.prototype.getMaskelement = function () {
+    return this.maskElement;
+  };
+
+  MaskElement.prototype.createLayerSolidPath = function () {
+    var path = 'M0,0 ';
+    path += ' h' + this.globalData.compSize.w;
+    path += ' v' + this.globalData.compSize.h;
+    path += ' h-' + this.globalData.compSize.w;
+    path += ' v-' + this.globalData.compSize.h + ' ';
+    return path;
+  };
+
+  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {
+    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];
+    var i;
+    var len;
+    len = pathNodes._length;
+
+    for (i = 1; i < len; i += 1) {
+      // 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];
+      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];
+    } // 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];
+
+
+    if (pathNodes.c && len > 1) {
+      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];
+    } // pathNodes.__renderedString = pathString;
+
+
+    if (viewData.lastPath !== pathString) {
+      var pathShapeValue = '';
+
+      if (viewData.elem) {
+        if (pathNodes.c) {
+          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
+        }
+
+        viewData.elem.setAttribute('d', pathShapeValue);
+      }
+
+      viewData.lastPath = pathString;
+    }
+  };
+
+  MaskElement.prototype.destroy = function () {
+    this.element = null;
+    this.globalData = null;
+    this.maskElement = null;
+    this.data = null;
+    this.masksProperties = null;
+  };
+
+  var filtersFactory = function () {
+    var ob = {};
+    ob.createFilter = createFilter;
+    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
+
+    function createFilter(filId, skipCoordinates) {
+      var fil = createNS('filter');
+      fil.setAttribute('id', filId);
+
+      if (skipCoordinates !== true) {
+        fil.setAttribute('filterUnits', 'objectBoundingBox');
+        fil.setAttribute('x', '0%');
+        fil.setAttribute('y', '0%');
+        fil.setAttribute('width', '100%');
+        fil.setAttribute('height', '100%');
+      }
+
+      return fil;
+    }
+
+    function createAlphaToLuminanceFilter() {
+      var feColorMatrix = createNS('feColorMatrix');
+      feColorMatrix.setAttribute('type', 'matrix');
+      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
+      return feColorMatrix;
+    }
+
+    return ob;
+  }();
+
+  var featureSupport = function () {
+    var ob = {
+      maskType: true
+    };
+
+    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)) {
+      ob.maskType = false;
+    }
+
+    return ob;
+  }();
+
+  function SVGTintFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    feColorMatrix.setAttribute('result', 'f2');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+
+    if (filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k) {
+      var feMerge = createNS('feMerge');
+      filter.appendChild(feMerge);
+      var feMergeNode;
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'SourceGraphic');
+      feMerge.appendChild(feMergeNode);
+      feMergeNode = createNS('feMergeNode');
+      feMergeNode.setAttribute('in', 'f2');
+      feMerge.appendChild(feMergeNode);
+    }
+  }
+
+  SVGTintFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var colorBlack = this.filterManager.effectElements[0].p.v;
+      var colorWhite = this.filterManager.effectElements[1].p.v;
+      var opacity = this.filterManager.effectElements[2].p.v / 100;
+      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');
+    }
+  };
+
+  function SVGFillFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
+    filter.appendChild(feColorMatrix);
+    this.matrixFilter = feColorMatrix;
+  }
+
+  SVGFillFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color = this.filterManager.effectElements[2].p.v;
+      var opacity = this.filterManager.effectElements[6].p.v;
+      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');
+    }
+  };
+
+  function SVGStrokeEffect(elem, filterManager) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.elem = elem;
+    this.paths = [];
+  }
+
+  SVGStrokeEffect.prototype.initialize = function () {
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
+    var path;
+    var groupPath;
+    var i;
+    var len;
+
+    if (this.filterManager.effectElements[1].p.v === 1) {
+      len = this.elem.maskManager.masksProperties.length;
+      i = 0;
+    } else {
+      i = this.filterManager.effectElements[0].p.v - 1;
+      len = i + 1;
+    }
+
+    groupPath = createNS('g');
+    groupPath.setAttribute('fill', 'none');
+    groupPath.setAttribute('stroke-linecap', 'round');
+    groupPath.setAttribute('stroke-dashoffset', 1);
+
+    for (i; i < len; i += 1) {
+      path = createNS('path');
+      groupPath.appendChild(path);
+      this.paths.push({
+        p: path,
+        m: i
       });
     }
-    Object.defineProperties(groupInterface, {
-      numProperties: {
-        get: function () {
-          return data.np;
-        },
-      },
-      _name: { value: data.nm },
-      propertyGroup: { value: _propertyGroup },
-    });
-    groupInterface.enabled = data.en !== 0;
-    groupInterface.active = groupInterface.enabled;
-    return groupInterface;
-  }
 
-  function createValueInterface(element, type, elem, propertyGroup) {
-    var expressionProperty = ExpressionPropertyInterface(element.p);
-    function interfaceFunction() {
-      if (type === 10) {
-        return elem.comp.compInterface(element.p.v);
+    if (this.filterManager.effectElements[10].p.v === 3) {
+      var mask = createNS('mask');
+      var id = createElementID();
+      mask.setAttribute('id', id);
+      mask.setAttribute('mask-type', 'alpha');
+      mask.appendChild(groupPath);
+      this.elem.globalData.defs.appendChild(mask);
+      var g = createNS('g');
+      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+
+      while (elemChildren[0]) {
+        g.appendChild(elemChildren[0]);
       }
-      return expressionProperty();
-    }
 
-    if (element.p.setGroupProperty) {
-      element.p.setGroupProperty(PropertyInterface('', propertyGroup));
-    }
+      this.elem.layerElement.appendChild(g);
+      this.masker = mask;
+      groupPath.setAttribute('stroke', '#fff');
+    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (this.filterManager.effectElements[10].p.v === 2) {
+        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
 
-    return interfaceFunction;
-  }
-
-  return ob;
-}());
-
-/* global createSizedArray */
-/* exported MaskManagerInterface */
-
-var MaskManagerInterface = (function () {
-  function MaskInterface(mask, data) {
-    this._mask = mask;
-    this._data = data;
-  }
-  Object.defineProperty(MaskInterface.prototype, 'maskPath', {
-    get: function () {
-      if (this._mask.prop.k) {
-        this._mask.prop.getValue();
-      }
-      return this._mask.prop;
-    },
-  });
-  Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
-    get: function () {
-      if (this._mask.op.k) {
-        this._mask.op.getValue();
-      }
-      return this._mask.op.v * 100;
-    },
-  });
-
-  var MaskManager = function (maskManager) {
-    var _masksInterfaces = createSizedArray(maskManager.viewData.length);
-    var i;
-    var len = maskManager.viewData.length;
-    for (i = 0; i < len; i += 1) {
-      _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
-    }
-
-    var maskFunction = function (name) {
-      i = 0;
-      while (i < len) {
-        if (maskManager.masksProperties[i].nm === name) {
-          return _masksInterfaces[i];
+        while (elemChildren.length) {
+          this.elem.layerElement.removeChild(elemChildren[0]);
         }
+      }
+
+      this.elem.layerElement.appendChild(groupPath);
+      this.elem.layerElement.removeAttribute('mask');
+      groupPath.setAttribute('stroke', '#fff');
+    }
+
+    this.initialized = true;
+    this.pathMasker = groupPath;
+  };
+
+  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {
+    if (!this.initialized) {
+      this.initialize();
+    }
+
+    var i;
+    var len = this.paths.length;
+    var mask;
+    var path;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.paths[i].m !== -1) {
+        mask = this.elem.maskManager.viewData[this.paths[i].m];
+        path = this.paths[i].p;
+
+        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {
+          path.setAttribute('d', mask.lastPath);
+        }
+
+        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) {
+          var dasharrayValue;
+
+          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {
+            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;
+            var l = path.getTotalLength();
+            dasharrayValue = '0 0 0 ' + l * s + ' ';
+            var lineLength = l * (e - s);
+            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+            var units = Math.floor(lineLength / segment);
+            var j;
+
+            for (j = 0; j < units; j += 1) {
+              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';
+            }
+
+            dasharrayValue += '0 ' + l * 10 + ' 0 0';
+          } else {
+            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;
+          }
+
+          path.setAttribute('stroke-dasharray', dasharrayValue);
+        }
+      }
+    }
+
+    if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);
+    }
+
+    if (forceRender || this.filterManager.effectElements[6].p._mdf) {
+      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);
+    }
+
+    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {
+      if (forceRender || this.filterManager.effectElements[3].p._mdf) {
+        var color = this.filterManager.effectElements[3].p.v;
+        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');
+      }
+    }
+  };
+
+  function SVGTritoneFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
+    feColorMatrix.setAttribute('type', 'matrix');
+    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');
+    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');
+    feColorMatrix.setAttribute('result', 'f1');
+    filter.appendChild(feColorMatrix);
+    var feComponentTransfer = createNS('feComponentTransfer');
+    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+    filter.appendChild(feComponentTransfer);
+    this.matrixFilter = feComponentTransfer;
+    var feFuncR = createNS('feFuncR');
+    feFuncR.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncR);
+    this.feFuncR = feFuncR;
+    var feFuncG = createNS('feFuncG');
+    feFuncG.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncG);
+    this.feFuncG = feFuncG;
+    var feFuncB = createNS('feFuncB');
+    feFuncB.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFuncB);
+    this.feFuncB = feFuncB;
+  }
+
+  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var color1 = this.filterManager.effectElements[0].p.v;
+      var color2 = this.filterManager.effectElements[1].p.v;
+      var color3 = this.filterManager.effectElements[2].p.v;
+      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
+      this.feFuncR.setAttribute('tableValues', tableR);
+      this.feFuncG.setAttribute('tableValues', tableG);
+      this.feFuncB.setAttribute('tableValues', tableB); // var opacity = this.filterManager.effectElements[2].p.v/100;
+      // 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');
+    }
+  };
+
+  function SVGProLevelsFilter(filter, filterManager) {
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
+
+    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) {
+      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+
+    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) {
+      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
+    }
+
+    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      feComponentTransfer = createNS('feComponentTransfer');
+    }
+
+    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) {
+      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');
+      filter.appendChild(feComponentTransfer);
+      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
+      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
+      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
+    }
+  }
+
+  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {
+    var feFunc = createNS(type);
+    feFunc.setAttribute('type', 'table');
+    feComponentTransfer.appendChild(feFunc);
+    return feFunc;
+  };
+
+  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+    var cnt = 0;
+    var segments = 256;
+    var perc;
+    var min = Math.min(inputBlack, inputWhite);
+    var max = Math.max(inputBlack, inputWhite);
+    var table = Array.call(null, {
+      length: segments
+    });
+    var colorValue;
+    var pos = 0;
+    var outputDelta = outputWhite - outputBlack;
+    var inputDelta = inputWhite - inputBlack;
+
+    while (cnt <= 256) {
+      perc = cnt / 256;
+
+      if (perc <= min) {
+        colorValue = inputDelta < 0 ? outputWhite : outputBlack;
+      } else if (perc >= max) {
+        colorValue = inputDelta < 0 ? outputBlack : outputWhite;
+      } else {
+        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);
+      }
+
+      table[pos] = colorValue;
+      pos += 1;
+      cnt += 256 / (segments - 1);
+    }
+
+    return table.join(' ');
+  };
+
+  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      var val;
+      var effectElements = this.filterManager.effectElements;
+
+      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {
+        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);
+        this.feFuncRComposed.setAttribute('tableValues', val);
+        this.feFuncGComposed.setAttribute('tableValues', val);
+        this.feFuncBComposed.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {
+        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);
+        this.feFuncR.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {
+        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);
+        this.feFuncG.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {
+        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);
+        this.feFuncB.setAttribute('tableValues', val);
+      }
+
+      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {
+        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);
+        this.feFuncA.setAttribute('tableValues', val);
+      }
+    }
+  };
+
+  function SVGDropShadowEffect(filter, filterManager) {
+    var filterSize = filterManager.container.globalData.renderConfig.filterSize;
+    filter.setAttribute('x', filterSize.x);
+    filter.setAttribute('y', filterSize.y);
+    filter.setAttribute('width', filterSize.width);
+    filter.setAttribute('height', filterSize.height);
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    feGaussianBlur.setAttribute('in', 'SourceAlpha');
+    feGaussianBlur.setAttribute('result', 'drop_shadow_1');
+    feGaussianBlur.setAttribute('stdDeviation', '0');
+    this.feGaussianBlur = feGaussianBlur;
+    filter.appendChild(feGaussianBlur);
+    var feOffset = createNS('feOffset');
+    feOffset.setAttribute('dx', '25');
+    feOffset.setAttribute('dy', '0');
+    feOffset.setAttribute('in', 'drop_shadow_1');
+    feOffset.setAttribute('result', 'drop_shadow_2');
+    this.feOffset = feOffset;
+    filter.appendChild(feOffset);
+    var feFlood = createNS('feFlood');
+    feFlood.setAttribute('flood-color', '#00ff00');
+    feFlood.setAttribute('flood-opacity', '1');
+    feFlood.setAttribute('result', 'drop_shadow_3');
+    this.feFlood = feFlood;
+    filter.appendChild(feFlood);
+    var feComposite = createNS('feComposite');
+    feComposite.setAttribute('in', 'drop_shadow_3');
+    feComposite.setAttribute('in2', 'drop_shadow_2');
+    feComposite.setAttribute('operator', 'in');
+    feComposite.setAttribute('result', 'drop_shadow_4');
+    filter.appendChild(feComposite);
+    var feMerge = createNS('feMerge');
+    filter.appendChild(feMerge);
+    var feMergeNode;
+    feMergeNode = createNS('feMergeNode');
+    feMerge.appendChild(feMergeNode);
+    feMergeNode = createNS('feMergeNode');
+    feMergeNode.setAttribute('in', 'SourceGraphic');
+    this.feMergeNode = feMergeNode;
+    this.feMerge = feMerge;
+    this.originalNodeAdded = false;
+    feMerge.appendChild(feMergeNode);
+  }
+
+  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      if (forceRender || this.filterManager.effectElements[4].p._mdf) {
+        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
+      }
+
+      if (forceRender || this.filterManager.effectElements[0].p._mdf) {
+        var col = this.filterManager.effectElements[0].p.v;
+        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));
+      }
+
+      if (forceRender || this.filterManager.effectElements[1].p._mdf) {
+        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);
+      }
+
+      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {
+        var distance = this.filterManager.effectElements[3].p.v;
+        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+        var x = distance * Math.cos(angle);
+        var y = distance * Math.sin(angle);
+        this.feOffset.setAttribute('dx', x);
+        this.feOffset.setAttribute('dy', y);
+      }
+      /* if(forceRender || this.filterManager.effectElements[5].p._mdf){
+              if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
+                  this.feMerge.removeChild(this.feMergeNode);
+                  this.originalNodeAdded = false;
+              } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
+                  this.feMerge.appendChild(this.feMergeNode);
+                  this.originalNodeAdded = true;
+              }
+          } */
+
+    }
+  };
+
+  var _svgMatteSymbols = [];
+
+  function SVGMatte3Effect(filterElem, filterManager, elem) {
+    this.initialized = false;
+    this.filterManager = filterManager;
+    this.filterElem = filterElem;
+    this.elem = elem;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
+  }
+
+  SVGMatte3Effect.prototype.findSymbol = function (mask) {
+    var i = 0;
+    var len = _svgMatteSymbols.length;
+
+    while (i < len) {
+      if (_svgMatteSymbols[i] === mask) {
+        return _svgMatteSymbols[i];
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
+
+    if (!parentNode) {
+      return;
+    }
+
+    var children = parentNode.children;
+    var i = 0;
+    var len = children.length;
+
+    while (i < len) {
+      if (children[i] === mask.layerElement) {
+        break;
+      }
+
+      i += 1;
+    }
+
+    var nextChild;
+
+    if (i <= len - 2) {
+      nextChild = children[i + 1];
+    }
+
+    var useElem = createNS('use');
+    useElem.setAttribute('href', '#' + symbolId);
+
+    if (nextChild) {
+      parentNode.insertBefore(useElem, nextChild);
+    } else {
+      parentNode.appendChild(useElem);
+    }
+  };
+
+  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {
+    if (!this.findSymbol(mask)) {
+      var symbolId = createElementID();
+      var masker = createNS('mask');
+      masker.setAttribute('id', mask.layerId);
+      masker.setAttribute('mask-type', 'alpha');
+
+      _svgMatteSymbols.push(mask);
+
+      var defs = elem.globalData.defs;
+      defs.appendChild(masker);
+      var symbol = createNS('symbol');
+      symbol.setAttribute('id', symbolId);
+      this.replaceInParent(mask, symbolId);
+      symbol.appendChild(mask.layerElement);
+      defs.appendChild(symbol);
+      var useElem = createNS('use');
+      useElem.setAttribute('href', '#' + symbolId);
+      masker.appendChild(useElem);
+      mask.data.hd = false;
+      mask.show();
+    }
+
+    elem.setMatte(mask.layerId);
+  };
+
+  SVGMatte3Effect.prototype.initialize = function () {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var elements = this.elem.comp.elements;
+    var i = 0;
+    var len = elements.length;
+
+    while (i < len) {
+      if (elements[i] && elements[i].data.ind === ind) {
+        this.setElementAsMask(this.elem, elements[i]);
+      }
+
+      i += 1;
+    }
+
+    this.initialized = true;
+  };
+
+  SVGMatte3Effect.prototype.renderFrame = function () {
+    if (!this.initialized) {
+      this.initialize();
+    }
+  };
+
+  function SVGGaussianBlurEffect(filter, filterManager) {
+    // Outset the filter region by 100% on all sides to accommodate blur expansion.
+    filter.setAttribute('x', '-100%');
+    filter.setAttribute('y', '-100%');
+    filter.setAttribute('width', '300%');
+    filter.setAttribute('height', '300%');
+    this.filterManager = filterManager;
+    var feGaussianBlur = createNS('feGaussianBlur');
+    filter.appendChild(feGaussianBlur);
+    this.feGaussianBlur = feGaussianBlur;
+  }
+
+  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {
+    if (forceRender || this.filterManager._mdf) {
+      // Empirical value, matching AE's blur appearance.
+      var kBlurrinessToSigma = 0.3;
+      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:
+      //
+      //   1 -> horizontal & vertical
+      //   2 -> horizontal only
+      //   3 -> vertical only
+      //
+
+      var dimensions = this.filterManager.effectElements[1].p.v;
+      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:
+      //
+      //   0 -> off -> duplicate
+      //   1 -> on  -> wrap
+
+      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq
+
+      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
+    }
+  };
+
+  var registeredEffects = {};
+
+  function SVGEffects(elem) {
+    var i;
+    var len = elem.data.ef ? elem.data.ef.length : 0;
+    var filId = createElementID();
+    var fil = filtersFactory.createFilter(filId, true);
+    var count = 0;
+    this.filters = [];
+    var filterManager;
+
+    for (i = 0; i < len; i += 1) {
+      filterManager = null;
+      var type = elem.data.ef[i].ty;
+
+      if (registeredEffects[type]) {
+        var Effect = registeredEffects[type].effect;
+        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+
+        if (registeredEffects[type].countsAsEffect) {
+          count += 1;
+        }
+      }
+
+      if (elem.data.ef[i].ty === 20) {
+        count += 1;
+        filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 21) {
+        count += 1;
+        filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 22) {
+        filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 23) {
+        count += 1;
+        filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 24) {
+        count += 1;
+        filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 25) {
+        count += 1;
+        filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
+      } else if (elem.data.ef[i].ty === 28) {
+        // count += 1;
+        filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+      } else if (elem.data.ef[i].ty === 29) {
+        count += 1;
+        filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
+      }
+
+      if (filterManager) {
+        this.filters.push(filterManager);
+      }
+    }
+
+    if (count) {
+      elem.globalData.defs.appendChild(fil);
+      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+    }
+
+    if (this.filters.length) {
+      elem.addRenderableComponent(this);
+    }
+  }
+
+  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {
+    var i;
+    var len = this.filters.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.filters[i].renderFrame(_isFirstFrame);
+    }
+  };
+
+  function registerEffect(id, effect, countsAsEffect) {
+    registeredEffects[id] = {
+      effect: effect,
+      countsAsEffect: countsAsEffect
+    };
+  }
+
+  function SVGBaseElement() {}
+
+  SVGBaseElement.prototype = {
+    initRendererElement: function initRendererElement() {
+      this.layerElement = createNS('g');
+    },
+    createContainerElements: function createContainerElements() {
+      this.matteElement = createNS('g');
+      this.transformedElement = this.layerElement;
+      this.maskedElement = this.layerElement;
+      this._sizeChanged = false;
+      var layerElementParent = null; // If this layer acts as a mask for the following layer
+
+      var filId;
+      var fil;
+      var gg;
+
+      if (this.data.td) {
+        if (this.data.td == 3 || this.data.td == 1) {
+          // eslint-disable-line eqeqeq
+          var masker = createNS('mask');
+          masker.setAttribute('id', this.layerId);
+          masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq
+
+          masker.appendChild(this.layerElement);
+          layerElementParent = masker;
+          this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha
+
+          if (!featureSupport.maskType && this.data.td == 1) {
+            // eslint-disable-line eqeqeq
+            masker.setAttribute('mask-type', 'luminance');
+            filId = createElementID();
+            fil = filtersFactory.createFilter(filId);
+            this.globalData.defs.appendChild(fil);
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            masker.appendChild(gg);
+            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          }
+        } else if (this.data.td == 2) {
+          // eslint-disable-line eqeqeq
+          var maskGroup = createNS('mask');
+          maskGroup.setAttribute('id', this.layerId);
+          maskGroup.setAttribute('mask-type', 'alpha');
+          var maskGrouper = createNS('g');
+          maskGroup.appendChild(maskGrouper);
+          filId = createElementID();
+          fil = filtersFactory.createFilter(filId); /// /
+          // This solution doesn't work on Android when meta tag with viewport attribute is set
+
+          /* var feColorMatrix = createNS('feColorMatrix');
+                  feColorMatrix.setAttribute('type', 'matrix');
+                  feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                  feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                  fil.appendChild(feColorMatrix); */
+          /// /
+
+          var feCTr = createNS('feComponentTransfer');
+          feCTr.setAttribute('in', 'SourceGraphic');
+          fil.appendChild(feCTr);
+          var feFunc = createNS('feFuncA');
+          feFunc.setAttribute('type', 'table');
+          feFunc.setAttribute('tableValues', '1.0 0.0');
+          feCTr.appendChild(feFunc); /// /
+
+          this.globalData.defs.appendChild(fil);
+          var alphaRect = createNS('rect');
+          alphaRect.setAttribute('width', this.comp.data.w);
+          alphaRect.setAttribute('height', this.comp.data.h);
+          alphaRect.setAttribute('x', '0');
+          alphaRect.setAttribute('y', '0');
+          alphaRect.setAttribute('fill', '#ffffff');
+          alphaRect.setAttribute('opacity', '0');
+          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
+          maskGrouper.appendChild(alphaRect);
+          maskGrouper.appendChild(this.layerElement);
+          layerElementParent = maskGrouper;
+
+          if (!featureSupport.maskType) {
+            maskGroup.setAttribute('mask-type', 'luminance');
+            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+            gg = createNS('g');
+            maskGrouper.appendChild(alphaRect);
+            gg.appendChild(this.layerElement);
+            layerElementParent = gg;
+            maskGrouper.appendChild(gg);
+          }
+
+          this.globalData.defs.appendChild(maskGroup);
+        }
+      } else if (this.data.tt) {
+        this.matteElement.appendChild(this.layerElement);
+        layerElementParent = this.matteElement;
+        this.baseElement = this.matteElement;
+      } else {
+        this.baseElement = this.layerElement;
+      }
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+
+
+      if (this.data.ty === 0 && !this.data.hd) {
+        var cp = createNS('clipPath');
+        var pt = createNS('path');
+        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+        var clipId = createElementID();
+        cp.setAttribute('id', clipId);
+        cp.appendChild(pt);
+        this.globalData.defs.appendChild(cp);
+
+        if (this.checkMasks()) {
+          var cpGroup = createNS('g');
+          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+          cpGroup.appendChild(this.layerElement);
+          this.transformedElement = cpGroup;
+
+          if (layerElementParent) {
+            layerElementParent.appendChild(this.transformedElement);
+          } else {
+            this.baseElement = this.transformedElement;
+          }
+        } else {
+          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
+        }
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      if (this.finalTransform._matMdf) {
+        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+      }
+
+      if (this.finalTransform._opMdf) {
+        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+      }
+    },
+    destroyBaseElement: function destroyBaseElement() {
+      this.layerElement = null;
+      this.matteElement = null;
+      this.maskManager.destroy();
+    },
+    getBaseElement: function getBaseElement() {
+      if (this.data.hd) {
+        return null;
+      }
+
+      return this.baseElement;
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+      this.renderableEffectsManager = new SVGEffects(this);
+    },
+    setMatte: function setMatte(id) {
+      if (!this.matteElement) {
+        return;
+      }
+
+      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
+    }
+  };
+
+  /**
+   * @file
+   * Handles AE's layer parenting property.
+   *
+   */
+  function HierarchyElement() {}
+
+  HierarchyElement.prototype = {
+    /**
+       * @function
+       * Initializes hierarchy properties
+       *
+       */
+    initHierarchy: function initHierarchy() {
+      // element's parent list
+      this.hierarchy = []; // if element is parent of another layer _isParent will be true
+
+      this._isParent = false;
+      this.checkParenting();
+    },
+
+    /**
+       * @function
+       * Sets layer's hierarchy.
+       * @param {array} hierarch
+       * layer's parent list
+       *
+       */
+    setHierarchy: function setHierarchy(hierarchy) {
+      this.hierarchy = hierarchy;
+    },
+
+    /**
+       * @function
+       * Sets layer as parent.
+       *
+       */
+    setAsParent: function setAsParent() {
+      this._isParent = true;
+    },
+
+    /**
+       * @function
+       * Searches layer's parenting chain
+       *
+       */
+    checkParenting: function checkParenting() {
+      if (this.data.parent !== undefined) {
+        this.comp.buildElementParenting(this, this.data.parent, []);
+      }
+    }
+  };
+
+  function RenderableDOMElement() {}
+
+  (function () {
+    var _prototype = {
+      initElement: function initElement(data, globalData, comp) {
+        this.initFrame();
+        this.initBaseData(data, globalData, comp);
+        this.initTransform(data, globalData, comp);
+        this.initHierarchy();
+        this.initRenderable();
+        this.initRendererElement();
+        this.createContainerElements();
+        this.createRenderableComponents();
+        this.createContent();
+        this.hide();
+      },
+      hide: function hide() {
+        // console.log('HIDE', this);
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+          var elem = this.baseElement || this.layerElement;
+          elem.style.display = 'none';
+          this.hidden = true;
+        }
+      },
+      show: function show() {
+        // console.log('SHOW', this);
+        if (this.isInRange && !this.isTransparent) {
+          if (!this.data.hd) {
+            var elem = this.baseElement || this.layerElement;
+            elem.style.display = 'block';
+          }
+
+          this.hidden = false;
+          this._isFirstFrame = true;
+        }
+      },
+      renderFrame: function renderFrame() {
+        // If it is exported as hidden (data.hd === true) no need to render
+        // If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+          return;
+        }
+
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+
+        if (this._isFirstFrame) {
+          this._isFirstFrame = false;
+        }
+      },
+      renderInnerContent: function renderInnerContent() {},
+      prepareFrame: function prepareFrame(num) {
+        this._mdf = false;
+        this.prepareRenderableFrame(num);
+        this.prepareProperties(num, this.isInRange);
+        this.checkTransparency();
+      },
+      destroy: function destroy() {
+        this.innerElem = null;
+        this.destroyBaseElement();
+      }
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+  })();
+
+  function IImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+    this.sourceRect = {
+      top: 0,
+      left: 0,
+      width: this.assetData.w,
+      height: this.assetData.h
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);
+
+  IImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width', this.assetData.w + 'px');
+    this.innerElem.setAttribute('height', this.assetData.h + 'px');
+    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+    this.layerElement.appendChild(this.innerElem);
+  };
+
+  IImageElement.prototype.sourceRectAtTime = function () {
+    return this.sourceRect;
+  };
+
+  function ProcessedElement(element, position) {
+    this.elem = element;
+    this.pos = position;
+  }
+
+  function IShapeElement() {}
+
+  IShapeElement.prototype = {
+    addShapeToModifiers: function addShapeToModifiers(data) {
+      var i;
+      var len = this.shapeModifiers.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapeModifiers[i].addShape(data);
+      }
+    },
+    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {
+      var i = 0;
+      var len = this.shapeModifiers.length;
+
+      while (i < len) {
+        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {
+          return true;
+        }
+      }
+
+      return false;
+    },
+    renderModifiers: function renderModifiers() {
+      if (!this.shapeModifiers.length) {
+        return;
+      }
+
+      var i;
+      var len = this.shapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.shapes[i].sh.reset();
+      }
+
+      len = this.shapeModifiers.length;
+      var shouldBreakProcess;
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice
+        // TODO: find a better solution for this
+
+        if (shouldBreakProcess) {
+          break;
+        }
+      }
+    },
+    searchProcessedElement: function searchProcessedElement(elem) {
+      var elements = this.processedElements;
+      var i = 0;
+      var len = elements.length;
+
+      while (i < len) {
+        if (elements[i].elem === elem) {
+          return elements[i].pos;
+        }
+
         i += 1;
       }
-      return null;
-    };
-    return maskFunction;
+
+      return 0;
+    },
+    addProcessedElement: function addProcessedElement(elem, pos) {
+      var elements = this.processedElements;
+      var i = elements.length;
+
+      while (i) {
+        i -= 1;
+
+        if (elements[i].elem === elem) {
+          elements[i].pos = pos;
+          return;
+        }
+      }
+
+      elements.push(new ProcessedElement(elem, pos));
+    },
+    prepareFrame: function prepareFrame(num) {
+      this.prepareRenderableFrame(num);
+      this.prepareProperties(num, this.isInRange);
+    }
   };
-  return MaskManager;
-}());
 
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
-
-var ExpressionPropertyInterface = (function () {
-  var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
-  var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
-
-  function completeProperty(expressionValue, property, type) {
-    Object.defineProperty(expressionValue, 'velocity', {
-      get: function () {
-        return property.getVelocityAtTime(property.comp.currentFrame);
-      },
-    });
-    expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
-    expressionValue.key = function (pos) {
-      if (!expressionValue.numKeys) {
-        return 0;
-      }
-      var value = '';
-      if ('s' in property.keyframes[pos - 1]) {
-        value = property.keyframes[pos - 1].s;
-      } else if ('e' in property.keyframes[pos - 2]) {
-        value = property.keyframes[pos - 2].e;
-      } else {
-        value = property.keyframes[pos - 2].s;
-      }
-      var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers
-      valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;
-      valueProp.value = type === 'unidimensional' ? value[0] : value;
-      return valueProp;
-    };
-    expressionValue.valueAtTime = property.getValueAtTime;
-    expressionValue.speedAtTime = property.getSpeedAtTime;
-    expressionValue.velocityAtTime = property.getVelocityAtTime;
-    expressionValue.propertyGroup = property.propertyGroup;
-  }
-
-  function UnidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultUnidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var val = property.pv * mult;
-    var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-    expressionValue.value = val;
-    completeProperty(expressionValue, property, 'unidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      val = property.v * mult;
-      if (expressionValue.value !== val) {
-        expressionValue = new Number(val); // eslint-disable-line no-new-wrappers
-        expressionValue.value = val;
-        completeProperty(expressionValue, property, 'unidimensional');
-      }
-      return expressionValue;
-    };
-  }
-
-  function MultidimensionalPropertyInterface(property) {
-    if (!property || !('pv' in property)) {
-      property = defaultMultidimensionalValue;
-    }
-    var mult = 1 / property.mult;
-    var len = (property.data && property.data.l) || property.pv.length;
-    var expressionValue = createTypedArray('float32', len);
-    var arrValue = createTypedArray('float32', len);
-    expressionValue.value = arrValue;
-    completeProperty(expressionValue, property, 'multidimensional');
-
-    return function () {
-      if (property.k) {
-        property.getValue();
-      }
-      for (var i = 0; i < len; i += 1) {
-        arrValue[i] = property.v[i] * mult;
-        expressionValue[i] = arrValue[i];
-      }
-      return expressionValue;
-    };
-  }
-
-  // TODO: try to avoid using this getter
-  function defaultGetter() {
-    return defaultUnidimensionalValue;
-  }
-
-  return function (property) {
-    if (!property) {
-      return defaultGetter;
-    } if (property.propType === 'unidimensional') {
-      return UnidimensionalPropertyInterface(property);
-    }
-    return MultidimensionalPropertyInterface(property);
+  var lineCapEnum = {
+    1: 'butt',
+    2: 'round',
+    3: 'square'
   };
-}());
+  var lineJoinEnum = {
+    1: 'miter',
+    2: 'round',
+    3: 'bevel'
+  };
 
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+  function SVGShapeData(transformers, level, shape) {
+    this.caches = [];
+    this.styles = [];
+    this.transformers = transformers;
+    this.lStr = '';
+    this.sh = shape;
+    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.
+    // For now, since shapes add up with other shapes. They have to be calculated every time.
+    // One way of finding out is checking if all styles associated to this shape depend only of this shape
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
-  function getValueProxy(index, total) {
-    this.textIndex = index + 1;
-    this.textTotal = total;
-    this.v = this.getValue() * this.mult;
-    return this.v;
+    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated
+
+    var i = 0;
+    var len = transformers.length;
+
+    while (i < len) {
+      if (transformers[i].mProps.dynamicProperties.length) {
+        this._isAnimated = true;
+        break;
+      }
+
+      i += 1;
+    }
   }
 
-  return function (elem, data) {
-    this.pv = 1;
-    this.comp = elem.comp;
+  SVGShapeData.prototype.setAsAnimated = function () {
+    this._isAnimated = true;
+  };
+
+  function SVGStyleData(data, level) {
+    this.data = data;
+    this.type = data.ty;
+    this.d = '';
+    this.lvl = level;
+    this._mdf = false;
+    this.closed = data.hd === true;
+    this.pElem = createNS('path');
+    this.msElem = null;
+  }
+
+  SVGStyleData.prototype.reset = function () {
+    this.d = '';
+    this._mdf = false;
+  };
+
+  function DashProperty(elem, data, renderer, container) {
     this.elem = elem;
-    this.mult = 0.01;
-    this.propType = 'textSelector';
-    this.textTotal = data.totalChars;
-    this.selectorValue = 100;
-    this.lastValue = [1, 1, 1];
-    this.k = true;
-    this.x = true;
-    this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this);
-    this.getMult = getValueProxy;
-    this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
-    if (this.kf) {
-      this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
-    } else {
-      this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
+    this.frameId = -1;
+    this.dataProps = createSizedArray(data.length);
+    this.renderer = renderer;
+    this.k = false;
+    this.dashStr = '';
+    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);
+    this.dashoffset = createTypedArray('float32', 1);
+    this.initDynamicPropertyContainer(container);
+    var i;
+    var len = data.length || 0;
+    var prop;
+
+    for (i = 0; i < len; i += 1) {
+      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);
+      this.k = prop.k || this.k;
+      this.dataProps[i] = {
+        n: data[i].n,
+        p: prop
+      };
     }
-    this.setGroupProperty = expressionHelpers.setGroupProperty;
+
+    if (!this.k) {
+      this.getValue(true);
+    }
+
+    this._isAnimated = this.k;
+  }
+
+  DashProperty.prototype.getValue = function (forceRender) {
+    if (this.elem.globalData.frameId === this.frameId && !forceRender) {
+      return;
+    }
+
+    this.frameId = this.elem.globalData.frameId;
+    this.iterateDynamicProperties();
+    this._mdf = this._mdf || forceRender;
+
+    if (this._mdf) {
+      var i = 0;
+      var len = this.dataProps.length;
+
+      if (this.renderer === 'svg') {
+        this.dashStr = '';
+      }
+
+      for (i = 0; i < len; i += 1) {
+        if (this.dataProps[i].n !== 'o') {
+          if (this.renderer === 'svg') {
+            this.dashStr += ' ' + this.dataProps[i].p.v;
+          } else {
+            this.dashArray[i] = this.dataProps[i].p.v;
+          }
+        } else {
+          this.dashoffset[0] = this.dataProps[i].p.v;
+        }
+      }
+    }
   };
-}());
 
-var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
-TextSelectorProp.getTextSelectorProp = function (elem, data, arr) {
-  if (data.t === 1) {
-    return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef
+  extendPrototype([DynamicPropertyContainer], DashProperty);
+
+  function SVGStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
+    this._isAnimated = !!this._isAnimated;
   }
-  return propertyGetTextProp(elem, data, arr);
-};
 
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
+  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
 
-function SliderEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function AngleEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function ColorEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function PointEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);
-}
-function LayerIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function MaskIndexEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function CheckboxEffect(data, elem, container) {
-  this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
-}
-function NoValueEffect() {
-  this.p = {};
-}
-
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
-
-function EffectsManager(data, element) {
-  var effects = data.ef || [];
-  this.effectElements = [];
-  var i;
-  var len = effects.length;
-  var effectItem;
-  for (i = 0; i < len; i += 1) {
-    effectItem = new GroupEffect(effects[i], element);
-    this.effectElements.push(effectItem);
+  function SVGFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
+    this.style = styleOb;
   }
-}
 
-function GroupEffect(data, element) {
-  this.init(data, element);
-}
+  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
 
-extendPrototype([DynamicPropertyContainer], GroupEffect);
+  function SVGNoStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.style = styleOb;
+  }
 
-GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
+  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
 
-GroupEffect.prototype.init = function (data, element) {
-  this.data = data;
-  this.effectElements = [];
-  this.initDynamicPropertyContainer(element);
-  var i;
-  var len = this.data.ef.length;
-  var eff;
-  var effects = this.data.ef;
-  for (i = 0; i < len; i += 1) {
-    eff = null;
-    switch (effects[i].ty) {
-      case 0:
-        eff = new SliderEffect(effects[i], element, this);
+  function GradientProperty(elem, data, container) {
+    this.data = data;
+    this.c = createTypedArray('uint8c', data.p * 4);
+    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
+    this._collapsable = this.checkCollapsable();
+    this._hasOpacity = cLength;
+    this.initDynamicPropertyContainer(container);
+    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);
+    this.k = this.prop.k;
+    this.getValue(true);
+  }
+
+  GradientProperty.prototype.comparePoints = function (values, points) {
+    var i = 0;
+    var len = this.o.length / 2;
+    var diff;
+
+    while (i < len) {
+      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
+
+      if (diff > 0.01) {
+        return false;
+      }
+
+      i += 1;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.checkCollapsable = function () {
+    if (this.o.length / 2 !== this.c.length / 4) {
+      return false;
+    }
+
+    if (this.data.k.k[0].s) {
+      var i = 0;
+      var len = this.data.k.k.length;
+
+      while (i < len) {
+        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
+          return false;
+        }
+
+        i += 1;
+      }
+    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {
+      return false;
+    }
+
+    return true;
+  };
+
+  GradientProperty.prototype.getValue = function (forceRender) {
+    this.prop.getValue();
+    this._mdf = false;
+    this._cmdf = false;
+    this._omdf = false;
+
+    if (this.prop._mdf || forceRender) {
+      var i;
+      var len = this.data.p * 4;
+      var mult;
+      var val;
+
+      for (i = 0; i < len; i += 1) {
+        mult = i % 4 === 0 ? 100 : 255;
+        val = Math.round(this.prop.v[i] * mult);
+
+        if (this.c[i] !== val) {
+          this.c[i] = val;
+          this._cmdf = !forceRender;
+        }
+      }
+
+      if (this.o.length) {
+        len = this.prop.v.length;
+
+        for (i = this.data.p * 4; i < len; i += 1) {
+          mult = i % 2 === 0 ? 100 : 1;
+          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];
+
+          if (this.o[i - this.data.p * 4] !== val) {
+            this.o[i - this.data.p * 4] = val;
+            this._omdf = !forceRender;
+          }
+        }
+      }
+
+      this._mdf = !forceRender;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+  function SVGGradientFillStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.initGradientData(elem, data, styleOb);
+  }
+
+  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
+    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);
+    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);
+    this.h = PropertyFactory.getProp(elem, data.h || {
+      k: 0
+    }, 0, 0.01, this);
+    this.a = PropertyFactory.getProp(elem, data.a || {
+      k: 0
+    }, 0, degToRads, this);
+    this.g = new GradientProperty(elem, data.g, this);
+    this.style = styleOb;
+    this.stops = [];
+    this.setGradientData(styleOb.pElem, data);
+    this.setGradientOpacity(data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {
+    var gradientId = createElementID();
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    gfill.setAttribute('id', gradientId);
+    gfill.setAttribute('spreadMethod', 'pad');
+    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');
+    var stops = [];
+    var stop;
+    var j;
+    var jLen;
+    jLen = data.g.p * 4;
+
+    for (j = 0; j < jLen; j += 4) {
+      stop = createNS('stop');
+      gfill.appendChild(stop);
+      stops.push(stop);
+    }
+
+    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
+    this.gf = gfill;
+    this.cst = stops;
+  };
+
+  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {
+    if (this.g._hasOpacity && !this.g._collapsable) {
+      var stop;
+      var j;
+      var jLen;
+      var mask = createNS('mask');
+      var maskElement = createNS('path');
+      mask.appendChild(maskElement);
+      var opacityId = createElementID();
+      var maskId = createElementID();
+      mask.setAttribute('id', maskId);
+      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
+      opFill.setAttribute('id', opacityId);
+      opFill.setAttribute('spreadMethod', 'pad');
+      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');
+      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
+      var stops = this.stops;
+
+      for (j = data.g.p * 4; j < jLen; j += 2) {
+        stop = createNS('stop');
+        stop.setAttribute('stop-color', 'rgb(255,255,255)');
+        opFill.appendChild(stop);
+        stops.push(stop);
+      }
+
+      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
+
+      if (data.ty === 'gs') {
+        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+
+        if (data.lj === 1) {
+          maskElement.setAttribute('stroke-miterlimit', data.ml);
+        }
+      }
+
+      this.of = opFill;
+      this.ms = mask;
+      this.ost = stops;
+      this.maskId = maskId;
+      styleOb.msElem = maskElement;
+    }
+  };
+
+  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+  function SVGGradientStrokeStyleData(elem, data, styleOb) {
+    this.initDynamicPropertyContainer(elem);
+    this.getValue = this.iterateDynamicProperties;
+    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
+    this.d = new DashProperty(elem, data.d || {}, 'svg', this);
+    this.initGradientData(elem, data, styleOb);
+    this._isAnimated = !!this._isAnimated;
+  }
+
+  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+  function ShapeGroupData() {
+    this.it = [];
+    this.prevViewData = [];
+    this.gr = createNS('g');
+  }
+
+  function SVGTransformData(mProps, op, container) {
+    this.transform = {
+      mProps: mProps,
+      op: op,
+      container: container
+    };
+    this.elements = [];
+    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
+  }
+
+  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {
+    if (length === 0) {
+      return '';
+    }
+
+    var _o = pathNodes.o;
+    var _i = pathNodes.i;
+    var _v = pathNodes.v;
+    var i;
+    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);
+
+    for (i = 1; i < length; i += 1) {
+      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]);
+    }
+
+    if (closed && length) {
+      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]);
+      shapeString += 'z';
+    }
+
+    return shapeString;
+  };
+
+  var SVGElementsRenderer = function () {
+    var _identityMatrix = new Matrix();
+
+    var _matrixHelper = new Matrix();
+
+    var ob = {
+      createRenderFunction: createRenderFunction
+    };
+
+    function createRenderFunction(data) {
+      switch (data.ty) {
+        case 'fl':
+          return renderFill;
+
+        case 'gf':
+          return renderGradient;
+
+        case 'gs':
+          return renderGradientStroke;
+
+        case 'st':
+          return renderStroke;
+
+        case 'sh':
+        case 'el':
+        case 'rc':
+        case 'sr':
+          return renderPath;
+
+        case 'tr':
+          return renderContentTransform;
+
+        case 'no':
+          return renderNoop;
+
+        default:
+          return null;
+      }
+    }
+
+    function renderContentTransform(styleData, itemData, isFirstFrame) {
+      if (isFirstFrame || itemData.transform.op._mdf) {
+        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);
+      }
+
+      if (isFirstFrame || itemData.transform.mProps._mdf) {
+        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());
+      }
+    }
+
+    function renderNoop() {}
+
+    function renderPath(styleData, itemData, isFirstFrame) {
+      var j;
+      var jLen;
+      var pathStringTransformed;
+      var redraw;
+      var pathNodes;
+      var l;
+      var lLen = itemData.styles.length;
+      var lvl = itemData.lvl;
+      var paths;
+      var mat;
+      var props;
+      var iterations;
+      var k;
+
+      for (l = 0; l < lLen; l += 1) {
+        redraw = itemData.sh._mdf || isFirstFrame;
+
+        if (itemData.styles[l].lvl < lvl) {
+          mat = _matrixHelper.reset();
+          iterations = lvl - itemData.styles[l].lvl;
+          k = itemData.transformers.length - 1;
+
+          while (!redraw && iterations > 0) {
+            redraw = itemData.transformers[k].mProps._mdf || redraw;
+            iterations -= 1;
+            k -= 1;
+          }
+
+          if (redraw) {
+            iterations = lvl - itemData.styles[l].lvl;
+            k = itemData.transformers.length - 1;
+
+            while (iterations > 0) {
+              props = itemData.transformers[k].mProps.v.props;
+              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]);
+              iterations -= 1;
+              k -= 1;
+            }
+          }
+        } else {
+          mat = _identityMatrix;
+        }
+
+        paths = itemData.sh.paths;
+        jLen = paths._length;
+
+        if (redraw) {
+          pathStringTransformed = '';
+
+          for (j = 0; j < jLen; j += 1) {
+            pathNodes = paths.shapes[j];
+
+            if (pathNodes && pathNodes._length) {
+              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
+            }
+          }
+
+          itemData.caches[l] = pathStringTransformed;
+        } else {
+          pathStringTransformed = itemData.caches[l];
+        }
+
+        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
+      }
+    }
+
+    function renderFill(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+
+      if (itemData.c._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);
+      }
+    }
+
+    function renderGradientStroke(styleData, itemData, isFirstFrame) {
+      renderGradient(styleData, itemData, isFirstFrame);
+      renderStroke(styleData, itemData, isFirstFrame);
+    }
+
+    function renderGradient(styleData, itemData, isFirstFrame) {
+      var gfill = itemData.gf;
+      var hasOpacity = itemData.g._hasOpacity;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (itemData.o._mdf || isFirstFrame) {
+        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
+        itemData.style.pElem.setAttribute(attr, itemData.o.v);
+      }
+
+      if (itemData.s._mdf || isFirstFrame) {
+        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
+        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
+        gfill.setAttribute(attr1, pt1[0]);
+        gfill.setAttribute(attr2, pt1[1]);
+
+        if (hasOpacity && !itemData.g._collapsable) {
+          itemData.of.setAttribute(attr1, pt1[0]);
+          itemData.of.setAttribute(attr2, pt1[1]);
+        }
+      }
+
+      var stops;
+      var i;
+      var len;
+      var stop;
+
+      if (itemData.g._cmdf || isFirstFrame) {
+        stops = itemData.cst;
+        var cValues = itemData.g.c;
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+          stop.setAttribute('offset', cValues[i * 4] + '%');
+          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');
+        }
+      }
+
+      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
+        var oValues = itemData.g.o;
+
+        if (itemData.g._collapsable) {
+          stops = itemData.cst;
+        } else {
+          stops = itemData.ost;
+        }
+
+        len = stops.length;
+
+        for (i = 0; i < len; i += 1) {
+          stop = stops[i];
+
+          if (!itemData.g._collapsable) {
+            stop.setAttribute('offset', oValues[i * 2] + '%');
+          }
+
+          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
+        }
+      }
+
+      if (styleData.t === 1) {
+        if (itemData.e._mdf || isFirstFrame) {
+          gfill.setAttribute('x2', pt2[0]);
+          gfill.setAttribute('y2', pt2[1]);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('x2', pt2[0]);
+            itemData.of.setAttribute('y2', pt2[1]);
+          }
+        }
+      } else {
+        var rad;
+
+        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
+          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          gfill.setAttribute('r', rad);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('r', rad);
+          }
+        }
+
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
+          if (!rad) {
+            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+          }
+
+          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+          var percent = itemData.h.v;
+
+          if (percent >= 1) {
+            percent = 0.99;
+          } else if (percent <= -1) {
+            percent = -0.99;
+          }
+
+          var dist = rad * percent;
+          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+          gfill.setAttribute('fx', x);
+          gfill.setAttribute('fy', y);
+
+          if (hasOpacity && !itemData.g._collapsable) {
+            itemData.of.setAttribute('fx', x);
+            itemData.of.setAttribute('fy', y);
+          }
+        } // gfill.setAttribute('fy','200');
+
+      }
+    }
+
+    function renderStroke(styleData, itemData, isFirstFrame) {
+      var styleElem = itemData.style;
+      var d = itemData.d;
+
+      if (d && (d._mdf || isFirstFrame) && d.dashStr) {
+        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
+        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
+      }
+
+      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {
+        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');
+      }
+
+      if (itemData.o._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
+      }
+
+      if (itemData.w._mdf || isFirstFrame) {
+        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
+
+        if (styleElem.msElem) {
+          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
+        }
+      }
+    }
+
+    return ob;
+  }();
+
+  function SVGShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);
+
+  SVGShapeElement.prototype.initSecondaryElement = function () {};
+
+  SVGShapeElement.prototype.identityMatrix = new Matrix();
+
+  SVGShapeElement.prototype.buildExpressionInterface = function () {};
+
+  SVGShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+  };
+  /*
+  This method searches for multiple shapes that affect a single element and one of them is animated
+  */
+
+
+  SVGShapeElement.prototype.filterUniqueShapes = function () {
+    var i;
+    var len = this.shapes.length;
+    var shape;
+    var j;
+    var jLen = this.stylesList.length;
+    var style;
+    var tempShapes = [];
+    var areAnimated = false;
+
+    for (j = 0; j < jLen; j += 1) {
+      style = this.stylesList[j];
+      areAnimated = false;
+      tempShapes.length = 0;
+
+      for (i = 0; i < len; i += 1) {
+        shape = this.shapes[i];
+
+        if (shape.styles.indexOf(style) !== -1) {
+          tempShapes.push(shape);
+          areAnimated = shape._isAnimated || areAnimated;
+        }
+      }
+
+      if (tempShapes.length > 1 && areAnimated) {
+        this.setShapesAsAnimated(tempShapes);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {
+    var i;
+    var len = shapes.length;
+
+    for (i = 0; i < len; i += 1) {
+      shapes[i].setAsAnimated();
+    }
+  };
+
+  SVGShapeElement.prototype.createStyleElement = function (data, level) {
+    // TODO: prevent drawing of hidden styles
+    var elementData;
+    var styleOb = new SVGStyleData(data, level);
+    var pathElement = styleOb.pElem;
+
+    if (data.ty === 'st') {
+      elementData = new SVGStrokeStyleData(this, data, styleOb);
+    } else if (data.ty === 'fl') {
+      elementData = new SVGFillStyleData(this, data, styleOb);
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+      elementData = new GradientConstructor(this, data, styleOb);
+      this.globalData.defs.appendChild(elementData.gf);
+
+      if (elementData.maskId) {
+        this.globalData.defs.appendChild(elementData.ms);
+        this.globalData.defs.appendChild(elementData.of);
+        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
+      }
+    } else if (data.ty === 'no') {
+      elementData = new SVGNoStyleData(this, data, styleOb);
+    }
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
+      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
+      pathElement.setAttribute('fill-opacity', '0');
+
+      if (data.lj === 1) {
+        pathElement.setAttribute('stroke-miterlimit', data.ml);
+      }
+    }
+
+    if (data.r === 2) {
+      pathElement.setAttribute('fill-rule', 'evenodd');
+    }
+
+    if (data.ln) {
+      pathElement.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      pathElement.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    this.stylesList.push(styleOb);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createGroupElement = function (data) {
+    var elementData = new ShapeGroupData();
+
+    if (data.ln) {
+      elementData.gr.setAttribute('id', data.ln);
+    }
+
+    if (data.cl) {
+      elementData.gr.setAttribute('class', data.cl);
+    }
+
+    if (data.bm) {
+      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
+    }
+
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createTransformElement = function (data, container) {
+    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);
+    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    this.addToAnimatedContents(data, elementData);
+    return elementData;
+  };
+
+  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {
+    var i = 0;
+    var len = this.animatedContents.length;
+
+    while (i < len) {
+      if (this.animatedContents[i].element === element) {
+        return;
+      }
+
+      i += 1;
+    }
+
+    this.animatedContents.push({
+      fn: SVGElementsRenderer.createRenderFunction(data),
+      element: element,
+      data: data
+    });
+  };
+
+  SVGShapeElement.prototype.setElementStyles = function (elementData) {
+    var arr = elementData.styles;
+    var j;
+    var jLen = this.stylesList.length;
+
+    for (j = 0; j < jLen; j += 1) {
+      if (!this.stylesList[j].closed) {
+        arr.push(this.stylesList[j]);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);
+    this.filterUniqueShapes();
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+  };
+
+  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {
+    var ownTransformers = [].concat(transformers);
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var currentTransform;
+    var modifier;
+    var processedPos;
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._render = render;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], level);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        if (arr[i]._render) {
+          if (itemsData[i].style.pElem.parentNode !== container) {
+            container.appendChild(itemsData[i].style.pElem);
+          }
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);
+
+        if (arr[i]._render) {
+          if (itemsData[i].gr.parentNode !== container) {
+            container.appendChild(itemsData[i].gr);
+          }
+        }
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          itemsData[i] = this.createTransformElement(arr[i], container);
+        }
+
+        currentTransform = itemsData[i].transform;
+        ownTransformers.push(currentTransform);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
+        }
+
+        this.setElementStyles(itemsData[i]);
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          render = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    len = ownStyles.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownStyles[i].closed = true;
+    }
+
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  SVGShapeElement.prototype.renderInnerContent = function () {
+    this.renderModifiers();
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.stylesList[i].reset();
+    }
+
+    this.renderShape();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.stylesList[i]._mdf || this._isFirstFrame) {
+        if (this.stylesList[i].msElem) {
+          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers
+
+          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
+        }
+
+        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.renderShape = function () {
+    var i;
+    var len = this.animatedContents.length;
+    var animatedContent;
+
+    for (i = 0; i < len; i += 1) {
+      animatedContent = this.animatedContents[i];
+
+      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
+        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
+      }
+    }
+  };
+
+  SVGShapeElement.prototype.destroy = function () {
+    this.destroyBaseElement();
+    this.shapesData = null;
+    this.itemsData = null;
+  };
+
+  function LetterProps(o, sw, sc, fc, m, p) {
+    this.o = o;
+    this.sw = sw;
+    this.sc = sc;
+    this.fc = fc;
+    this.m = m;
+    this.p = p;
+    this._mdf = {
+      o: true,
+      sw: !!sw,
+      sc: !!sc,
+      fc: !!fc,
+      m: true,
+      p: true
+    };
+  }
+
+  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {
+    this._mdf.o = false;
+    this._mdf.sw = false;
+    this._mdf.sc = false;
+    this._mdf.fc = false;
+    this._mdf.m = false;
+    this._mdf.p = false;
+    var updated = false;
+
+    if (this.o !== o) {
+      this.o = o;
+      this._mdf.o = true;
+      updated = true;
+    }
+
+    if (this.sw !== sw) {
+      this.sw = sw;
+      this._mdf.sw = true;
+      updated = true;
+    }
+
+    if (this.sc !== sc) {
+      this.sc = sc;
+      this._mdf.sc = true;
+      updated = true;
+    }
+
+    if (this.fc !== fc) {
+      this.fc = fc;
+      this._mdf.fc = true;
+      updated = true;
+    }
+
+    if (this.m !== m) {
+      this.m = m;
+      this._mdf.m = true;
+      updated = true;
+    }
+
+    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])) {
+      this.p = p;
+      this._mdf.p = true;
+      updated = true;
+    }
+
+    return updated;
+  };
+
+  function TextProperty(elem, data) {
+    this._frameId = initialDefaultFrame;
+    this.pv = '';
+    this.v = '';
+    this.kf = false;
+    this._isFirstFrame = true;
+    this._mdf = false;
+    this.data = data;
+    this.elem = elem;
+    this.comp = this.elem.comp;
+    this.keysIndex = 0;
+    this.canResize = false;
+    this.minimumFontSize = 1;
+    this.effectsSequence = [];
+    this.currentData = {
+      ascent: 0,
+      boxWidth: this.defaultBoxWidth,
+      f: '',
+      fStyle: '',
+      fWeight: '',
+      fc: '',
+      j: '',
+      justifyOffset: '',
+      l: [],
+      lh: 0,
+      lineWidths: [],
+      ls: '',
+      of: '',
+      s: '',
+      sc: '',
+      sw: 0,
+      t: 0,
+      tr: 0,
+      sz: 0,
+      ps: null,
+      fillColorAnim: false,
+      strokeColorAnim: false,
+      strokeWidthAnim: false,
+      yOffset: 0,
+      finalSize: 0,
+      finalText: [],
+      finalLineHeight: 0,
+      __complete: false
+    };
+    this.copyData(this.currentData, this.data.d.k[0].s);
+
+    if (!this.searchProperty()) {
+      this.completeTextData(this.currentData);
+    }
+  }
+
+  TextProperty.prototype.defaultBoxWidth = [0, 0];
+
+  TextProperty.prototype.copyData = function (obj, data) {
+    for (var s in data) {
+      if (Object.prototype.hasOwnProperty.call(data, s)) {
+        obj[s] = data[s];
+      }
+    }
+
+    return obj;
+  };
+
+  TextProperty.prototype.setCurrentData = function (data) {
+    if (!data.__complete) {
+      this.completeTextData(data);
+    }
+
+    this.currentData = data;
+    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
+    this._mdf = true;
+  };
+
+  TextProperty.prototype.searchProperty = function () {
+    return this.searchKeyframes();
+  };
+
+  TextProperty.prototype.searchKeyframes = function () {
+    this.kf = this.data.d.k.length > 1;
+
+    if (this.kf) {
+      this.addEffect(this.getKeyframeValue.bind(this));
+    }
+
+    return this.kf;
+  };
+
+  TextProperty.prototype.addEffect = function (effectFunction) {
+    this.effectsSequence.push(effectFunction);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.getValue = function (_finalValue) {
+    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
+      return;
+    }
+
+    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
+    var currentValue = this.currentData;
+    var currentIndex = this.keysIndex;
+
+    if (this.lock) {
+      this.setCurrentData(this.currentData);
+      return;
+    }
+
+    this.lock = true;
+    this._mdf = false;
+    var i;
+    var len = this.effectsSequence.length;
+    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
+
+    for (i = 0; i < len; i += 1) {
+      // Checking if index changed to prevent creating a new object every time the expression updates.
+      if (currentIndex !== this.keysIndex) {
+        finalValue = this.effectsSequence[i](finalValue, finalValue.t);
+      } else {
+        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
+      }
+    }
+
+    if (currentValue !== finalValue) {
+      this.setCurrentData(finalValue);
+    }
+
+    this.v = this.currentData;
+    this.pv = this.v;
+    this.lock = false;
+    this.frameId = this.elem.globalData.frameId;
+  };
+
+  TextProperty.prototype.getKeyframeValue = function () {
+    var textKeys = this.data.d.k;
+    var frameNum = this.elem.comp.renderedFrame;
+    var i = 0;
+    var len = textKeys.length;
+
+    while (i <= len - 1) {
+      if (i === len - 1 || textKeys[i + 1].t > frameNum) {
         break;
+      }
+
+      i += 1;
+    }
+
+    if (this.keysIndex !== i) {
+      this.keysIndex = i;
+    }
+
+    return this.data.d.k[this.keysIndex].s;
+  };
+
+  TextProperty.prototype.buildFinalText = function (text) {
+    var charactersArray = [];
+    var i = 0;
+    var len = text.length;
+    var charCode;
+    var secondCharCode;
+    var shouldCombine = false;
+
+    while (i < len) {
+      charCode = text.charCodeAt(i);
+
+      if (FontManager.isCombinedCharacter(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {
+          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {
+            charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+            shouldCombine = false;
+          } else {
+            charactersArray.push(text.substr(i, 2));
+          }
+
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (charCode > 0xDBFF) {
+        secondCharCode = text.charCodeAt(i + 1);
+
+        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {
+          shouldCombine = true;
+          charactersArray[charactersArray.length - 1] += text.substr(i, 2);
+          i += 1;
+        } else {
+          charactersArray.push(text.charAt(i));
+        }
+      } else if (FontManager.isZeroWidthJoiner(charCode)) {
+        charactersArray[charactersArray.length - 1] += text.charAt(i);
+        shouldCombine = true;
+      } else {
+        charactersArray.push(text.charAt(i));
+      }
+
+      i += 1;
+    }
+
+    return charactersArray;
+  };
+
+  TextProperty.prototype.completeTextData = function (documentData) {
+    documentData.__complete = true;
+    var fontManager = this.elem.globalData.fontManager;
+    var data = this.data;
+    var letters = [];
+    var i;
+    var len;
+    var newLineFlag;
+    var index = 0;
+    var val;
+    var anchorGrouping = data.m.g;
+    var currentSize = 0;
+    var currentPos = 0;
+    var currentLine = 0;
+    var lineWidths = [];
+    var lineWidth = 0;
+    var maxLineWidth = 0;
+    var j;
+    var jLen;
+    var fontData = fontManager.getFontByName(documentData.f);
+    var charData;
+    var cLength = 0;
+    var fontProps = getFontProperties(fontData);
+    documentData.fWeight = fontProps.weight;
+    documentData.fStyle = fontProps.style;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = this.buildFinalText(documentData.t);
+    len = documentData.finalText.length;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+    var charCode;
+
+    if (documentData.sz) {
+      var flag = true;
+      var boxWidth = documentData.sz[0];
+      var boxHeight = documentData.sz[1];
+      var currentHeight;
+      var finalText;
+
+      while (flag) {
+        finalText = this.buildFinalText(documentData.t);
+        currentHeight = 0;
+        lineWidth = 0;
+        len = finalText.length;
+        trackingOffset = documentData.tr / 1000 * documentData.finalSize;
+        var lastSpaceIndex = -1;
+
+        for (i = 0; i < len; i += 1) {
+          charCode = finalText[i].charCodeAt(0);
+          newLineFlag = false;
+
+          if (finalText[i] === ' ') {
+            lastSpaceIndex = i;
+          } else if (charCode === 13 || charCode === 3) {
+            lineWidth = 0;
+            newLineFlag = true;
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+          }
+
+          if (fontManager.chars) {
+            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
+            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+          } else {
+            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
+          }
+
+          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {
+            if (lastSpaceIndex === -1) {
+              len += 1;
+            } else {
+              i = lastSpaceIndex;
+            }
+
+            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;
+            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+
+            lastSpaceIndex = -1;
+            lineWidth = 0;
+          } else {
+            lineWidth += cLength;
+            lineWidth += trackingOffset;
+          }
+        }
+
+        currentHeight += fontData.ascent * documentData.finalSize / 100;
+
+        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+          documentData.finalSize -= 1;
+          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+        } else {
+          documentData.finalText = finalText;
+          len = documentData.finalText.length;
+          flag = false;
+        }
+      }
+    }
+
+    lineWidth = -trackingOffset;
+    cLength = 0;
+    var uncollapsedSpaces = 0;
+    var currentChar;
+
+    for (i = 0; i < len; i += 1) {
+      newLineFlag = false;
+      currentChar = documentData.finalText[i];
+      charCode = currentChar.charCodeAt(0);
+
+      if (charCode === 13 || charCode === 3) {
+        uncollapsedSpaces = 0;
+        lineWidths.push(lineWidth);
+        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+        lineWidth = -2 * trackingOffset;
+        val = '';
+        newLineFlag = true;
+        currentLine += 1;
+      } else {
+        val = currentChar;
+      }
+
+      if (fontManager.chars) {
+        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;
+      } else {
+        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
+      } //
+
+
+      if (currentChar === ' ') {
+        uncollapsedSpaces += cLength + trackingOffset;
+      } else {
+        lineWidth += cLength + trackingOffset + uncollapsedSpaces;
+        uncollapsedSpaces = 0;
+      }
+
+      letters.push({
+        l: cLength,
+        an: cLength,
+        add: currentSize,
+        n: newLineFlag,
+        anIndexes: [],
+        val: val,
+        line: currentLine,
+        animatorJustifyOffset: 0
+      });
+
+      if (anchorGrouping == 2) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || val === ' ' || i === len - 1) {
+          if (val === '' || val === ' ') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          index += 1;
+          currentSize = 0;
+        }
+      } else if (anchorGrouping == 3) {
+        // eslint-disable-line eqeqeq
+        currentSize += cLength;
+
+        if (val === '' || i === len - 1) {
+          if (val === '') {
+            currentSize -= cLength;
+          }
+
+          while (currentPos <= i) {
+            letters[currentPos].an = currentSize;
+            letters[currentPos].ind = index;
+            letters[currentPos].extra = cLength;
+            currentPos += 1;
+          }
+
+          currentSize = 0;
+          index += 1;
+        }
+      } else {
+        letters[index].ind = index;
+        letters[index].extra = 0;
+        index += 1;
+      }
+    }
+
+    documentData.l = letters;
+    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
+    lineWidths.push(lineWidth);
+
+    if (documentData.sz) {
+      documentData.boxWidth = documentData.sz[0];
+      documentData.justifyOffset = 0;
+    } else {
+      documentData.boxWidth = maxLineWidth;
+
+      switch (documentData.j) {
+        case 1:
+          documentData.justifyOffset = -documentData.boxWidth;
+          break;
+
+        case 2:
+          documentData.justifyOffset = -documentData.boxWidth / 2;
+          break;
+
+        default:
+          documentData.justifyOffset = 0;
+      }
+    }
+
+    documentData.lineWidths = lineWidths;
+    var animators = data.a;
+    var animatorData;
+    var letterData;
+    jLen = animators.length;
+    var based;
+    var ind;
+    var indexes = [];
+
+    for (j = 0; j < jLen; j += 1) {
+      animatorData = animators[j];
+
+      if (animatorData.a.sc) {
+        documentData.strokeColorAnim = true;
+      }
+
+      if (animatorData.a.sw) {
+        documentData.strokeWidthAnim = true;
+      }
+
+      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {
+        documentData.fillColorAnim = true;
+      }
+
+      ind = 0;
+      based = animatorData.s.b;
+
+      for (i = 0; i < len; i += 1) {
+        letterData = letters[i];
+        letterData.anIndexes[j] = ind;
+
+        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {
+          // eslint-disable-line eqeqeq
+          if (animatorData.s.rn === 1) {
+            indexes.push(ind);
+          }
+
+          ind += 1;
+        }
+      }
+
+      data.a[j].s.totalChars = ind;
+      var currentInd = -1;
+      var newInd;
+
+      if (animatorData.s.rn === 1) {
+        for (i = 0; i < len; i += 1) {
+          letterData = letters[i];
+
+          if (currentInd != letterData.anIndexes[j]) {
+            // eslint-disable-line eqeqeq
+            currentInd = letterData.anIndexes[j];
+            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];
+          }
+
+          letterData.anIndexes[j] = newInd;
+        }
+      }
+    }
+
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;
+    documentData.ls = documentData.ls || 0;
+    documentData.ascent = fontData.ascent * documentData.finalSize / 100;
+  };
+
+  TextProperty.prototype.updateDocumentData = function (newData, index) {
+    index = index === undefined ? this.keysIndex : index;
+    var dData = this.copyData({}, this.data.d.k[index].s);
+    dData = this.copyData(dData, newData);
+    this.data.d.k[index].s = dData;
+    this.recalculate(index);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.recalculate = function (index) {
+    var dData = this.data.d.k[index].s;
+    dData.__complete = false;
+    this.keysIndex = 0;
+    this._isFirstFrame = true;
+    this.getValue(dData);
+  };
+
+  TextProperty.prototype.canResizeFont = function (_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+    this.elem.addDynamicProperty(this);
+  };
+
+  var TextSelectorProp = function () {
+    var max = Math.max;
+    var min = Math.min;
+    var floor = Math.floor;
+
+    function TextSelectorPropFactory(elem, data) {
+      this._currentTextLength = -1;
+      this.k = false;
+      this.data = data;
+      this.elem = elem;
+      this.comp = elem.comp;
+      this.finalS = 0;
+      this.finalE = 0;
+      this.initDynamicPropertyContainer(elem);
+      this.s = PropertyFactory.getProp(elem, data.s || {
+        k: 0
+      }, 0, 0, this);
+
+      if ('e' in data) {
+        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);
+      } else {
+        this.e = {
+          v: 100
+        };
+      }
+
+      this.o = PropertyFactory.getProp(elem, data.o || {
+        k: 0
+      }, 0, 0, this);
+      this.xe = PropertyFactory.getProp(elem, data.xe || {
+        k: 0
+      }, 0, 0, this);
+      this.ne = PropertyFactory.getProp(elem, data.ne || {
+        k: 0
+      }, 0, 0, this);
+      this.sm = PropertyFactory.getProp(elem, data.sm || {
+        k: 100
+      }, 0, 0, this);
+      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);
+
+      if (!this.dynamicProperties.length) {
+        this.getValue();
+      }
+    }
+
+    TextSelectorPropFactory.prototype = {
+      getMult: function getMult(ind) {
+        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
+          this.getValue();
+        }
+
+        var x1 = 0;
+        var y1 = 0;
+        var x2 = 1;
+        var y2 = 1;
+
+        if (this.ne.v > 0) {
+          x1 = this.ne.v / 100.0;
+        } else {
+          y1 = -this.ne.v / 100.0;
+        }
+
+        if (this.xe.v > 0) {
+          x2 = 1.0 - this.xe.v / 100.0;
+        } else {
+          y2 = 1.0 + this.xe.v / 100.0;
+        }
+
+        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;
+        var mult = 0;
+        var s = this.finalS;
+        var e = this.finalE;
+        var type = this.data.sh;
+
+        if (type === 2) {
+          if (e === s) {
+            mult = ind >= e ? 1 : 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 3) {
+          if (e === s) {
+            mult = ind >= e ? 0 : 1;
+          } else {
+            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+          }
+
+          mult = easer(mult);
+        } else if (type === 4) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));
+
+            if (mult < 0.5) {
+              mult *= 2;
+            } else {
+              mult = 1 - 2 * (mult - 0.5);
+            }
+          }
+
+          mult = easer(mult);
+        } else if (type === 5) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            var tot = e - s;
+            /* ind += 0.5;
+                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */
+
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            var x = -tot / 2 + ind;
+            var a = tot / 2;
+            mult = Math.sqrt(1 - x * x / (a * a));
+          }
+
+          mult = easer(mult);
+        } else if (type === 6) {
+          if (e === s) {
+            mult = 0;
+          } else {
+            ind = min(max(0, ind + 0.5 - s), e - s);
+            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line
+          }
+
+          mult = easer(mult);
+        } else {
+          if (ind >= floor(s)) {
+            if (ind - s < 0) {
+              mult = max(0, min(min(e, 1) - (s - ind), 1));
+            } else {
+              mult = max(0, min(e - ind, 1));
+            }
+          }
+
+          mult = easer(mult);
+        } // Smoothness implementation.
+        // The smoothness represents a reduced range of the original [0; 1] range.
+        // if smoothness is 25%, the new range will be [0.375; 0.625]
+        // Steps are:
+        // - find the lower value of the new range (threshold)
+        // - if multiplier is smaller than that value, floor it to 0
+        // - if it is larger,
+        //     - subtract the threshold
+        //     - divide it by the smoothness (this will return the range to [0; 1])
+        // Note: If it doesn't work on some scenarios, consider applying it before the easer.
+
+
+        if (this.sm.v !== 100) {
+          var smoothness = this.sm.v * 0.01;
+
+          if (smoothness === 0) {
+            smoothness = 0.00000001;
+          }
+
+          var threshold = 0.5 - smoothness * 0.5;
+
+          if (mult < threshold) {
+            mult = 0;
+          } else {
+            mult = (mult - threshold) / smoothness;
+
+            if (mult > 1) {
+              mult = 1;
+            }
+          }
+        }
+
+        return mult * this.a.v;
+      },
+      getValue: function getValue(newCharsFlag) {
+        this.iterateDynamicProperties();
+        this._mdf = newCharsFlag || this._mdf;
+        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
+
+        if (newCharsFlag && this.data.r === 2) {
+          this.e.v = this._currentTextLength;
+        }
+
+        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
+        var o = this.o.v / divisor;
+        var s = this.s.v / divisor + o;
+        var e = this.e.v / divisor + o;
+
+        if (s > e) {
+          var _s = s;
+          s = e;
+          e = _s;
+        }
+
+        this.finalS = s;
+        this.finalE = e;
+      }
+    };
+    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
+
+    function getTextSelectorProp(elem, data, arr) {
+      return new TextSelectorPropFactory(elem, data, arr);
+    }
+
+    return {
+      getTextSelectorProp: getTextSelectorProp
+    };
+  }();
+
+  function TextAnimatorDataProperty(elem, animatorProps, container) {
+    var defaultData = {
+      propType: false
+    };
+    var getProp = PropertyFactory.getProp;
+    var textAnimatorAnimatables = animatorProps.a;
+    this.a = {
+      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,
+      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,
+      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,
+      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,
+      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,
+      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,
+      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,
+      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,
+      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,
+      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,
+      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,
+      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,
+      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,
+      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,
+      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,
+      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData
+    };
+    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
+    this.s.t = animatorProps.s.t;
+  }
+
+  function TextAnimatorProperty(textData, renderType, elem) {
+    this._isFirstFrame = true;
+    this._hasMaskedPath = false;
+    this._frameId = -1;
+    this._textData = textData;
+    this._renderType = renderType;
+    this._elem = elem;
+    this._animatorsData = createSizedArray(this._textData.a.length);
+    this._pathData = {};
+    this._moreOptions = {
+      alignment: {}
+    };
+    this.renderedLetters = [];
+    this.lettersChangedFlag = false;
+    this.initDynamicPropertyContainer(elem);
+  }
+
+  TextAnimatorProperty.prototype.searchProperties = function () {
+    var i;
+    var len = this._textData.a.length;
+    var animatorProps;
+    var getProp = PropertyFactory.getProp;
+
+    for (i = 0; i < len; i += 1) {
+      animatorProps = this._textData.a[i];
+      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
+    }
+
+    if (this._textData.p && 'm' in this._textData.p) {
+      this._pathData = {
+        a: getProp(this._elem, this._textData.p.a, 0, 0, this),
+        f: getProp(this._elem, this._textData.p.f, 0, 0, this),
+        l: getProp(this._elem, this._textData.p.l, 0, 0, this),
+        r: getProp(this._elem, this._textData.p.r, 0, 0, this),
+        p: getProp(this._elem, this._textData.p.p, 0, 0, this),
+        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
+      };
+      this._hasMaskedPath = true;
+    } else {
+      this._hasMaskedPath = false;
+    }
+
+    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);
+  };
+
+  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
+    this.lettersChangedFlag = lettersChangedFlag;
+
+    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
+      return;
+    }
+
+    this._isFirstFrame = false;
+    var alignment = this._moreOptions.alignment.v;
+    var animators = this._animatorsData;
+    var textData = this._textData;
+    var matrixHelper = this.mHelper;
+    var renderType = this._renderType;
+    var renderedLettersCount = this.renderedLetters.length;
+    var xPos;
+    var yPos;
+    var i;
+    var len;
+    var letters = documentData.l;
+    var pathInfo;
+    var currentLength;
+    var currentPoint;
+    var segmentLength;
+    var flag;
+    var pointInd;
+    var segmentInd;
+    var prevPoint;
+    var points;
+    var segments;
+    var partialLength;
+    var totalLength;
+    var perc;
+    var tanAngle;
+    var mask;
+
+    if (this._hasMaskedPath) {
+      mask = this._pathData.m;
+
+      if (!this._pathData.n || this._pathData._mdf) {
+        var paths = mask.v;
+
+        if (this._pathData.r.v) {
+          paths = paths.reverse();
+        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
+
+
+        pathInfo = {
+          tLength: 0,
+          segments: []
+        };
+        len = paths._length - 1;
+        var bezierData;
+        totalLength = 0;
+
+        for (i = 0; i < len; i += 1) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        i = len;
+
+        if (mask.v.c) {
+          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
+          pathInfo.tLength += bezierData.segmentLength;
+          pathInfo.segments.push(bezierData);
+          totalLength += bezierData.segmentLength;
+        }
+
+        this._pathData.pi = pathInfo;
+      }
+
+      pathInfo = this._pathData.pi;
+      currentLength = this._pathData.f.v;
+      segmentInd = 0;
+      pointInd = 1;
+      segmentLength = 0;
+      flag = true;
+      segments = pathInfo.segments;
+
+      if (currentLength < 0 && mask.v.c) {
+        if (pathInfo.tLength < Math.abs(currentLength)) {
+          currentLength = -Math.abs(currentLength) % pathInfo.tLength;
+        }
+
+        segmentInd = segments.length - 1;
+        points = segments[segmentInd].points;
+        pointInd = points.length - 1;
+
+        while (currentLength < 0) {
+          currentLength += points[pointInd].partialLength;
+          pointInd -= 1;
+
+          if (pointInd < 0) {
+            segmentInd -= 1;
+            points = segments[segmentInd].points;
+            pointInd = points.length - 1;
+          }
+        }
+      }
+
+      points = segments[segmentInd].points;
+      prevPoint = points[pointInd - 1];
+      currentPoint = points[pointInd];
+      partialLength = currentPoint.partialLength;
+    }
+
+    len = letters.length;
+    xPos = 0;
+    yPos = 0;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
+    var firstLine = true;
+    var animatorProps;
+    var animatorSelector;
+    var j;
+    var jLen;
+    var letterValue;
+    jLen = animators.length;
+    var mult;
+    var ind = -1;
+    var offf;
+    var xPathPos;
+    var yPathPos;
+    var initPathPos = currentLength;
+    var initSegmentInd = segmentInd;
+    var initPointInd = pointInd;
+    var currentLine = -1;
+    var elemOpacity;
+    var sc;
+    var sw;
+    var fc;
+    var k;
+    var letterSw;
+    var letterSc;
+    var letterFc;
+    var letterM = '';
+    var letterP = this.defaultPropsArray;
+    var letterO; //
+
+    if (documentData.j === 2 || documentData.j === 1) {
+      var animatorJustifyOffset = 0;
+      var animatorFirstCharOffset = 0;
+      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
+      var lastIndex = 0;
+      var isNewLine = true;
+
+      for (i = 0; i < len; i += 1) {
+        if (letters[i].n) {
+          if (animatorJustifyOffset) {
+            animatorJustifyOffset += animatorFirstCharOffset;
+          }
+
+          while (lastIndex < i) {
+            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+            lastIndex += 1;
+          }
+
+          animatorJustifyOffset = 0;
+          isNewLine = true;
+        } else {
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.t.propType) {
+              if (isNewLine && documentData.j === 2) {
+                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
+              }
+
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;
+              } else {
+                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;
+              }
+            }
+          }
+
+          isNewLine = false;
+        }
+      }
+
+      if (animatorJustifyOffset) {
+        animatorJustifyOffset += animatorFirstCharOffset;
+      }
+
+      while (lastIndex < i) {
+        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
+        lastIndex += 1;
+      }
+    } //
+
+
+    for (i = 0; i < len; i += 1) {
+      matrixHelper.reset();
+      elemOpacity = 1;
+
+      if (letters[i].n) {
+        xPos = 0;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        currentLength = initPathPos;
+        firstLine = false;
+
+        if (this._hasMaskedPath) {
+          segmentInd = initSegmentInd;
+          pointInd = initPointInd;
+          points = segments[segmentInd].points;
+          prevPoint = points[pointInd - 1];
+          currentPoint = points[pointInd];
+          partialLength = currentPoint.partialLength;
+          segmentLength = 0;
+        }
+
+        letterM = '';
+        letterFc = '';
+        letterSw = '';
+        letterO = '';
+        letterP = this.defaultPropsArray;
+      } else {
+        if (this._hasMaskedPath) {
+          if (currentLine !== letters[i].line) {
+            switch (documentData.j) {
+              case 1:
+                currentLength += totalLength - documentData.lineWidths[letters[i].line];
+                break;
+
+              case 2:
+                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;
+                break;
+
+              default:
+                break;
+            }
+
+            currentLine = letters[i].line;
+          }
+
+          if (ind !== letters[i].ind) {
+            if (letters[ind]) {
+              currentLength += letters[ind].extra;
+            }
+
+            currentLength += letters[i].an / 2;
+            ind = letters[i].ind;
+          }
+
+          currentLength += alignment[0] * letters[i].an * 0.005;
+          var animatorOffset = 0;
+
+          for (j = 0; j < jLen; j += 1) {
+            animatorProps = animators[j].a;
+
+            if (animatorProps.p.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.p.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.p.v[0] * mult;
+              }
+            }
+
+            if (animatorProps.a.propType) {
+              animatorSelector = animators[j].s;
+              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+              if (mult.length) {
+                animatorOffset += animatorProps.a.v[0] * mult[0];
+              } else {
+                animatorOffset += animatorProps.a.v[0] * mult;
+              }
+            }
+          }
+
+          flag = true; // Force alignment only works with a single line for now
+
+          if (this._pathData.a.v) {
+            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);
+            currentLength += this._pathData.f.v;
+          }
+
+          while (flag) {
+            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
+              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
+              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
+              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
+              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);
+              flag = false;
+            } else if (points) {
+              segmentLength += currentPoint.partialLength;
+              pointInd += 1;
+
+              if (pointInd >= points.length) {
+                pointInd = 0;
+                segmentInd += 1;
+
+                if (!segments[segmentInd]) {
+                  if (mask.v.c) {
+                    pointInd = 0;
+                    segmentInd = 0;
+                    points = segments[segmentInd].points;
+                  } else {
+                    segmentLength -= currentPoint.partialLength;
+                    points = null;
+                  }
+                } else {
+                  points = segments[segmentInd].points;
+                }
+              }
+
+              if (points) {
+                prevPoint = currentPoint;
+                currentPoint = points[pointInd];
+                partialLength = currentPoint.partialLength;
+              }
+            }
+          }
+
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0);
+        } else {
+          offf = letters[i].an / 2 - letters[i].add;
+          matrixHelper.translate(-offf, 0, 0); // Grouping alignment
+
+          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.t.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
+
+            if (xPos !== 0 || documentData.j !== 0) {
+              if (this._hasMaskedPath) {
+                if (mult.length) {
+                  currentLength += animatorProps.t.v * mult[0];
+                } else {
+                  currentLength += animatorProps.t.v * mult;
+                }
+              } else if (mult.length) {
+                xPos += animatorProps.t.v * mult[0];
+              } else {
+                xPos += animatorProps.t.v * mult;
+              }
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          sw = documentData.sw || 0;
+        }
+
+        if (documentData.strokeColorAnim) {
+          if (documentData.sc) {
+            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
+          } else {
+            sc = [0, 0, 0];
+          }
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.a.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.s.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (mult.length) {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);
+            } else {
+              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+          animatorSelector = animators[j].s;
+          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+          if (animatorProps.sk.propType) {
+            if (mult.length) {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
+            } else {
+              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
+            }
+          }
+
+          if (animatorProps.r.propType) {
+            if (mult.length) {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
+            } else {
+              matrixHelper.rotateZ(-animatorProps.r.v * mult);
+            }
+          }
+
+          if (animatorProps.ry.propType) {
+            if (mult.length) {
+              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);
+            } else {
+              matrixHelper.rotateY(animatorProps.ry.v * mult);
+            }
+          }
+
+          if (animatorProps.rx.propType) {
+            if (mult.length) {
+              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);
+            } else {
+              matrixHelper.rotateX(animatorProps.rx.v * mult);
+            }
+          }
+
+          if (animatorProps.o.propType) {
+            if (mult.length) {
+              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];
+            } else {
+              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;
+            }
+          }
+
+          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
+            if (mult.length) {
+              sw += animatorProps.sw.v * mult[0];
+            } else {
+              sw += animatorProps.sw.v * mult;
+            }
+          }
+
+          if (documentData.strokeColorAnim && animatorProps.sc.propType) {
+            for (k = 0; k < 3; k += 1) {
+              if (mult.length) {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];
+              } else {
+                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;
+              }
+            }
+          }
+
+          if (documentData.fillColorAnim && documentData.fc) {
+            if (animatorProps.fc.propType) {
+              for (k = 0; k < 3; k += 1) {
+                if (mult.length) {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];
+                } else {
+                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;
+                }
+              }
+            }
+
+            if (animatorProps.fh.propType) {
+              if (mult.length) {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);
+              } else {
+                fc = addHueToRGB(fc, animatorProps.fh.v * mult);
+              }
+            }
+
+            if (animatorProps.fs.propType) {
+              if (mult.length) {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);
+              } else {
+                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);
+              }
+            }
+
+            if (animatorProps.fb.propType) {
+              if (mult.length) {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);
+              } else {
+                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);
+              }
+            }
+          }
+        }
+
+        for (j = 0; j < jLen; j += 1) {
+          animatorProps = animators[j].a;
+
+          if (animatorProps.p.propType) {
+            animatorSelector = animators[j].s;
+            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
+
+            if (this._hasMaskedPath) {
+              if (mult.length) {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
+              } else {
+                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+              }
+            } else if (mult.length) {
+              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
+            } else {
+              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
+            }
+          }
+        }
+
+        if (documentData.strokeWidthAnim) {
+          letterSw = sw < 0 ? 0 : sw;
+        }
+
+        if (documentData.strokeColorAnim) {
+          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';
+        }
+
+        if (documentData.fillColorAnim && documentData.fc) {
+          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';
+        }
+
+        if (this._hasMaskedPath) {
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);
+
+          if (this._pathData.p.v) {
+            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
+            var rot = Math.atan(tanAngle) * 180 / Math.PI;
+
+            if (currentPoint.point[0] < prevPoint.point[0]) {
+              rot += 180;
+            }
+
+            matrixHelper.rotate(-rot * Math.PI / 180);
+          }
+
+          matrixHelper.translate(xPathPos, yPathPos, 0);
+          currentLength -= alignment[0] * letters[i].an * 0.005;
+
+          if (letters[i + 1] && ind !== letters[i + 1].ind) {
+            currentLength += letters[i].an / 2;
+            currentLength += documentData.tr * 0.001 * documentData.finalSize;
+          }
+        } else {
+          matrixHelper.translate(xPos, yPos, 0);
+
+          if (documentData.ps) {
+            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
+            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+          }
+
+          switch (documentData.j) {
+            case 1:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);
+              break;
+
+            case 2:
+              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);
+              break;
+
+            default:
+              break;
+          }
+
+          matrixHelper.translate(0, -documentData.ls);
+          matrixHelper.translate(offf, 0, 0);
+          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);
+          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;
+        }
+
+        if (renderType === 'html') {
+          letterM = matrixHelper.toCSS();
+        } else if (renderType === 'svg') {
+          letterM = matrixHelper.to2dCSS();
+        } else {
+          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]];
+        }
+
+        letterO = elemOpacity;
+      }
+
+      if (renderedLettersCount <= i) {
+        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);
+        this.renderedLetters.push(letterValue);
+        renderedLettersCount += 1;
+        this.lettersChangedFlag = true;
+      } else {
+        letterValue = this.renderedLetters[i];
+        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
+      }
+    }
+  };
+
+  TextAnimatorProperty.prototype.getValue = function () {
+    if (this._elem.globalData.frameId === this._frameId) {
+      return;
+    }
+
+    this._frameId = this._elem.globalData.frameId;
+    this.iterateDynamicProperties();
+  };
+
+  TextAnimatorProperty.prototype.mHelper = new Matrix();
+  TextAnimatorProperty.prototype.defaultPropsArray = [];
+  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+  function ITextElement() {}
+
+  ITextElement.prototype.initElement = function (data, globalData, comp) {
+    this.lettersChangedFlag = true;
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+    this.initRenderable();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+    this.createContent();
+    this.hide();
+    this.textAnimator.searchProperties(this.dynamicProperties);
+  };
+
+  ITextElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {
+      this.buildNewText();
+      this.textProperty._isFirstFrame = false;
+      this.textProperty._mdf = false;
+    }
+  };
+
+  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {
+    var j;
+    var jLen = shapes.length;
+    var pathNodes;
+    var shapeStr = '';
+
+    for (j = 0; j < jLen; j += 1) {
+      if (shapes[j].ty === 'sh') {
+        pathNodes = shapes[j].ks.k;
+        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+      }
+    }
+
+    return shapeStr;
+  };
+
+  ITextElement.prototype.updateDocumentData = function (newData, index) {
+    this.textProperty.updateDocumentData(newData, index);
+  };
+
+  ITextElement.prototype.canResizeFont = function (_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+  };
+
+  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+  };
+
+  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {
+    if (documentData.ps) {
+      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);
+    }
+
+    matrixHelper.translate(0, -documentData.ls, 0);
+
+    switch (documentData.j) {
       case 1:
-        eff = new AngleEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);
         break;
+
       case 2:
-        eff = new ColorEffect(effects[i], element, this);
+        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);
         break;
-      case 3:
-        eff = new PointEffect(effects[i], element, this);
-        break;
-      case 4:
-      case 7:
-        eff = new CheckboxEffect(effects[i], element, this);
-        break;
-      case 10:
-        eff = new LayerIndexEffect(effects[i], element, this);
-        break;
-      case 11:
-        eff = new MaskIndexEffect(effects[i], element, this);
-        break;
-      case 5:
-        eff = new EffectsManager(effects[i], element, this);
-        break;
-        // case 6:
+
       default:
-        eff = new NoValueEffect(effects[i], element, this);
         break;
     }
-    if (eff) {
-      this.effectElements.push(eff);
+
+    matrixHelper.translate(xPos, yPos, 0);
+  };
+
+  ITextElement.prototype.buildColor = function (colorData) {
+    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';
+  };
+
+  ITextElement.prototype.emptyProp = new LetterProps();
+
+  ITextElement.prototype.destroy = function () {};
+
+  var emptyShapeData = {
+    shapes: []
+  };
+
+  function SVGTextLottieElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.renderType = 'svg';
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);
+
+  SVGTextLottieElement.prototype.createContent = function () {
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+      this.textContainer = createNS('text');
+    }
+  };
+
+  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {
+    var i = 0;
+    var len = textArray.length;
+    var textContents = [];
+    var currentTextContent = '';
+
+    while (i < len) {
+      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
+        textContents.push(currentTextContent);
+        currentTextContent = '';
+      } else {
+        currentTextContent += textArray[i];
+      }
+
+      i += 1;
+    }
+
+    textContents.push(currentTextContent);
+    return textContents;
+  };
+
+  SVGTextLottieElement.prototype.buildNewText = function () {
+    this.addDynamicProperty(this);
+    var i;
+    var len;
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
+
+    if (documentData.fc) {
+      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
+    } else {
+      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
+    }
+
+    if (documentData.sc) {
+      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+      this.layerElement.setAttribute('stroke-width', documentData.sw);
+    }
+
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (fontData.fClass) {
+      this.layerElement.setAttribute('class', fontData.fClass);
+    } else {
+      this.layerElement.setAttribute('font-family', fontData.fFamily);
+      var fWeight = documentData.fWeight;
+      var fStyle = documentData.fStyle;
+      this.layerElement.setAttribute('font-style', fStyle);
+      this.layerElement.setAttribute('font-weight', fWeight);
+    }
+
+    this.layerElement.setAttribute('aria-label', documentData.t);
+    var letters = documentData.l || [];
+    var usesGlyphs = !!this.globalData.fontManager.chars;
+    len = letters.length;
+    var tSpan;
+    var matrixHelper = this.mHelper;
+    var shapeStr = '';
+    var singleShape = this.data.singleShape;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+
+    if (singleShape && !usesGlyphs && !documentData.sz) {
+      var tElement = this.textContainer;
+      var justify = 'start';
+
+      switch (documentData.j) {
+        case 1:
+          justify = 'end';
+          break;
+
+        case 2:
+          justify = 'middle';
+          break;
+
+        default:
+          justify = 'start';
+          break;
+      }
+
+      tElement.setAttribute('text-anchor', justify);
+      tElement.setAttribute('letter-spacing', trackingOffset);
+      var textContent = this.buildTextContents(documentData.finalText);
+      len = textContent.length;
+      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+
+      for (i = 0; i < len; i += 1) {
+        tSpan = this.textSpans[i].span || createNS('tspan');
+        tSpan.textContent = textContent[i];
+        tSpan.setAttribute('x', 0);
+        tSpan.setAttribute('y', yPos);
+        tSpan.style.display = 'inherit';
+        tElement.appendChild(tSpan);
+
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            glyph: null
+          };
+        }
+
+        this.textSpans[i].span = tSpan;
+        yPos += documentData.finalLineHeight;
+      }
+
+      this.layerElement.appendChild(tElement);
+    } else {
+      var cachedSpansLength = this.textSpans.length;
+      var charData;
+
+      for (i = 0; i < len; i += 1) {
+        if (!this.textSpans[i]) {
+          this.textSpans[i] = {
+            span: null,
+            childSpan: null,
+            glyph: null
+          };
+        }
+
+        if (!usesGlyphs || !singleShape || i === 0) {
+          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
+
+          if (cachedSpansLength <= i) {
+            tSpan.setAttribute('stroke-linecap', 'butt');
+            tSpan.setAttribute('stroke-linejoin', 'round');
+            tSpan.setAttribute('stroke-miterlimit', '4');
+            this.textSpans[i].span = tSpan;
+
+            if (usesGlyphs) {
+              var childSpan = createNS('g');
+              tSpan.appendChild(childSpan);
+              this.textSpans[i].childSpan = childSpan;
+            }
+
+            this.textSpans[i].span = tSpan;
+            this.layerElement.appendChild(tSpan);
+          }
+
+          tSpan.style.display = 'inherit';
+        }
+
+        matrixHelper.reset();
+        matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+        if (singleShape) {
+          if (letters[i].n) {
+            xPos = -trackingOffset;
+            yPos += documentData.yOffset;
+            yPos += firstLine ? 1 : 0;
+            firstLine = false;
+          }
+
+          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+
+          xPos += trackingOffset;
+        }
+
+        if (usesGlyphs) {
+          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+          var glyphElement;
+
+          if (charData.t === 1) {
+            glyphElement = new SVGCompElement(charData.data, this.globalData, this);
+          } else {
+            var data = emptyShapeData;
+
+            if (charData.data && charData.data.shapes) {
+              data = charData.data;
+            }
+
+            glyphElement = new SVGShapeElement(data, this.globalData, this);
+          }
+
+          this.textSpans[i].glyph = glyphElement;
+          glyphElement._debug = true;
+          glyphElement.prepareFrame(0);
+          glyphElement.renderFrame();
+          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+          this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
+        } else {
+          if (singleShape) {
+            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
+          }
+
+          tSpan.textContent = letters[i].val;
+          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+        } //
+
+      }
+
+      if (singleShape && tSpan) {
+        tSpan.setAttribute('d', shapeStr);
+      }
+    }
+
+    while (i < this.textSpans.length) {
+      this.textSpans[i].span.style.display = 'none';
+      i += 1;
+    }
+
+    this._sizeChanged = true;
+  };
+
+  SVGTextLottieElement.prototype.sourceRectAtTime = function () {
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
+    this.renderInnerContent();
+
+    if (this._sizeChanged) {
+      this._sizeChanged = false;
+      var textBox = this.layerElement.getBBox();
+      this.bbox = {
+        top: textBox.y,
+        left: textBox.x,
+        width: textBox.width,
+        height: textBox.height
+      };
+    }
+
+    return this.bbox;
+  };
+
+  SVGTextLottieElement.prototype.getValue = function () {
+    var i;
+    var len = this.textSpans.length;
+    var glyphElement;
+    this.renderedFrame = this.comp.renderedFrame;
+
+    for (i = 0; i < len; i += 1) {
+      glyphElement = this.textSpans[i].glyph;
+
+      if (glyphElement) {
+        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+
+        if (glyphElement._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  SVGTextLottieElement.prototype.renderInnerContent = function () {
+    if (!this.data.singleShape || this._mdf) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
+        this._sizeChanged = true;
+        var i;
+        var len;
+        var renderedLetters = this.textAnimator.renderedLetters;
+        var letters = this.textProperty.currentData.l;
+        len = letters.length;
+        var renderedLetter;
+        var textSpan;
+        var glyphElement;
+
+        for (i = 0; i < len; i += 1) {
+          if (!letters[i].n) {
+            renderedLetter = renderedLetters[i];
+            textSpan = this.textSpans[i].span;
+            glyphElement = this.textSpans[i].glyph;
+
+            if (glyphElement) {
+              glyphElement.renderFrame();
+            }
+
+            if (renderedLetter._mdf.m) {
+              textSpan.setAttribute('transform', renderedLetter.m);
+            }
+
+            if (renderedLetter._mdf.o) {
+              textSpan.setAttribute('opacity', renderedLetter.o);
+            }
+
+            if (renderedLetter._mdf.sw) {
+              textSpan.setAttribute('stroke-width', renderedLetter.sw);
+            }
+
+            if (renderedLetter._mdf.sc) {
+              textSpan.setAttribute('stroke', renderedLetter.sc);
+            }
+
+            if (renderedLetter._mdf.fc) {
+              textSpan.setAttribute('fill', renderedLetter.fc);
+            }
+          }
+        }
+      }
+    }
+  };
+
+  function ISolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([IImageElement], ISolidElement);
+
+  ISolidElement.prototype.createContent = function () {
+    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;
+    /// /rect.style.height = this.data.sh;
+    /// /rect.style.fill = this.data.sc;
+
+    rect.setAttribute('width', this.data.sw);
+    rect.setAttribute('height', this.data.sh);
+    rect.setAttribute('fill', this.data.sc);
+    this.layerElement.appendChild(rect);
+  };
+
+  function NullElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initFrame();
+    this.initTransform(data, globalData, comp);
+    this.initHierarchy();
+  }
+
+  NullElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  NullElement.prototype.renderFrame = function () {};
+
+  NullElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  NullElement.prototype.destroy = function () {};
+
+  NullElement.prototype.sourceRectAtTime = function () {};
+
+  NullElement.prototype.hide = function () {};
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+  function SVGRendererBase() {}
+
+  extendPrototype([BaseRenderer], SVGRendererBase);
+
+  SVGRendererBase.prototype.createNull = function (data) {
+    return new NullElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createShape = function (data) {
+    return new SVGShapeElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createText = function (data) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createImage = function (data) {
+    return new IImageElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.createSolid = function (data) {
+    return new ISolidElement(data, this.globalData, this);
+  };
+
+  SVGRendererBase.prototype.configAnimation = function (animData) {
+    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+
+    if (this.renderConfig.viewBoxSize) {
+      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+    } else {
+      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+    }
+
+    if (!this.renderConfig.viewBoxOnly) {
+      this.svgElement.setAttribute('width', animData.w);
+      this.svgElement.setAttribute('height', animData.h);
+      this.svgElement.style.width = '100%';
+      this.svgElement.style.height = '100%';
+      this.svgElement.style.transform = 'translate3d(0,0,0)';
+      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+    }
+
+    if (this.renderConfig.className) {
+      this.svgElement.setAttribute('class', this.renderConfig.className);
+    }
+
+    if (this.renderConfig.id) {
+      this.svgElement.setAttribute('id', this.renderConfig.id);
+    }
+
+    if (this.renderConfig.focusable !== undefined) {
+      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+    }
+
+    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';
+    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+
+    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation
+
+    var defs = this.globalData.defs;
+    this.setupGlobalData(animData, defs);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.data = animData;
+    var maskElement = createNS('clipPath');
+    var rect = createNS('rect');
+    rect.setAttribute('width', animData.w);
+    rect.setAttribute('height', animData.h);
+    rect.setAttribute('x', 0);
+    rect.setAttribute('y', 0);
+    var maskId = createElementID();
+    maskElement.setAttribute('id', maskId);
+    maskElement.appendChild(rect);
+    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+    defs.appendChild(maskElement);
+    this.layers = animData.layers;
+    this.elements = createSizedArray(animData.layers.length);
+  };
+
+  SVGRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.layerElement = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  SVGRendererBase.prototype.updateContainerSize = function () {};
+
+  SVGRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    elements[pos] = true;
+    var element = this.createItem(this.layers[pos]);
+    elements[pos] = element;
+
+    if (getExpressionsPlugin()) {
+      if (this.layers[pos].ty === 0) {
+        this.globalData.projectInterface.registerComposition(element);
+      }
+
+      element.initExpressions();
+    }
+
+    this.appendElementInPos(element, pos);
+
+    if (this.layers[pos].tt) {
+      if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+        this.buildItem(pos - 1);
+        this.addPendingElement(element);
+      } else {
+        element.setMatte(elements[pos - 1].layerId);
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+
+      if (element.data.tt) {
+        var i = 0;
+        var len = this.elements.length;
+
+        while (i < len) {
+          if (this.elements[i] === element) {
+            element.setMatte(this.elements[i - 1].layerId);
+            break;
+          }
+
+          i += 1;
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.renderFrame = function (num) {
+    if (this.renderedFrame === num || this.destroyed) {
+      return;
+    }
+
+    if (num === null) {
+      num = this.renderedFrame;
+    } else {
+      this.renderedFrame = num;
+    } // console.log('-------');
+    // console.log('FRAME ',num);
+
+
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      for (i = 0; i < len; i += 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+    }
+  };
+
+  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newElement = element.getBaseElement();
+
+    if (!newElement) {
+      return;
+    }
+
+    var i = 0;
+    var nextElement;
+
+    while (i < pos) {
+      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+        nextElement = this.elements[i].getBaseElement();
+      }
+
+      i += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(newElement, nextElement);
+    } else {
+      this.layerElement.appendChild(newElement);
+    }
+  };
+
+  SVGRendererBase.prototype.hide = function () {
+    this.layerElement.style.display = 'none';
+  };
+
+  SVGRendererBase.prototype.show = function () {
+    this.layerElement.style.display = 'block';
+  };
+
+  function ICompElement() {}
+
+  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
+
+  ICompElement.prototype.initElement = function (data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
+    this.initRenderable();
+    this.initHierarchy();
+    this.initRendererElement();
+    this.createContainerElements();
+    this.createRenderableComponents();
+
+    if (this.data.xt || !globalData.progressiveLoad) {
+      this.buildAllItems();
+    }
+
+    this.hide();
+  };
+  /* ICompElement.prototype.hide = function(){
+      if(!this.hidden){
+          this.hideElement();
+          var i,len = this.elements.length;
+          for( i = 0; i < len; i+=1 ){
+              if(this.elements[i]){
+                  this.elements[i].hide();
+              }
+          }
+      }
+  }; */
+
+
+  ICompElement.prototype.prepareFrame = function (num) {
+    this._mdf = false;
+    this.prepareRenderableFrame(num);
+    this.prepareProperties(num, this.isInRange);
+
+    if (!this.isInRange && !this.data.xt) {
+      return;
+    }
+
+    if (!this.tm._placeholder) {
+      var timeRemapped = this.tm.v;
+
+      if (timeRemapped === this.data.op) {
+        timeRemapped = this.data.op - 1;
+      }
+
+      this.renderedFrame = timeRemapped;
+    } else {
+      this.renderedFrame = num / this.data.sr;
+    }
+
+    var i;
+    var len = this.elements.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(this.renderedFrame);
+    } // This iteration needs to be backwards because of how expressions connect between each other
+
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+
+        if (this.elements[i]._mdf) {
+          this._mdf = true;
+        }
+      }
+    }
+  };
+
+  ICompElement.prototype.renderInnerContent = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  ICompElement.prototype.setElements = function (elems) {
+    this.elements = elems;
+  };
+
+  ICompElement.prototype.getElements = function () {
+    return this.elements;
+  };
+
+  ICompElement.prototype.destroyElements = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+  };
+
+  ICompElement.prototype.destroy = function () {
+    this.destroyElements();
+    this.destroyBaseElement();
+  };
+
+  function SVGCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = true;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+  SVGCompElement.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function SVGRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.svgElement = createNS('svg');
+    var ariaLabel = '';
+
+    if (config && config.title) {
+      var titleElement = createNS('title');
+      var titleId = createElementID();
+      titleElement.setAttribute('id', titleId);
+      titleElement.textContent = config.title;
+      this.svgElement.appendChild(titleElement);
+      ariaLabel += titleId;
+    }
+
+    if (config && config.description) {
+      var descElement = createNS('desc');
+      var descId = createElementID();
+      descElement.setAttribute('id', descId);
+      descElement.textContent = config.description;
+      this.svgElement.appendChild(descElement);
+      ariaLabel += ' ' + descId;
+    }
+
+    if (ariaLabel) {
+      this.svgElement.setAttribute('aria-labelledby', ariaLabel);
+    }
+
+    var defs = createNS('defs');
+    this.svgElement.appendChild(defs);
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    this.renderConfig = {
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      progressiveLoad: config && config.progressiveLoad || false,
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      viewBoxOnly: config && config.viewBoxOnly || false,
+      viewBoxSize: config && config.viewBoxSize || false,
+      className: config && config.className || '',
+      id: config && config.id || '',
+      focusable: config && config.focusable,
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '100%',
+        height: config && config.filterSize && config.filterSize.height || '100%',
+        x: config && config.filterSize && config.filterSize.x || '0%',
+        y: config && config.filterSize && config.filterSize.y || '0%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      defs: defs,
+      renderConfig: this.renderConfig
+    };
+    this.elements = [];
+    this.pendingElements = [];
+    this.destroyed = false;
+    this.rendererType = 'svg';
+  }
+
+  extendPrototype([SVGRendererBase], SVGRenderer);
+
+  SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data, this.globalData, this);
+  };
+
+  function CVContextData() {
+    this.saved = [];
+    this.cArrPos = 0;
+    this.cTr = new Matrix();
+    this.cO = 1;
+    var i;
+    var len = 15;
+    this.savedOp = createTypedArray('float32', len);
+
+    for (i = 0; i < len; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = len;
+  }
+
+  CVContextData.prototype.duplicate = function () {
+    var newLength = this._length * 2;
+    var currentSavedOp = this.savedOp;
+    this.savedOp = createTypedArray('float32', newLength);
+    this.savedOp.set(currentSavedOp);
+    var i = 0;
+
+    for (i = this._length; i < newLength; i += 1) {
+      this.saved[i] = createTypedArray('float32', 16);
+    }
+
+    this._length = newLength;
+  };
+
+  CVContextData.prototype.reset = function () {
+    this.cArrPos = 0;
+    this.cTr.reset();
+    this.cO = 1;
+  };
+
+  function ShapeTransformManager() {
+    this.sequences = {};
+    this.sequenceList = [];
+    this.transform_key_count = 0;
+  }
+
+  ShapeTransformManager.prototype = {
+    addTransformSequence: function addTransformSequence(transforms) {
+      var i;
+      var len = transforms.length;
+      var key = '_';
+
+      for (i = 0; i < len; i += 1) {
+        key += transforms[i].transform.key + '_';
+      }
+
+      var sequence = this.sequences[key];
+
+      if (!sequence) {
+        sequence = {
+          transforms: [].concat(transforms),
+          finalTransform: new Matrix(),
+          _mdf: false
+        };
+        this.sequences[key] = sequence;
+        this.sequenceList.push(sequence);
+      }
+
+      return sequence;
+    },
+    processSequence: function processSequence(sequence, isFirstFrame) {
+      var i = 0;
+      var len = sequence.transforms.length;
+      var _mdf = isFirstFrame;
+
+      while (i < len && !isFirstFrame) {
+        if (sequence.transforms[i].transform.mProps._mdf) {
+          _mdf = true;
+          break;
+        }
+
+        i += 1;
+      }
+
+      if (_mdf) {
+        var props;
+        sequence.finalTransform.reset();
+
+        for (i = len - 1; i >= 0; i -= 1) {
+          props = sequence.transforms[i].transform.mProps.v.props;
+          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]);
+        }
+      }
+
+      sequence._mdf = _mdf;
+    },
+    processSequences: function processSequences(isFirstFrame) {
+      var i;
+      var len = this.sequenceList.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.processSequence(this.sequenceList[i], isFirstFrame);
+      }
+    },
+    getNewKey: function getNewKey() {
+      this.transform_key_count += 1;
+      return '_' + this.transform_key_count;
+    }
+  };
+
+  function CVEffects() {}
+
+  CVEffects.prototype.renderFrame = function () {};
+
+  function CVMaskElement(data, element) {
+    this.data = data;
+    this.element = element;
+    this.masksProperties = this.data.masksProperties || [];
+    this.viewData = createSizedArray(this.masksProperties.length);
+    var i;
+    var len = this.masksProperties.length;
+    var hasMasks = false;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        hasMasks = true;
+      }
+
+      this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);
+    }
+
+    this.hasMasks = hasMasks;
+
+    if (hasMasks) {
+      this.element.addRenderableComponent(this);
     }
   }
-};
+
+  CVMaskElement.prototype.renderFrame = function () {
+    if (!this.hasMasks) {
+      return;
+    }
+
+    var transform = this.element.finalTransform.mat;
+    var ctx = this.element.canvasContext;
+    var i;
+    var len = this.masksProperties.length;
+    var pt;
+    var pts;
+    var data;
+    ctx.beginPath();
+
+    for (i = 0; i < len; i += 1) {
+      if (this.masksProperties[i].mode !== 'n') {
+        if (this.masksProperties[i].inv) {
+          ctx.moveTo(0, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, 0);
+          ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
+          ctx.lineTo(0, this.element.globalData.compSize.h);
+          ctx.lineTo(0, 0);
+        }
+
+        data = this.viewData[i].v;
+        pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);
+        ctx.moveTo(pt[0], pt[1]);
+        var j;
+        var jLen = data._length;
+
+        for (j = 1; j < jLen; j += 1) {
+          pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
+          ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+        }
+
+        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
+        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
+      }
+    }
+
+    this.element.globalData.renderer.save(true);
+    ctx.clip();
+  };
+
+  CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
+
+  CVMaskElement.prototype.destroy = function () {
+    this.element = null;
+  };
+
+  function CVBaseElement() {}
+
+  CVBaseElement.prototype = {
+    createElements: function createElements() {},
+    initRendererElement: function initRendererElement() {},
+    createContainerElements: function createContainerElements() {
+      this.canvasContext = this.globalData.canvasContext;
+      this.renderableEffectsManager = new CVEffects(this);
+    },
+    createContent: function createContent() {},
+    setBlendMode: function setBlendMode() {
+      var globalData = this.globalData;
+
+      if (globalData.blendMode !== this.data.bm) {
+        globalData.blendMode = this.data.bm;
+        var blendModeValue = getBlendMode(this.data.bm);
+        globalData.canvasContext.globalCompositeOperation = blendModeValue;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new CVMaskElement(this.data, this);
+    },
+    hideElement: function hideElement() {
+      if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+        this.hidden = true;
+      }
+    },
+    showElement: function showElement() {
+      if (this.isInRange && !this.isTransparent) {
+        this.hidden = false;
+        this._isFirstFrame = true;
+        this.maskManager._isFirstFrame = true;
+      }
+    },
+    renderFrame: function renderFrame() {
+      if (this.hidden || this.data.hd) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.setBlendMode();
+      var forceRealStack = this.data.ty === 0;
+      this.globalData.renderer.save(forceRealStack);
+      this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
+      this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
+      this.renderInnerContent();
+      this.globalData.renderer.restore(forceRealStack);
+
+      if (this.maskManager.hasMasks) {
+        this.globalData.renderer.restore(true);
+      }
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.canvasContext = null;
+      this.data = null;
+      this.globalData = null;
+      this.maskManager.destroy();
+    },
+    mHelper: new Matrix()
+  };
+  CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
+  CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
+
+  function CVShapeData(element, data, styles, transformsManager) {
+    this.styledShapes = [];
+    this.tr = [0, 0, 0, 0, 0, 0];
+    var ty = 4;
+
+    if (data.ty === 'rc') {
+      ty = 5;
+    } else if (data.ty === 'el') {
+      ty = 6;
+    } else if (data.ty === 'sr') {
+      ty = 7;
+    }
+
+    this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);
+    var i;
+    var len = styles.length;
+    var styledShape;
+
+    for (i = 0; i < len; i += 1) {
+      if (!styles[i].closed) {
+        styledShape = {
+          transforms: transformsManager.addTransformSequence(styles[i].transforms),
+          trNodes: []
+        };
+        this.styledShapes.push(styledShape);
+        styles[i].elements.push(styledShape);
+      }
+    }
+  }
+
+  CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
+
+  function CVShapeElement(data, globalData, comp) {
+    this.shapes = [];
+    this.shapesData = data.shapes;
+    this.stylesList = [];
+    this.itemsData = [];
+    this.prevViewData = [];
+    this.shapeModifiers = [];
+    this.processedElements = [];
+    this.transformsManager = new ShapeTransformManager();
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);
+  CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
+  CVShapeElement.prototype.transformHelper = {
+    opacity: 1,
+    _opMdf: false
+  };
+  CVShapeElement.prototype.dashResetter = [];
+
+  CVShapeElement.prototype.createContent = function () {
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+  };
+
+  CVShapeElement.prototype.createStyleElement = function (data, transforms) {
+    var styleElem = {
+      data: data,
+      type: data.ty,
+      preTransforms: this.transformsManager.addTransformSequence(transforms),
+      transforms: [],
+      elements: [],
+      closed: data.hd === true
+    };
+    var elementData = {};
+
+    if (data.ty === 'fl' || data.ty === 'st') {
+      elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);
+
+      if (!elementData.c.k) {
+        styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';
+      }
+    } else if (data.ty === 'gf' || data.ty === 'gs') {
+      elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);
+      elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);
+      elementData.h = PropertyFactory.getProp(this, data.h || {
+        k: 0
+      }, 0, 0.01, this);
+      elementData.a = PropertyFactory.getProp(this, data.a || {
+        k: 0
+      }, 0, degToRads, this);
+      elementData.g = new GradientProperty(this, data.g, this);
+    }
+
+    elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);
+
+    if (data.ty === 'st' || data.ty === 'gs') {
+      styleElem.lc = lineCapEnum[data.lc || 2];
+      styleElem.lj = lineJoinEnum[data.lj || 2];
+
+      if (data.lj == 1) {
+        // eslint-disable-line eqeqeq
+        styleElem.ml = data.ml;
+      }
+
+      elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);
+
+      if (!elementData.w.k) {
+        styleElem.wi = elementData.w.v;
+      }
+
+      if (data.d) {
+        var d = new DashProperty(this, data.d, 'canvas', this);
+        elementData.d = d;
+
+        if (!elementData.d.k) {
+          styleElem.da = elementData.d.dashArray;
+          styleElem["do"] = elementData.d.dashoffset[0];
+        }
+      }
+    } else {
+      styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
+    }
+
+    this.stylesList.push(styleElem);
+    elementData.style = styleElem;
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createGroupElement = function () {
+    var elementData = {
+      it: [],
+      prevViewData: []
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createTransformElement = function (data) {
+    var elementData = {
+      transform: {
+        opacity: 1,
+        _opMdf: false,
+        key: this.transformsManager.getNewKey(),
+        op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),
+        mProps: TransformPropertyFactory.getTransformProperty(this, data, this)
+      }
+    };
+    return elementData;
+  };
+
+  CVShapeElement.prototype.createShapeElement = function (data) {
+    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
+    this.shapes.push(elementData);
+    this.addShapeToModifiers(elementData);
+    return elementData;
+  };
+
+  CVShapeElement.prototype.reloadShapes = function () {
+    this._isFirstFrame = true;
+    var i;
+    var len = this.itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.prevViewData[i] = this.itemsData[i];
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);
+    len = this.dynamicProperties.length;
+
+    for (i = 0; i < len; i += 1) {
+      this.dynamicProperties[i].getValue();
+    }
+
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+  };
+
+  CVShapeElement.prototype.addTransformToStyleList = function (transform) {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.push(transform);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.removeTransformFromStyleList = function () {
+    var i;
+    var len = this.stylesList.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (!this.stylesList[i].closed) {
+        this.stylesList[i].transforms.pop();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.closeStyles = function (styles) {
+    var i;
+    var len = styles.length;
+
+    for (i = 0; i < len; i += 1) {
+      styles[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {
+    var i;
+    var len = arr.length - 1;
+    var j;
+    var jLen;
+    var ownStyles = [];
+    var ownModifiers = [];
+    var processedPos;
+    var modifier;
+    var currentTransform;
+    var ownTransforms = [].concat(transforms);
+
+    for (i = len; i >= 0; i -= 1) {
+      processedPos = this.searchProcessedElement(arr[i]);
+
+      if (!processedPos) {
+        arr[i]._shouldRender = shouldRender;
+      } else {
+        itemsData[i] = prevViewData[processedPos - 1];
+      }
+
+      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
+        if (!processedPos) {
+          itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
+        } else {
+          itemsData[i].style.closed = false;
+        }
+
+        ownStyles.push(itemsData[i].style);
+      } else if (arr[i].ty === 'gr') {
+        if (!processedPos) {
+          itemsData[i] = this.createGroupElement(arr[i]);
+        } else {
+          jLen = itemsData[i].it.length;
+
+          for (j = 0; j < jLen; j += 1) {
+            itemsData[i].prevViewData[j] = itemsData[i].it[j];
+          }
+        }
+
+        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);
+      } else if (arr[i].ty === 'tr') {
+        if (!processedPos) {
+          currentTransform = this.createTransformElement(arr[i]);
+          itemsData[i] = currentTransform;
+        }
+
+        ownTransforms.push(itemsData[i]);
+        this.addTransformToStyleList(itemsData[i]);
+      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {
+        if (!processedPos) {
+          itemsData[i] = this.createShapeElement(arr[i]);
+        }
+      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          modifier.init(this, arr[i]);
+          itemsData[i] = modifier;
+          this.shapeModifiers.push(modifier);
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = false;
+        }
+
+        ownModifiers.push(modifier);
+      } else if (arr[i].ty === 'rp') {
+        if (!processedPos) {
+          modifier = ShapeModifiers.getModifier(arr[i].ty);
+          itemsData[i] = modifier;
+          modifier.init(this, arr, i, itemsData);
+          this.shapeModifiers.push(modifier);
+          shouldRender = false;
+        } else {
+          modifier = itemsData[i];
+          modifier.closed = true;
+        }
+
+        ownModifiers.push(modifier);
+      }
+
+      this.addProcessedElement(arr[i], i + 1);
+    }
+
+    this.removeTransformFromStyleList();
+    this.closeStyles(ownStyles);
+    len = ownModifiers.length;
+
+    for (i = 0; i < len; i += 1) {
+      ownModifiers[i].closed = true;
+    }
+  };
+
+  CVShapeElement.prototype.renderInnerContent = function () {
+    this.transformHelper.opacity = 1;
+    this.transformHelper._opMdf = false;
+    this.renderModifiers();
+    this.transformsManager.processSequences(this._isFirstFrame);
+    this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);
+  };
+
+  CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {
+    if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+      groupTransform.opacity = parentTransform.opacity;
+      groupTransform.opacity *= groupTransform.op.v;
+      groupTransform._opMdf = true;
+    }
+  };
+
+  CVShapeElement.prototype.drawLayer = function () {
+    var i;
+    var len = this.stylesList.length;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var elems;
+    var nodes;
+    var renderer = this.globalData.renderer;
+    var ctx = this.globalData.canvasContext;
+    var type;
+    var currentStyle;
+
+    for (i = 0; i < len; i += 1) {
+      currentStyle = this.stylesList[i];
+      type = currentStyle.type; // Skipping style when
+      // Stroke width equals 0
+      // style should not be rendered (extra unused repeaters)
+      // current opacity equals 0
+      // global opacity equals 0
+
+      if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {
+        renderer.save();
+        elems = currentStyle.elements;
+
+        if (type === 'st' || type === 'gs') {
+          ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
+          ctx.lineWidth = currentStyle.wi;
+          ctx.lineCap = currentStyle.lc;
+          ctx.lineJoin = currentStyle.lj;
+          ctx.miterLimit = currentStyle.ml || 0;
+        } else {
+          ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
+        }
+
+        renderer.ctxOpacity(currentStyle.coOp);
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.beginPath();
+        }
+
+        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
+        jLen = elems.length;
+
+        for (j = 0; j < jLen; j += 1) {
+          if (type === 'st' || type === 'gs') {
+            ctx.beginPath();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(currentStyle.da);
+              ctx.lineDashOffset = currentStyle["do"];
+            }
+          }
+
+          nodes = elems[j].trNodes;
+          kLen = nodes.length;
+
+          for (k = 0; k < kLen; k += 1) {
+            if (nodes[k].t === 'm') {
+              ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);
+            } else if (nodes[k].t === 'c') {
+              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]);
+            } else {
+              ctx.closePath();
+            }
+          }
+
+          if (type === 'st' || type === 'gs') {
+            ctx.stroke();
+
+            if (currentStyle.da) {
+              ctx.setLineDash(this.dashResetter);
+            }
+          }
+        }
+
+        if (type !== 'st' && type !== 'gs') {
+          ctx.fill(currentStyle.r);
+        }
+
+        renderer.restore();
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {
+    var i;
+    var len = items.length - 1;
+    var groupTransform;
+    groupTransform = parentTransform;
+
+    for (i = len; i >= 0; i -= 1) {
+      if (items[i].ty === 'tr') {
+        groupTransform = data[i].transform;
+        this.renderShapeTransform(parentTransform, groupTransform);
+      } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {
+        this.renderPath(items[i], data[i]);
+      } else if (items[i].ty === 'fl') {
+        this.renderFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'st') {
+        this.renderStroke(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {
+        this.renderGradientFill(items[i], data[i], groupTransform);
+      } else if (items[i].ty === 'gr') {
+        this.renderShape(groupTransform, items[i].it, data[i].it);
+      } else if (items[i].ty === 'tm') {//
+      }
+    }
+
+    if (isMain) {
+      this.drawLayer();
+    }
+  };
+
+  CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {
+    if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
+      var shapeNodes = styledShape.trNodes;
+      var paths = shape.paths;
+      var i;
+      var len;
+      var j;
+      var jLen = paths._length;
+      shapeNodes.length = 0;
+      var groupTransformMat = styledShape.transforms.finalTransform;
+
+      for (j = 0; j < jLen; j += 1) {
+        var pathNodes = paths.shapes[j];
+
+        if (pathNodes && pathNodes.v) {
+          len = pathNodes._length;
+
+          for (i = 1; i < len; i += 1) {
+            if (i === 1) {
+              shapeNodes.push({
+                t: 'm',
+                p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+              });
+            }
+
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
+            });
+          }
+
+          if (len === 1) {
+            shapeNodes.push({
+              t: 'm',
+              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+            });
+          }
+
+          if (pathNodes.c && len) {
+            shapeNodes.push({
+              t: 'c',
+              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
+            });
+            shapeNodes.push({
+              t: 'z'
+            });
+          }
+        }
+      }
+
+      styledShape.trNodes = shapeNodes;
+    }
+  };
+
+  CVShapeElement.prototype.renderPath = function (pathData, itemData) {
+    if (pathData.hd !== true && pathData._shouldRender) {
+      var i;
+      var len = itemData.styledShapes.length;
+
+      for (i = 0; i < len; i += 1) {
+        this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
+      }
+    }
+  };
+
+  CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+  };
+
+  CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var grd;
+
+    if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {
+      var ctx = this.globalData.canvasContext;
+      var pt1 = itemData.s.v;
+      var pt2 = itemData.e.v;
+
+      if (styleData.t === 1) {
+        grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
+      } else {
+        var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
+        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
+        var percent = itemData.h.v;
+
+        if (percent >= 1) {
+          percent = 0.99;
+        } else if (percent <= -1) {
+          percent = -0.99;
+        }
+
+        var dist = rad * percent;
+        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
+        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
+        grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
+      }
+
+      var i;
+      var len = styleData.g.p;
+      var cValues = itemData.g.c;
+      var opacity = 1;
+
+      for (i = 0; i < len; i += 1) {
+        if (itemData.g._hasOpacity && itemData.g._collapsable) {
+          opacity = itemData.g.o[i * 2 + 1];
+        }
+
+        grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');
+      }
+
+      styleElem.grd = grd;
+    }
+
+    styleElem.coOp = itemData.o.v * groupTransform.opacity;
+  };
+
+  CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {
+    var styleElem = itemData.style;
+    var d = itemData.d;
+
+    if (d && (d._mdf || this._isFirstFrame)) {
+      styleElem.da = d.dashArray;
+      styleElem["do"] = d.dashoffset[0];
+    }
+
+    if (itemData.c._mdf || this._isFirstFrame) {
+      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';
+    }
+
+    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
+      styleElem.coOp = itemData.o.v * groupTransform.opacity;
+    }
+
+    if (itemData.w._mdf || this._isFirstFrame) {
+      styleElem.wi = itemData.w.v;
+    }
+  };
+
+  CVShapeElement.prototype.destroy = function () {
+    this.shapesData = null;
+    this.globalData = null;
+    this.canvasContext = null;
+    this.stylesList.length = 0;
+    this.itemsData.length = 0;
+  };
+
+  function CVTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.yOffset = 0;
+    this.fillColorAnim = false;
+    this.strokeColorAnim = false;
+    this.strokeWidthAnim = false;
+    this.stroke = false;
+    this.fill = false;
+    this.justifyOffset = 0;
+    this.currentRender = null;
+    this.renderType = 'canvas';
+    this.values = {
+      fill: 'rgba(0,0,0,0)',
+      stroke: 'rgba(0,0,0,0)',
+      sWidth: 0,
+      fValue: ''
+    };
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);
+  CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
+
+  CVTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var hasFill = false;
+
+    if (documentData.fc) {
+      hasFill = true;
+      this.values.fill = this.buildColor(documentData.fc);
+    } else {
+      this.values.fill = 'rgba(0,0,0,0)';
+    }
+
+    this.fill = hasFill;
+    var hasStroke = false;
+
+    if (documentData.sc) {
+      hasStroke = true;
+      this.values.stroke = this.buildColor(documentData.sc);
+      this.values.sWidth = documentData.sw;
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+    var i;
+    var len;
+    var letters = documentData.l;
+    var matrixHelper = this.mHelper;
+    this.stroke = hasStroke;
+    this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;
+    len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;
+
+    var charData;
+    var shapeData;
+    var k;
+    var kLen;
+    var shapes;
+    var j;
+    var jLen;
+    var pathNodes;
+    var commands;
+    var pathArr;
+    var singleShape = this.data.singleShape;
+    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;
+    var xPos = 0;
+    var yPos = 0;
+    var firstLine = true;
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+      shapeData = charData && charData.data || {};
+      matrixHelper.reset();
+
+      if (singleShape && letters[i].n) {
+        xPos = -trackingOffset;
+        yPos += documentData.yOffset;
+        yPos += firstLine ? 1 : 0;
+        firstLine = false;
+      }
+
+      shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
+      jLen = shapes.length;
+      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+
+      if (singleShape) {
+        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+      }
+
+      commands = createSizedArray(jLen - 1);
+      var commandsCounter = 0;
+
+      for (j = 0; j < jLen; j += 1) {
+        if (shapes[j].ty === 'sh') {
+          kLen = shapes[j].ks.k.i.length;
+          pathNodes = shapes[j].ks.k;
+          pathArr = [];
+
+          for (k = 1; k < kLen; k += 1) {
+            if (k === 1) {
+              pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+            }
+
+            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));
+          }
+
+          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));
+          commands[commandsCounter] = pathArr;
+          commandsCounter += 1;
+        }
+      }
+
+      if (singleShape) {
+        xPos += letters[i].l;
+        xPos += trackingOffset;
+      }
+
+      if (this.textSpans[cnt]) {
+        this.textSpans[cnt].elem = commands;
+      } else {
+        this.textSpans[cnt] = {
+          elem: commands
+        };
+      }
+
+      cnt += 1;
+    }
+  };
+
+  CVTextElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.font = this.values.fValue;
+    ctx.lineCap = 'butt';
+    ctx.lineJoin = 'miter';
+    ctx.miterLimit = 4;
+
+    if (!this.data.singleShape) {
+      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+    }
+
+    var i;
+    var len;
+    var j;
+    var jLen;
+    var k;
+    var kLen;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var lastFill = null;
+    var lastStroke = null;
+    var lastStrokeW = null;
+    var commands;
+    var pathArr;
+
+    for (i = 0; i < len; i += 1) {
+      if (!letters[i].n) {
+        renderedLetter = renderedLetters[i];
+
+        if (renderedLetter) {
+          this.globalData.renderer.save();
+          this.globalData.renderer.ctxTransform(renderedLetter.p);
+          this.globalData.renderer.ctxOpacity(renderedLetter.o);
+        }
+
+        if (this.fill) {
+          if (renderedLetter && renderedLetter.fc) {
+            if (lastFill !== renderedLetter.fc) {
+              lastFill = renderedLetter.fc;
+              ctx.fillStyle = renderedLetter.fc;
+            }
+          } else if (lastFill !== this.values.fill) {
+            lastFill = this.values.fill;
+            ctx.fillStyle = this.values.fill;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);
+        }
+
+        if (this.stroke) {
+          if (renderedLetter && renderedLetter.sw) {
+            if (lastStrokeW !== renderedLetter.sw) {
+              lastStrokeW = renderedLetter.sw;
+              ctx.lineWidth = renderedLetter.sw;
+            }
+          } else if (lastStrokeW !== this.values.sWidth) {
+            lastStrokeW = this.values.sWidth;
+            ctx.lineWidth = this.values.sWidth;
+          }
+
+          if (renderedLetter && renderedLetter.sc) {
+            if (lastStroke !== renderedLetter.sc) {
+              lastStroke = renderedLetter.sc;
+              ctx.strokeStyle = renderedLetter.sc;
+            }
+          } else if (lastStroke !== this.values.stroke) {
+            lastStroke = this.values.stroke;
+            ctx.strokeStyle = this.values.stroke;
+          }
+
+          commands = this.textSpans[i].elem;
+          jLen = commands.length;
+          this.globalData.canvasContext.beginPath();
+
+          for (j = 0; j < jLen; j += 1) {
+            pathArr = commands[j];
+            kLen = pathArr.length;
+            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
+
+            for (k = 2; k < kLen; k += 6) {
+              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+            }
+          }
+
+          this.globalData.canvasContext.closePath();
+          this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);
+        }
+
+        if (renderedLetter) {
+          this.globalData.renderer.restore();
+        }
+      }
+    }
+  };
+
+  function CVImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.img = globalData.imageLoader.getAsset(this.assetData);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
+  CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVImageElement.prototype.createContent = function () {
+    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
+      var canvas = createTag('canvas');
+      canvas.width = this.assetData.w;
+      canvas.height = this.assetData.h;
+      var ctx = canvas.getContext('2d');
+      var imgW = this.img.width;
+      var imgH = this.img.height;
+      var imgRel = imgW / imgH;
+      var canvasRel = this.assetData.w / this.assetData.h;
+      var widthCrop;
+      var heightCrop;
+      var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
+
+      if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {
+        heightCrop = imgH;
+        widthCrop = heightCrop * canvasRel;
+      } else {
+        widthCrop = imgW;
+        heightCrop = widthCrop / canvasRel;
+      }
+
+      ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);
+      this.img = canvas;
+    }
+  };
+
+  CVImageElement.prototype.renderInnerContent = function () {
+    this.canvasContext.drawImage(this.img, 0, 0);
+  };
+
+  CVImageElement.prototype.destroy = function () {
+    this.img = null;
+  };
+
+  function CVSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
+  CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+  CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
+
+  CVSolidElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.fillStyle = this.data.sc;
+    ctx.fillRect(0, 0, this.data.sw, this.data.sh); //
+  };
+
+  function CanvasRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([BaseRenderer], CanvasRendererBase);
+
+  CanvasRendererBase.prototype.createShape = function (data) {
+    return new CVShapeElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createText = function (data) {
+    return new CVTextElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createImage = function (data) {
+    return new CVImageElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createSolid = function (data) {
+    return new CVSolidElement(data, this.globalData, this);
+  };
+
+  CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  CanvasRendererBase.prototype.ctxTransform = function (props) {
+    if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
+      return;
+    }
+
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
+      return;
+    }
+
+    this.transformMat.cloneFromProps(props);
+    var cProps = this.contextData.cTr.props;
+    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]); // 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]);
+
+    this.contextData.cTr.cloneFromProps(this.transformMat.props);
+    var trProps = this.contextData.cTr.props;
+    this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
+  };
+
+  CanvasRendererBase.prototype.ctxOpacity = function (op) {
+    /* if(op === 1){
+          return;
+      } */
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+      return;
+    }
+
+    this.contextData.cO *= op < 0 ? 0 : op;
+
+    if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
+      this.canvasContext.globalAlpha = this.contextData.cO;
+      this.globalData.currentGlobalAlpha = this.contextData.cO;
+    }
+  };
+
+  CanvasRendererBase.prototype.reset = function () {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    this.contextData.reset();
+  };
+
+  CanvasRendererBase.prototype.save = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.save();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.save();
+    }
+
+    var props = this.contextData.cTr.props;
+
+    if (this.contextData._length <= this.contextData.cArrPos) {
+      this.contextData.duplicate();
+    }
+
+    var i;
+    var arr = this.contextData.saved[this.contextData.cArrPos];
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = props[i];
+    }
+
+    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
+    this.contextData.cArrPos += 1;
+  };
+
+  CanvasRendererBase.prototype.restore = function (actionFlag) {
+    if (!this.renderConfig.clearCanvas) {
+      this.canvasContext.restore();
+      return;
+    }
+
+    if (actionFlag) {
+      this.canvasContext.restore();
+      this.globalData.blendMode = 'source-over';
+    }
+
+    this.contextData.cArrPos -= 1;
+    var popped = this.contextData.saved[this.contextData.cArrPos];
+    var i;
+    var arr = this.contextData.cTr.props;
+
+    for (i = 0; i < 16; i += 1) {
+      arr[i] = popped[i];
+    }
+
+    this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
+    popped = this.contextData.savedOp[this.contextData.cArrPos];
+    this.contextData.cO = popped;
+
+    if (this.globalData.currentGlobalAlpha !== popped) {
+      this.canvasContext.globalAlpha = popped;
+      this.globalData.currentGlobalAlpha = popped;
+    }
+  };
+
+  CanvasRendererBase.prototype.configAnimation = function (animData) {
+    if (this.animationItem.wrapper) {
+      this.animationItem.container = createTag('canvas');
+      var containerStyle = this.animationItem.container.style;
+      containerStyle.width = '100%';
+      containerStyle.height = '100%';
+      var origin = '0px 0px 0px';
+      containerStyle.transformOrigin = origin;
+      containerStyle.mozTransformOrigin = origin;
+      containerStyle.webkitTransformOrigin = origin;
+      containerStyle['-webkit-transform'] = origin;
+      containerStyle.contentVisibility = this.renderConfig.contentVisibility;
+      this.animationItem.wrapper.appendChild(this.animationItem.container);
+      this.canvasContext = this.animationItem.container.getContext('2d');
+
+      if (this.renderConfig.className) {
+        this.animationItem.container.setAttribute('class', this.renderConfig.className);
+      }
+
+      if (this.renderConfig.id) {
+        this.animationItem.container.setAttribute('id', this.renderConfig.id);
+      }
+    } else {
+      this.canvasContext = this.renderConfig.context;
+    }
+
+    this.data = animData;
+    this.layers = animData.layers;
+    this.transformCanvas = {
+      w: animData.w,
+      h: animData.h,
+      sx: 0,
+      sy: 0,
+      tx: 0,
+      ty: 0
+    };
+    this.setupGlobalData(animData, document.body);
+    this.globalData.canvasContext = this.canvasContext;
+    this.globalData.renderer = this;
+    this.globalData.isDashed = false;
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.transformCanvas = this.transformCanvas;
+    this.elements = createSizedArray(animData.layers.length);
+    this.updateContainerSize();
+  };
+
+  CanvasRendererBase.prototype.updateContainerSize = function () {
+    this.reset();
+    var elementWidth;
+    var elementHeight;
+
+    if (this.animationItem.wrapper && this.animationItem.container) {
+      elementWidth = this.animationItem.wrapper.offsetWidth;
+      elementHeight = this.animationItem.wrapper.offsetHeight;
+      this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
+      this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
+    } else {
+      elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+      elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
+    }
+
+    var elementRel;
+    var animationRel;
+
+    if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
+      var par = this.renderConfig.preserveAspectRatio.split(' ');
+      var fillType = par[1] || 'meet';
+      var pos = par[0] || 'xMidYMid';
+      var xPos = pos.substr(0, 4);
+      var yPos = pos.substr(4);
+      elementRel = elementWidth / elementHeight;
+      animationRel = this.transformCanvas.w / this.transformCanvas.h;
+
+      if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {
+        this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      } else {
+        this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+        this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      }
+
+      if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;
+      } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {
+        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.tx = 0;
+      }
+
+      if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;
+      } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {
+        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;
+      } else {
+        this.transformCanvas.ty = 0;
+      }
+    } else if (this.renderConfig.preserveAspectRatio === 'none') {
+      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    } else {
+      this.transformCanvas.sx = this.renderConfig.dpr;
+      this.transformCanvas.sy = this.renderConfig.dpr;
+      this.transformCanvas.tx = 0;
+      this.transformCanvas.ty = 0;
+    }
+
+    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];
+    /* var i, len = this.elements.length;
+      for(i=0;i<len;i+=1){
+          if(this.elements[i] && this.elements[i].data.ty === 0){
+              this.elements[i].resize(this.globalData.transformCanvas);
+          }
+      } */
+
+    this.ctxTransform(this.transformCanvas.props);
+    this.canvasContext.beginPath();
+    this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+    this.canvasContext.closePath();
+    this.canvasContext.clip();
+    this.renderFrame(this.renderedFrame, true);
+  };
+
+  CanvasRendererBase.prototype.destroy = function () {
+    if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.elements.length = 0;
+    this.globalData.canvasContext = null;
+    this.animationItem.container = null;
+    this.destroyed = true;
+  };
+
+  CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {
+    if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {
+      return;
+    }
+
+    this.renderedFrame = num;
+    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+    this.globalData.frameId += 1;
+    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
+    this.globalData.projectInterface.currentFrame = num; // console.log('--------');
+    // console.log('NEW: ',num);
+
+    var i;
+    var len = this.layers.length;
+
+    if (!this.completeLayers) {
+      this.checkLayers(num);
+    }
+
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].prepareFrame(num - this.layers[i].st);
+      }
+    }
+
+    if (this.globalData._mdf) {
+      if (this.renderConfig.clearCanvas === true) {
+        this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+      } else {
+        this.save();
+      }
+
+      for (i = len - 1; i >= 0; i -= 1) {
+        if (this.completeLayers || this.elements[i]) {
+          this.elements[i].renderFrame();
+        }
+      }
+
+      if (this.renderConfig.clearCanvas !== true) {
+        this.restore();
+      }
+    }
+  };
+
+  CanvasRendererBase.prototype.buildItem = function (pos) {
+    var elements = this.elements;
+
+    if (elements[pos] || this.layers[pos].ty === 99) {
+      return;
+    }
+
+    var element = this.createItem(this.layers[pos], this, this.globalData);
+    elements[pos] = element;
+    element.initExpressions();
+    /* if(this.layers[pos].ty === 0){
+          element.resize(this.globalData.transformCanvas);
+      } */
+  };
+
+  CanvasRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  CanvasRendererBase.prototype.hide = function () {
+    this.animationItem.container.style.display = 'none';
+  };
+
+  CanvasRendererBase.prototype.show = function () {
+    this.animationItem.container.style.display = 'block';
+  };
+
+  function CVCompElement(data, globalData, comp) {
+    this.completeLayers = false;
+    this.layers = data.layers;
+    this.pendingElements = [];
+    this.elements = createSizedArray(this.layers.length);
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);
+
+  CVCompElement.prototype.renderInnerContent = function () {
+    var ctx = this.canvasContext;
+    ctx.beginPath();
+    ctx.moveTo(0, 0);
+    ctx.lineTo(this.data.w, 0);
+    ctx.lineTo(this.data.w, this.data.h);
+    ctx.lineTo(0, this.data.h);
+    ctx.lineTo(0, 0);
+    ctx.clip();
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  };
+
+  CVCompElement.prototype.destroy = function () {
+    var i;
+    var len = this.layers.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.elements[i]) {
+        this.elements[i].destroy();
+      }
+    }
+
+    this.layers = null;
+    this.elements = null;
+  };
+
+  CVCompElement.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function CanvasRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.renderConfig = {
+      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,
+      context: config && config.context || null,
+      progressiveLoad: config && config.progressiveLoad || false,
+      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      contentVisibility: config && config.contentVisibility || 'visible',
+      className: config && config.className || '',
+      id: config && config.id || ''
+    };
+    this.renderConfig.dpr = config && config.dpr || 1;
+
+    if (this.animationItem.wrapper) {
+      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;
+    }
+
+    this.renderedFrame = -1;
+    this.globalData = {
+      frameNum: -1,
+      _mdf: false,
+      renderConfig: this.renderConfig,
+      currentGlobalAlpha: -1
+    };
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
+    this.transformMat = new Matrix();
+    this.completeLayers = false;
+    this.rendererType = 'canvas';
+  }
+
+  extendPrototype([CanvasRendererBase], CanvasRenderer);
+
+  CanvasRenderer.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
+  };
+
+  function HBaseElement() {}
+
+  HBaseElement.prototype = {
+    checkBlendMode: function checkBlendMode() {},
+    initRendererElement: function initRendererElement() {
+      this.baseElement = createTag(this.data.tg || 'div');
+
+      if (this.data.hasMask) {
+        this.svgElement = createNS('svg');
+        this.layerElement = createNS('g');
+        this.maskedElement = this.layerElement;
+        this.svgElement.appendChild(this.layerElement);
+        this.baseElement.appendChild(this.svgElement);
+      } else {
+        this.layerElement = this.baseElement;
+      }
+
+      styleDiv(this.baseElement);
+    },
+    createContainerElements: function createContainerElements() {
+      this.renderableEffectsManager = new CVEffects(this);
+      this.transformedElement = this.baseElement;
+      this.maskedElement = this.layerElement;
+
+      if (this.data.ln) {
+        this.layerElement.setAttribute('id', this.data.ln);
+      }
+
+      if (this.data.cl) {
+        this.layerElement.setAttribute('class', this.data.cl);
+      }
+
+      if (this.data.bm !== 0) {
+        this.setBlendMode();
+      }
+    },
+    renderElement: function renderElement() {
+      var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};
+
+      if (this.finalTransform._matMdf) {
+        var matrixValue = this.finalTransform.mat.toCSS();
+        transformedElementStyle.transform = matrixValue;
+        transformedElementStyle.webkitTransform = matrixValue;
+      }
+
+      if (this.finalTransform._opMdf) {
+        transformedElementStyle.opacity = this.finalTransform.mProp.o.v;
+      }
+    },
+    renderFrame: function renderFrame() {
+      // If it is exported as hidden (data.hd === true) no need to render
+      // If it is not visible no need to render
+      if (this.data.hd || this.hidden) {
+        return;
+      }
+
+      this.renderTransform();
+      this.renderRenderable();
+      this.renderElement();
+      this.renderInnerContent();
+
+      if (this._isFirstFrame) {
+        this._isFirstFrame = false;
+      }
+    },
+    destroy: function destroy() {
+      this.layerElement = null;
+      this.transformedElement = null;
+
+      if (this.matteElement) {
+        this.matteElement = null;
+      }
+
+      if (this.maskManager) {
+        this.maskManager.destroy();
+        this.maskManager = null;
+      }
+    },
+    createRenderableComponents: function createRenderableComponents() {
+      this.maskManager = new MaskElement(this.data, this, this.globalData);
+    },
+    addEffects: function addEffects() {},
+    setMatte: function setMatte() {}
+  };
+  HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
+  HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
+  HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;
+
+  function HSolidElement(data, globalData, comp) {
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);
+
+  HSolidElement.prototype.createContent = function () {
+    var rect;
+
+    if (this.data.hasMask) {
+      rect = createNS('rect');
+      rect.setAttribute('width', this.data.sw);
+      rect.setAttribute('height', this.data.sh);
+      rect.setAttribute('fill', this.data.sc);
+      this.svgElement.setAttribute('width', this.data.sw);
+      this.svgElement.setAttribute('height', this.data.sh);
+    } else {
+      rect = createTag('div');
+      rect.style.width = this.data.sw + 'px';
+      rect.style.height = this.data.sh + 'px';
+      rect.style.backgroundColor = this.data.sc;
+    }
+
+    this.layerElement.appendChild(rect);
+  };
+
+  function HShapeElement(data, globalData, comp) {
+    // List of drawable elements
+    this.shapes = []; // Full shape data
+
+    this.shapesData = data.shapes; // List of styles that will be applied to shapes
+
+    this.stylesList = []; // List of modifiers that will be applied to shapes
+
+    this.shapeModifiers = []; // List of items in shape tree
+
+    this.itemsData = []; // List of items in previous shape tree
+
+    this.processedElements = []; // List of animated components
+
+    this.animatedContents = [];
+    this.shapesContainer = createNS('g');
+    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
+    // List of elements that have been created
+
+    this.prevViewData = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+  }
+
+  extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);
+  HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
+
+  HShapeElement.prototype.createContent = function () {
+    var cont;
+    this.baseElement.style.fontSize = 0;
+
+    if (this.data.hasMask) {
+      this.layerElement.appendChild(this.shapesContainer);
+      cont = this.svgElement;
+    } else {
+      cont = createNS('svg');
+      var size = this.comp.data ? this.comp.data : this.globalData.compSize;
+      cont.setAttribute('width', size.w);
+      cont.setAttribute('height', size.h);
+      cont.appendChild(this.shapesContainer);
+      this.layerElement.appendChild(cont);
+    }
+
+    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);
+    this.filterUniqueShapes();
+    this.shapeCont = cont;
+  };
+
+  HShapeElement.prototype.getTransformedPoint = function (transformers, point) {
+    var i;
+    var len = transformers.length;
+
+    for (i = 0; i < len; i += 1) {
+      point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
+    }
+
+    return point;
+  };
+
+  HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {
+    var shape = item.sh.v;
+    var transformers = item.transformers;
+    var i;
+    var len = shape._length;
+    var vPoint;
+    var oPoint;
+    var nextIPoint;
+    var nextVPoint;
+
+    if (len <= 1) {
+      return;
+    }
+
+    for (i = 0; i < len - 1; i += 1) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+
+    if (shape.c) {
+      vPoint = this.getTransformedPoint(transformers, shape.v[i]);
+      oPoint = this.getTransformedPoint(transformers, shape.o[i]);
+      nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
+      nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
+      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
+    }
+  };
+
+  HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
+    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
+    var bounds = this.shapeBoundingBox;
+    boundingBox.x = bmMin(bounds.left, boundingBox.x);
+    boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);
+    boundingBox.y = bmMin(bounds.top, boundingBox.y);
+    boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);
+  };
+
+  HShapeElement.prototype.shapeBoundingBox = {
+    left: 0,
+    right: 0,
+    top: 0,
+    bottom: 0
+  };
+  HShapeElement.prototype.tempBoundingBox = {
+    x: 0,
+    xMax: 0,
+    y: 0,
+    yMax: 0,
+    width: 0,
+    height: 0
+  };
+
+  HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {
+    var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];
+
+    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {
+      // eslint-disable-line no-plusplus
+      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
+      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
+      c = 3 * p1[i] - 3 * p0[i];
+      b |= 0; // eslint-disable-line no-bitwise
+
+      a |= 0; // eslint-disable-line no-bitwise
+
+      c |= 0; // eslint-disable-line no-bitwise
+
+      if (a === 0 && b === 0) {//
+      } else if (a === 0) {
+        t = -c / b;
+
+        if (t > 0 && t < 1) {
+          bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));
+        }
+      } else {
+        b2ac = b * b - 4 * c * a;
+
+        if (b2ac >= 0) {
+          t1 = (-b + bmSqrt(b2ac)) / (2 * a);
+          if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));
+          t2 = (-b - bmSqrt(b2ac)) / (2 * a);
+          if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));
+        }
+      }
+    }
+
+    this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);
+    this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);
+    this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);
+    this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);
+  };
+
+  HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {
+    return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];
+  };
+
+  HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {
+    var i;
+    var len = itemsData.length;
+
+    for (i = 0; i < len; i += 1) {
+      if (itemsData[i] && itemsData[i].sh) {
+        this.calculateShapeBoundingBox(itemsData[i], boundingBox);
+      } else if (itemsData[i] && itemsData[i].it) {
+        this.calculateBoundingBox(itemsData[i].it, boundingBox);
+      }
+    }
+  };
+
+  HShapeElement.prototype.currentBoxContains = function (box) {
+    return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;
+  };
+
+  HShapeElement.prototype.renderInnerContent = function () {
+    this._renderShapeFrame();
+
+    if (!this.hidden && (this._isFirstFrame || this._mdf)) {
+      var tempBoundingBox = this.tempBoundingBox;
+      var max = 999999;
+      tempBoundingBox.x = max;
+      tempBoundingBox.xMax = -max;
+      tempBoundingBox.y = max;
+      tempBoundingBox.yMax = -max;
+      this.calculateBoundingBox(this.itemsData, tempBoundingBox);
+      tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
+      tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();
+
+      if (this.currentBoxContains(tempBoundingBox)) {
+        return;
+      }
+
+      var changed = false;
+
+      if (this.currentBBox.w !== tempBoundingBox.width) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.shapeCont.setAttribute('width', tempBoundingBox.width);
+        changed = true;
+      }
+
+      if (this.currentBBox.h !== tempBoundingBox.height) {
+        this.currentBBox.h = tempBoundingBox.height;
+        this.shapeCont.setAttribute('height', tempBoundingBox.height);
+        changed = true;
+      }
+
+      if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {
+        this.currentBBox.w = tempBoundingBox.width;
+        this.currentBBox.h = tempBoundingBox.height;
+        this.currentBBox.x = tempBoundingBox.x;
+        this.currentBBox.y = tempBoundingBox.y;
+        this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        var shapeStyle = this.shapeCont.style;
+        var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        shapeStyle.transform = shapeTransform;
+        shapeStyle.webkitTransform = shapeTransform;
+      }
+    }
+  };
+
+  function HTextElement(data, globalData, comp) {
+    this.textSpans = [];
+    this.textPaths = [];
+    this.currentBBox = {
+      x: 999999,
+      y: -999999,
+      h: 0,
+      w: 0
+    };
+    this.renderType = 'svg';
+    this.isMasked = false;
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);
+
+  HTextElement.prototype.createContent = function () {
+    this.isMasked = this.checkMasks();
+
+    if (this.isMasked) {
+      this.renderType = 'svg';
+      this.compW = this.comp.data.w;
+      this.compH = this.comp.data.h;
+      this.svgElement.setAttribute('width', this.compW);
+      this.svgElement.setAttribute('height', this.compH);
+      var g = createNS('g');
+      this.maskedElement.appendChild(g);
+      this.innerElem = g;
+    } else {
+      this.renderType = 'html';
+      this.innerElem = this.layerElement;
+    }
+
+    this.checkParenting();
+  };
+
+  HTextElement.prototype.buildNewText = function () {
+    var documentData = this.textProperty.currentData;
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
+    var innerElemStyle = this.innerElem.style;
+    var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
+    innerElemStyle.fill = textColor;
+    innerElemStyle.color = textColor;
+
+    if (documentData.sc) {
+      innerElemStyle.stroke = this.buildColor(documentData.sc);
+      innerElemStyle.strokeWidth = documentData.sw + 'px';
+    }
+
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+
+    if (!this.globalData.fontManager.chars) {
+      innerElemStyle.fontSize = documentData.finalSize + 'px';
+      innerElemStyle.lineHeight = documentData.finalSize + 'px';
+
+      if (fontData.fClass) {
+        this.innerElem.className = fontData.fClass;
+      } else {
+        innerElemStyle.fontFamily = fontData.fFamily;
+        var fWeight = documentData.fWeight;
+        var fStyle = documentData.fStyle;
+        innerElemStyle.fontStyle = fStyle;
+        innerElemStyle.fontWeight = fWeight;
+      }
+    }
+
+    var i;
+    var len;
+    var letters = documentData.l;
+    len = letters.length;
+    var tSpan;
+    var tParent;
+    var tCont;
+    var matrixHelper = this.mHelper;
+    var shapes;
+    var shapeStr = '';
+    var cnt = 0;
+
+    for (i = 0; i < len; i += 1) {
+      if (this.globalData.fontManager.chars) {
+        if (!this.textPaths[cnt]) {
+          tSpan = createNS('path');
+          tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);
+          tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);
+          tSpan.setAttribute('stroke-miterlimit', '4');
+        } else {
+          tSpan = this.textPaths[cnt];
+        }
+
+        if (!this.isMasked) {
+          if (this.textSpans[cnt]) {
+            tParent = this.textSpans[cnt];
+            tCont = tParent.children[0];
+          } else {
+            tParent = createTag('div');
+            tParent.style.lineHeight = 0;
+            tCont = createNS('svg');
+            tCont.appendChild(tSpan);
+            styleDiv(tParent);
+          }
+        }
+      } else if (!this.isMasked) {
+        if (this.textSpans[cnt]) {
+          tParent = this.textSpans[cnt];
+          tSpan = this.textPaths[cnt];
+        } else {
+          tParent = createTag('span');
+          styleDiv(tParent);
+          tSpan = createTag('span');
+          styleDiv(tSpan);
+          tParent.appendChild(tSpan);
+        }
+      } else {
+        tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
+      } // tSpan.setAttribute('visibility', 'hidden');
 
 
-    var lottiejs = {};
+      if (this.globalData.fontManager.chars) {
+        var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
+        var shapeData;
+
+        if (charData) {
+          shapeData = charData.data;
+        } else {
+          shapeData = null;
+        }
+
+        matrixHelper.reset();
+
+        if (shapeData && shapeData.shapes && shapeData.shapes.length) {
+          shapes = shapeData.shapes[0].it;
+          matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+          shapeStr = this.createPathShape(matrixHelper, shapes);
+          tSpan.setAttribute('d', shapeStr);
+        }
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent);
+
+          if (shapeData && shapeData.shapes) {
+            // document.body.appendChild is needed to get exact measure of shape
+            document.body.appendChild(tCont);
+            var boundingBox = tCont.getBBox();
+            tCont.setAttribute('width', boundingBox.width + 2);
+            tCont.setAttribute('height', boundingBox.height + 2);
+            tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));
+            var tContStyle = tCont.style;
+            var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';
+            tContStyle.transform = tContTranslation;
+            tContStyle.webkitTransform = tContTranslation;
+            letters[i].yOffset = boundingBox.y - 1;
+          } else {
+            tCont.setAttribute('width', 1);
+            tCont.setAttribute('height', 1);
+          }
+
+          tParent.appendChild(tCont);
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } else {
+        tSpan.textContent = letters[i].val;
+        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
+
+        if (!this.isMasked) {
+          this.innerElem.appendChild(tParent); //
+
+          var tStyle = tSpan.style;
+          var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';
+          tStyle.transform = tSpanTranslation;
+          tStyle.webkitTransform = tSpanTranslation;
+        } else {
+          this.innerElem.appendChild(tSpan);
+        }
+      } //
+
+
+      if (!this.isMasked) {
+        this.textSpans[cnt] = tParent;
+      } else {
+        this.textSpans[cnt] = tSpan;
+      }
+
+      this.textSpans[cnt].style.display = 'block';
+      this.textPaths[cnt] = tSpan;
+      cnt += 1;
+    }
+
+    while (cnt < this.textSpans.length) {
+      this.textSpans[cnt].style.display = 'none';
+      cnt += 1;
+    }
+  };
+
+  HTextElement.prototype.renderInnerContent = function () {
+    var svgStyle;
+
+    if (this.data.singleShape) {
+      if (!this._isFirstFrame && !this.lettersChangedFlag) {
+        return;
+      }
+
+      if (this.isMasked && this.finalTransform._matMdf) {
+        // Todo Benchmark if using this is better than getBBox
+        this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);
+        svgStyle = this.svgElement.style;
+        var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
+        svgStyle.transform = translation;
+        svgStyle.webkitTransform = translation;
+      }
+    }
+
+    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
+
+    if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {
+      return;
+    }
+
+    var i;
+    var len;
+    var count = 0;
+    var renderedLetters = this.textAnimator.renderedLetters;
+    var letters = this.textProperty.currentData.l;
+    len = letters.length;
+    var renderedLetter;
+    var textSpan;
+    var textPath;
+
+    for (i = 0; i < len; i += 1) {
+      if (letters[i].n) {
+        count += 1;
+      } else {
+        textSpan = this.textSpans[i];
+        textPath = this.textPaths[i];
+        renderedLetter = renderedLetters[count];
+        count += 1;
+
+        if (renderedLetter._mdf.m) {
+          if (!this.isMasked) {
+            textSpan.style.webkitTransform = renderedLetter.m;
+            textSpan.style.transform = renderedLetter.m;
+          } else {
+            textSpan.setAttribute('transform', renderedLetter.m);
+          }
+        } /// /textSpan.setAttribute('opacity',renderedLetter.o);
+
+
+        textSpan.style.opacity = renderedLetter.o;
+
+        if (renderedLetter.sw && renderedLetter._mdf.sw) {
+          textPath.setAttribute('stroke-width', renderedLetter.sw);
+        }
+
+        if (renderedLetter.sc && renderedLetter._mdf.sc) {
+          textPath.setAttribute('stroke', renderedLetter.sc);
+        }
+
+        if (renderedLetter.fc && renderedLetter._mdf.fc) {
+          textPath.setAttribute('fill', renderedLetter.fc);
+          textPath.style.color = renderedLetter.fc;
+        }
+      }
+    }
+
+    if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {
+      var boundingBox = this.innerElem.getBBox();
+
+      if (this.currentBBox.w !== boundingBox.width) {
+        this.currentBBox.w = boundingBox.width;
+        this.svgElement.setAttribute('width', boundingBox.width);
+      }
+
+      if (this.currentBBox.h !== boundingBox.height) {
+        this.currentBBox.h = boundingBox.height;
+        this.svgElement.setAttribute('height', boundingBox.height);
+      }
+
+      var margin = 1;
+
+      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) {
+        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;
+        this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);
+        svgStyle = this.svgElement.style;
+        var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
+        svgStyle.transform = svgTransform;
+        svgStyle.webkitTransform = svgTransform;
+      }
+    }
+  };
+
+  function HCameraElement(data, globalData, comp) {
+    this.initFrame();
+    this.initBaseData(data, globalData, comp);
+    this.initHierarchy();
+    var getProp = PropertyFactory.getProp;
+    this.pe = getProp(this, data.pe, 0, 0, this);
+
+    if (data.ks.p.s) {
+      this.px = getProp(this, data.ks.p.x, 1, 0, this);
+      this.py = getProp(this, data.ks.p.y, 1, 0, this);
+      this.pz = getProp(this, data.ks.p.z, 1, 0, this);
+    } else {
+      this.p = getProp(this, data.ks.p, 1, 0, this);
+    }
+
+    if (data.ks.a) {
+      this.a = getProp(this, data.ks.a, 1, 0, this);
+    }
+
+    if (data.ks.or.k.length && data.ks.or.k[0].to) {
+      var i;
+      var len = data.ks.or.k.length;
+
+      for (i = 0; i < len; i += 1) {
+        data.ks.or.k[i].to = null;
+        data.ks.or.k[i].ti = null;
+      }
+    }
+
+    this.or = getProp(this, data.ks.or, 1, degToRads, this);
+    this.or.sh = true;
+    this.rx = getProp(this, data.ks.rx, 0, degToRads, this);
+    this.ry = getProp(this, data.ks.ry, 0, degToRads, this);
+    this.rz = getProp(this, data.ks.rz, 0, degToRads, this);
+    this.mat = new Matrix();
+    this._prevMat = new Matrix();
+    this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
+
+    this.finalTransform = {
+      mProp: this
+    };
+  }
+
+  extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
+
+  HCameraElement.prototype.setup = function () {
+    var i;
+    var len = this.comp.threeDElements.length;
+    var comp;
+    var perspectiveStyle;
+    var containerStyle;
+
+    for (i = 0; i < len; i += 1) {
+      // [perspectiveElem,container]
+      comp = this.comp.threeDElements[i];
+
+      if (comp.type === '3d') {
+        perspectiveStyle = comp.perspectiveElem.style;
+        containerStyle = comp.container.style;
+        var perspective = this.pe.v + 'px';
+        var origin = '0px 0px 0px';
+        var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+        perspectiveStyle.perspective = perspective;
+        perspectiveStyle.webkitPerspective = perspective;
+        containerStyle.transformOrigin = origin;
+        containerStyle.mozTransformOrigin = origin;
+        containerStyle.webkitTransformOrigin = origin;
+        perspectiveStyle.transform = matrix;
+        perspectiveStyle.webkitTransform = matrix;
+      }
+    }
+  };
+
+  HCameraElement.prototype.createElements = function () {};
+
+  HCameraElement.prototype.hide = function () {};
+
+  HCameraElement.prototype.renderFrame = function () {
+    var _mdf = this._isFirstFrame;
+    var i;
+    var len;
+
+    if (this.hierarchy) {
+      len = this.hierarchy.length;
+
+      for (i = 0; i < len; i += 1) {
+        _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
+      }
+    }
+
+    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) {
+      this.mat.reset();
+
+      if (this.hierarchy) {
+        len = this.hierarchy.length - 1;
+
+        for (i = len; i >= 0; i -= 1) {
+          var mTransf = this.hierarchy[i].finalTransform.mProp;
+          this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);
+          this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
+          this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
+          this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);
+          this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);
+        }
+      }
+
+      if (this.p) {
+        this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);
+      } else {
+        this.mat.translate(-this.px.v, -this.py.v, this.pz.v);
+      }
+
+      if (this.a) {
+        var diffVector;
+
+        if (this.p) {
+          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]];
+        } else {
+          diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
+        }
+
+        var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
+
+        var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];
+        var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);
+        var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);
+        var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);
+        this.mat.rotateY(mRotationY).rotateX(-mRotationX);
+      }
+
+      this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
+      this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
+      this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);
+      this.mat.translate(0, 0, this.pe.v);
+      var hasMatrixChanged = !this._prevMat.equals(this.mat);
+
+      if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
+        len = this.comp.threeDElements.length;
+        var comp;
+        var perspectiveStyle;
+        var containerStyle;
+
+        for (i = 0; i < len; i += 1) {
+          comp = this.comp.threeDElements[i];
+
+          if (comp.type === '3d') {
+            if (hasMatrixChanged) {
+              var matValue = this.mat.toCSS();
+              containerStyle = comp.container.style;
+              containerStyle.transform = matValue;
+              containerStyle.webkitTransform = matValue;
+            }
+
+            if (this.pe._mdf) {
+              perspectiveStyle = comp.perspectiveElem.style;
+              perspectiveStyle.perspective = this.pe.v + 'px';
+              perspectiveStyle.webkitPerspective = this.pe.v + 'px';
+            }
+          }
+        }
+
+        this.mat.clone(this._prevMat);
+      }
+    }
+
+    this._isFirstFrame = false;
+  };
+
+  HCameraElement.prototype.prepareFrame = function (num) {
+    this.prepareProperties(num, true);
+  };
+
+  HCameraElement.prototype.destroy = function () {};
+
+  HCameraElement.prototype.getBaseElement = function () {
+    return null;
+  };
+
+  function HImageElement(data, globalData, comp) {
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data, globalData, comp);
+  }
+
+  extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);
+
+  HImageElement.prototype.createContent = function () {
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
+    var img = new Image();
+
+    if (this.data.hasMask) {
+      this.imageElem = createNS('image');
+      this.imageElem.setAttribute('width', this.assetData.w + 'px');
+      this.imageElem.setAttribute('height', this.assetData.h + 'px');
+      this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);
+      this.layerElement.appendChild(this.imageElem);
+      this.baseElement.setAttribute('width', this.assetData.w);
+      this.baseElement.setAttribute('height', this.assetData.h);
+    } else {
+      this.layerElement.appendChild(img);
+    }
+
+    img.crossOrigin = 'anonymous';
+    img.src = assetPath;
+
+    if (this.data.ln) {
+      this.baseElement.setAttribute('id', this.data.ln);
+    }
+  };
+
+  function HybridRendererBase(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([BaseRenderer], HybridRendererBase);
+  HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;
+
+  HybridRendererBase.prototype.checkPendingElements = function () {
+    while (this.pendingElements.length) {
+      var element = this.pendingElements.pop();
+      element.checkParenting();
+    }
+  };
+
+  HybridRendererBase.prototype.appendElementInPos = function (element, pos) {
+    var newDOMElement = element.getBaseElement();
+
+    if (!newDOMElement) {
+      return;
+    }
+
+    var layer = this.layers[pos];
+
+    if (!layer.ddd || !this.supports3d) {
+      if (this.threeDElements) {
+        this.addTo3dContainer(newDOMElement, pos);
+      } else {
+        var i = 0;
+        var nextDOMElement;
+        var nextLayer;
+        var tmpDOMElement;
+
+        while (i < pos) {
+          if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
+            nextLayer = this.elements[i];
+            tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+            nextDOMElement = tmpDOMElement || nextDOMElement;
+          }
+
+          i += 1;
+        }
+
+        if (nextDOMElement) {
+          if (!layer.ddd || !this.supports3d) {
+            this.layerElement.insertBefore(newDOMElement, nextDOMElement);
+          }
+        } else if (!layer.ddd || !this.supports3d) {
+          this.layerElement.appendChild(newDOMElement);
+        }
+      }
+    } else {
+      this.addTo3dContainer(newDOMElement, pos);
+    }
+  };
+
+  HybridRendererBase.prototype.createShape = function (data) {
+    if (!this.supports3d) {
+      return new SVGShapeElement(data, this.globalData, this);
+    }
+
+    return new HShapeElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createText = function (data) {
+    if (!this.supports3d) {
+      return new SVGTextLottieElement(data, this.globalData, this);
+    }
+
+    return new HTextElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createCamera = function (data) {
+    this.camera = new HCameraElement(data, this.globalData, this);
+    return this.camera;
+  };
+
+  HybridRendererBase.prototype.createImage = function (data) {
+    if (!this.supports3d) {
+      return new IImageElement(data, this.globalData, this);
+    }
+
+    return new HImageElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createSolid = function (data) {
+    if (!this.supports3d) {
+      return new ISolidElement(data, this.globalData, this);
+    }
+
+    return new HSolidElement(data, this.globalData, this);
+  };
+
+  HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+  HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
+        return this.threeDElements[i].perspectiveElem;
+      }
+
+      i += 1;
+    }
+
+    return null;
+  };
+
+  HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {
+    var perspectiveElem = createTag('div');
+    var style;
+    var containerStyle;
+    styleDiv(perspectiveElem);
+    var container = createTag('div');
+    styleDiv(container);
+
+    if (type === '3d') {
+      style = perspectiveElem.style;
+      style.width = this.globalData.compSize.w + 'px';
+      style.height = this.globalData.compSize.h + 'px';
+      var center = '50% 50%';
+      style.webkitTransformOrigin = center;
+      style.mozTransformOrigin = center;
+      style.transformOrigin = center;
+      containerStyle = container.style;
+      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+      containerStyle.transform = matrix;
+      containerStyle.webkitTransform = matrix;
+    }
+
+    perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);
+
+    var threeDContainerData = {
+      container: container,
+      perspectiveElem: perspectiveElem,
+      startPos: pos,
+      endPos: pos,
+      type: type
+    };
+    this.threeDElements.push(threeDContainerData);
+    return threeDContainerData;
+  };
+
+  HybridRendererBase.prototype.build3dContainers = function () {
+    var i;
+    var len = this.layers.length;
+    var lastThreeDContainerData;
+    var currentContainer = '';
+
+    for (i = 0; i < len; i += 1) {
+      if (this.layers[i].ddd && this.layers[i].ty !== 3) {
+        if (currentContainer !== '3d') {
+          currentContainer = '3d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '3d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      } else {
+        if (currentContainer !== '2d') {
+          currentContainer = '2d';
+          lastThreeDContainerData = this.createThreeDContainer(i, '2d');
+        }
+
+        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+      }
+    }
+
+    len = this.threeDElements.length;
+
+    for (i = len - 1; i >= 0; i -= 1) {
+      this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
+    }
+  };
+
+  HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {
+    var i = 0;
+    var len = this.threeDElements.length;
+
+    while (i < len) {
+      if (pos <= this.threeDElements[i].endPos) {
+        var j = this.threeDElements[i].startPos;
+        var nextElement;
+
+        while (j < pos) {
+          if (this.elements[j] && this.elements[j].getBaseElement) {
+            nextElement = this.elements[j].getBaseElement();
+          }
+
+          j += 1;
+        }
+
+        if (nextElement) {
+          this.threeDElements[i].container.insertBefore(elem, nextElement);
+        } else {
+          this.threeDElements[i].container.appendChild(elem);
+        }
+
+        break;
+      }
+
+      i += 1;
+    }
+  };
+
+  HybridRendererBase.prototype.configAnimation = function (animData) {
+    var resizerElem = createTag('div');
+    var wrapper = this.animationItem.wrapper;
+    var style = resizerElem.style;
+    style.width = animData.w + 'px';
+    style.height = animData.h + 'px';
+    this.resizerElem = resizerElem;
+    styleDiv(resizerElem);
+    style.transformStyle = 'flat';
+    style.mozTransformStyle = 'flat';
+    style.webkitTransformStyle = 'flat';
+
+    if (this.renderConfig.className) {
+      resizerElem.setAttribute('class', this.renderConfig.className);
+    }
+
+    wrapper.appendChild(resizerElem);
+    style.overflow = 'hidden';
+    var svg = createNS('svg');
+    svg.setAttribute('width', '1');
+    svg.setAttribute('height', '1');
+    styleDiv(svg);
+    this.resizerElem.appendChild(svg);
+    var defs = createNS('defs');
+    svg.appendChild(defs);
+    this.data = animData; // Mask animation
+
+    this.setupGlobalData(animData, svg);
+    this.globalData.defs = defs;
+    this.layers = animData.layers;
+    this.layerElement = this.resizerElem;
+    this.build3dContainers();
+    this.updateContainerSize();
+  };
+
+  HybridRendererBase.prototype.destroy = function () {
+    if (this.animationItem.wrapper) {
+      this.animationItem.wrapper.innerText = '';
+    }
+
+    this.animationItem.container = null;
+    this.globalData.defs = null;
+    var i;
+    var len = this.layers ? this.layers.length : 0;
+
+    for (i = 0; i < len; i += 1) {
+      this.elements[i].destroy();
+    }
+
+    this.elements.length = 0;
+    this.destroyed = true;
+    this.animationItem = null;
+  };
+
+  HybridRendererBase.prototype.updateContainerSize = function () {
+    var elementWidth = this.animationItem.wrapper.offsetWidth;
+    var elementHeight = this.animationItem.wrapper.offsetHeight;
+    var elementRel = elementWidth / elementHeight;
+    var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
+    var sx;
+    var sy;
+    var tx;
+    var ty;
+
+    if (animationRel > elementRel) {
+      sx = elementWidth / this.globalData.compSize.w;
+      sy = elementWidth / this.globalData.compSize.w;
+      tx = 0;
+      ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;
+    } else {
+      sx = elementHeight / this.globalData.compSize.h;
+      sy = elementHeight / this.globalData.compSize.h;
+      tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
+      ty = 0;
+    }
+
+    var style = this.resizerElem.style;
+    style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
+    style.transform = style.webkitTransform;
+  };
+
+  HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
+
+  HybridRendererBase.prototype.hide = function () {
+    this.resizerElem.style.display = 'none';
+  };
+
+  HybridRendererBase.prototype.show = function () {
+    this.resizerElem.style.display = 'block';
+  };
+
+  HybridRendererBase.prototype.initItems = function () {
+    this.buildAllItems();
+
+    if (this.camera) {
+      this.camera.setup();
+    } else {
+      var cWidth = this.globalData.compSize.w;
+      var cHeight = this.globalData.compSize.h;
+      var i;
+      var len = this.threeDElements.length;
+
+      for (i = 0; i < len; i += 1) {
+        var style = this.threeDElements[i].perspectiveElem.style;
+        style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
+        style.perspective = style.webkitPerspective;
+      }
+    }
+  };
+
+  HybridRendererBase.prototype.searchExtraCompositions = function (assets) {
+    var i;
+    var len = assets.length;
+    var floatingContainer = createTag('div');
+
+    for (i = 0; i < len; i += 1) {
+      if (assets[i].xt) {
+        var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
+        comp.initExpressions();
+        this.globalData.projectInterface.registerComposition(comp);
+      }
+    }
+  };
+
+  function HCompElement(data, globalData, comp) {
+    this.layers = data.layers;
+    this.supports3d = !data.hasMask;
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {
+      _placeholder: true
+    };
+  }
+
+  extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);
+  HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
+
+  HCompElement.prototype.createContainerElements = function () {
+    this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
+
+
+    if (this.data.hasMask) {
+      this.svgElement.setAttribute('width', this.data.w);
+      this.svgElement.setAttribute('height', this.data.h);
+      this.transformedElement = this.baseElement;
+    } else {
+      this.transformedElement = this.layerElement;
+    }
+  };
+
+  HCompElement.prototype.addTo3dContainer = function (elem, pos) {
+    var j = 0;
+    var nextElement;
+
+    while (j < pos) {
+      if (this.elements[j] && this.elements[j].getBaseElement) {
+        nextElement = this.elements[j].getBaseElement();
+      }
+
+      j += 1;
+    }
+
+    if (nextElement) {
+      this.layerElement.insertBefore(elem, nextElement);
+    } else {
+      this.layerElement.appendChild(elem);
+    }
+  };
+
+  HCompElement.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  function HybridRenderer(animationItem, config) {
+    this.animationItem = animationItem;
+    this.layers = null;
+    this.renderedFrame = -1;
+    this.renderConfig = {
+      className: config && config.className || '',
+      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',
+      hideOnTransparent: !(config && config.hideOnTransparent === false),
+      filterSize: {
+        width: config && config.filterSize && config.filterSize.width || '400%',
+        height: config && config.filterSize && config.filterSize.height || '400%',
+        x: config && config.filterSize && config.filterSize.x || '-100%',
+        y: config && config.filterSize && config.filterSize.y || '-100%'
+      }
+    };
+    this.globalData = {
+      _mdf: false,
+      frameNum: -1,
+      renderConfig: this.renderConfig
+    };
+    this.pendingElements = [];
+    this.elements = [];
+    this.threeDElements = [];
+    this.destroyed = false;
+    this.camera = null;
+    this.supports3d = true;
+    this.rendererType = 'html';
+  }
+
+  extendPrototype([HybridRendererBase], HybridRenderer);
+
+  HybridRenderer.prototype.createComp = function (data) {
+    if (!this.supports3d) {
+      return new SVGCompElement(data, this.globalData, this);
+    }
+
+    return new HCompElement(data, this.globalData, this);
+  };
+
+  var Expressions = function () {
+    var ob = {};
+    ob.initExpressions = initExpressions;
+
+    function initExpressions(animation) {
+      var stackCount = 0;
+      var registers = [];
+
+      function pushExpression() {
+        stackCount += 1;
+      }
+
+      function popExpression() {
+        stackCount -= 1;
+
+        if (stackCount === 0) {
+          releaseInstances();
+        }
+      }
+
+      function registerExpressionProperty(expression) {
+        if (registers.indexOf(expression) === -1) {
+          registers.push(expression);
+        }
+      }
+
+      function releaseInstances() {
+        var i;
+        var len = registers.length;
+
+        for (i = 0; i < len; i += 1) {
+          registers[i].release();
+        }
+
+        registers.length = 0;
+      }
+
+      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
+      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
+      animation.renderer.globalData.pushExpression = pushExpression;
+      animation.renderer.globalData.popExpression = popExpression;
+      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
+    }
+
+    return ob;
+  }();
+
+  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+  /* eslint-disable */
+
+  /*
+   Copyright 2014 David Bau.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+   */
+  function seedRandom(pool, math) {
+    //
+    // The following constants are related to IEEE 754 limits.
+    //
+    var global = this,
+        width = 256,
+        // each RC4 output is 0 <= x < 256
+    chunks = 6,
+        // at least six RC4 outputs for each double
+    digits = 52,
+        // there are 52 significant digits in a double
+    rngname = 'random',
+        // rngname: name for Math.random and Math.seedrandom
+    startdenom = math.pow(width, chunks),
+        significance = math.pow(2, digits),
+        overflow = significance * 2,
+        mask = width - 1,
+        nodecrypto; // node.js crypto module, initialized at the bottom.
+    //
+    // seedrandom()
+    // This is the seedrandom function described above.
+    //
+
+    function seedrandom(seed, options, callback) {
+      var key = [];
+      options = options === true ? {
+        entropy: true
+      } : options || {}; // Flatten the seed string or build one from local entropy if needed.
+
+      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.
+
+      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains
+      // randomness in every bit of the mantissa of the IEEE 754 value.
+
+      var prng = function prng() {
+        var n = arc4.g(chunks),
+            // Start with a numerator n < 2 ^ 48
+        d = startdenom,
+            //   and denominator d = 2 ^ 48.
+        x = 0; //   and no 'extra last byte'.
+
+        while (n < significance) {
+          // Fill up all significant digits by
+          n = (n + x) * width; //   shifting numerator and
+
+          d *= width; //   denominator and generating a
+
+          x = arc4.g(1); //   new least-significant-byte.
+        }
+
+        while (n >= overflow) {
+          // To avoid rounding up, before adding
+          n /= 2; //   last byte, shift everything
+
+          d /= 2; //   right using integer math until
+
+          x >>>= 1; //   we have exactly the desired bits.
+        }
+
+        return (n + x) / d; // Form the number within [0, 1).
+      };
+
+      prng.int32 = function () {
+        return arc4.g(4) | 0;
+      };
+
+      prng.quick = function () {
+        return arc4.g(4) / 0x100000000;
+      };
+
+      prng["double"] = prng; // Mix the randomness into accumulated entropy.
+
+      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.
+
+      return (options.pass || callback || function (prng, seed, is_math_call, state) {
+        if (state) {
+          // Load the arc4 state from the given state if it has an S array.
+          if (state.S) {
+            copy(state, arc4);
+          } // Only provide the .state method if requested via options.state.
+
+
+          prng.state = function () {
+            return copy(arc4, {});
+          };
+        } // If called as a method of Math (Math.seedrandom()), mutate
+        // Math.random because that is how seedrandom.js has worked since v1.0.
+
+
+        if (is_math_call) {
+          math[rngname] = prng;
+          return seed;
+        } // Otherwise, it is a newer calling convention, so return the
+        // prng directly.
+        else return prng;
+      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);
+    }
+
+    math['seed' + rngname] = seedrandom; //
+    // ARC4
+    //
+    // An ARC4 implementation.  The constructor takes a key in the form of
+    // an array of at most (width) integers that should be 0 <= x < (width).
+    //
+    // The g(count) method returns a pseudorandom integer that concatenates
+    // the next (count) outputs from ARC4.  Its return value is a number x
+    // that is in the range 0 <= x < (width ^ count).
+    //
+
+    function ARC4(key) {
+      var t,
+          keylen = key.length,
+          me = this,
+          i = 0,
+          j = me.i = me.j = 0,
+          s = me.S = []; // The empty key [] is treated as [0].
+
+      if (!keylen) {
+        key = [keylen++];
+      } // Set up S using the standard key scheduling algorithm.
+
+
+      while (i < width) {
+        s[i] = i++;
+      }
+
+      for (i = 0; i < width; i++) {
+        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];
+        s[j] = t;
+      } // The "g" method returns the next (count) outputs as one number.
+
+
+      me.g = function (count) {
+        // Using instance members instead of closure state nearly doubles speed.
+        var t,
+            r = 0,
+            i = me.i,
+            j = me.j,
+            s = me.S;
+
+        while (count--) {
+          t = s[i = mask & i + 1];
+          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];
+        }
+
+        me.i = i;
+        me.j = j;
+        return r; // For robust unpredictability, the function call below automatically
+        // discards an initial batch of values.  This is called RC4-drop[256].
+        // See http://google.com/search?q=rsa+fluhrer+response&btnI
+      };
+    } //
+    // copy()
+    // Copies internal state of ARC4 to or from a plain object.
+    //
+
+
+    function copy(f, t) {
+      t.i = f.i;
+      t.j = f.j;
+      t.S = f.S.slice();
+      return t;
+    } //
+    // flatten()
+    // Converts an object tree to nested arrays of strings.
+    //
+
+
+    function flatten(obj, depth) {
+      var result = [],
+          typ = _typeof$1(obj),
+          prop;
+
+      if (depth && typ == 'object') {
+        for (prop in obj) {
+          try {
+            result.push(flatten(obj[prop], depth - 1));
+          } catch (e) {}
+        }
+      }
+
+      return result.length ? result : typ == 'string' ? obj : obj + '\0';
+    } //
+    // mixkey()
+    // Mixes a string seed into a key that is an array of integers, and
+    // returns a shortened string seed that is equivalent to the result key.
+    //
+
+
+    function mixkey(seed, key) {
+      var stringseed = seed + '',
+          smear,
+          j = 0;
+
+      while (j < stringseed.length) {
+        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);
+      }
+
+      return tostring(key);
+    } //
+    // autoseed()
+    // Returns an object for autoseeding, using window.crypto and Node crypto
+    // module if available.
+    //
+
+
+    function autoseed() {
+      try {
+        if (nodecrypto) {
+          return tostring(nodecrypto.randomBytes(width));
+        }
+
+        var out = new Uint8Array(width);
+        (global.crypto || global.msCrypto).getRandomValues(out);
+        return tostring(out);
+      } catch (e) {
+        var browser = global.navigator,
+            plugins = browser && browser.plugins;
+        return [+new Date(), global, plugins, global.screen, tostring(pool)];
+      }
+    } //
+    // tostring()
+    // Converts an array of charcodes to a string
+    //
+
+
+    function tostring(a) {
+      return String.fromCharCode.apply(0, a);
+    } //
+    // When seedrandom.js is loaded, we immediately mix a few bits
+    // from the built-in RNG into the entropy pool.  Because we do
+    // not want to interfere with deterministic PRNG state later,
+    // seedrandom will not call math.random on its own again after
+    // initialization.
+    //
+
+
+    mixkey(math.random(), pool); //
+    // Nodejs and AMD support: export the implementation as a module using
+    // either convention.
+    //
+    // End anonymous scope, and pass initial values.
+  }
+
+  ;
+
+  function initialize$2(BMMath) {
+    seedRandom([], BMMath);
+  }
+
+  var propTypes = {
+    SHAPE: 'shape'
+  };
+
+  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+  var ExpressionManager = function () {
+    'use strict';
+
+    var ob = {};
+    var Math = BMMath;
+    var window = null;
+    var document = null;
+    var XMLHttpRequest = null;
+    var fetch = null;
+    var frames = null;
+    initialize$2(BMMath);
+
+    function $bm_isInstanceOfArray(arr) {
+      return arr.constructor === Array || arr.constructor === Float32Array;
+    }
+
+    function isNumerable(tOfV, v) {
+      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
+    }
+
+    function $bm_neg(a) {
+      var tOfA = _typeof(a);
+
+      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {
+        return -a;
+      }
+
+      if ($bm_isInstanceOfArray(a)) {
+        var i;
+        var lenA = a.length;
+        var retArr = [];
+
+        for (i = 0; i < lenA; i += 1) {
+          retArr[i] = -a[i];
+        }
+
+        return retArr;
+      }
+
+      if (a.propType) {
+        return a.v;
+      }
+
+      return -a;
+    }
+
+    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;
+    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;
+    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;
+
+    function sum(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (tOfA === 'string' || tOfB === 'string') {
+        return a + b;
+      }
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a + b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] += b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a + b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] + b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    var add = sum;
+
+    function sub(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        if (tOfA === 'string') {
+          a = parseInt(a, 10);
+        }
+
+        if (tOfB === 'string') {
+          b = parseInt(b, 10);
+        }
+
+        return a - b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        a = a.slice(0);
+        a[0] -= b;
+        return a;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        b = b.slice(0);
+        b[0] = a - b[0];
+        return b;
+      }
+
+      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {
+        var i = 0;
+        var lenA = a.length;
+        var lenB = b.length;
+        var retArr = [];
+
+        while (i < lenA || i < lenB) {
+          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {
+            retArr[i] = a[i] - b[i];
+          } else {
+            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
+          }
+
+          i += 1;
+        }
+
+        return retArr;
+      }
+
+      return 0;
+    }
+
+    function mul(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a * b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] * b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a * b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function div(a, b) {
+      var tOfA = _typeof(a);
+
+      var tOfB = _typeof(b);
+
+      var arr;
+
+      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
+        return a / b;
+      }
+
+      var i;
+      var len;
+
+      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {
+        len = a.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a[i] / b;
+        }
+
+        return arr;
+      }
+
+      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {
+        len = b.length;
+        arr = createTypedArray('float32', len);
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = a / b[i];
+        }
+
+        return arr;
+      }
+
+      return 0;
+    }
+
+    function mod(a, b) {
+      if (typeof a === 'string') {
+        a = parseInt(a, 10);
+      }
+
+      if (typeof b === 'string') {
+        b = parseInt(b, 10);
+      }
+
+      return a % b;
+    }
+
+    var $bm_sum = sum;
+    var $bm_sub = sub;
+    var $bm_mul = mul;
+    var $bm_div = div;
+    var $bm_mod = mod;
+
+    function clamp(num, min, max) {
+      if (min > max) {
+        var mm = max;
+        max = min;
+        min = mm;
+      }
+
+      return Math.min(Math.max(num, min), max);
+    }
+
+    function radiansToDegrees(val) {
+      return val / degToRads;
+    }
+
+    var radians_to_degrees = radiansToDegrees;
+
+    function degreesToRadians(val) {
+      return val * degToRads;
+    }
+
+    var degrees_to_radians = radiansToDegrees;
+    var helperLengthArray = [0, 0, 0, 0, 0, 0];
+
+    function length(arr1, arr2) {
+      if (typeof arr1 === 'number' || arr1 instanceof Number) {
+        arr2 = arr2 || 0;
+        return Math.abs(arr1 - arr2);
+      }
+
+      if (!arr2) {
+        arr2 = helperLengthArray;
+      }
+
+      var i;
+      var len = Math.min(arr1.length, arr2.length);
+      var addedLength = 0;
+
+      for (i = 0; i < len; i += 1) {
+        addedLength += Math.pow(arr2[i] - arr1[i], 2);
+      }
+
+      return Math.sqrt(addedLength);
+    }
+
+    function normalize(vec) {
+      return div(vec, length(vec));
+    }
+
+    function rgbToHsl(val) {
+      var r = val[0];
+      var g = val[1];
+      var b = val[2];
+      var max = Math.max(r, g, b);
+      var min = Math.min(r, g, b);
+      var h;
+      var s;
+      var l = (max + min) / 2;
+
+      if (max === min) {
+        h = 0; // achromatic
+
+        s = 0; // achromatic
+      } else {
+        var d = max - min;
+        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+
+        switch (max) {
+          case r:
+            h = (g - b) / d + (g < b ? 6 : 0);
+            break;
+
+          case g:
+            h = (b - r) / d + 2;
+            break;
+
+          case b:
+            h = (r - g) / d + 4;
+            break;
+
+          default:
+            break;
+        }
+
+        h /= 6;
+      }
+
+      return [h, s, l, val[3]];
+    }
+
+    function hue2rgb(p, q, t) {
+      if (t < 0) t += 1;
+      if (t > 1) t -= 1;
+      if (t < 1 / 6) return p + (q - p) * 6 * t;
+      if (t < 1 / 2) return q;
+      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+      return p;
+    }
+
+    function hslToRgb(val) {
+      var h = val[0];
+      var s = val[1];
+      var l = val[2];
+      var r;
+      var g;
+      var b;
+
+      if (s === 0) {
+        r = l; // achromatic
+
+        b = l; // achromatic
+
+        g = l; // achromatic
+      } else {
+        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+        var p = 2 * l - q;
+        r = hue2rgb(p, q, h + 1 / 3);
+        g = hue2rgb(p, q, h);
+        b = hue2rgb(p, q, h - 1 / 3);
+      }
+
+      return [r, g, b, val[3]];
+    }
+
+    function linear(t, tMin, tMax, value1, value2) {
+      if (value1 === undefined || value2 === undefined) {
+        value1 = tMin;
+        value2 = tMax;
+        tMin = 0;
+        tMax = 1;
+      }
+
+      if (tMax < tMin) {
+        var _tMin = tMax;
+        tMax = tMin;
+        tMin = _tMin;
+      }
+
+      if (t <= tMin) {
+        return value1;
+      }
+
+      if (t >= tMax) {
+        return value2;
+      }
+
+      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);
+
+      if (!value1.length) {
+        return value1 + (value2 - value1) * perc;
+      }
+
+      var i;
+      var len = value1.length;
+      var arr = createTypedArray('float32', len);
+
+      for (i = 0; i < len; i += 1) {
+        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;
+      }
+
+      return arr;
+    }
+
+    function random(min, max) {
+      if (max === undefined) {
+        if (min === undefined) {
+          min = 0;
+          max = 1;
+        } else {
+          max = min;
+          min = undefined;
+        }
+      }
+
+      if (max.length) {
+        var i;
+        var len = max.length;
+
+        if (!min) {
+          min = createTypedArray('float32', len);
+        }
+
+        var arr = createTypedArray('float32', len);
+        var rnd = BMMath.random();
+
+        for (i = 0; i < len; i += 1) {
+          arr[i] = min[i] + rnd * (max[i] - min[i]);
+        }
+
+        return arr;
+      }
+
+      if (min === undefined) {
+        min = 0;
+      }
+
+      var rndm = BMMath.random();
+      return min + rndm * (max - min);
+    }
+
+    function createPath(points, inTangents, outTangents, closed) {
+      var i;
+      var len = points.length;
+      var path = shapePool.newElement();
+      path.setPathData(!!closed, len);
+      var arrPlaceholder = [0, 0];
+      var inVertexPoint;
+      var outVertexPoint;
+
+      for (i = 0; i < len; i += 1) {
+        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
+        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
+        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);
+      }
+
+      return path;
+    }
+
+    function initiateExpression(elem, data, property) {
+      var val = data.x;
+      var needsVelocity = /velocity(?![\w\d])/.test(val);
+
+      var _needsRandom = val.indexOf('random') !== -1;
+
+      var elemType = elem.data.ty;
+      var transform;
+      var $bm_transform;
+      var content;
+      var effect;
+      var thisProperty = property;
+      thisProperty.valueAtTime = thisProperty.getValueAtTime;
+      Object.defineProperty(thisProperty, 'value', {
+        get: function get() {
+          return thisProperty.v;
+        }
+      });
+      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;
+      elem.comp.displayStartTime = 0;
+      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;
+      var outPoint = elem.data.op / elem.comp.globalData.frameRate;
+      var width = elem.data.sw ? elem.data.sw : 0;
+      var height = elem.data.sh ? elem.data.sh : 0;
+      var name = elem.data.nm;
+      var loopIn;
+      var loop_in;
+      var loopOut;
+      var loop_out;
+      var smooth;
+      var toWorld;
+      var fromWorld;
+      var fromComp;
+      var toComp;
+      var fromCompToSurface;
+      var position;
+      var rotation;
+      var anchorPoint;
+      var scale;
+      var thisLayer;
+      var thisComp;
+      var mask;
+      var valueAtTime;
+      var velocityAtTime;
+      var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls
+
+      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval
+
+      var numKeys = property.kf ? data.k.length : 0;
+      var active = !this.data || this.data.hd !== true;
+
+      var wiggle = function wiggle(freq, amp) {
+        var iWiggle;
+        var j;
+        var lenWiggle = this.pv.length ? this.pv.length : 1;
+        var addedAmps = createTypedArray('float32', lenWiggle);
+        freq = 5;
+        var iterations = Math.floor(time * freq);
+        iWiggle = 0;
+        j = 0;
+
+        while (iWiggle < iterations) {
+          // var rnd = BMMath.random();
+          for (j = 0; j < lenWiggle; j += 1) {
+            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;
+          }
+
+          iWiggle += 1;
+        } // var rnd2 = BMMath.random();
+
+
+        var periods = time * freq;
+        var perc = periods - Math.floor(periods);
+        var arr = createTypedArray('float32', lenWiggle);
+
+        if (lenWiggle > 1) {
+          for (j = 0; j < lenWiggle; j += 1) {
+            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
+            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
+          }
+
+          return arr;
+        }
+
+        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;
+      }.bind(this);
+
+      if (thisProperty.loopIn) {
+        loopIn = thisProperty.loopIn.bind(thisProperty);
+        loop_in = loopIn;
+      }
+
+      if (thisProperty.loopOut) {
+        loopOut = thisProperty.loopOut.bind(thisProperty);
+        loop_out = loopOut;
+      }
+
+      if (thisProperty.smooth) {
+        smooth = thisProperty.smooth.bind(thisProperty);
+      }
+
+      function loopInDuration(type, duration) {
+        return loopIn(type, duration, true);
+      }
+
+      function loopOutDuration(type, duration) {
+        return loopOut(type, duration, true);
+      }
+
+      if (this.getValueAtTime) {
+        valueAtTime = this.getValueAtTime.bind(this);
+      }
+
+      if (this.getVelocityAtTime) {
+        velocityAtTime = this.getVelocityAtTime.bind(this);
+      }
+
+      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
+
+      function lookAt(elem1, elem2) {
+        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];
+        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;
+        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;
+        return [yaw, pitch, 0];
+      }
+
+      function easeOut(t, tMin, tMax, val1, val2) {
+        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function easeIn(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInBez, t, tMin, tMax, val1, val2);
+      }
+
+      function ease(t, tMin, tMax, val1, val2) {
+        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
+      }
+
+      function applyEase(fn, t, tMin, tMax, val1, val2) {
+        if (val1 === undefined) {
+          val1 = tMin;
+          val2 = tMax;
+        } else {
+          t = (t - tMin) / (tMax - tMin);
+        }
+
+        if (t > 1) {
+          t = 1;
+        } else if (t < 0) {
+          t = 0;
+        }
+
+        var mult = fn(t);
+
+        if ($bm_isInstanceOfArray(val1)) {
+          var iKey;
+          var lenKey = val1.length;
+          var arr = createTypedArray('float32', lenKey);
+
+          for (iKey = 0; iKey < lenKey; iKey += 1) {
+            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];
+          }
+
+          return arr;
+        }
+
+        return (val2 - val1) * mult + val1;
+      }
+
+      function nearestKey(time) {
+        var iKey;
+        var lenKey = data.k.length;
+        var index;
+        var keyTime;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          index = 0;
+          keyTime = 0;
+        } else {
+          index = -1;
+          time *= elem.comp.globalData.frameRate;
+
+          if (time < data.k[0].t) {
+            index = 1;
+            keyTime = data.k[0].t;
+          } else {
+            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {
+              if (time === data.k[iKey].t) {
+                index = iKey + 1;
+                keyTime = data.k[iKey].t;
+                break;
+              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {
+                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {
+                  index = iKey + 2;
+                  keyTime = data.k[iKey + 1].t;
+                } else {
+                  index = iKey + 1;
+                  keyTime = data.k[iKey].t;
+                }
+
+                break;
+              }
+            }
+
+            if (index === -1) {
+              index = iKey + 1;
+              keyTime = data.k[iKey].t;
+            }
+          }
+        }
+
+        var obKey = {};
+        obKey.index = index;
+        obKey.time = keyTime / elem.comp.globalData.frameRate;
+        return obKey;
+      }
+
+      function key(ind) {
+        var obKey;
+        var iKey;
+        var lenKey;
+
+        if (!data.k.length || typeof data.k[0] === 'number') {
+          throw new Error('The property has no keyframe at index ' + ind);
+        }
+
+        ind -= 1;
+        obKey = {
+          time: data.k[ind].t / elem.comp.globalData.frameRate,
+          value: []
+        };
+        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;
+        lenKey = arr.length;
+
+        for (iKey = 0; iKey < lenKey; iKey += 1) {
+          obKey[iKey] = arr[iKey];
+          obKey.value[iKey] = arr[iKey];
+        }
+
+        return obKey;
+      }
+
+      function framesToTime(fr, fps) {
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return fr / fps;
+      }
+
+      function timeToFrames(t, fps) {
+        if (!t && t !== 0) {
+          t = time;
+        }
+
+        if (!fps) {
+          fps = elem.comp.globalData.frameRate;
+        }
+
+        return t * fps;
+      }
+
+      function seedRandom(seed) {
+        BMMath.seedrandom(randSeed + seed);
+      }
+
+      function sourceRectAtTime() {
+        return elem.sourceRectAtTime();
+      }
+
+      function substring(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substring(init);
+          }
+
+          return value.substring(init, end);
+        }
+
+        return '';
+      }
+
+      function substr(init, end) {
+        if (typeof value === 'string') {
+          if (end === undefined) {
+            return value.substr(init);
+          }
+
+          return value.substr(init, end);
+        }
+
+        return '';
+      }
+
+      function posterizeTime(framesPerSecond) {
+        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;
+        value = valueAtTime(time);
+      }
+
+      var time;
+      var velocity;
+      var value;
+      var text;
+      var textIndex;
+      var textTotal;
+      var selectorValue;
+      var index = elem.data.ind;
+      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+      var parent;
+      var randSeed = Math.floor(Math.random() * 1000000);
+      var globalData = elem.globalData;
+
+      function executeExpression(_value) {
+        // globalData.pushExpression();
+        value = _value;
+
+        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
+          return value;
+        }
+
+        if (this.propType === 'textSelector') {
+          textIndex = this.textIndex;
+          textTotal = this.textTotal;
+          selectorValue = this.selectorValue;
+        }
+
+        if (!thisLayer) {
+          text = elem.layerInterface.text;
+          thisLayer = elem.layerInterface;
+          thisComp = elem.comp.compInterface;
+          toWorld = thisLayer.toWorld.bind(thisLayer);
+          fromWorld = thisLayer.fromWorld.bind(thisLayer);
+          fromComp = thisLayer.fromComp.bind(thisLayer);
+          toComp = thisLayer.toComp.bind(thisLayer);
+          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
+          fromCompToSurface = fromComp;
+        }
+
+        if (!transform) {
+          transform = elem.layerInterface('ADBE Transform Group');
+          $bm_transform = transform;
+
+          if (transform) {
+            anchorPoint = transform.anchorPoint;
+            /* position = transform.position;
+                      rotation = transform.rotation;
+                      scale = transform.scale; */
+          }
+        }
+
+        if (elemType === 4 && !content) {
+          content = thisLayer('ADBE Root Vectors Group');
+        }
+
+        if (!effect) {
+          effect = thisLayer(4);
+        }
+
+        hasParent = !!(elem.hierarchy && elem.hierarchy.length);
+
+        if (hasParent && !parent) {
+          parent = elem.hierarchy[0].layerInterface;
+        }
+
+        time = this.comp.renderedFrame / this.comp.globalData.frameRate;
+
+        if (_needsRandom) {
+          seedRandom(randSeed + time);
+        }
+
+        if (needsVelocity) {
+          velocity = velocityAtTime(time);
+        }
+
+        expression_function();
+        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value
+        // Changed this to a ternary operation because Rollup failed compiling it correctly
+
+        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;
+        return scoped_bm_rt;
+      } // Bundlers will see these as dead code and unless we reference them
+
+
+      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
+      return executeExpression;
+    }
+
+    ob.initiateExpression = initiateExpression;
+    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
+    return ob;
+  }();
+
+  var expressionHelpers = function () {
+    function searchExpressions(elem, data, prop) {
+      if (data.x) {
+        prop.k = true;
+        prop.x = true;
+        prop.initiateExpression = ExpressionManager.initiateExpression;
+        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));
+      }
+    }
+
+    function getValueAtTime(frameNum) {
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastFrame) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
+        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
+        this._cachingAtTime.lastFrame = frameNum;
+      }
+
+      return this._cachingAtTime.value;
+    }
+
+    function getSpeedAtTime(frameNum) {
+      var delta = -0.01;
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var speed = 0;
+
+      if (v1.length) {
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          speed += Math.pow(v2[i] - v1[i], 2);
+        }
+
+        speed = Math.sqrt(speed) * 100;
+      } else {
+        speed = 0;
+      }
+
+      return speed;
+    }
+
+    function getVelocityAtTime(frameNum) {
+      if (this.vel !== undefined) {
+        return this.vel;
+      }
+
+      var delta = -0.001; // frameNum += this.elem.data.st;
+
+      var v1 = this.getValueAtTime(frameNum);
+      var v2 = this.getValueAtTime(frameNum + delta);
+      var velocity;
+
+      if (v1.length) {
+        velocity = createTypedArray('float32', v1.length);
+        var i;
+
+        for (i = 0; i < v1.length; i += 1) {
+          // removing frameRate
+          // if needed, don't add it here
+          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
+          velocity[i] = (v2[i] - v1[i]) / delta;
+        }
+      } else {
+        velocity = (v2 - v1) / delta;
+      }
+
+      return velocity;
+    }
+
+    function getStaticValueAtTime() {
+      return this.pv;
+    }
+
+    function setGroupProperty(propertyGroup) {
+      this.propertyGroup = propertyGroup;
+    }
+
+    return {
+      searchExpressions: searchExpressions,
+      getSpeedAtTime: getSpeedAtTime,
+      getVelocityAtTime: getVelocityAtTime,
+      getValueAtTime: getValueAtTime,
+      getStaticValueAtTime: getStaticValueAtTime,
+      setGroupProperty: setGroupProperty
+    };
+  }();
+
+  function addPropertyDecorator() {
+    function loopOut(type, duration, durationFlag) {
+      if (!this.k || !this.keyframes) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var lastKeyFrame = keyframes[keyframes.length - 1].t;
+
+      if (currentFrame <= lastKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var firstKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);
+        } else {
+          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);
+        }
+
+        firstKeyFrame = lastKeyFrame - cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (iterations % 2 !== 0) {
+          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+
+        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = (endV[i] - initV[i]) * repeats + current[i];
+          }
+
+          return ret;
+        }
+
+        return (endV - initV) * repeats + current;
+      } else if (type === 'continue') {
+        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(lastValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line
+          }
+
+          return ret;
+        }
+
+        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);
+      }
+
+      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function loopIn(type, duration, durationFlag) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      type = type ? type.toLowerCase() : '';
+      var currentFrame = this.comp.renderedFrame;
+      var keyframes = this.keyframes;
+      var firstKeyFrame = keyframes[0].t;
+
+      if (currentFrame >= firstKeyFrame) {
+        return this.pv;
+      }
+
+      var cycleDuration;
+      var lastKeyFrame;
+
+      if (!durationFlag) {
+        if (!duration || duration > keyframes.length - 1) {
+          duration = keyframes.length - 1;
+        }
+
+        lastKeyFrame = keyframes[duration].t;
+        cycleDuration = lastKeyFrame - firstKeyFrame;
+      } else {
+        if (!duration) {
+          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);
+        } else {
+          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);
+        }
+
+        lastKeyFrame = firstKeyFrame + cycleDuration;
+      }
+
+      var i;
+      var len;
+      var ret;
+
+      if (type === 'pingpong') {
+        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);
+
+        if (iterations % 2 === 0) {
+          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+        }
+      } else if (type === 'offset') {
+        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);
+        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;
+
+        if (this.pv.length) {
+          ret = new Array(initV.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;
+          }
+
+          return ret;
+        }
+
+        return current - (endV - initV) * repeats;
+      } else if (type === 'continue') {
+        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
+
+        if (this.pv.length) {
+          ret = new Array(firstValue.length);
+          len = ret.length;
+
+          for (i = 0; i < len; i += 1) {
+            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;
+          }
+
+          return ret;
+        }
+
+        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;
+      }
+
+      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line
+    }
+
+    function smooth(width, samples) {
+      if (!this.k) {
+        return this.pv;
+      }
+
+      width = (width || 0.4) * 0.5;
+      samples = Math.floor(samples || 5);
+
+      if (samples <= 1) {
+        return this.pv;
+      }
+
+      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
+      var initFrame = currentTime - width;
+      var endFrame = currentTime + width;
+      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
+      var i = 0;
+      var j = 0;
+      var value;
+
+      if (this.pv.length) {
+        value = createTypedArray('float32', this.pv.length);
+      } else {
+        value = 0;
+      }
+
+      var sampleValue;
+
+      while (i < samples) {
+        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
+
+        if (this.pv.length) {
+          for (j = 0; j < this.pv.length; j += 1) {
+            value[j] += sampleValue[j];
+          }
+        } else {
+          value += sampleValue;
+        }
+
+        i += 1;
+      }
+
+      if (this.pv.length) {
+        for (j = 0; j < this.pv.length; j += 1) {
+          value[j] /= samples;
+        }
+      } else {
+        value /= samples;
+      }
+
+      return value;
+    }
+
+    function getTransformValueAtTime(time) {
+      if (!this._transformCachingAtTime) {
+        this._transformCachingAtTime = {
+          v: new Matrix()
+        };
+      } /// /
+
+
+      var matrix = this._transformCachingAtTime.v;
+      matrix.cloneFromProps(this.pre.props);
+
+      if (this.appliedTransformations < 1) {
+        var anchor = this.a.getValueAtTime(time);
+        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);
+      }
+
+      if (this.appliedTransformations < 2) {
+        var scale = this.s.getValueAtTime(time);
+        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);
+      }
+
+      if (this.sk && this.appliedTransformations < 3) {
+        var skew = this.sk.getValueAtTime(time);
+        var skewAxis = this.sa.getValueAtTime(time);
+        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);
+      }
+
+      if (this.r && this.appliedTransformations < 4) {
+        var rotation = this.r.getValueAtTime(time);
+        matrix.rotate(-rotation * this.r.mult);
+      } else if (!this.r && this.appliedTransformations < 4) {
+        var rotationZ = this.rz.getValueAtTime(time);
+        var rotationY = this.ry.getValueAtTime(time);
+        var rotationX = this.rx.getValueAtTime(time);
+        var orientation = this.or.getValueAtTime(time);
+        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);
+      }
+
+      if (this.data.p && this.data.p.s) {
+        var positionX = this.px.getValueAtTime(time);
+        var positionY = this.py.getValueAtTime(time);
+
+        if (this.data.p.z) {
+          var positionZ = this.pz.getValueAtTime(time);
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);
+        } else {
+          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);
+        }
+      } else {
+        var position = this.p.getValueAtTime(time);
+        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);
+      }
+
+      return matrix; /// /
+    }
+
+    function getTransformStaticValueAtTime() {
+      return this.v.clone(new Matrix());
+    }
+
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+
+    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {
+      var prop = getTransformProperty(elem, data, container);
+
+      if (prop.dynamicProperties.length) {
+        prop.getValueAtTime = getTransformValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      return prop;
+    };
+
+    var propertyGetProp = PropertyFactory.getProp;
+
+    PropertyFactory.getProp = function (elem, data, type, mult, container) {
+      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;
+      // prop.loopOut = loopOut;
+      // prop.loopIn = loopIn;
+
+      if (prop.kf) {
+        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
+      } else {
+        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
+      }
+
+      prop.setGroupProperty = expressionHelpers.setGroupProperty;
+      prop.loopOut = loopOut;
+      prop.loopIn = loopIn;
+      prop.smooth = smooth;
+      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
+      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
+      prop.numKeys = data.a === 1 ? data.k.length : 0;
+      prop.propertyIndex = data.ix;
+      var value = 0;
+
+      if (type !== 0) {
+        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);
+      }
+
+      prop._cachingAtTime = {
+        lastFrame: initialDefaultFrame,
+        lastIndex: 0,
+        value: value
+      };
+      expressionHelpers.searchExpressions(elem, data, prop);
+
+      if (prop.k) {
+        container.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+
+    function getShapeValueAtTime(frameNum) {
+      // For now this caching object is created only when needed instead of creating it when the shape is initialized.
+      if (!this._cachingAtTime) {
+        this._cachingAtTime = {
+          shapeValue: shapePool.clone(this.pv),
+          lastIndex: 0,
+          lastTime: initialDefaultFrame
+        };
+      }
+
+      frameNum *= this.elem.globalData.frameRate;
+      frameNum -= this.offsetTime;
+
+      if (frameNum !== this._cachingAtTime.lastTime) {
+        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
+        this._cachingAtTime.lastTime = frameNum;
+        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
+      }
+
+      return this._cachingAtTime.shapeValue;
+    }
+
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
+
+    function ShapeExpressions() {}
+
+    ShapeExpressions.prototype = {
+      vertices: function vertices(prop, time) {
+        if (this.k) {
+          this.getValue();
+        }
+
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        var i;
+        var len = shapePath._length;
+        var vertices = shapePath[prop];
+        var points = shapePath.v;
+        var arr = createSizedArray(len);
+
+        for (i = 0; i < len; i += 1) {
+          if (prop === 'i' || prop === 'o') {
+            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
+          } else {
+            arr[i] = [vertices[i][0], vertices[i][1]];
+          }
+        }
+
+        return arr;
+      },
+      points: function points(time) {
+        return this.vertices('v', time);
+      },
+      inTangents: function inTangents(time) {
+        return this.vertices('i', time);
+      },
+      outTangents: function outTangents(time) {
+        return this.vertices('o', time);
+      },
+      isClosed: function isClosed() {
+        return this.v.c;
+      },
+      pointOnPath: function pointOnPath(perc, time) {
+        var shapePath = this.v;
+
+        if (time !== undefined) {
+          shapePath = this.getValueAtTime(time, 0);
+        }
+
+        if (!this._segmentsLength) {
+          this._segmentsLength = bez.getSegmentsLength(shapePath);
+        }
+
+        var segmentsLength = this._segmentsLength;
+        var lengths = segmentsLength.lengths;
+        var lengthPos = segmentsLength.totalLength * perc;
+        var i = 0;
+        var len = lengths.length;
+        var accumulatedLength = 0;
+        var pt;
+
+        while (i < len) {
+          if (accumulatedLength + lengths[i].addedLength > lengthPos) {
+            var initIndex = i;
+            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;
+            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;
+            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
+            break;
+          } else {
+            accumulatedLength += lengths[i].addedLength;
+          }
+
+          i += 1;
+        }
+
+        if (!pt) {
+          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];
+        }
+
+        return pt;
+      },
+      vectorOnPath: function vectorOnPath(perc, time, vectorType) {
+        // perc doesn't use triple equality because it can be a Number object as well as a primitive.
+        if (perc == 1) {
+          // eslint-disable-line eqeqeq
+          perc = this.v.c;
+        } else if (perc == 0) {
+          // eslint-disable-line eqeqeq
+          perc = 0.999;
+        }
+
+        var pt1 = this.pointOnPath(perc, time);
+        var pt2 = this.pointOnPath(perc + 0.001, time);
+        var xLength = pt2[0] - pt1[0];
+        var yLength = pt2[1] - pt1[1];
+        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));
+
+        if (magnitude === 0) {
+          return [0, 0];
+        }
+
+        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];
+        return unitVector;
+      },
+      tangentOnPath: function tangentOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'tangent');
+      },
+      normalOnPath: function normalOnPath(perc, time) {
+        return this.vectorOnPath(perc, time, 'normal');
+      },
+      setGroupProperty: expressionHelpers.setGroupProperty,
+      getValueAtTime: expressionHelpers.getStaticValueAtTime
+    };
+    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
+    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+
+    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {
+      var prop = propertyGetShapeProp(elem, data, type, arr, trims);
+      prop.propertyIndex = data.ix;
+      prop.lock = false;
+
+      if (type === 3) {
+        expressionHelpers.searchExpressions(elem, data.pt, prop);
+      } else if (type === 4) {
+        expressionHelpers.searchExpressions(elem, data.ks, prop);
+      }
+
+      if (prop.k) {
+        elem.addDynamicProperty(prop);
+      }
+
+      return prop;
+    };
+  }
+
+  function initialize$1() {
+    addPropertyDecorator();
+  }
+
+  function addDecorator() {
+    function searchExpressions() {
+      if (this.data.d.x) {
+        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
+        this.addEffect(this.getExpressionValue.bind(this));
+        return true;
+      }
+
+      return null;
+    }
+
+    TextProperty.prototype.getExpressionValue = function (currentValue, text) {
+      var newValue = this.calculateExpression(text);
+
+      if (currentValue.t !== newValue) {
+        var newData = {};
+        this.copyData(newData, currentValue);
+        newData.t = newValue.toString();
+        newData.__complete = false;
+        return newData;
+      }
+
+      return currentValue;
+    };
+
+    TextProperty.prototype.searchProperty = function () {
+      var isKeyframed = this.searchKeyframes();
+      var hasExpressions = this.searchExpressions();
+      this.kf = isKeyframed || hasExpressions;
+      return this.kf;
+    };
+
+    TextProperty.prototype.searchExpressions = searchExpressions;
+  }
+
+  function initialize() {
+    addDecorator();
+  }
+
+  registerRenderer('canvas', CanvasRenderer);
+  registerRenderer('html', HybridRenderer);
+  registerRenderer('svg', SVGRenderer); // Registering shape modifiers
+
+  ShapeModifiers.registerModifier('tm', TrimModifier);
+  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+  ShapeModifiers.registerModifier('rp', RepeaterModifier);
+  ShapeModifiers.registerModifier('rd', RoundCornersModifier); // Registering expression plugin
+
+  setExpressionsPlugin(Expressions);
+  initialize$1();
+  initialize(); // Registering svg effects
+
+  registerEffect(20, SVGTintFilter, true);
+  registerEffect(21, SVGFillFilter, true);
+  registerEffect(22, SVGStrokeEffect, false);
+  registerEffect(23, SVGTritoneFilter, true);
+  registerEffect(24, SVGProLevelsFilter, true);
+  registerEffect(25, SVGDropShadowEffect, true);
+  registerEffect(28, SVGMatte3Effect, false);
+  registerEffect(29, SVGGaussianBlurEffect, true);
+
+  return lottie;
+
+}));
+
+
 
     function addElementToList(element, list) {
       list.push(element);
@@ -15188,7 +18738,7 @@
         var ctx = canvas.getContext('2d');
         params.rendererSettings.context = ctx;
       }
-      animation = animationManager.loadAnimation(params);
+      animation = lottie.loadAnimation(params);
       animation.addEventListener('error', function (error) {
         console.log(error); // eslint-disable-line
       });
@@ -15241,56 +18791,9 @@
       animations[payload.id] = animation;
     }
 
-    function setQuality(value) {
-      if (typeof value === 'string') {
-        switch (value) {
-          case 'high':
-            defaultCurveSegments = 200;
-            break;
-          case 'medium':
-            defaultCurveSegments = 50;
-            break;
-          case 'low':
-          default:
-            defaultCurveSegments = 10;
-            break;
-        }
-      } else if (!isNaN(value) && value > 1) {
-        defaultCurveSegments = value;
-      }
-      if (defaultCurveSegments >= 50) {
-        roundValues(false);
-      } else {
-        roundValues(true);
-      }
-    }
-
-    function setIDPrefix(prefix) {
-      idPrefix = prefix;
-    }
-
-    lottiejs.play = animationManager.play;
-    lottiejs.pause = animationManager.pause;
-    lottiejs.togglePause = animationManager.togglePause;
-    lottiejs.setSpeed = animationManager.setSpeed;
-    lottiejs.setDirection = animationManager.setDirection;
-    lottiejs.stop = animationManager.stop;
-    lottiejs.registerAnimation = animationManager.registerAnimation;
-    lottiejs.loadAnimation = loadAnimation;
-    lottiejs.resize = animationManager.resize;
-    lottiejs.goToAndStop = animationManager.goToAndStop;
-    lottiejs.destroy = animationManager.destroy;
-    lottiejs.setQuality = setQuality;
-    lottiejs.freeze = animationManager.freeze;
-    lottiejs.unfreeze = animationManager.unfreeze;
-    lottiejs.setVolume = animationManager.setVolume;
-    lottiejs.mute = animationManager.mute;
-    lottiejs.unmute = animationManager.unmute;
-    lottiejs.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-    lottiejs.setIDPrefix = setIDPrefix;
-    lottiejs.version = '5.8.1';
-
-    return lottiejs;
+    return {
+      loadAnimation: loadAnimation,
+    };
   }({}));
   onmessage = function (evt) {
     var data = evt.data;
diff --git a/build/player/lottie_worker.min.js b/build/player/lottie_worker.min.js
index 0bb178b..c4c4637 100644
--- a/build/player/lottie_worker.min.js
+++ b/build/player/lottie_worker.min.js
@@ -10,6 +10,6 @@
         root.bodymovin = root.lottie;
     }
 }((self || {}), function(window) {
-	function workerContent(){var localIdCounter=0,animations={},styleProperties=["width","height","display","transform","opacity","contentVisibility"];function createElement(t,e){var r={serialize:function(){for(var t={},e=0;e<styleProperties.length;e+=1){var r=styleProperties[e],i="_"+r;i in this&&(t[r]=this[i])}return t}};styleProperties.forEach(function(e){Object.defineProperty(r,e,{set:function(t){i._isDirty||(i._isDirty=!0),i._changedStyles.push(e),this["_"+e]=t},get:function(){return this["_"+e]}})});var i={_state:"init",_isDirty:!1,_changedStyles:[],_changedAttributes:[],_changedElements:[],type:e,namespace:t,children:[],attributes:{id:"l_d_"+(localIdCounter+=1)},style:r,appendChild:function(t){(t.parentNode=this).children.push(t),this._isDirty=!0,this._changedElements.push([t,this.attributes.id])},insertBefore:function(t,e){for(var r=this.children,i=0;i<r.length;i+=1)if(r[i]===e)return r.splice(i,0,t),this._isDirty=!0,void this._changedElements.push([t,this.attributes.id,e.attributes.id]);r.push(e)},setAttribute:function(t,e){this.attributes[t]=e,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(t)},serialize:function(){return{type:this.type,namespace:this.namespace,style:this.style.serialize(),attributes:this.attributes,children:this.children.map(function(t){return t.serialize()})}},getContext:function(){return{fillRect:function(){}}},addEventListener:function(t,e){setTimeout(e,1)},setAttributeNS:function(t,e,r){this.attributes[e]=r,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(e)}};return i.style=r,i}var window=self,document={createElementNS:function(t,e){return createElement(t,e)},createElement:function(t){return createElement("",t)}},lottieInternal=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,_useWebWorker=!1,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bmRnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}roundValues(!1);var createElementID=(fa=0,function(){return idPrefix+"__lottie_element_"+(fa+=1)}),fa;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function createNS(t){return document.createElementNS(svgNS,t)}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var getBlendMode=(pb={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return pb[t]||""}),pb,lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"},Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],P=y[3],S=y[4],E=y[5],A=y[6],x=y[7],_=y[8],C=y[9],T=y[10],k=y[11],M=y[12],D=y[13],F=y[14],I=y[15];return y[0]=g*t+v*s+b*h+P*m,y[1]=g*e+v*a+b*l+P*c,y[2]=g*r+v*n+b*p+P*d,y[3]=g*i+v*o+b*f+P*u,y[4]=S*t+E*s+A*h+x*m,y[5]=S*e+E*a+A*l+x*c,y[6]=S*r+E*n+A*p+x*d,y[7]=S*i+E*o+A*f+x*u,y[8]=_*t+C*s+T*h+k*m,y[9]=_*e+C*a+T*l+k*c,y[10]=_*r+C*n+T*p+k*d,y[11]=_*i+C*o+T*f+k*u,y[12]=M*t+D*s+F*h+I*m,y[13]=M*e+D*a+F*l+I*c,y[14]=M*r+D*n+F*p+I*d,y[15]=M*i+D*o+F*f+I*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function P(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function S(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function E(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function A(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function x(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function _(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function C(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=_(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function k(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function M(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function D(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=S,this.applyToY=E,this.applyToZ=A,this.applyToPointArray=k,this.applyToTriplePoints=T,this.applyToPointStringified=M,this.toCSS=D,this.to2dCSS=I,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=C,this.inversePoint=_,this.getInverseMatrix=x,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var l,p=this,f=256,m=6,c="random",d=h.pow(f,m),u=h.pow(2,52),y=2*u,g=f-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<f;)a[i]=i++;for(i=0;i<f;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*f+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function P(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return S(e)}function S(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=P(function t(e,r){var i,s=[],a=typeof e;if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,S(o)]:null===t?function(){try{if(l)return S(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),S(t)}catch(t){var e=p.navigator,r=e&&e.plugins;return[+new Date,p,r,p.screen,S(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(m),e=d,r=0;t<u;)t=(t+r)*f,e*=f,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,P(S(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&b(i,a),t.state=function(){return b(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},P(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function f(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function m(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:f(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<l;++r)this._mSampleValues[r]=f(r*p,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&i[a]<=t;++a)s+=p;var o=s+(t-i[--a])/(i[a+1]-i[a])*p,h=m(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=m(e,r,i);if(0===a)return e;e-=(f(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=f(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,r)}},t}();function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){var M=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var p=function(t,e,r,i){var s,a,n,o,h,l,p=defaultCurveSegments,f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=f}return d.addedLength=f,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[s]){var a,n,o,h,l,p,f,m=defaultCurveSegments,c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(m=2);var u=new g(m);for(o=r.length,a=0;a<m;a+=1){for(f=createSizedArray(o),l=a/(m-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+r[n])+3*(1-l)*bmPow(l,2)*(e[n]+i[n])+bmPow(l,3)*e[n],f[n]=h,null!==d&&(p+=bmPow(f[n]-d[n],2));c+=p=bmSqrt(p),u.points[a]=new v(p,f),d=f}u.segmentLength=c,b[s]=u}return b[s]});function D(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var F=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),r.totalLength=l,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=D(s,n),l=D(a=1<a?1:a,n),p=t.length,f=1-h,m=1-l,c=f*f*f,d=h*f*f*3,u=h*h*f*3,y=h*h*h,g=f*f*m,v=h*f*m+f*h*m+f*f*l,b=h*h*m+f*h*l+h*f*l,P=h*h*l,S=f*m*m,E=h*m*m+f*l*m+f*m*l,A=h*l*m+f*l*l+h*m*l,x=h*l*l,_=m*m*m,C=l*m*m+m*l*m+m*m*l,T=l*l*m+m*l*l+l*m*l,k=l*l*l;for(o=0;o<p;o+=1)F[4*o]=M.round(1e3*(c*t[o]+d*r[o]+u*i[o]+y*e[o]))/1e3,F[4*o+1]=M.round(1e3*(g*t[o]+v*r[o]+b*i[o]+P*e[o]))/1e3,F[4*o+2]=M.round(1e3*(S*t[o]+E*r[o]+A*i[o]+x*e[o]))/1e3,F[4*o+3]=M.round(1e3*(_*t[o]+C*r[o]+T*i[o]+k*e[o]))/1e3;return F},getPointInSegment:function(t,e,r,i,s,a){var n=D(s,a),o=1-n;return[M.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,M.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var l,p=M.sqrt(M.pow(i-t,2)+M.pow(s-e,2)+M.pow(a-r,2)),f=M.sqrt(M.pow(n-t,2)+M.pow(o-e,2)+M.pow(h-r,2)),m=M.sqrt(M.pow(n-i,2)+M.pow(o-s,2)+M.pow(h-a,2));return-1e-4<(l=f<p?m<p?p-f-m:m-f-p:f<m?m-f-p:f-p-m)&&l<1e-4}}}!function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-s)),i=setTimeout(function(){t(e+r)},r);return s=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&_useWebWorker){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function f(t,e){var r,i,s,a,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var p=r.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)d(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&d(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&d(p[s].pt.k[n].e[0])}0===r.ty?(r.layers=m(r.refId,e),f(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0!==(h=r).t.a.length||"m"in h.t.p||(h.singleShape=!0))}}function m(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}return null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&d(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&d(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var h,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,r,i,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(i=(a=t.chars[e].data.shapes[0].it).length,r=0;r<i;r+=1)(s=a[r].ks.k).__converted||(d(a[r].ks.k),s.__converted=!0)}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),s=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,4,18];function l(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={completeData:function(t){t.__complete||(s(t),e(t),r(t),i(t),a(t),f(t.layers,t.assets),t.__complete=!0)}};return t.checkColors=s,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=a,t.completeLayers=f,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}();function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}var FontManager=function(){var a={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function m(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=m(i[r].fFamily,"monospace"),i[r].sansCase=m(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.setAttribute("f-family",i[r].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(l)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.type="text/css",p.rel="stylesheet",p.href=i[r].fPath,document.body.appendChild(p)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var f=createTag("link");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[r].fPath),e.appendChild(f)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}(),PropertyFactory=function(){var f=initialDefaultFrame,s=Math.abs;function m(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,b,P,S,E,A,x,_,C,T=a.t-i,k=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var M=n.bezierData;if(T<=t||t<k){var D=T<=t?M.points.length-1:0;for(h=M.points[D].point.length,o=0;o<h;o+=1)r[o]=M.points[D].point[o]}else{n.__fnct?m=n.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=m),l=m((t-k)/(T-k));var F,I=M.segmentLength*l,w=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,p=M.points.length;y;){if(w+=M.points[f].partialLength,0===I||0===l||f===M.points.length-1){for(h=M.points[f].point.length,o=0;o<h;o+=1)r[o]=M.points[f].point[o];break}if(w<=I&&I<w+M.points[f+1].partialLength){for(F=(I-w)/M.points[f+1].partialLength,h=M.points[f].point.length,o=0;o<h;o+=1)r[o]=M.points[f].point[o]+(M.points[f+1].point[o]-M.points[f].point[o])*F;break}f<p-1?f+=1:y=!1}e._lastPoint=f,e._lastAddedLength=w-M.points[f].partialLength,e._lastKeyframeIndex=d}}else{var V,R,L,G,B;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(T<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=k)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var O=z(s.s),N=z(g);v=r,b=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(O,N,(t-k)/(T-k)),P=b[0],S=b[1],E=b[2],A=b[3],x=Math.atan2(2*S*A-2*P*E,1-2*S*S-2*E*E),_=Math.asin(2*P*S+2*E*A),C=Math.atan2(2*P*A-2*S*E,1-2*P*P-2*E*E),v[0]=x/degToRads,v[1]=_/degToRads,v[2]=C/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(l=T<=t?1:t<k?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?m=n.__fnct[d]:(V=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],R=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],L=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],G=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],m=BezierFactory.getBezierEasing(V,R,L,G).get,n.__fnct[d]=m)):n.__fnct?m=n.__fnct:(V=s.o.x,R=s.o.y,L=s.i.x,G=s.i.y,m=BezierFactory.getBezierEasing(V,R,L,G).get,s.keyframeMetadata=m),m((t-k)/(T-k)))),g=a.s||s.e,B=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*l,"multidimensional"===this.propType?r[d]=B:r=B}return e.lastIndex=c,r}function z(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=f,this.pv[s]=f;this._caching={lastFrame:f,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new l(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var P;y.__fnct?P=y.__fnct:(P=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=P),p=P((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?l:p,i=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var f={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new p(t,e):6===r?i=new h(t,e):7===r&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return f}(),ShapeModifiers=(Vt={},Wt={},Vt.registerModifier=function(t,e){Wt[t]||(Wt[t]=e)},Vt.getModifier=function(t,e,r){return new Wt[t](e,r)},Vt),Vt,Wt;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<m;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,P=0;for(s=m-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<m?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var S=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var E=S.pop();this.addPaths(S,u),S=this.addShapes(d,y[1],E)}else this.addPaths(S,u),S=this.addShapes(d,y[1]);this.addPaths(S,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),u.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,a=m[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,f=u=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,f=t.i[a][1]+(i[1]-t.i[a][1])*-r,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=0<m?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(0<m){for(;P<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),P+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),P+=c)}else if(m<0){for(;d<P;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];P+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}(),featureSupport=(mz={maskType:!0},(/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))&&(mz.maskType=!1),mz),mz,filtersFactory=(nz={},nz.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},nz.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},nz),nz;function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,f,m,c,d,u,y,g,v,b,P,S=this._moreOptions.alignment.v,E=this._animatorsData,A=this._textData,x=this.mHelper,_=this._renderType,C=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var k,M=P.v;for(this._pathData.r.v&&(M=M.reverse()),n={tLength:0,segments:[]},a=M._length-1,s=g=0;s<a;s+=1)k=bez.buildBezierData(M.v[s],M.v[s+1],[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],[M.i[s+1][0]-M.v[s+1][0],M.i[s+1][1]-M.v[s+1][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength;s=a,P.v.c&&(k=bez.buildBezierData(M.v[s],M.v[0],[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=1,p=!(l=m=0),u=n.segments,o<0&&P.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}a=T.length,i=r=0;var D,F,I,w,V,R=1.2*t.finalSize*.714,L=!0;I=E.length;var G,B,O,N,z,j,q,H,W,Y,X,K,$=-1,J=o,Z=m,U=f,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(F=0;F<I;F+=1)(D=E[F].a).t.propType&&(nt&&2===t.j&&(it+=D.t.v*st),(V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars)).length?rt+=D.t.v*V[0]*st:rt+=D.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(x.reset(),N=1,T[s].n)r=0,i+=t.yOffset,i+=L?1:0,o=J,L=!1,this._hasMaskedPath&&(f=U,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),K=W=X=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}$!==T[s].ind&&(T[$]&&(o+=T[$].extra),o+=T[s].an/2,$=T[s].ind),o+=S[0]*T[s].an*.005;var ot=0;for(F=0;F<I;F+=1)(D=E[F].a).p.propType&&((V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars)).length?ot+=D.p.v[0]*V[0]:ot+=D.p.v[0]*V),D.a.propType&&((V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars)).length?ot+=D.a.v[0]*V[0]:ot+=D.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*$/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,B=c.point[0]+(h.point[0]-c.point[0])*v,O=c.point[1]+(h.point[1]-c.point[1])*v,x.translate(-S[0]*T[s].an*.005,-S[1]*R*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,d=u[m+=1]?u[m].points:P.v.c?u[m=f=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[f]).partialLength));G=T[s].an/2-T[s].add,x.translate(-G,0,0)}else G=T[s].an/2-T[s].add,x.translate(-G,0,0),x.translate(-S[0]*T[s].an*.005,-S[1]*R*.01,0);for(F=0;F<I;F+=1)(D=E[F].a).t.propType&&(V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=D.t.v*V[0]:o+=D.t.v*V:V.length?r+=D.t.v*V[0]:r+=D.t.v*V));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(z=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(q=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<I;F+=1)(D=E[F].a).a.propType&&((V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars)).length?x.translate(-D.a.v[0]*V[0],-D.a.v[1]*V[1],D.a.v[2]*V[2]):x.translate(-D.a.v[0]*V,-D.a.v[1]*V,D.a.v[2]*V));for(F=0;F<I;F+=1)(D=E[F].a).s.propType&&((V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars)).length?x.scale(1+(D.s.v[0]-1)*V[0],1+(D.s.v[1]-1)*V[1],1):x.scale(1+(D.s.v[0]-1)*V,1+(D.s.v[1]-1)*V,1));for(F=0;F<I;F+=1){if(D=E[F].a,V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars),D.sk.propType&&(V.length?x.skewFromAxis(-D.sk.v*V[0],D.sa.v*V[1]):x.skewFromAxis(-D.sk.v*V,D.sa.v*V)),D.r.propType&&(V.length?x.rotateZ(-D.r.v*V[2]):x.rotateZ(-D.r.v*V)),D.ry.propType&&(V.length?x.rotateY(D.ry.v*V[1]):x.rotateY(D.ry.v*V)),D.rx.propType&&(V.length?x.rotateX(D.rx.v*V[0]):x.rotateX(D.rx.v*V)),D.o.propType&&(V.length?N+=(D.o.v*V[0]-N)*V[0]:N+=(D.o.v*V-N)*V),t.strokeWidthAnim&&D.sw.propType&&(V.length?j+=D.sw.v*V[0]:j+=D.sw.v*V),t.strokeColorAnim&&D.sc.propType)for(H=0;H<3;H+=1)V.length?z[H]+=(D.sc.v[H]-z[H])*V[0]:z[H]+=(D.sc.v[H]-z[H])*V;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(H=0;H<3;H+=1)V.length?q[H]+=(D.fc.v[H]-q[H])*V[0]:q[H]+=(D.fc.v[H]-q[H])*V;D.fh.propType&&(q=V.length?addHueToRGB(q,D.fh.v*V[0]):addHueToRGB(q,D.fh.v*V)),D.fs.propType&&(q=V.length?addSaturationToRGB(q,D.fs.v*V[0]):addSaturationToRGB(q,D.fs.v*V)),D.fb.propType&&(q=V.length?addBrightnessToRGB(q,D.fb.v*V[0]):addBrightnessToRGB(q,D.fb.v*V))}}for(F=0;F<I;F+=1)(D=E[F].a).p.propType&&(V=E[F].s.getMult(T[s].anIndexes[F],A.a[F].s.totalChars),this._hasMaskedPath?V.length?x.translate(0,D.p.v[1]*V[0],-D.p.v[2]*V[1]):x.translate(0,D.p.v[1]*V,-D.p.v[2]*V):V.length?x.translate(D.p.v[0]*V[0],D.p.v[1]*V[1],-D.p.v[2]*V[2]):x.translate(D.p.v[0]*V,D.p.v[1]*V,-D.p.v[2]*V));if(t.strokeWidthAnim&&(W=j<0?0:j),t.strokeColorAnim&&(Y="rgb("+Math.round(255*z[0])+","+Math.round(255*z[1])+","+Math.round(255*z[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*q[0])+","+Math.round(255*q[1])+","+Math.round(255*q[2])+")"),this._hasMaskedPath){if(x.translate(0,-t.ls),x.translate(0,S[1]*R*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),x.rotate(-ht*Math.PI/180)}x.translate(B,O,0),o-=S[0]*T[s].an*.005,T[s+1]&&$!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(x.translate(r,i,0),t.ps&&x.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:x.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:x.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}x.translate(0,-t.ls),x.translate(G,0,0),x.translate(S[0]*T[s].an*.005,S[1]*R*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===_?tt=x.toCSS():"svg"===_?tt=x.to2dCSS():et=[x.props[0],x.props[1],x.props[2],x.props[3],x.props[4],x.props[5],x.props[6],x.props[7],x.props[8],x.props[9],x.props[10],x.props[11],x.props[12],x.props[13],x.props[14],x.props[15]],K=N}this.lettersChangedFlag=C<=s?(w=new LetterProps(K,W,Y,X,tt,et),this.renderedLetters.push(w),C+=1,!0):(w=this.renderedLetters[s]).update(K,W,Y,X,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,S=getFontProperties(b);t.fWeight=S.weight,t.fStyle=S.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var E,A=t.tr/1e3*t.finalSize;if(t.sz)for(var x,_,C=!0,T=t.sz[0],k=t.sz[1];C;){g=x=0,r=(_=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var M=-1;for(e=0;e<r;e+=1)E=_[e].charCodeAt(0),i=!1," "===_[e]?M=e:13!==E&&3!==E||(i=!(g=0),x+=t.finalLineHeight||1.2*t.finalSize),T<g+(P=h.chars?(o=h.getCharData(_[e],b.fStyle,b.fFamily),i?0:o.w*t.finalSize/100):h.measureText(_[e],t.f,t.finalSize))&&" "!==_[e]?(-1===M?r+=1:e=M,x+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,M===e?1:0,"\r"),M=-1,g=0):(g+=P,g+=A);x+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&k<x?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=_,r=t.finalText.length,C=!1)}g=-A;var D,F=P=0;for(e=0;e<r;e+=1)if(i=!1,13===(E=(D=t.finalText[e]).charCodeAt(0))||3===E?(F=0,y.push(g),v=v<g?g:v,g=-2*A,i=!(s=""),u+=1):s=D,P=h.chars?(o=h.getCharData(D,b.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===D?F+=P+A:(g+=P+A+F,F=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=P,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===s||e===r-1){for(""===s&&(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var I,w,V,R,L=l.a;n=L.length;var G=[];for(a=0;a<n;a+=1){for((I=L[a]).a.sc&&(t.strokeColorAnim=!0),I.a.sw&&(t.strokeWidthAnim=!0),(I.a.fc||I.a.fh||I.a.fs||I.a.fb)&&(t.fillColorAnim=!0),R=0,V=I.s.b,e=0;e<r;e+=1)(w=p[e]).anIndexes[a]=R,(1==V&&""!==w.val||2==V&&""!==w.val&&" "!==w.val||3==V&&(w.n||" "==w.val||e==r-1)||4==V&&(w.n||e==r-1))&&(1===I.s.rn&&G.push(R),R+=1);l.a[a].s.totalChars=R;var B,O=-1;if(1===I.s.rn)for(e=0;e<r;e+=1)O!=(w=p[e]).anIndexes[a]&&(O=w.anIndexes[a],B=G.splice(Math.floor(Math.random()*G.length),1)[0]),w.anIndexes[a]=B}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,f=-p/2+(t=y(u(0,t+.5-o),h-o)),m=p/2;n=Math.sqrt(1-f*f/(m*m))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}(),poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},pointPool=poolFactory(8,function(){return createTypedArray("float32",2)}),shapePool=(nD=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),nD.clone=function(t){var e,r=nD.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},nD),nD,shapeCollectionPool=(vD={newShapeCollection:function(){var t;t=wD?yD[wD-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,wD===xD&&(yD=pooling.double(yD),xD*=2);yD[wD]=t,wD+=1}},wD=0,xD=4,yD=createSizedArray(xD),vD),vD,wD,xD,yD,segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}),bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}),markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}();function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):m=f=null,this.storedData[i]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var P=createNS("g");for(o=0;o<h;o+=1)P.appendChild(u[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+d),S.appendChild(s),a.appendChild(S),P.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(P)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRenderer.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRenderer.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRenderer.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRenderer.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=r<i&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRenderer.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);(e[t]=r).initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+locationHref+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+locationHref+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function r(t,e,r){var i,s,a,n,o,h,l,p,f,m,c,d=e.styles.length,u=e.lvl;for(h=0;h<d;h+=1){if(n=e.sh._mdf||r,e.styles[h].lvl<u){for(p=g.reset(),m=u-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<m;)n=e.transformers[c].mProps._mdf||n,m-=1,c-=1;if(n)for(m=u-e.styles[h].lvl,c=e.transformers.length-1;0<m;)f=e.transformers[c].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m-=1,c-=1}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",i=0;i<s;i+=1)(o=l.shapes[i])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function i(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function s(t,e,r){a(t,e,r),n(t,e,r)}function a(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],S=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",S),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",S))}}function n(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return i;case"gf":return a;case"gs":return s;case"st":return n;case"sh":case"el":case"rc":case"sr":return r;case"tr":return e;default:return null}}}}();function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function BaseElement(){}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,r){this.initElement(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e,r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l,p=this.mHelper,f="",m=this.data.singleShape,c=0,d=0,u=!0,y=.001*r.tr*r.finalSize;if(!m||h||r.sz){var g,v,b=this.textSpans.length;for(t=0;t<e;t+=1)h&&m&&0!==t||(n=t<b?this.textSpans[t]:createNS(h?"path":"text"),b<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(r.finalSize/100,r.finalSize/100),m&&(o[t].n&&(c=-y,d+=r.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(r,p,o[t].line,c,d),c+=o[t].l||0,c+=y),h?(l=(g=(v=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily))&&v.data||{}).shapes?g.shapes[0].it:[],m?f+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(m&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));m&&n&&n.setAttribute("d",f)}else{var P=this.textContainer,S="start";switch(r.j){case 1:S="end";break;case 2:S="middle";break;default:S="start"}P.setAttribute("text-anchor",S),P.setAttribute("letter-spacing",y);var E=this.buildTextContents(r.finalText);for(e=E.length,d=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||createNS("tspan")).textContent=E[t],n.setAttribute("x",0),n.setAttribute("y",d),n.style.display="inherit",P.appendChild(n),this.textSpans[t]=n,d+=r.finalLineHeight;this.layerElement.appendChild(P)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(r=s[t],i=this.textSpans[t],r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+locationHref+"#"+r.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,f,m,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),(e[o]=f).init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+locationHref+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:l<=a?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=r).matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1)r=null,20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r);n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+locationHref+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function CVBaseElement(){}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CVEffects(){}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,l,p,f=t.length-1,m=[],c=[],d=[].concat(s);for(a=f;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),(e[a]=l).init(this,t,a,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),f=c.length,a=0;a<f;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;1<=f?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},CVEffects.prototype.renderFrame=function(){};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return m(i,t),i.setData(t,e),i}function p(){n+=1,d()}function f(){n-=1}function m(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",p),t.addEventListener("_idle",f),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),l(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(tV={},tV.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},tV),tV;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=typeof t,i=typeof e;if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=typeof t,i=typeof e;if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var l=n-o;switch(r=.5<h?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*d+c[a];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null};var ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(f(t[i],e[i],r)):"tm"===t[i].ty?s.push(m(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(d(t[i],e[i],r)):"sr"===t[i].ty?s.push(u(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(l(t[i],e[i],r)):s.push(p(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(){return function(){return null}}function f(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function m(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function f(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function m(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=p,i.applyPoint=l,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=f,i.sampleImage=m,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),FootageInterface=(f3=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"==typeof(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"==typeof(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=f3(t),e}),f3,CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function l(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(p(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function p(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(l(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TextExpressionSelectorPropFactory=function(){function r(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=r,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}TextSelectorProp.getTextSelectorProp=function(t,e,r){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,r):propertyGetTextProp(t,e,r)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}};var lottiejs={};function addElementToList(t,e){e.push(t),t._isDirty=!1,t._changedStyles.length=0,t._changedAttributes.length=0,t._changedElements.length=0,t.children.forEach(function(t){addElementToList(t,e)})}function addChangedAttributes(t){for(var e,r=t._changedAttributes,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.attributes[e]]);return i}function addChangedStyles(t){for(var e,r=t._changedStyles,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.style[e]]);return i}function addChangedElements(t,e){for(var r,i=t._changedElements,s=[],a=0;a<i.length;a+=1)r=i[a],s.push([r[0].serialize(),r[1],r[2]]),addElementToList(r[0],e);return s}function loadAnimation(a){var e,r,t=a.params,n=[];if("svg"===t.renderer)e=document.createElement("div"),t.container=e;else{var i=t.rendererSettings.canvas.getContext("2d");t.rendererSettings.context=i}(r=animationManager.loadAnimation(t)).addEventListener("error",function(t){console.log(t)}),r.onError=function(t){console.log("ERRORO",t)},"svg"===t.renderer&&(r.addEventListener("DOMLoaded",function(){var t=e.serialize();addElementToList(e,n),self.postMessage({type:"loaded",payload:{id:a.id,tree:t.children[0],totalFrames:r.totalFrames,frameRate:r.frameRate}})}),r.addEventListener("drawnFrame",function(t){for(var e,r=[],i=0;i<n.length;i+=1)if((e=n[i])._isDirty){var s={id:e.attributes.id,styles:addChangedStyles(e),attributes:addChangedAttributes(e),elements:addChangedElements(e,n)};r.push(s),e._isDirty=!1,e._changedAttributes.length=0,e._changedStyles.length=0,e._changedElements.length=0}self.postMessage({type:"updated",payload:{elements:r,id:a.id,currentTime:t.currentTime}})})),animations[a.id]=r}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":default:defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}function setIDPrefix(t){idPrefix=t}return lottiejs.play=animationManager.play,lottiejs.pause=animationManager.pause,lottiejs.togglePause=animationManager.togglePause,lottiejs.setSpeed=animationManager.setSpeed,lottiejs.setDirection=animationManager.setDirection,lottiejs.stop=animationManager.stop,lottiejs.registerAnimation=animationManager.registerAnimation,lottiejs.loadAnimation=loadAnimation,lottiejs.resize=animationManager.resize,lottiejs.goToAndStop=animationManager.goToAndStop,lottiejs.destroy=animationManager.destroy,lottiejs.setQuality=setQuality,lottiejs.freeze=animationManager.freeze,lottiejs.unfreeze=animationManager.unfreeze,lottiejs.setVolume=animationManager.setVolume,lottiejs.mute=animationManager.mute,lottiejs.unmute=animationManager.unmute,lottiejs.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottiejs.setIDPrefix=setIDPrefix,lottiejs.version="5.8.1",lottiejs}({});onmessage=function(t){var e=t.data,r=e.type,i=e.payload;"load"===r?lottieInternal.loadAnimation(i):"pause"===r?animations[i.id]&&animations[i.id].pause():"play"===r?animations[i.id]&&animations[i.id].play():"stop"===r?animations[i.id]&&animations[i.id].stop():"setSpeed"===r?animations[i.id]&&animations[i.id].setSpeed(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"goToAndPlay"===r?animations[i.id]&&animations[i.id].goToAndPlay(i.value,i.isFrame):"goToAndStop"===r?animations[i.id]&&animations[i.id].goToAndStop(i.value,i.isFrame):"setSubframe"===r?animations[i.id]&&animations[i.id].setSubframe(i.value):"addEventListener"===r?animations[i.id]&&animations[i.id].addEventListener(i.eventName,function(){self.postMessage({type:"event",payload:{id:i.id,callbackId:i.callbackId,argument:arguments[0]}})}):"destroy"===r?animations[i.id]&&(animations[i.id].destroy(),animations[i.id]=null):"resize"===r&&animations[i.id]&&animations[i.id].resize()}}function createWorker(t){var e=new Blob(["("+t.toString()+"())"],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}var lottie=function(){"use strict";var n=createWorker(workerContent),r=0,o=0,h={},l={rendererSettings:{}};function p(t,e,r,i){var s;for(var a in s="div"===t.type?document.createElement("div"):document.createElementNS(t.namespace,t.type),t.attributes)Object.prototype.hasOwnProperty.call(t.attributes,a)&&("href"===a?s.setAttributeNS("http://www.w3.org/1999/xlink",a,t.attributes[a]):s.setAttribute(a,t.attributes[a]),"id"===a&&(r[t.attributes[a]]=s));for(var n in t.style)Object.prototype.hasOwnProperty.call(t.style,n)&&(s.style[n]=t.style[n]);t.children.forEach(function(t){p(t,s,r)}),i?e.insertBefore(s,i):e.appendChild(s)}var e=function(t){var e=h[t.id];e._loaded=!0,e.pendingCallbacks.forEach(function(t){e.animInstance.addEventListener(t.eventName,t.callback),"DOMLoaded"===t.eventName&&t.callback()}),e.animInstance.totalFrames=t.totalFrames,e.animInstance.frameRate=t.frameRate;var r=e.container,i=e.elements;p(t.tree,r,i)};function f(t,e){for(var r,i=0;i<t.length;i+=1){var s,a=e[(r=t[i])[1]];if(a)r[2]&&(s=e[r[2]]),p(r[0],a,e,s),t.splice(i,1),i-=1}}function m(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.style[r[0]]=r[1]}function c(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.setAttribute(r[0],r[1])}return n.onmessage=function(t){"loaded"===t.data.type?e(t.data.payload):"updated"===t.data.type?function(t){var e=t.elements,r=h[t.id];if(r){for(var i,s=r.elements,a=0;a<e.length;a+=1){var n=s[(i=e[a]).id];f(i.elements,s),m(n,i.styles),c(n,i.attributes)}r.animInstance.currentFrame=t.currentTime}}(t.data.payload):"event"===t.data.type&&function(t){var e=h[t.id];if(e){var r=e.callbacks;r[t.callbackId]&&r[t.callbackId](t.argument)}}(t.data.payload)},{loadAnimation:function(t){var i,s="lottie_animationId_"+(r+=1),a={elements:{},callbacks:{},pendingCallbacks:[]},e={id:s,pause:function(){n.postMessage({type:"pause",payload:{id:s}})},play:function(){n.postMessage({type:"play",payload:{id:s}})},stop:function(){n.postMessage({type:"stop",payload:{id:s}})},setSpeed:function(t){n.postMessage({type:"setSpeed",payload:{id:s,value:t}})},setDirection:function(t){n.postMessage({type:"setDirection",payload:{id:s,value:t}})},goToAndStop:function(t,e){n.postMessage({type:"goToAndStop",payload:{id:s,value:t,isFrame:e}})},goToAndPlay:function(t,e){n.postMessage({type:"goToAndPlay",payload:{id:s,value:t,isFrame:e}})},setSubframe:function(t){n.postMessage({type:"setSubframe",payload:{id:s,value:t}})},addEventListener:function(t,e){if(a._loaded){var r="callback_"+(o+=1);a.callbacks[r]=e,n.postMessage({type:"addEventListener",payload:{id:s,callbackId:r,eventName:t}})}else a.pendingCallbacks.push({eventName:t,callback:e})},destroy:function(){h[s]=null,a.container&&(a.container.innerHTML=""),n.postMessage({type:"destroy",payload:{id:s}})},resize:function(){n.postMessage({type:"resize",payload:{id:s}})}};return a.animInstance=e,(i=t,new Promise(function(e,t){var r=Object.assign({},l,i);r.animType&&!r.renderer&&(r.renderer=r.animType),r.wrapper&&(r.container||(r.container=r.wrapper),delete r.wrapper),r.animationData?e(r):r.path?fetch(r.path).then(function(t){return t.json()}).then(function(t){r.animationData=t,delete r.path,e(r)}):t()})).then(function(t){var e=[];if(t.container&&(a.container=t.container,delete t.container),"canvas"===t.renderer&&!t.rendererSettings.canvas){var r=document.createElement("canvas");a.container.appendChild(r),r.width=t.animationData.w,r.height=t.animationData.h,r.style.width="100%",r.style.height="100%";var i=r.transferControlToOffscreen();e.push(i),t.rendererSettings.canvas=i}h[s]=a,n.postMessage({type:"load",payload:{params:t,id:s}},e)}),e}}}();
+	function workerContent(){var localIdCounter=0,animations={},styleProperties=["width","height","display","transform","opacity","contentVisibility"];function createElement(t,e){var r={serialize:function(){for(var t={},e=0;e<styleProperties.length;e+=1){var r=styleProperties[e],i="_"+r;i in this&&(t[r]=this[i])}return t}};styleProperties.forEach(function(e){Object.defineProperty(r,e,{set:function(t){i._isDirty||(i._isDirty=!0),i._changedStyles.push(e),this["_"+e]=t},get:function(){return this["_"+e]}})});var i={_state:"init",_isDirty:!1,_changedStyles:[],_changedAttributes:[],_changedElements:[],type:e,namespace:t,children:[],attributes:{id:"l_d_"+(localIdCounter+=1)},style:r,appendChild:function(t){(t.parentNode=this).children.push(t),this._isDirty=!0,this._changedElements.push([t,this.attributes.id])},insertBefore:function(t,e){for(var r=this.children,i=0;i<r.length;i+=1)if(r[i]===e)return r.splice(i,0,t),this._isDirty=!0,void this._changedElements.push([t,this.attributes.id,e.attributes.id]);r.push(e)},setAttribute:function(t,e){this.attributes[t]=e,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(t)},serialize:function(){return{type:this.type,namespace:this.namespace,style:this.style.serialize(),attributes:this.attributes,children:this.children.map(function(t){return t.serialize()})}},getContext:function(){return{fillRect:function(){}}},addEventListener:function(t,e){setTimeout(e,1)},setAttributeNS:function(t,e,r){this.attributes[e]=r,i._isDirty||(i._isDirty=!0),i._changedAttributes.push(e)}};return i.style=r,i}var window=self,document={createElementNS:function(t,e){return createElement(t,e)},createElement:function(t){return createElement("",t)},getElementsByTagName:function(){return[]}},lottieInternal=function(){"use strict";var C,D;function addElementToList(t,e){e.push(t),t._isDirty=!1,t._changedStyles.length=0,t._changedAttributes.length=0,t._changedElements.length=0,t.children.forEach(function(t){addElementToList(t,e)})}function addChangedAttributes(t){for(var e,r=t._changedAttributes,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.attributes[e]]);return i}function addChangedStyles(t){for(var e,r=t._changedStyles,i=[],s=0;s<r.length;s+=1)e=r[s],i.push([e,t.style[e]]);return i}function addChangedElements(t,e){for(var r,i=t._changedElements,s=[],a=0;a<i.length;a+=1)r=i[a],s.push([r[0].serialize(),r[1],r[2]]),addElementToList(r[0],e);return s}function loadAnimation(a){var e,r,t=a.params,n=[];if("svg"===t.renderer)e=document.createElement("div"),t.container=e;else{var i=t.rendererSettings.canvas.getContext("2d");t.rendererSettings.context=i}(r=lottie.loadAnimation(t)).addEventListener("error",function(t){console.log(t)}),r.onError=function(t){console.log("ERRORO",t)},"svg"===t.renderer&&(r.addEventListener("DOMLoaded",function(){var t=e.serialize();addElementToList(e,n),self.postMessage({type:"loaded",payload:{id:a.id,tree:t.children[0],totalFrames:r.totalFrames,frameRate:r.frameRate}})}),r.addEventListener("drawnFrame",function(t){for(var e,r=[],i=0;i<n.length;i+=1)if((e=n[i])._isDirty){var s={id:e.attributes.id,styles:addChangedStyles(e),attributes:addChangedAttributes(e),elements:addChangedElements(e,n)};r.push(s),e._isDirty=!1,e._changedAttributes.length=0,e._changedStyles.length=0,e._changedElements.length=0}self.postMessage({type:"updated",payload:{elements:r,id:a.id,currentTime:t.currentTime}})})),animations[a.id]=r}return"undefined"!=typeof navigator&&(C=this,D=function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r<s;r+=1)for(var a in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function r(t,e){var r,i=0,s=[];switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(i=0;i<e;i+=1)s.push(r);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):r(t,e)}:r}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var subframeEnabled=!0,expressionsPlugin=null,idPrefix="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["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"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(rb=0,function(){return idPrefix+"__lottie_element_"+(rb+=1)}),rb;function HSVtoRGB(t,e,r){var i,s,a,n,o,h,l,p;switch(h=r*(1-e),l=r*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=r*(1-(1-o)*e),n%6){case 0:i=r,s=p,a=h;break;case 1:i=l,s=r,a=h;break;case 2:i=h,s=r,a=p;break;case 3:i=h,s=l,a=r;break;case 4:i=p,s=h,a=r;break;case 5:i=r,s=h,a=l}return[i,s,a]}function RGBtoHSV(t,e,r){var i,s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:i=0;break;case t:i=e-r+n*(e<r?6:0),i/=6*n;break;case e:i=r-t+2*n,i/=6*n;break;case r:i=t-e+4*n,i/=6*n}return[i,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,1<r[1]?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,1<r[2]?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,1<r[0]?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix=t},getIdPrefix=function(){return idPrefix};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dataManager=function(){var i,s,a=1,n=[],o={onmessage:function(){},postMessage:function(t){i({data:t})}},r={postMessage:function(t){o.onmessage({data:t})}};function h(){s||((s=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}return i=t,o}(function(e){if(r.dataManager||(r.dataManager=function(){function f(t,e){var r,i,s,a,n,o,h,l=t.length;for(i=0;i<l;i+=1)if("ks"in(r=t[i])&&!r.completed){if(r.completed=!0,r.tt&&(t[i-1].td=r.tt),r.hasMask){var p=r.masksProperties;for(a=p.length,s=0;s<a;s+=1)if(p[s].pt.k.i)d(p[s].pt.k);else for(o=p[s].pt.k.length,n=0;n<o;n+=1)p[s].pt.k[n].s&&d(p[s].pt.k[n].s[0]),p[s].pt.k[n].e&&d(p[s].pt.k[n].e[0])}0===r.ty?(r.layers=m(r.refId,e),f(r.layers,e)):4===r.ty?c(r.shapes):5===r.ty&&(0===(h=r).t.a.length&&h.t.p)}}function m(t,e){var r=function(t,e){for(var r=0,i=e.length;r<i;){if(e[r].id===t)return e[r];r+=1}return null}(t,e);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function c(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)d(t[e].ks.k);else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&d(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&d(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&c(t[e].it)}function d(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function n(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var s,e=function(){var i=[4,4,14];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=r.t.d,r.t.d={k:[{s:i,t:0}]})}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(s=[4,7,99],function(t){if(t.chars&&!n(s,t.v)){var e,r=t.chars.length;for(e=0;e<r;e+=1){var i=t.chars[e];i.data&&i.data.shapes&&(c(i.data.shapes),i.data.ip=0,i.data.op=99999,i.data.st=0,i.data.sr=1,i.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(i.data.shapes.push({ty:"no"}),i.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),i=function(){var i=[5,7,15];function s(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(r=t[e],i=void 0,"number"==typeof(i=r.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var i=[4,1,9];function a(t){var e,r,i,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(i=t[e].c.k.length,r=0;r<i;r+=1)t[e].c.k[r].s&&(t[e].c.k[r].s[0]/=255,t[e].c.k[r].s[1]/=255,t[e].c.k[r].s[2]/=255,t[e].c.k[r].s[3]/=255),t[e].c.k[r].e&&(t[e].c.k[r].e[0]/=255,t[e].c.k[r].e[1]/=255,t[e].c.k[r].e[2]/=255,t[e].c.k[r].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,r=t.length;for(e=0;e<r;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),o=function(){var i=[4,4,18];function l(t){var e,r,i;for(e=t.length-1;0<=e;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(i=t[e].ks.k.length,r=0;r<i;r+=1)t[e].ks.k[r].s&&(t[e].ks.k[r].s[0].c=t[e].closed),t[e].ks.k[r].e&&(t[e].ks.k[r].e[0].c=t[e].closed);else"gr"===t[e].ty&&l(t[e].it)}function s(t){var e,r,i,s,a,n,o=t.length;for(r=0;r<o;r+=1){if((e=t[r]).hasMask){var h=e.masksProperties;for(s=h.length,i=0;i<s;i+=1)if(h[i].pt.k.i)h[i].pt.k.c=h[i].cl;else for(n=h[i].pt.k.length,a=0;a<n;a+=1)h[i].pt.k[a].s&&(h[i].pt.k[a].s[0].c=h[i].cl),h[i].pt.k[a].e&&(h[i].pt.k[a].e[0].c=h[i].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(n(i,t.v)&&(s(t.layers),t.assets)){var e,r=t.assets.length;for(e=0;e<r;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();var t={};return t.completeData=function(t){t.__complete||(a(t),e(t),r(t),i(t),o(t),f(t.layers,t.assets),function(t,e){if(t){var r=0,i=t.length;for(r=0;r<i;r+=1)1===t[r].t&&(t[r].data.layers=m(t[r].data.refId,e),f(t[r].data.layers,e))}}(t.chars,t.assets),t.__complete=!0)},t.checkColors=a,t.checkChars=r,t.checkPathProperties=i,t.checkShapes=o,t.completeLayers=f,t}()),r.assetLoader||(r.assetLoader=function(){function n(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")?t.response:t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,r,t,i){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=n(a),t(s);else try{s=n(a),t(s)}catch(t){i&&i(t)}};try{a.open("GET",e,!0)}catch(t){a.open("GET",r+"/"+e,!0)}a.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(t){var e=t.data,r=e.id,i=n[r];n[r]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function l(t,e){var r="processId_"+(a+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(t,e,r){h();var i=l(e,r);s.postMessage({type:"complete",animation:t,id:i})}}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,r){var i="";if(t.e)i=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),i=e+s}else i=r,i+=t.u?t.u:"",i+=t.p;return i}function r(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=function(t){var e=0,r=setInterval(function(){(t.getBBox().width||500<e)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}.bind(this),this.createFootageData=function(t){var e={assetData:t},r=a(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return r.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;r<i;r+=1)t[r].layers||(t[r].t&&"seq"!==t[r].t?3===t[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[r]))):(this.totalImages+=1,this.images.push(this._createImageData(t[r]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,r=this.images.length;e<r;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(t){var e=a(t,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.src=e;var i={img:r,assetData:t};return i},createImageData:function(t){var e=a(t,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){i.img=s,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var i={img:r,assetData:t};return i},imageLoaded:t,footageLoaded:e,setCacheType:function(t,e){this._createImageData="svg"===t?(this._elementHelper=e,this.createImageData.bind(this)):this.createImgData.bind(this)}},r}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function a(t){for(var e,r=t.split("\r\n"),i={},s=0,a=0;a<r.length;a+=1)2===(e=r[a].split(":")).length&&(i[e[0]]=e[1].trim(),s+=1);if(0===s)throw new Error;return i}return function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e[r],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(e[r].cm)}catch(t){try{s.payload=a(e[r].cm)}catch(t){s.payload={name:e[r]}}}t.push(s)}return t}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var s=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===s?r.loop=!1:"true"===s?r.loop=!0:""!==s&&(r.loop=parseInt(s,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<s;){if(i[e].id===a[r].id){i[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&0<this.frameModifier?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},s=[],i=0,a=0,n=0,o=!0,h=!1;function r(t){for(var e=0,r=t.target;e<a;)s[e].animation===r&&(s.splice(e,1),e-=1,a-=1,r.isPaused||f()),e+=1}function l(t,e){if(!t)return null;for(var r=0;r<a;){if(s[r].elem===t&&null!==s[r].elem)return s[r].animation;r+=1}var i=new AnimationItem;return m(i,t),i.setData(t,e),i}function p(){n+=1,d()}function f(){n-=1}function m(t,e){t.addEventListener("destroy",r),t.addEventListener("_active",p),t.addEventListener("_idle",f),s.push({elem:e,animation:t}),a+=1}function c(t){var e,r=t-i;for(e=0;e<a;e+=1)s[e].animation.advanceTime(r);i=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){i=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return m(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setSpeed(t,e)},t.setDirection=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setDirection(t,e)},t.play=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,r){var i,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(i=0;i<a;i+=1)r&&s[i].setAttribute("data-bm-type",r),l(s[i],t);if(e&&0===a){r||(r="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,r){var i;for(i=0;i<a;i+=1)s[i].animation.goToAndStop(t,e,r)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var r;for(r=0;r<a;r+=1)s[r].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,r=[];for(t=0;t<e;t+=1)r.push(s[t].animation);return r},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,e,r,i,s){var a=s||("bez_"+t+"_"+e+"_"+r+"_"+i).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,r,i]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function f(t,e,r){return((i(e,r)*t+s(e,r))*t+a(e))*t}function m(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:f(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<l;++r)this._mSampleValues[r]=f(r*p,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&i[a]<=t;++a)s+=p;var o=s+(t-i[--a])/(i[a+1]-i[a])*p,h=m(o,e,r);return.001<=h?function(t,e,r,i){for(var s=0;s<4;++s){var a=m(e,r,i);if(0===a)return e;e-=(f(e,r,i)-t)/a}return e}(t,o,e,r):0===h?o:function(t,e,r,i,s){for(var a,n,o=0;0<(a=f(n=e+(r-e)/2,i,s)-t)?r=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,r)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0});function bezFunction(){var k=Math;function y(t,e,r,i,s,a){var n=t*i+e*s+r*a-s*i-a*t-r*e;return-.001<n&&n<.001}var p=function(t,e,r,i){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bmPow(1-h,3)*t[a]+3*bmPow(1-h,2)*h*r[a]+3*(1-h)*bmPow(h,2)*i[a]+bmPow(h,3)*e[a],m[a]=o,null!==c[a]&&(l+=bmPow(m[a]-c[a],2)),c[a]=m[a];l&&(f+=l=bmSqrt(l)),d.percents[s]=h,d.lengths[s]=f}return d.addedLength=f,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,r,i){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+i[0]+"_"+i[1]).replace(/\./g,"p");if(!b[s]){var a,n,o,h,l,p,f,m=getDefaultCurveSegments(),c=0,d=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&y(t[0],t[1],e[0],e[1],t[0]+r[0],t[1]+r[1])&&y(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(m=2);var u=new g(m);for(o=r.length,a=0;a<m;a+=1){for(f=createSizedArray(o),l=a/(m-1),n=p=0;n<o;n+=1)h=bmPow(1-l,3)*t[n]+3*bmPow(1-l,2)*l*(t[n]+r[n])+3*(1-l)*bmPow(l,2)*(e[n]+i[n])+bmPow(l,3)*e[n],f[n]=h,null!==d&&(p+=bmPow(f[n]-d[n],2));c+=p=bmSqrt(p),u.points[a]=new v(p,f),d=f}u.segmentLength=c,b[s]=u}return b[s]});function M(t,e){var r=e.percents,i=e.lengths,s=r.length,a=bmFloor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===i[a])return r[a];for(var h=i[a]>n?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var F=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),i=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=r.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),r.totalLength=l,r},getNewSegment:function(t,e,r,i,s,a,n){s<0?s=0:1<s&&(s=1);var o,h=M(s,n),l=M(a=1<a?1:a,n),p=t.length,f=1-h,m=1-l,c=f*f*f,d=h*f*f*3,u=h*h*f*3,y=h*h*h,g=f*f*m,v=h*f*m+f*h*m+f*f*l,b=h*h*m+f*h*l+h*f*l,E=h*h*l,P=f*m*m,S=h*m*m+f*l*m+f*m*l,x=h*l*m+f*l*l+h*m*l,C=h*l*l,A=m*m*m,_=l*m*m+m*l*m+m*m*l,T=l*l*m+m*l*l+l*m*l,D=l*l*l;for(o=0;o<p;o+=1)F[4*o]=k.round(1e3*(c*t[o]+d*r[o]+u*i[o]+y*e[o]))/1e3,F[4*o+1]=k.round(1e3*(g*t[o]+v*r[o]+b*i[o]+E*e[o]))/1e3,F[4*o+2]=k.round(1e3*(P*t[o]+S*r[o]+x*i[o]+C*e[o]))/1e3,F[4*o+3]=k.round(1e3*(A*t[o]+_*r[o]+T*i[o]+D*e[o]))/1e3;return F},getPointInSegment:function(t,e,r,i,s,a){var n=M(s,a),o=1-n;return[k.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*r[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0]))/1e3,k.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*r[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,r,i,s,a,n,o,h){if(0===r&&0===a&&0===h)return y(t,e,i,s,n,o);var l,p=k.sqrt(k.pow(i-t,2)+k.pow(s-e,2)+k.pow(a-r,2)),f=k.sqrt(k.pow(n-t,2)+k.pow(o-e,2)+k.pow(h-r,2)),m=k.sqrt(k.pow(n-i,2)+k.pow(o-s,2)+k.pow(h-a,2));return-1e-4<(l=f<p?m<p?p-f-m:m-f-p:f<m?m-f-p:f-p-m)&&l<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var f=initialDefaultFrame,s=Math.abs;function m(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-i){s.h&&(s=a),c=0;break}if(a.t-i>t){c=d;break}d<u-1?d+=1:(c=0,y=!1)}n=this.keyframesMetadata[d]||{};var g,v,b,E,P,S,x,C,A,_,T=a.t-i,D=s.t-i;if(s.to){n.bezierData||(n.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var k=n.bezierData;if(T<=t||t<D){var M=T<=t?k.points.length-1:0;for(h=k.points[M].point.length,o=0;o<h;o+=1)r[o]=k.points[M].point[o]}else{n.__fnct?m=n.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,n.__fnct=m),l=m((t-D)/(T-D));var F,w=k.segmentLength*l,I=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(f=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,y=!0,p=k.points.length;y;){if(I+=k.points[f].partialLength,0===w||0===l||f===k.points.length-1){for(h=k.points[f].point.length,o=0;o<h;o+=1)r[o]=k.points[f].point[o];break}if(I<=w&&w<I+k.points[f+1].partialLength){for(F=(w-I)/k.points[f+1].partialLength,h=k.points[f].point.length,o=0;o<h;o+=1)r[o]=k.points[f].point[o]+(k.points[f+1].point[o]-k.points[f].point[o])*F;break}f<p-1?f+=1:y=!1}e._lastPoint=f,e._lastAddedLength=I-k.points[f].partialLength,e._lastKeyframeIndex=d}}else{var V,B,R,L,G;if(u=s.s.length,g=a.s||s.e,this.sh&&1!==s.h)if(T<=t)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=D)r[0]=s.s[0],r[1]=s.s[1],r[2]=s.s[2];else{var z=O(s.s),N=O(g);v=r,b=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(n=1-r,r);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(z,N,(t-D)/(T-D)),E=b[0],P=b[1],S=b[2],x=b[3],C=Math.atan2(2*P*x-2*E*S,1-2*P*P-2*S*S),A=Math.asin(2*E*P+2*S*x),_=Math.atan2(2*E*x-2*P*S,1-2*E*E-2*S*S),v[0]=C/degToRads,v[1]=A/degToRads,v[2]=_/degToRads}else for(d=0;d<u;d+=1)1!==s.h&&(l=T<=t?1:t<D?0:(s.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[d]?m=n.__fnct[d]:(V=void 0===s.o.x[d]?s.o.x[0]:s.o.x[d],B=void 0===s.o.y[d]?s.o.y[0]:s.o.y[d],R=void 0===s.i.x[d]?s.i.x[0]:s.i.x[d],L=void 0===s.i.y[d]?s.i.y[0]:s.i.y[d],m=BezierFactory.getBezierEasing(V,B,R,L).get,n.__fnct[d]=m)):n.__fnct?m=n.__fnct:(V=s.o.x,B=s.o.y,R=s.i.x,L=s.i.y,m=BezierFactory.getBezierEasing(V,B,R,L).get,s.keyframeMetadata=m),m((t-D)/(T-D)))),g=a.s||s.e,G=1===s.h?s.s[d]:s.s[d]+(g[d]-s.s[d])*l,"multidimensional"===this.propType?r[d]=G:r=G}return e.lastIndex=c,r}function O(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==f&&(this._caching.lastFrame>=r&&r<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r<i;)e=t[r]*this.mult,1e-5<s(this.v[r]-e)&&(this.v[r]=e,this._mdf=!0),r+=1}function u(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,r,i){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,r,i){var s;this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}function h(t,e,r,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:f,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=f,this.pv=f,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,r,i){var s;this.propType="multidimensional";var a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=m,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=f,this.pv[s]=f;this._caching={lastFrame:f,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,r,i,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,i,s);else switch(r){case 0:a=new h(t,e,i,s);break;case 1:a=new l(t,e,i,s)}else a=new n(t,e,i,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,s){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],r[n][0],r[n][1],a,!1),n-=1;return t};var shapePool=(Fr=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),Fr.clone=function(t){var e,r=Fr.newElement(),i=void 0===t._length?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},Fr),Fr;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(Pr={newShapeCollection:function(){var t;t=Qr?Sr[Qr-=1]:new ShapeCollection;return t},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,Qr===Rr&&(Sr=pooling.double(Sr),Rr*=2);Sr[Qr]=t,Qr+=1}},Qr=0,Rr=4,Sr=createSizedArray(Rr),Pr),Pr,Qr,Rr,Sr,ShapePropertyFactory=function(){var s=-999999;function t(t,e,r){var i,s,a,n,o,h,l,p,f,m=r.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)i=c[0].s[0],a=!0,m=0;else if(t>=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(y=this.keyframesMetadata[g]||{},m=g,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var E;y.__fnct?E=y.__fnct:(E=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,y.__fnct=E),p=E((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}i=d.s[0]}for(h=e._length,l=i.i[0].length,r.lastIndex=m,n=0;n<h;n+=1)for(o=0;o<l;o+=1)f=a?i.i[n][o]:i.i[n][o]+(s.i[n][o]-i.i[n][o])*p,e.i[n][o]=f,f=a?i.o[n][o]:i.o[n][o]+(s.o[n][o]-i.o[n][o])*p,e.o[n][o]=f,f=a?i.v[n][o]:i.v[n][o]+(s.v[n][o]-i.v[n][o])*p,e.v[n][o]=f}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,i=t._length;for(r=0;r<i;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(e=0;e<r;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,r){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===r?e.pt.k:e.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var i=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==s&&(i<e&&t<e||r<i&&r<t)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=r,n.prototype.setVValue=e,n.prototype.addEffect=i,o.prototype.getValue=r,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=i;var h=function(){var n=roundCorner;function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=s?t+r:t-r,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=s?t-r:t+r,a.v[3][1]=e,a.i[0][0]=s?t-r*n:t+r*n,a.i[0][1]=e-i,a.i[1][0]=s?t+r:t-r,a.i[1][1]=e-i*n,a.i[2][0]=s?t+r*n:t-r*n,a.i[2][1]=e+i,a.i[3][0]=s?t-r:t+r,a.i[3][1]=e+i*n,a.o[0][0]=s?t+r*n:t-r*n,a.o[0][1]=e-i,a.o[1][0]=s?t+r:t-r,a.o[1][1]=e+i*n,a.o[2][0]=s?t-r*n:t+r*n,a.o[2][1]=e+i,a.o[3][0]=s?t-r:t+r,a.o[3][1]=e-i*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,r,i,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*o/(2*s),m=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){r=n?l:p,i=n?f:m;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*i*r*d,y-v*i*r*d,u+g*i*r*d,y+v*i*r*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,i=this.or.v,s=this.os.v,a=2*Math.PI*i/(4*e),n=.5*-Math.PI,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=i*Math.cos(n),l=i*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),f=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-f*a*s*o,h+p*a*s*o,l+f*a*s*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,s=bmMin(r,i,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+s,t+r,e-i+a,0,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-a,t+r,e+i-s,1,!0),0!==s?(this.v.setTripleAt(t+r-s,e+i,t+r-s,e+i,t+r-a,e+i,2,!0),this.v.setTripleAt(t-r+s,e+i,t-r+a,e+i,t-r+s,e+i,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-s,t-r,e+i-a,4,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+a,t-r,e-i+s,5,!0),this.v.setTripleAt(t-r+s,e-i,t-r+s,e-i,t-r+a,e-i,6,!0),this.v.setTripleAt(t+r-s,e-i,t+r-a,e-i,t+r-s,e-i,7,!0)):(this.v.setTripleAt(t-r,e+i,t-r+a,e+i,t-r,e+i,2),this.v.setTripleAt(t-r,e-i,t-r,e-i+a,t-r,e-i,3))):(this.v.setTripleAt(t+r,e-i+s,t+r,e-i+a,t+r,e-i+s,0,!0),0!==s?(this.v.setTripleAt(t+r-s,e-i,t+r-s,e-i,t+r-a,e-i,1,!0),this.v.setTripleAt(t-r+s,e-i,t-r+a,e-i,t-r+s,e-i,2,!0),this.v.setTripleAt(t-r,e-i+s,t-r,e-i+s,t-r,e-i+a,3,!0),this.v.setTripleAt(t-r,e+i-s,t-r,e+i-a,t-r,e+i-s,4,!0),this.v.setTripleAt(t-r+s,e+i,t-r+s,e+i,t-r+a,e+i,5,!0),this.v.setTripleAt(t+r-s,e+i,t+r-a,e+i,t+r-s,e+i,6,!0),this.v.setTripleAt(t+r,e+i-s,t+r,e+i-s,t+r,e+i-a,7,!0)):(this.v.setTripleAt(t-r,e-i,t-r+a,e-i,t-r,e-i,1,!0),this.v.setTripleAt(t-r,e+i,t-r,e+i-a,t-r,e+i,2,!0),this.v.setTripleAt(t+r,e+i,t+r-a,e+i,t+r,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var f={getShapeProp:function(t,e,r){var i;return 3===r||4===r?i=(3===r?e.pt:e.ks).k.length?new o(t,e,r):new n(t,e,r):5===r?i=new p(t,e):6===r?i=new h(t,e):7===r&&(i=new l(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return f}(),Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,i=Math.round;function t(){return 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,this}function e(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),r=a(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function f(t,e){var r=s(e),i=a(e);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function m(t,e,r){return r||0===r||(r=1),1===t&&1===e&&1===r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function c(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=i,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function u(t,e,r,i,s,a,n,o,h,l,p,f,m,c,d,u){var y=this.props;if(1===t&&0===e&&0===r&&0===i&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===f)return y[12]=y[12]*t+y[15]*m,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]*=u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],E=y[3],P=y[4],S=y[5],x=y[6],C=y[7],A=y[8],_=y[9],T=y[10],D=y[11],k=y[12],M=y[13],F=y[14],w=y[15];return y[0]=g*t+v*s+b*h+E*m,y[1]=g*e+v*a+b*l+E*c,y[2]=g*r+v*n+b*p+E*d,y[3]=g*i+v*o+b*f+E*u,y[4]=P*t+S*s+x*h+C*m,y[5]=P*e+S*a+x*l+C*c,y[6]=P*r+S*n+x*p+C*d,y[7]=P*i+S*o+x*f+C*u,y[8]=A*t+_*s+T*h+D*m,y[9]=A*e+_*a+T*l+D*c,y[10]=A*r+_*n+T*p+D*d,y[11]=A*i+_*o+T*f+D*u,y[12]=k*t+M*s+F*h+w*m,y[13]=k*e+M*a+F*l+w*c,y[14]=k*r+M*n+F*p+w*d,y[15]=k*i+M*o+F*f+w*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function E(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function P(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function S(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function x(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function C(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,r=-this.props[1]/t,i=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=r,o.props[4]=i,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function _(t){var e,r=t.length,i=[];for(e=0;e<r;e+=1)i[e]=A(t[e]);return i}function T(t,e,r){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=r[0],i[5]=r[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i[0]=t[0]*s+t[1]*n+h,i[1]=t[0]*a+t[1]*o+l,i[2]=e[0]*s+e[1]*n+h,i[3]=e[0]*a+e[1]*o+l,i[4]=r[0]*s+r[1]*n+h,i[5]=r[0]*a+r[1]*o+l}return i}function D(t,e,r){return this.isIdentity()?[t,e,r]:[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function k(t,e){if(this.isIdentity())return t+","+e;var r=this.props;return Math.round(100*(t*r[0]+e*r[4]+r[12]))/100+","+Math.round(100*(t*r[1]+e*r[5]+r[13]))/100}function M(){for(var t=0,e=this.props,r="matrix3d(";t<16;)r+=i(1e4*e[t])/1e4,r+=15===t?")":",",t+=1;return r}function F(t){return t<1e-6&&0<t||-1e-6<t&&t<0?i(1e4*t)/1e4:t}function w(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=E,this.applyToX=P,this.applyToY=S,this.applyToZ=x,this.applyToPointArray=D,this.applyToTriplePoints=T,this.applyToPointStringified=k,this.toCSS=M,this.to2dCSS=w,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=_,this.inversePoint=A,this.getInverseMatrix=C,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&1<t&&setDefaultCurveSegments(t);50<=getDefaultCurveSegments()?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}if(lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.1",standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===("undefined"==typeof exports?"undefined":_typeof$3(exports))&&"undefined"!=typeof module||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=(Ox={},Px={},Ox.registerModifier=function(t,e){Px[t]||(Px[t]=e)},Ox.getModifier=function(t,e,r){return new Px[t](e,r)},Ox),Ox,Px;function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,f;if(!((o=a[n]).e*s<i||o.s*s>i+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,s;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),e=1<this.s.v?1+a:this.s.v<0?0+a:this.s.v+a,(r=1<this.e.v?1+a:this.e.v<0?0+a:this.e.v+a)<e){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===r&&0===e||0===r&&1===e){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var d,u,y=[];for(s=0;s<m;s+=1)if((d=this.shapes[s]).shape._mdf||this._mdf||t||2===this.m){if(h=(i=d.shape.paths)._length,f=0,!d.shape._mdf&&d.pathsData.length)f=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(i.shapes[o]),l.push(p),f+=p.totalLength;d.totalShapeLength=f,d.pathsData=l}c+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=r,E=0;for(s=m-1;0<=s;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<m?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,E,c),E+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var S=P.pop();this.addPaths(P,u),P=this.addShapes(d,y[1],S)}else this.addPaths(P,u),P=this.addShapes(d,y[1]);this.addPaths(P,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,s,a,n,o,h,l,p,f=t.pathsData,m=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=r?(o=r._length,r._length):(r=shapePool.newElement(),o=0),u.push(r),i=0;i<c;i+=1){for(h=f[i].lengths,r.c=m[i].c,a=m[i].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i<c-1&&(r=shapePool.newElement(),y=!0,u.push(r),o=0)}return u},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=s,i[1]/=s;var n,o,h,l,p,f,m=shapePool.newElement();for(m.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(i[0]-t.v[a][0])*r,o=t.v[a][1]+(i[1]-t.v[a][1])*r,h=t.o[a][0]+(i[0]-t.o[a][0])*-r,l=t.o[a][1]+(i[1]-t.o[a][1])*-r,p=t.i[a][0]+(i[0]-t.i[a][0])*-r,f=t.i[a][1]+(i[1]-t.i[a][1])*-r,m.setTripleAt(n,o,h,l,p,f,a);return m},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var n=[0,0];function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,s=e.or.k.length;for(i=0;i<s;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return i.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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]),this.autoOriented){var r,i;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(r=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/e,0),i[0]=s.getValueAtTime(s.keyframes[0].t/e,0),i[1]=a.getValueAtTime(a.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/e,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/e,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/e,a.offsetTime))}else r=i=n;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(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]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],i),i.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},i.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,r){return new i(t,e,r)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a<s;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,s,a){var n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-s),h=i.s.v[1]+(1-i.s.v[1])*(1-s);t.translate(i.p.v[0]*n*s,i.p.v[1]*n*s,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*s),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);0<r;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,s,a,n=!1;if(this._mdf||t){var o,h=Math.ceil(this.c.v);if(this._groups.length<h){for(;this._groups.length<h;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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"}),this.arr.splice(0,0,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),n=!0}for(i=a=0;i<=this._groups.length-1;i+=1){if(o=a<h,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var p=this.elemsData[i].it,f=p[p.length-1];0!==f.transform.op.v?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}a+=1}this._currentCopies=h;var m=this.o.v,c=m%1,d=0<m?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,E=0;if(0<m){for(;E<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),E+=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),E+=c)}else if(m<0){for(;d<E;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),E-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),E-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==E){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];E+=1,a-=1,i+=s}}else for(a=this._currentCopies,i=0,s=1;a;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=s;return n},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var s,a,n,o,h,l,p,f,m,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,f=u=s[1]-(s[1]-o[1])*l,m=p-(p-s[0])*roundCorner,c=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=m=s[0]+(o[0]-s[0])*l,f=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=f-(f-s[1])*roundCorner,i.setTripleAt(p,f,m,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(r=0;r<o;r+=1){if(n=(a=this.shapes[r]).localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)n.addShape(this.processPath(e[i],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var a={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],r=[65039,8205];function m(t,e){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(i),document.body.appendChild(r);var s=i.offsetWidth;return i.style.fontFamily=function(t){var e,r=t.split(","),i=r.length,s=[];for(e=0;e<i;e+=1)"sans-serif"!==r[e]&&"monospace"!==r[e]&&s.push(r[e]);return s.join(",")}(t)+", "+e,{node:i,w:s,parent:r}}function c(t,e){var r=createNS("text");r.style.fontSize="100px";var i=getFontProperties(e);return r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",i.style),r.setAttribute("font-weight",i.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),createTag("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,r}var t=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return t.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},t.isZeroWidthJoiner=function(t,e){return e?t===r[0]&&e===r[1]:t===r[1]},t.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},t.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(r=0,i=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(i=!0),r+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var r,i=t.list,s=i.length,a=s;for(r=0;r<s;r+=1){var n,o,h=!0;if(i[r].loaded=!1,i[r].monoCase=m(i[r].fFamily,"monospace"),i[r].sansCase=m(i[r].fFamily,"sans-serif"),i[r].fPath){if("p"===i[r].fOrigin||3===i[r].origin){if(0<(n=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[r].fFamily+'"], style[f-origin="3"][f-family="'+i[r].fFamily+'"]')).length&&(h=!1),h){var l=createTag("style");l.setAttribute("f-forigin",i[r].fOrigin),l.setAttribute("f-origin",i[r].origin),l.setAttribute("f-family",i[r].fFamily),l.type="text/css",l.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(l)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(n=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),o=0;o<n.length;o+=1)-1!==n[o].href.indexOf(i[r].fPath)&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[r].fOrigin),p.setAttribute("f-origin",i[r].origin),p.type="text/css",p.rel="stylesheet",p.href=i[r].fPath,document.body.appendChild(p)}}else if("t"===i[r].fOrigin||2===i[r].origin){for(n=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),o=0;o<n.length;o+=1)i[r].fPath===n[o].src&&(h=!1);if(h){var f=createTag("link");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",i[r].fPath),e.appendChild(f)}}}else i[r].loaded=!0,a-=1;i[r].helper=c(e,i[r]),i[r].cache={},this.fonts.push(i[r])}0===a?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,r){for(var i=0,s=this.chars.length;i<s;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,r)),a},getFontByName:function(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,r){var i=this.getFontByName(e),s=t.charCodeAt(0);if(!i.cache[s+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();i.cache[s+1]=(n-o)/100}else a.textContent=t,i.cache[s+1]=a.getComputedTextLength()/100}return i.cache[s+1]*r},checkLoadedFonts:function(){var t,e,r,i=this.fonts.length,s=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,e.offsetWidth!==r?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,e.offsetWidth!==r&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},t}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e){var r,i=createSizedArray(e.viewData.length),s=e.viewData.length;for(r=0;r<s;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(t){for(r=0;r<s;){if(e.masksProperties[r].nm===t)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(i,s,a){Object.defineProperty(i,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),i.numKeys=s.keyframes?s.keyframes.length:0,i.key=function(t){if(!i.numKeys)return 0;var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var r="unidimensional"===a?new Number(e):Object.assign({},e);return r.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,r.value="unidimensional"===a?e[0]:e,r},i.valueAtTime=s.getValueAtTime,i.speedAtTime=s.getSpeedAtTime,i.velocityAtTime=s.getVelocityAtTime,i.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,r=t.pv*e,i=new Number(r);return i.value=r,o(i,t,"unidimensional"),function(){return t.k&&t.getValue(),r=t.v*e,i.value!==r&&((i=new Number(r)).value=r,o(i,t,"unidimensional")),i}}(t):function(e){e&&"pv"in e||(e=n);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",i),a=createTypedArray("float32",i);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)a[t]=e.v[t]*r,s[t]=a[t];return s}}(t):e}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,s,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),i(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,t)}function n(t,e){var r=this.getMatrix(e);return this.applyPoint(r,t)}function o(t,e){var r=this.getMatrix(e);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,t)}function h(t,e){var r=this.getMatrix(e);return this.invertPoint(r,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function f(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,i=this._elem.hierarchy.length;for(r=0;r<i;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function m(){return[1,1,1,1]}return function(e){var r;function i(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return i.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return r;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return i.effect;case"ADBE Text Properties":return i.textInterface;default:return null}}i.getMatrix=s,i.invertPoint=p,i.applyPoint=l,i.toWorld=n,i.toWorldVec=a,i.fromWorld=h,i.fromWorldVec=o,i.toComp=n,i.fromComp=f,i.sampleImage=m,i.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(r=TransformExpressionInterface((i._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(i,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(r,"rotation"),scale:getDescriptor(r,"scale"),position:getDescriptor(r,"position"),opacity:getDescriptor(r,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return r}},active:{get:function(){return e.isInRange}}}),i.startTime=e.data.st,i.index=e.data.ind,i.source=e.data.refId,i.height=0===e.data.ty?e.data.h:100,i.width=0===e.data.ty?e.data.w:100,i.inPoint=e.data.ip/e.comp.globalData.frameRate,i.outPoint=e.data.op/e.comp.globalData.frameRate,i._name=e.data.nm,i.registerMaskInterface=function(t){i.mask=new MaskManagerInterface(t,e)},i.registerEffectsInterface=function(t){i.effect=t},i}}(),propertyGroupFactory=function(e,r){return function(t){return(t=void 0===t?1:t)<=0?e:r(t-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(t){return(t=void 0===t?1:t)<=0?r:e(t-1)}},EffectsExpressionInterface=function(){function l(s,t,e,r){function i(t){for(var e=s.ef,r=0,i=e.length;r<i;){if(t===e[r].nm||t===e[r].mn||t===e[r].ix)return 5===e[r].ty?o[r]:o[r]();r+=1}throw new Error}var a,n=propertyGroupFactory(i,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,r)):o.push(p(t.effectElements[a],s.ef[a].ty,r,n));return"ADBE Color Control"===s.mn&&Object.defineProperty(i,"color",{get:function(){return o[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),i.enabled=0!==s.en,i.active=i.enabled,i}function p(t,e,r,i){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?r.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var r,i=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(r=0;r<a;r+=1)i.push(l(s[r],t.effectsManager.effectElements[r],e,t));var n=t.data.ef||[],o=function(t){for(r=0,a=n.length;r<a;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return i[r];r+=1}return null};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}return null}}}(),CompExpressionInterface=function(i){function t(t){for(var e=0,r=i.layers.length;e<r;){if(i.layers[e].nm===t||i.layers[e].ind===t)return i.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:i.data.nm}),(t.layer=t).pixelAspect=1,t.height=i.data.h||i.globalData.compSize.h,t.width=i.data.w||i.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/i.globalData.frameRate,t.displayStartTime=0,t.numLayers=i.layers.length,t},ShapePathInterface=function(t,e,r){var i=e.sh;function s(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?s.path:null}var a=propertyGroupFactory(s,r);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s},ShapeExpressionInterface=function(){function n(t,e,r){var i,s=[],a=t?t.length:0;for(i=0;i<a;i+=1)"gr"===t[i].ty?s.push(o(t[i],e[i],r)):"fl"===t[i].ty?s.push(h(t[i],e[i],r)):"st"===t[i].ty?s.push(f(t[i],e[i],r)):"tm"===t[i].ty?s.push(m(t[i],e[i],r)):"tr"===t[i].ty||("el"===t[i].ty?s.push(d(t[i],e[i],r)):"sr"===t[i].ty?s.push(u(t[i],e[i],r)):"sh"===t[i].ty?s.push(ShapePathInterface(t[i],e[i],r)):"rc"===t[i].ty?s.push(y(t[i],e[i],r)):"rd"===t[i].ty?s.push(g(t[i],e[i],r)):"rp"===t[i].ty?s.push(v(t[i],e[i],r)):"gf"===t[i].ty?s.push(l(t[i],e[i],r)):s.push(p(t[i],e[i])));return s}function o(t,e,r){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var s=function(t,e,r){var i,s=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}return"number"==typeof t?i[t-1]:null};s.propertyGroup=propertyGroupFactory(s,r),i=n(t.it,e.it,s.propertyGroup),s.numProperties=i.length;var a=c(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,i.propertyGroup),a=c(t.it[t.it.length-1],e.it[e.it.length-1],i.propertyGroup);return i.content=s,i.transform=a,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function h(t,e,r){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function l(t,e,r){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",r)),e.e.setGroupProperty(PropertyInterface("End Point",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),i}function p(){return function(){return null}}function f(t,e,r){var i,s=propertyGroupFactory(l,r),a=propertyGroupFactory(h,s);var n,o=t.d?t.d.length:0,h={};for(i=0;i<o;i+=1)n=i,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[i].p.setGroupProperty(a);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:null}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",s)),e.o.setGroupProperty(PropertyInterface("Opacity",s)),e.w.setGroupProperty(PropertyInterface("Stroke Width",s)),l}function m(e,t,r){function i(t){return t===e.e.ix||"End"===t||"end"===t?i.end:t===e.s.ix?i.start:t===e.o.ix?i.offset:null}var s=propertyGroupFactory(i,r);return i.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),i.propertyIndex=e.ix,i.propertyGroup=r,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),i.mn=e.mn,i}function c(e,t,r){function i(t){return e.a.ix===t||"Anchor Point"===t?i.anchorPoint:e.o.ix===t||"Opacity"===t?i.opacity:e.p.ix===t||"Position"===t?i.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?i.rotation:e.s.ix===t||"Scale"===t?i.scale:e.sk&&e.sk.ix===t||"Skew"===t?i.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?i.skewAxis:null}var s=propertyGroupFactory(i,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),i.ty="tr",i.mn=e.mn,i.propertyGroup=r,i}function d(e,t,r){function i(t){return e.p.ix===t?i.position:e.s.ix===t?i.size:null}var s=propertyGroupFactory(i,r);i.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),i.mn=e.mn,i}function u(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.rotation:e.pt.ix===t?i.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?i.outerRadius:e.os.ix===t?i.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?i.innerRoundness:null:i.innerRadius}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),i.mn=e.mn,i}function y(e,t,r){function i(t){return e.p.ix===t?i.position:e.r.ix===t?i.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?i.size:null}var s=propertyGroupFactory(i,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return i.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),i.mn=e.mn,i}function g(e,t,r){function i(t){return e.r.ix===t||"Round Corners 1"===t?i.radius:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),i.mn=e.mn,i}function v(e,t,r){function i(t){return e.c.ix===t||"Copies"===t?i.copies:e.o.ix===t||"Offset"===t?i.offset:null}var s=propertyGroupFactory(i,r),a=t;return i.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),i.mn=e.mn,i}return function(t,e,i){var s;function r(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:s[t-1];for(var e=0,r=s.length;e<r;){if(s[e]._name===t)return s[e];e+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return i}),s=n(t,e,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var r;function i(t){switch(t){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(r=new String(t)).value=t||new String(t)),r}}),i},getBlendMode=(QI={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return QI[t]||""}),QI;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var s,a=i.length;for(r=0;r<a;r+=1)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function _typeof$2(t){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,s=this.data.ef.length,a=this.data.ef;for(r=0;r<s;r+=1){switch(i=null,a[r].ty){case 0:i=new SliderEffect(a[r],e,this);break;case 1:i=new AngleEffect(a[r],e,this);break;case 2:i=new ColorEffect(a[r],e,this);break;case 3:i=new PointEffect(a[r],e,this);break;case 4:case 7:i=new CheckboxEffect(a[r],e,this);break;case 10:i=new LayerIndexEffect(a[r],e,this);break;case 11:i=new MaskIndexEffect(a[r],e,this);break;case 5:i=new EffectsManager(a[r],e,this);break;default:i=new NoValueEffect(a[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}};var FootageInterface=(_J=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var i="",s=t.getFootageData();function a(t){if(s[t])return"object"===_typeof$2(s=s[i=t])?a:s;var e=t.indexOf(i);if(-1===e)return"";var r=parseInt(t.substr(e+i.length),10);return"object"===_typeof$2(s=s[r])?a:s}return function(){return i="",s=t.getFootageData(),a}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=_J(t),e}),_J;function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,f,m,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(i=0;i<n;i+=1)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k||c[i].o.x)&&(v=g="mask"),"s"!==c[i].mode&&"i"!==c[i].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),s=createNS("path"),"n"===c[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:s,lastPath:""},a.appendChild(s);else{var b;if(d+=1,s.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==c[i].x.k?(v=g="mask",m=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),p.appendChild(f),a.appendChild(p),s.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")):m=f=null,this.storedData[i]={elem:s,x:m,expan:f,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===c[i].mode){h=u.length;var E=createNS("g");for(o=0;o<h;o+=1)E.appendChild(u[o]);var P=createNS("mask");P.setAttribute("mask-type","alpha"),P.setAttribute("id",y+"_"+d),P.appendChild(s),a.appendChild(P),E.setAttribute("mask","url("+getLocationHref()+"#"+y+"_"+d+")"),u.length=0,u.push(E)}else u.push(s);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:l},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),n=u.length,i=0;i<n;i+=1)this.maskElement.appendChild(u[i]);0<d&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;0<=e;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,s=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<s;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(i[a]&&!0!==i[a]?(r.push(i[a]),i[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,s=this.comp;i;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):i=!1;var a,n=e.length;for(r=0;r<n;r+=1)a=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,i=1;i<s;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&1<s&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=($L={},$L.createFilter=function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},$L.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},$L),$L,featureSupport=(fM={maskType:!0},(/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))&&(fM.maskType=!1),fM),fM;function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),i.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),h=i.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/f);for(l=0;l<m;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*c[0])+","+bmFloor(255*c[1])+","+bmFloor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,s=i[0]+" "+r[0]+" "+e[0],a=i[1]+" "+r[1]+" "+e[1],n=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),f=0,m=s-i,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:i:l<=a?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=r).matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,s=r.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(i=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(i);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+r),i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=3==r?0:e,s=2==r?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}};var registeredEffects={};function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;for(this.filters=[],e=0;e<i;e+=1){r=null;var o=t.data.ef[e].ty;if(registeredEffects[o])r=new registeredEffects[o].effect(a,t.effectsManager.effectElements[e],t),registeredEffects[o].countsAsEffect&&(n+=1);20===t.data.ef[e].ty?(n+=1,r=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,r=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?r=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,r=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,r=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,r=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?r=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,r=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),r&&this.filters.push(r)}n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,r,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),i=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(this.layerElement),i=r,s.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),i=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),n.appendChild(l),r.appendChild(this.layerElement),i=r,n.appendChild(r)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),f=createNS("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m=createElementID();if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")"),c.appendChild(this.layerElement),this.transformedElement=c,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+m+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i<s;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var s;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(.01<Math.abs(t[4*r]-t[4*e+2*r]))return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,s=4*this.data.p;for(e=0;e<s;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),i.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(i=4*t.g.p;i<s;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&n.setAttribute("stroke-miterlimit",t.ml)),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[s][0],n[s][1])+" "+i.applyToPointStringified(o[s][0],o[s][1]);return r&&e&&(h+=" C"+i.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+i.applyToPointStringified(n[0][0],n[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,r){(r||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(r||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function r(){}function i(t,e,r){var i,s,a,n,o,h,l,p,f,m,c,d=e.styles.length,u=e.lvl;for(h=0;h<d;h+=1){if(n=e.sh._mdf||r,e.styles[h].lvl<u){for(p=g.reset(),m=u-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<m;)n=e.transformers[c].mProps._mdf||n,m-=1,c-=1;if(n)for(m=u-e.styles[h].lvl,c=e.transformers.length-1;0<m;)f=e.transformers[c].mProps.v.props,p.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m-=1,c-=1}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",i=0;i<s;i+=1)(o=l.shapes[i])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function s(t,e,r){var i=e.style;(e.c._mdf||r)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function a(t,e,r){n(t,e,r),o(t,e,r)}function n(t,e,r){var i,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,f=e.e.v;if(e.o._mdf||r){var m="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(m,e.o.v)}if(e.s._mdf||r){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||r){i=e.cst;var u=e.g.c;for(a=i.length,s=0;s<a;s+=1)(n=i[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||r)){var y=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=i[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||r)&&(h.setAttribute("x2",f[0]),h.setAttribute("y2",f[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",f[0]),e.of.setAttribute("y2",f[1])));else if((e.s._mdf||e.e._mdf||r)&&(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||r){o||(o=Math.sqrt(Math.pow(p[0]-f[0],2)+Math.pow(p[1]-f[1],2)));var g=Math.atan2(f[1]-p[1],f[0]-p[0]),v=e.h.v;1<=v?v=.99:v<=-1&&(v=-.99);var b=o*v,E=Math.cos(g+e.a.v)*b+p[0],P=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",E),h.setAttribute("fy",P),l&&!e.g._collapsable&&(e.of.setAttribute("fx",E),e.of.setAttribute("fy",P))}}function o(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return s;case"gf":return n;case"gs":return a;case"st":return o;case"sh":case"el":case"rc":case"sr":return i;case"tr":return e;case"no":return r;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r<a;r+=1){for(i=this.stylesList[r],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),s=i.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i);else if("gf"===t.ty||"gs"===t.ty){r=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else"no"===t.ty&&(r=new SVGNoStyleData(this,t,i));return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var s=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,s,a,n){var o,h,l,p,f,m,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else"tr"===t[o].ty?(m||(e[o]=this.createTransformElement(t[o],i)),p=e[o].transform,c.push(p)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(m||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty?(m?(f=e[o]).closed=!1:((f=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=f,this.shapeModifiers.push(f)),y.push(f)):"rp"===t[o].ty&&(m?(f=e[o]).closed=!0:(f=ShapeModifiers.getModifier(t[o].ty),(e[o]=f).init(this,t,o,e),this.shapeModifiers.push(f),n=!1),y.push(f));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==r&&(this.sc=r,n=this._mdf.sc=!0),this.fc!==i&&(this.fc=i,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<s;i+=1)a=r!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s<a;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(s):55296<=e&&e<=56319?56320<=(r=t.charCodeAt(s+1))&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):56319<e?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),E=0,P=getFontProperties(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var S,x=t.tr/1e3*t.finalSize;if(t.sz)for(var C,A,_=!0,T=t.sz[0],D=t.sz[1];_;){g=C=0,r=(A=this.buildFinalText(t.t)).length,x=t.tr/1e3*t.finalSize;var k=-1;for(e=0;e<r;e+=1)S=A[e].charCodeAt(0),i=!1," "===A[e]?k=e:13!==S&&3!==S||(i=!(g=0),C+=t.finalLineHeight||1.2*t.finalSize),T<g+(E=h.chars?(o=h.getCharData(A[e],b.fStyle,b.fFamily),i?0:o.w*t.finalSize/100):h.measureText(A[e],t.f,t.finalSize))&&" "!==A[e]?(-1===k?r+=1:e=k,C+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,k===e?1:0,"\r"),k=-1,g=0):(g+=E,g+=x);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&D<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,_=!1)}g=-x;var M,F=E=0;for(e=0;e<r;e+=1)if(i=!1,13===(S=(M=t.finalText[e]).charCodeAt(0))||3===S?(F=0,y.push(g),v=v<g?g:v,g=-2*x,i=!(s=""),u+=1):s=M,E=h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),i?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===M?F+=E+x:(g+=E+x+F,F=0),p.push({l:E,an:E,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=E,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=E);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=E,d+=1;f+=1,c=0}}else if(3==m){if(c+=E,""===s||e===r-1){for(""===s&&(c-=E);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=E,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=v<g?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,B,R=l.a;n=R.length;var L=[];for(a=0;a<n;a+=1){for((w=R[a]).a.sc&&(t.strokeColorAnim=!0),w.a.sw&&(t.strokeWidthAnim=!0),(w.a.fc||w.a.fh||w.a.fs||w.a.fb)&&(t.fillColorAnim=!0),B=0,V=w.s.b,e=0;e<r;e+=1)(I=p[e]).anIndexes[a]=B,(1==V&&""!==I.val||2==V&&""!==I.val&&" "!==I.val||3==V&&(I.n||" "==I.val||e==r-1)||4==V&&(I.n||e==r-1))&&(1===w.s.rn&&L.push(B),B+=1);l.a[a].s.totalChars=B;var G,z=-1;if(1===w.s.rn)for(e=0;e<r;e+=1)z!=(I=p[e]).anIndexes[a]&&(z=I.anIndexes[a],G=L.splice(Math.floor(Math.random()*L.length),1)[0]),I.anIndexes[a]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var u=Math.max,y=Math.min,g=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,i=1,s=1;0<this.ne.v?e=this.ne.v/100:r=-this.ne.v/100,0<this.xe.v?i=1-this.xe.v/100:s=1+this.xe.v/100;var a=BezierFactory.getBezierEasing(e,r,i,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-u(0,y(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=u(0,y(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,f=-p/2+(t=y(u(0,t+.5-o),h-o)),m=p/2;n=Math.sqrt(1-f*f/(m*m))}n=a(n)}else n=6===l?a(n=h===o?0:(t=y(u(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=g(o)&&(n=u(0,y(t-o<0?y(h,1)-(o-t):h-t,1))),a(n));if(100!==this.sm.v){var c=.01*this.sm.v;0===c&&(c=1e-8);var d=.5-.5*c;n<d?n=0:1<(n=(n-d)/c)&&(n=1)}return n*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(s<i){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,s,a,n,o,h,l,p,f,m,c,d,u,y,g,v,b,E,P=this._moreOptions.alignment.v,S=this._animatorsData,x=this._textData,C=this.mHelper,A=this._renderType,_=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(E=this._pathData.m,!this._pathData.n||this._pathData._mdf){var D,k=E.v;for(this._pathData.r.v&&(k=k.reverse()),n={tLength:0,segments:[]},a=k._length-1,s=g=0;s<a;s+=1)D=bez.buildBezierData(k.v[s],k.v[s+1],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[s+1][0]-k.v[s+1][0],k.i[s+1][1]-k.v[s+1][1]]),n.tLength+=D.segmentLength,n.segments.push(D),g+=D.segmentLength;s=a,E.v.c&&(D=bez.buildBezierData(k.v[s],k.v[0],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[0][0]-k.v[0][0],k.i[0][1]-k.v[0][1]]),n.tLength+=D.segmentLength,n.segments.push(D),g+=D.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=1,p=!(l=m=0),u=n.segments,o<0&&E.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=(d=u[m=u.length-1].points).length-1;o<0;)o+=d[f].partialLength,(f-=1)<0&&(f=(d=u[m-=1].points).length-1);c=(d=u[m].points)[f-1],y=(h=d[f]).partialLength}a=T.length,i=r=0;var M,F,w,I,V,B=1.2*t.finalSize*.714,R=!0;w=S.length;var L,G,z,N,O,H,j,q,W,$,Y,X,J=-1,K=o,Z=m,Q=f,U=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var rt=0,it=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1;nt=!(rt=0)}else{for(F=0;F<w;F+=1)(M=S[F].a).t.propType&&(nt&&2===t.j&&(it+=M.t.v*st),(V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?rt+=M.t.v*V[0]*st:rt+=M.t.v*V*st);nt=!1}for(rt&&(rt+=it);at<s;)T[at].animatorJustifyOffset=rt,at+=1}for(s=0;s<a;s+=1){if(C.reset(),N=1,T[s].n)r=0,i+=t.yOffset,i+=R?1:0,o=K,R=!1,this._hasMaskedPath&&(f=Q,c=(d=u[m=Z].points)[f-1],y=(h=d[f]).partialLength,l=0),X=W=Y=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(U!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}U=T[s].line}J!==T[s].ind&&(T[J]&&(o+=T[J].extra),o+=T[s].an/2,J=T[s].ind),o+=P[0]*T[s].an*.005;var ot=0;for(F=0;F<w;F+=1)(M=S[F].a).p.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?ot+=M.p.v[0]*V[0]:ot+=M.p.v[0]*V),M.a.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?ot+=M.a.v[0]*V[0]:ot+=M.a.v[0]*V);for(p=!0,this._pathData.a.v&&(o=.5*T[0].an+(g-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*J/(a-1),o+=this._pathData.f.v);p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,d=u[m+=1]?u[m].points:E.v.c?u[m=f=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,C.translate(-L,0,0)}else L=T[s].an/2-T[s].add,C.translate(-L,0,0),C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01,0);for(F=0;F<w;F+=1)(M=S[F].a).t.propType&&(V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),0===r&&0===t.j||(this._hasMaskedPath?V.length?o+=M.t.v*V[0]:o+=M.t.v*V:V.length?r+=M.t.v*V[0]:r+=M.t.v*V));for(t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<w;F+=1)(M=S[F].a).a.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?C.translate(-M.a.v[0]*V[0],-M.a.v[1]*V[1],M.a.v[2]*V[2]):C.translate(-M.a.v[0]*V,-M.a.v[1]*V,M.a.v[2]*V));for(F=0;F<w;F+=1)(M=S[F].a).s.propType&&((V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars)).length?C.scale(1+(M.s.v[0]-1)*V[0],1+(M.s.v[1]-1)*V[1],1):C.scale(1+(M.s.v[0]-1)*V,1+(M.s.v[1]-1)*V,1));for(F=0;F<w;F+=1){if(M=S[F].a,V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),M.sk.propType&&(V.length?C.skewFromAxis(-M.sk.v*V[0],M.sa.v*V[1]):C.skewFromAxis(-M.sk.v*V,M.sa.v*V)),M.r.propType&&(V.length?C.rotateZ(-M.r.v*V[2]):C.rotateZ(-M.r.v*V)),M.ry.propType&&(V.length?C.rotateY(M.ry.v*V[1]):C.rotateY(M.ry.v*V)),M.rx.propType&&(V.length?C.rotateX(M.rx.v*V[0]):C.rotateX(M.rx.v*V)),M.o.propType&&(V.length?N+=(M.o.v*V[0]-N)*V[0]:N+=(M.o.v*V-N)*V),t.strokeWidthAnim&&M.sw.propType&&(V.length?H+=M.sw.v*V[0]:H+=M.sw.v*V),t.strokeColorAnim&&M.sc.propType)for(q=0;q<3;q+=1)V.length?O[q]+=(M.sc.v[q]-O[q])*V[0]:O[q]+=(M.sc.v[q]-O[q])*V;if(t.fillColorAnim&&t.fc){if(M.fc.propType)for(q=0;q<3;q+=1)V.length?j[q]+=(M.fc.v[q]-j[q])*V[0]:j[q]+=(M.fc.v[q]-j[q])*V;M.fh.propType&&(j=V.length?addHueToRGB(j,M.fh.v*V[0]):addHueToRGB(j,M.fh.v*V)),M.fs.propType&&(j=V.length?addSaturationToRGB(j,M.fs.v*V[0]):addSaturationToRGB(j,M.fs.v*V)),M.fb.propType&&(j=V.length?addBrightnessToRGB(j,M.fb.v*V[0]):addBrightnessToRGB(j,M.fb.v*V))}}for(F=0;F<w;F+=1)(M=S[F].a).p.propType&&(V=S[F].s.getMult(T[s].anIndexes[F],x.a[F].s.totalChars),this._hasMaskedPath?V.length?C.translate(0,M.p.v[1]*V[0],-M.p.v[2]*V[1]):C.translate(0,M.p.v[1]*V,-M.p.v[2]*V):V.length?C.translate(M.p.v[0]*V[0],M.p.v[1]*V[1],-M.p.v[2]*V[2]):C.translate(M.p.v[0]*V,M.p.v[1]*V,-M.p.v[2]*V));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&($="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(Y="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(C.translate(0,-t.ls),C.translate(0,P[1]*B*.01+i,0),this._pathData.p.v){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),C.rotate(-ht*Math.PI/180)}C.translate(G,z,0),o-=P[0]*T[s].an*.005,T[s+1]&&J!==T[s+1].ind&&(o+=T[s].an/2,o+=.001*t.tr*t.finalSize)}else{switch(C.translate(r,i,0),t.ps&&C.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:C.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}C.translate(0,-t.ls),C.translate(L,0,0),C.translate(P[0]*T[s].an*.005,P[1]*B*.01,0),r+=T[s].l+.001*t.tr*t.finalSize}"html"===A?tt=C.toCSS():"svg"===A?tt=C.to2dCSS():et=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],X=N}this.lettersChangedFlag=_<=s?(I=new LetterProps(X,W,$,Y,tt,et),this.renderedLetters.push(I),_+=1,!0):(I=this.renderedLetters[s]).update(X,W,$,Y,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,s=e.length,a="";for(r=0;r<s;r+=1)"sh"===e[r].ty&&(i=e[r].ks.k,a+=buildShapeString(i,i.i.length,!0,t));return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),s=createElementID();i.setAttribute("id",s),i.textContent=e.title,this.svgElement.appendChild(i),r+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+n}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var t;this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVEffects(){}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,s=!1;for(r=0;r<i;r+=1)"n"!==this.masksProperties[r].mode&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVBaseElement(){}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var n,o=r.length;for(s=0;s<o;s+=1)r[s].closed||(n={transforms:i.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(n),r[s].elements.push(n))}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CanvasRendererBase(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],s="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(s),s=""):s+=t[e],e+=1;return i.push(s),i},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var n,o=r.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l=this.mHelper,p=this.data.singleShape,f=0,m=0,c=!0,d=.001*r.tr*r.finalSize;if(!p||h||r.sz){var u,y=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!h||!p||0===t){if(n=t<y?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),l.scale(r.finalSize/100,r.finalSize/100),p&&(o[t].n&&(f=-d,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=u.data),v=new SVGShapeElement(b,this.globalData,this)}(this.textSpans[t].glyph=v)._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var E=this.textContainer,P="start";switch(r.j){case 1:P="end";break;case 2:P="middle";break;default:P="start"}E.setAttribute("text-anchor",P),E.setAttribute("letter-spacing",d);var S=this.buildTextContents(r.finalText);for(e=S.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t].span||createNS("tspan")).textContent=S[t],n.setAttribute("x",0),n.setAttribute("y",m),n.style.display="inherit",E.appendChild(n),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=n,m+=r.finalLineHeight;this.layerElement.appendChild(E)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,s,a=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;for(e=n.length,t=0;t<e;t+=1)n[t].n||(r=a[t],i=this.textSpans[t].span,(s=this.textSpans[t].glyph)&&s.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;0<=e;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(i=this.elements[s].getBaseElement()),s+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r,i=0,s=t.transforms.length,a=e;i<s&&!e;){if(t.transforms[i].transform.mProps._mdf){a=!0;break}i+=1}if(a)for(t.finalTransform.reset(),i=s-1;0<=i;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=s.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var h=i._length;for(o=1;o<h;o+=1)r=s.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=s.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);i.d=s,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,s){var a,n,o,h,l,p,f=t.length-1,m=[],c=[],d=[].concat(s);for(a=f;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,d)}else"tr"===t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"===t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),(e[a]=l).init(this,t,a,e),this.shapeModifiers.push(l),i=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),f=c.length,a=0;a<f;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,f=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(f.strokeStyle="st"===o?h.co:h.grd,f.lineWidth=h.wi,f.lineCap=h.lc,f.lineJoin=h.lj,f.miterLimit=h.ml||0):f.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),r=a.length,e=0;e<r;e+=1){for("st"!==o&&"gs"!==o||(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,i=0;i<s;i+=1)"m"===n[i].t?f.moveTo(n[i].p[0],n[i].p[1]):"c"===n[i].t?f.bezierCurveTo(n[i].pts[0],n[i].pts[1],n[i].pts[2],n[i].pts[3],n[i].pts[4],n[i].pts[5]):f.closePath();"st"!==o&&"gs"!==o||(f.stroke(),h.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&f.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(i=l._length,r=1;r<i;r+=1)1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[r],l.v[r])});1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&i&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[r-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,n=this.globalData.canvasContext,o=e.s.v,h=e.e.v;if(1===t.t)i=n.createLinearGradient(o[0],o[1],h[0],h[1]);else{var l=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),p=Math.atan2(h[1]-o[1],h[0]-o[0]),f=e.h.v;1<=f?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;a<u;a+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*a+1]),i.addColorStop(y[4*a]/100,"rgba("+y[4*a+1]+","+y[4*a+2]+","+y[4*a+3]+","+g+")");s.grd=i}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(i.da=s.dashArray,i.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,s,a,n,o,h,l,p,f,m,c,d,u=this.globalData.fontManager.getFontByName(t.f),y=t.l,g=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,E=0,P=0,S=!0,x=0;for(i=0;i<s;i+=1){n=(a=this.globalData.fontManager.getCharData(t.finalText[i],u.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&a.data||{},g.reset(),v&&y[i].n&&(E=-b,P+=t.yOffset,P+=S?1:0,S=!1),f=(l=n.shapes?n.shapes[0].it:[]).length,g.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,g,y[i].line,E,P),c=createSizedArray(f-1);var C=0;for(p=0;p<f;p+=1)if("sh"===l[p].ty){for(h=l[p].ks.k.i.length,m=l[p].ks.k,d=[],o=1;o<h;o+=1)1===o&&d.push(g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[o][0],m.i[o][1],0),g.applyToY(m.i[o][0],m.i[o][1],0),g.applyToX(m.v[o][0],m.v[o][1],0),g.applyToY(m.v[o][0],m.v[o][1],0));d.push(g.applyToX(m.o[o-1][0],m.o[o-1][1],0),g.applyToY(m.o[o-1][0],m.o[o-1][1],0),g.applyToX(m.i[0][0],m.i[0][1],0),g.applyToY(m.i[0][0],m.i[0][1],0),g.applyToX(m.v[0][0],m.v[0][1],0),g.applyToY(m.v[0][0],m.v[0][1],0)),c[C]=d,C+=1}v&&(E+=y[i].l,E+=b),this.textSpans[x]?this.textSpans[x].elem=c:this.textSpans[x]={elem:c},x+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,s,a,n=this.canvasContext;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,f,m=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?m!==o.fc&&(m=o.fc,n.fillStyle=o.fc):m!==this.values.fill&&(m=this.values.fill,n.fillStyle=this.values.fill),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(f[s],f[s+1],f[s+2],f[s+3],f[s+4],f[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),i=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(a=(f=p[r]).length,this.globalData.canvasContext.moveTo(f[0],f[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(f[s],f[s+1],f[s+2],f[s+3],f[s+4],f[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o<n&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(r=a)*o:r=(e=s)/o,i.drawImage(this.img,(s-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(){var t,e,r,i;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,i=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=r<i&&"meet"===a||i<r&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(i<r&&"meet"===a||r<i&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r<i&&"meet"===a||i<r&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;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],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;0<=r;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);(e[t]=r).initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(r=0;r<l-1;r+=1)i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[r+1]),n=this.getTransformedPoint(h,o.v[r+1]),this.checkBounds(i,s,a,n,e);o.c&&(i=this.getTransformedPoint(h,o.v[r]),s=this.getTransformedPoint(h,o.o[r]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(i,s,a,n,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,s){this.getBoundsOfCurve(t,e,r,i);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var s,a,n,o,h,l,p,f=[[t[0],i[0]],[t[1],i[1]]],m=0;m<2;++m)a=6*t[m]-12*e[m]+6*r[m],s=-3*t[m]+9*e[m]-9*r[m]+3*i[m],n=3*e[m]-3*t[m],a|=0,n|=0,0===(s|=0)&&0===a||(0===s?0<(o=-n/a)&&o<1&&f[m].push(this.calculateF(o,t,e,r,i,m)):0<=(h=a*a-4*n*s)&&(0<(l=(-a+bmSqrt(h))/(2*s))&&l<1&&f[m].push(this.calculateF(l,t,e,r,i,m)),0<(p=(-a-bmSqrt(h))/(2*s))&&p<1&&f[m].push(this.calculateF(p,t,e,r,i,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it&&this.calculateBoundingBox(t[r].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=s,i.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,s,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var n=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=n}var h,l,p,f=t.l;s=f.length;var m,c=this.mHelper,d="",u=0;for(i=0;i<s;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[u]?h=this.textPaths[u]:((h=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[u]?p=(l=this.textSpans[u]).children[0]:((l=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[u]?this.textPaths[u]:createNS("text"):this.textSpans[u]?(l=this.textSpans[u],h=this.textPaths[u]):(styleDiv(l=createTag("span")),styleDiv(h=createTag("span")),l.appendChild(h)),this.globalData.fontManager.chars){var y,g=this.globalData.fontManager.getCharData(t.finalText[i],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(y=g?g.data:null,c.reset(),y&&y.shapes&&y.shapes.length&&(m=y.shapes[0].it,c.scale(t.finalSize/100,t.finalSize/100),d=this.createPathShape(c,m),h.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(l),y&&y.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=p.style,E="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=E,b.webkitTransform=E,f[i].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);l.appendChild(p)}}else if(h.textContent=f[i].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(l);var P=h.style,S="translate3d(0,"+-t.finalSize/1.2+"px,0)";P.transform=S,P.webkitTransform=S}this.isMasked?this.textSpans[u]=h:this.textSpans[u]=l,this.textSpans[u].style.display="block",this.textPaths[u]=h,u+=1}for(;u<this.textSpans.length;)this.textSpans[u].style.display="none",u+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,s,a,n,o=0,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;for(i=l.length,r=0;r<i;r+=1)l[r].n?o+=1:(a=this.textSpans[r],n=this.textPaths[r],s=h[o],o+=1,s._mdf.m&&(this.isMasked?a.setAttribute("transform",s.m):(a.style.webkitTransform=s.m,a.style.transform=s.m)),a.style.opacity=s.o,s.sw&&s._mdf.sw&&n.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&n.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(n.setAttribute("fill",s.fc),n.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height));if(this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var f="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=f,t.webkitTransform=f}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,s=this.comp.threeDElements.length;for(t=0;t<s;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){r=e.perspectiveElem.style,i=e.container.style;var a=this.pe.v+"px",n="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,i.transformOrigin=n,i.mozTransformOrigin=n,i.webkitTransformOrigin=n,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||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){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;0<=t;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(f=this.comp.threeDElements[t]).type){if(p){var d=this.mat.toCSS();(c=f.container.style).transform=d,c.webkitTransform=d}this.pe._mdf&&((m=f.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,s):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?"3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")):"2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t);for(t=(r=this.threeDElements.length)-1;0<=t;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var s,a=this.threeDElements[r].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[r].container.insertBefore(t,s):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",styleDiv(this.resizerElem=e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,r,i,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight;i=s/a<this.globalData.compSize.w/this.globalData.compSize.h?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,r=0,(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,0);var n=this.resizerElem.style;n.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",n.transform=n.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",s.perspective=s.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],i,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var Expressions=(Y6={},Y6.initExpressions=function(t){var e=0,r=[];function i(){var t,e=r.length;for(t=0;t<e;t+=1)r[t].release();r.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&i()},t.renderer.globalData.registerExpressionProperty=function(t){-1===r.indexOf(t)&&r.push(t)}},Y6),Y6;function _typeof$1(t){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function seedRandom(o,h){var l,p=this,f=256,m=6,c="random",d=h.pow(f,m),u=h.pow(2,52),y=2*u,g=f-1;function v(t){var e,r=t.length,n=this,i=0,s=n.i=n.j=0,a=n.S=[];for(r||(t=[r++]);i<f;)a[i]=i++;for(i=0;i<f;i++)a[i]=a[s=g&s+t[i%r]+(e=a[i])],a[s]=e;n.g=function(t){for(var e,r=0,i=n.i,s=n.j,a=n.S;t--;)e=a[i=g&i+1],r=r*f+a[g&(a[i]=a[s=g&s+e])+(a[s]=e)];return n.i=i,n.j=s,r}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function E(t,e){for(var r,i=t+"",s=0;s<i.length;)e[g&s]=g&(r^=19*e[g&s])+i.charCodeAt(s++);return P(e)}function P(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,r){var i=[],s=E(function t(e,r){var i,s=[],a=_typeof$1(e);if(r&&"object"==a)for(i in e)try{s.push(t(e[i],r-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,P(o)]:null===t?function(){try{if(l)return P(l.randomBytes(f));var t=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(t),P(t)}catch(t){var e=p.navigator,r=e&&e.plugins;return[+new Date,p,r,p.screen,P(o)]}}():t,3),i),a=new v(i),n=function(){for(var t=a.g(m),e=d,r=0;t<u;)t=(t+r)*f,e*=f,r=a.g(1);for(;y<=t;)t/=2,e/=2,r>>>=1;return(t+r)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,E(P(a.S),o),(e.pass||r||function(t,e,r,i){return i&&(i.S&&b(i,a),t.state=function(){return b(a,{})}),r?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},E(h.random(),o)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;r<i;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if("string"===r||"string"===i)return t+e;if(isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return"string"===r&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]*e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,s,a=_typeof(t),n=_typeof(e);if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t[i]/e;return r}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,r=createTypedArray("float32",s),i=0;i<s;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(r<e){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r<i;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],s=t[1],a=t[2],n=Math.max(i,s,a),o=Math.min(i,s,a),h=(n+o)/2;if(n===o)r=e=0;else{var l=n-o;switch(r=.5<h?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-i)/l+2;break;case a:e=(i-s)/l+4}e/=6}return[e,r,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)r=i=e=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return i;if(r<=t)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n<h;n+=1)l[n]=i[n]+(s[n]-i[n])*o;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var s=createTypedArray("float32",i),a=BMMath.random();for(r=0;r<i;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var s,a=t.length,n=shapePool.newElement();n.setPathData(!!i,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=r&&r[s]?r[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var r,i,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(i=r=0;r<n;){for(i=0;i<s;i+=1)a[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(i=0;i<s;i+=1)l[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,s){return applyEase(easeOutBez,t,e,r,i,s)}function easeIn(t,e,r,i,s){return applyEase(easeInBez,t,e,r,i,s)}function ease(t,e,r,i,s){return applyEase(easeInOutBez,t,e,r,i,s)}function applyEase(t,e,r,i,s,a){void 0===s?(s=r,a=i):e=(e-r)/(i-r),1<e?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,r,i,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){i=t-data.k[e].t>data.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;r<i;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var s;for(s=0;s<e.length;s+=1)i+=Math.pow(r[s]-e[s],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,r,i=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(s[r]-i[r])/-.001;else e=(s-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function o(t,e,r){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(r?s=p-(i=e?Math.abs(p-this.elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=(m[a]-f[a])*d+c[a];return o}return(m-f)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0)}function h(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(m[a]-f[a])*d;return o}return c-(m-f)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((i-((p-h)%i+p))/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var r,i,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]+=i[h];else r+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)r[h]/=e;else r/=e;return r}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,r){var i=s(t,e,r);return i.dynamicProperties.length?i.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(t);e.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(t),m=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(f*this.px.mult,m*this.py.mult,-c*this.pz.mult)}else e.translate(f*this.px.mult,m*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(i):i.getValueAtTime=function(){return this.v.clone(new Matrix)}.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,r,i,s){var a=p(t,e,r,i,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==r&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function r(){}r.prototype={vertices:function(t,e){this.k&&this.getValue();var r,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var i,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([r],t),extendPrototype([r],e),e.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,i,s){var a=n(t,e,r,i,s);return a.propertyIndex=e.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(t,e.pt,a):4===r&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t===r)return t;var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}return registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),setExpressionsPlugin(Expressions),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie},"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):(C="undefined"!=typeof globalThis?globalThis:C||self).lottie=D()),{loadAnimation:loadAnimation}}({});onmessage=function(t){var e=t.data,r=e.type,i=e.payload;"load"===r?lottieInternal.loadAnimation(i):"pause"===r?animations[i.id]&&animations[i.id].pause():"play"===r?animations[i.id]&&animations[i.id].play():"stop"===r?animations[i.id]&&animations[i.id].stop():"setSpeed"===r?animations[i.id]&&animations[i.id].setSpeed(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"setDirection"===r?animations[i.id]&&animations[i.id].setDirection(i.value):"goToAndPlay"===r?animations[i.id]&&animations[i.id].goToAndPlay(i.value,i.isFrame):"goToAndStop"===r?animations[i.id]&&animations[i.id].goToAndStop(i.value,i.isFrame):"setSubframe"===r?animations[i.id]&&animations[i.id].setSubframe(i.value):"addEventListener"===r?animations[i.id]&&animations[i.id].addEventListener(i.eventName,function(){self.postMessage({type:"event",payload:{id:i.id,callbackId:i.callbackId,argument:arguments[0]}})}):"destroy"===r?animations[i.id]&&(animations[i.id].destroy(),animations[i.id]=null):"resize"===r&&animations[i.id]&&animations[i.id].resize()}}function createWorker(t){var e=new Blob(["("+t.toString()+"())"],{type:"text/javascript"}),r=URL.createObjectURL(e);return new Worker(r)}var lottie=function(){"use strict";var n=createWorker(workerContent),r=0,o=0,h={},l={rendererSettings:{}};function p(t,e,r,i){var s;for(var a in s="div"===t.type?document.createElement("div"):document.createElementNS(t.namespace,t.type),t.attributes)Object.prototype.hasOwnProperty.call(t.attributes,a)&&("href"===a?s.setAttributeNS("http://www.w3.org/1999/xlink",a,t.attributes[a]):s.setAttribute(a,t.attributes[a]),"id"===a&&(r[t.attributes[a]]=s));for(var n in t.style)Object.prototype.hasOwnProperty.call(t.style,n)&&(s.style[n]=t.style[n]);t.children.forEach(function(t){p(t,s,r)}),i?e.insertBefore(s,i):e.appendChild(s)}var e=function(t){var e=h[t.id];e._loaded=!0,e.pendingCallbacks.forEach(function(t){e.animInstance.addEventListener(t.eventName,t.callback),"DOMLoaded"===t.eventName&&t.callback()}),e.animInstance.totalFrames=t.totalFrames,e.animInstance.frameRate=t.frameRate;var r=e.container,i=e.elements;p(t.tree,r,i)};function f(t,e){for(var r,i=0;i<t.length;i+=1){var s,a=e[(r=t[i])[1]];if(a)r[2]&&(s=e[r[2]]),p(r[0],a,e,s),t.splice(i,1),i-=1}}function m(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.style[r[0]]=r[1]}function c(t,e){for(var r,i=0;i<e.length;i+=1)r=e[i],t.setAttribute(r[0],r[1])}return n.onmessage=function(t){"loaded"===t.data.type?e(t.data.payload):"updated"===t.data.type?function(t){var e=t.elements,r=h[t.id];if(r){for(var i,s=r.elements,a=0;a<e.length;a+=1){var n=s[(i=e[a]).id];f(i.elements,s),m(n,i.styles),c(n,i.attributes)}r.animInstance.currentFrame=t.currentTime}}(t.data.payload):"event"===t.data.type&&function(t){var e=h[t.id];if(e){var r=e.callbacks;r[t.callbackId]&&r[t.callbackId](t.argument)}}(t.data.payload)},{loadAnimation:function(t){var i,s="lottie_animationId_"+(r+=1),a={elements:{},callbacks:{},pendingCallbacks:[]},e={id:s,pause:function(){n.postMessage({type:"pause",payload:{id:s}})},play:function(){n.postMessage({type:"play",payload:{id:s}})},stop:function(){n.postMessage({type:"stop",payload:{id:s}})},setSpeed:function(t){n.postMessage({type:"setSpeed",payload:{id:s,value:t}})},setDirection:function(t){n.postMessage({type:"setDirection",payload:{id:s,value:t}})},goToAndStop:function(t,e){n.postMessage({type:"goToAndStop",payload:{id:s,value:t,isFrame:e}})},goToAndPlay:function(t,e){n.postMessage({type:"goToAndPlay",payload:{id:s,value:t,isFrame:e}})},setSubframe:function(t){n.postMessage({type:"setSubframe",payload:{id:s,value:t}})},addEventListener:function(t,e){if(a._loaded){var r="callback_"+(o+=1);a.callbacks[r]=e,n.postMessage({type:"addEventListener",payload:{id:s,callbackId:r,eventName:t}})}else a.pendingCallbacks.push({eventName:t,callback:e})},destroy:function(){h[s]=null,a.container&&(a.container.innerHTML=""),n.postMessage({type:"destroy",payload:{id:s}})},resize:function(){n.postMessage({type:"resize",payload:{id:s}})}};return a.animInstance=e,(i=t,new Promise(function(e,t){var r=Object.assign({},l,i);r.animType&&!r.renderer&&(r.renderer=r.animType),r.wrapper&&(r.container||(r.container=r.wrapper),delete r.wrapper),r.animationData?e(r):r.path?fetch(r.path).then(function(t){return t.json()}).then(function(t){r.animationData=t,delete r.path,e(r)}):t()})).then(function(t){var e=[];if(t.container&&(a.container=t.container,delete t.container),"canvas"===t.renderer&&!t.rendererSettings.canvas){var r=document.createElement("canvas");a.container.appendChild(r),r.width=t.animationData.w,r.height=t.animationData.h,r.style.width="100%",r.style.height="100%";var i=r.transferControlToOffscreen();e.push(i),t.rendererSettings.canvas=i}h[s]=a,n.postMessage({type:"load",payload:{params:t,id:s}},e)}),e}}}();
 return lottie;
 }));
\ No newline at end of file
diff --git a/index.d.ts b/index.d.ts
index 740bf64..d27dd9e 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -17,7 +17,7 @@
     playCount: number;
     isPaused: boolean;
     autoplay: boolean;
-    loop: boolean;
+    loop: boolean | number;
     renderer: any;
     animationID: string;
     assetsPath: string;
@@ -30,8 +30,8 @@
     togglePause(name?: string): void;
     destroy(name?: string): void;
     pause(name?: string): void;
-    goToAndStop(value: number, isFrame?: boolean, name?: string): void;
-    goToAndPlay(value: number, isFrame?: boolean, name?: string): void;
+    goToAndStop(value: number | string, isFrame?: boolean, name?: string): void;
+    goToAndPlay(value: number | string, isFrame?: boolean, name?: string): void;
     includeLayers(data: any): void;
     setSegment(init: number, end: number): void;
     resetSegments(forceFlag: boolean): void;
@@ -127,6 +127,7 @@
     registerAnimation(element: Element, animationData?: any): void;
     setQuality(quality: string | number): void;
     setLocationHref(href: string): void;
+    setIDPrefix(prefix: string): void;
 };
 
 declare const Lottie: LottiePlayer;
diff --git a/package.json b/package.json
index d9e6be6..5da8769 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "lottie-web",
-  "version": "5.8.1",
+  "version": "5.9.1",
   "description": "After Effects plugin for exporting animations to SVG + JavaScript or canvas + JavaScript",
   "main": "./build/player/lottie.js",
   "repository": {
@@ -8,7 +8,7 @@
     "url": "https://github.com/airbnb/lottie-web.git"
   },
   "scripts": {
-    "build": "npx eslint ./player/js/**/* && node tasks/build.js",
+    "build": "npx eslint ./player/js/**/* && rollup -c && node tasks/build_worker",
     "build_test": "node tasks/build.js",
     "lint": "npx eslint ./player/js/**/*",
     "lint:fix": "npx eslint ./player/js/**/* --fix"
@@ -22,10 +22,17 @@
     "export"
   ],
   "devDependencies": {
+    "@babel/core": "^7.16.0",
+    "@babel/plugin-transform-runtime": "^7.17.0",
+    "@babel/preset-env": "^7.16.4",
+    "@rollup/plugin-babel": "^5.3.0",
+    "@rollup/plugin-node-resolve": "^13.0.6",
     "cheerio": "^1.0.0-rc.2",
     "eslint": "^7.16.0",
     "eslint-config-airbnb-base": "^14.2.1",
     "eslint-plugin-import": "^2.22.1",
+    "rollup": "^2.61.0",
+    "rollup-plugin-terser": "^7.0.2",
     "uglify-js": "^3.4.9",
     "watch": "^1.0.2"
   },
diff --git a/player/index.html b/player/index.html
index 885b886..286a17a 100644
--- a/player/index.html
+++ b/player/index.html
@@ -22,7 +22,7 @@
         }
 
         #lottie{
-            background-color:#ccc;
+            background-color:#000;
             width:100%;
             height:100%;
             display:block;
@@ -33,152 +33,10 @@
 
     </style>
     <!-- build:js lottie.js -->
-    <script src="js/main.js"></script>
-    <script src="js/utils/common.js"></script>
-    <script src="js/utils/BaseEvent.js"></script>
-    <script src="js/utils/getFontProperties.js"></script>
-    <script src="js/utils/helpers/arrays.js"></script>
-    <script src="js/utils/helpers/svg_elements.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/utils/helpers/html_elements.js"></script>
-    <script src="js/utils/helpers/dynamicProperties.js"></script>
-    <script src="js/utils/helpers/blendModes.js"></script>
-    <script src="js/utils/helpers/shapeEnums.js"></script>
-    <script src="js/3rd_party/transformation-matrix.js"></script>
-    <script src="js/3rd_party/seedrandom.js"></script>
-    <script src="js/3rd_party/BezierEaser.js"></script>
-    <script src="js/3rd_party/howler.js"></script>
-    <script src="js/utils/animationFramePolyFill.js"></script>
-    <script src="js/utils/functionExtensions.js"></script>
-    <script src="js/utils/bez.js"></script>
-    <script src="js/utils/DataManager.js"></script>
-    <!-- <script src="js/utils/DataManagerWorkerOverrides.js" data-builds="canvas_worker"></script> -->
-    <script src="js/utils/FontManager.js"></script>
-    <!-- <script src="js/utils/FontManagerWorkerOverride.js" data-builds="canvas_worker"></script> -->
-    <script src="js/utils/PropertyFactory.js"></script>
-    <script src="js/utils/TransformProperty.js"></script>
-    <script src="js/utils/shapes/ShapePath.js"></script>
-    <script src="js/utils/shapes/ShapeProperty.js"></script>
-    <script src="js/utils/shapes/ShapeModifiers.js"></script>
-    <script src="js/utils/shapes/TrimModifier.js"></script>
-    <script src="js/utils/shapes/RoundCornersModifier.js"></script>
-    <script src="js/utils/shapes/PuckerAndBloatModifier.js"></script>
-    <script src="js/utils/shapes/RepeaterModifier.js"></script>
-    <script src="js/utils/shapes/ShapeCollection.js"></script>
-    <script src="js/utils/shapes/DashProperty.js"></script>
-    <script src="js/utils/shapes/GradientProperty.js"></script>
-    <script src="js/utils/shapes/shapePathBuilder.js"></script>
-    <script src="js/utils/audio/AudioController.js"></script>
-    <script src="js/utils/imagePreloader.js" data-builds="full,canvas,canvas_light,html,html_light,svg,svg_light"></script>
-    <!-- <script src="js/utils/imagePreloaderWorkerOverride.js" data-builds="canvas_worker"></script> -->
-    <script src="js/utils/featureSupport.js"></script>
-    <script src="js/utils/filters.js"></script>
-    <!-- <script src="js/utils/asset_loader_worker_override.js" data-builds="canvas_worker"></script> -->
-    <script src="js/utils/text/TextAnimatorProperty.js"></script>
-    <script src="js/utils/text/TextAnimatorDataProperty.js"></script>
-    <script src="js/utils/text/LetterProps.js"></script>
-    <script src="js/utils/text/TextProperty.js"></script>
-    <script src="js/utils/text/TextSelectorProperty.js"></script>
-    <script src="js/utils/pooling/pool_factory.js"></script>
-    <script src="js/utils/pooling/pooling.js"></script>
-    <script src="js/utils/pooling/point_pool.js"></script>
-    <script src="js/utils/pooling/shape_pool.js"></script>
-    <script src="js/utils/pooling/shapeCollection_pool.js"></script>
-    <script src="js/utils/pooling/segments_length_pool.js"></script>
-    <script src="js/utils/pooling/bezier_length_pool.js"></script>
-    <script src="js/utils/markers/markerParser.js"></script>
-    <script src="js/renderers/BaseRenderer.js"></script>
-    <script src="js/renderers/SVGRenderer.js"></script>
-    <script src="js/renderers/CanvasRenderer.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <!-- <script src="js/renderers/CanvasRendererWorkerOverride.js" data-builds="canvas_worker"></script> -->
-    <script src="js/renderers/HybridRenderer.js" data-builds="full,html,html_light"></script>
-    <script src="js/mask.js"></script>
-    <script src="js/elements/helpers/HierarchyElement.js"></script>
-    <script src="js/elements/helpers/FrameElement.js"></script>
-    <script src="js/elements/helpers/TransformElement.js"></script>
-    <script src="js/elements/helpers/RenderableElement.js"></script>
-    <script src="js/elements/helpers/RenderableDOMElement.js"></script>
-    <script src="js/elements/helpers/shapes/ProcessedElement.js"></script>
-    <script src="js/elements/helpers/shapes/SVGStyleData.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/SVGShapeData.js" ></script>
-    <script src="js/elements/helpers/shapes/SVGTransformData.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/SVGStrokeStyleData.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/SVGFillStyleData.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/SVGGradientFillStyleData.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/SVGGradientStrokeStyleData.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/ShapeGroupData.js"></script>
-    <script src="js/elements/helpers/shapes/SVGElementsRenderer.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/helpers/shapes/ShapeTransformManager.js"></script>
-    <script src="js/elements/helpers/shapes/CVShapeData.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/BaseElement.js"></script>
-    <script src="js/elements/NullElement.js"></script>
-    <script src="js/elements/svgElements/SVGBaseElement.js"></script>
-    <script src="js/elements/ShapeElement.js"></script>
-    <script src="js/elements/TextElement.js"></script>
-    <script src="js/elements/CompElement.js"></script>
-    <script src="js/elements/ImageElement.js"></script>
-    <script src="js/elements/SolidElement.js"></script>
-    <script src="js/elements/AudioElement.js"></script>
-    <script src="js/elements/FootageElement.js"></script>
-    <script src="js/elements/svgElements/SVGCompElement.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/SVGTextElement.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/SVGShapeElement.js"></script>
-    <script src="js/elements/svgElements/effects/SVGTintEffect.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGFillFilter.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGGaussianBlurEffect.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGStrokeEffect.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGTritoneFilter.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGProLevelsFilter.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGDropShadowEffect.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/effects/SVGMatte3Effect.js" data-builds="full,svg,svg_light,html,html_light"></script>
-    <script src="js/elements/svgElements/SVGEffectsPlaceholder.js" data-builds="svg_light,html_light"></script>
-    <script src="js/elements/svgElements/SVGEffects.js" data-builds="full,svg,html"></script>
-    <script src="js/elements/canvasElements/CVContextData.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/canvasElements/CVBaseElement.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/canvasElements/CVImageElement.js" data-builds="full,canvas,canvas_light"></script>
-    <script src="js/elements/canvasElements/CVCompElement.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/canvasElements/CVMaskElement.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/canvasElements/CVShapeElement.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/canvasElements/CVSolidElement.js" data-builds="full,canvas,canvas_light,canvas_worker"></script>
-    <script src="js/elements/canvasElements/CVTextElement.js" data-builds="full,canvas,canvas_light"></script>
-    <script src="js/elements/canvasElements/CVEffects.js" data-builds="full,canvas,canvas_light,html,html_light,canvas_worker"></script>
-    <script src="js/elements/htmlElements/HBaseElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HSolidElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HCompElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HShapeElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HTextElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HImageElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HCameraElement.js" data-builds="full,html,html_light"></script>
-    <script src="js/elements/htmlElements/HEffects.js" data-builds="full,html,html_light"></script>
-    <script src="js/animation/AnimationManager.js"></script>
-    <!-- <script src="js/animation/AnimationManagerWorkerOverride.js" data-builds="canvas_worker"></script> -->
-    <script src="js/animation/AnimationItem.js"></script>
-    <!-- <script src="js/animation/AnimationItemWorkerOverride.js" data-builds="canvas_worker"></script> -->
-    <!-- Expressions -->
-    <script src="js/utils/expressions/Expressions.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/ExpressionManager.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/expressionHelpers.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/ExpressionPropertyDecorator.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/ExpressionTextPropertyDecorator.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/PropertyGroupFactory.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/PropertyInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/ShapeInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/shapes/ShapePathInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/TextInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/LayerInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/FootageInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/CompInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/TransformInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/ProjectInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/EffectInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/MaskInterface.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/ExpressionValueFactory.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/utils/expressions/TextSelectorPropertyDecorator.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/effects/SliderEffect.js" data-builds="full,svg,canvas,html,canvas_worker"></script>
-    <script src="js/effects/EffectsManagerPlaceholder.js"  data-builds="svg_light,canvas,html_light,canvas_worker" ></script>
-    <script src="js/EffectsManager.js" data-builds="full,svg,html"></script>
+    
     <!-- end Expressions -->
     <!-- endbuild -->
-    <script src="js/module.js" ></script>
+    <!-- <script src="js/module.js" type="module"></script> -->
     <!-- <script src="lottie.js"></script> -->
     <!-- <script src="bodymovin_light.js"></script> -->
 
@@ -191,44 +49,46 @@
 
 <script>
     var anim;
-    var elem = document.getElementById('lottie');
-    var animData = {
-        container: elem,
-        renderer: 'svg',
-        loop: true,
-        autoplay: true,
-        rendererSettings: {
-            progressiveLoad:false,
-            preserveAspectRatio: 'xMidYMid meet',
-            imagePreserveAspectRatio: 'xMidYMid meet',
-            title: 'TEST TITLE',
-            description: 'TEST DESCRIPTION',
-            filterSize: {
-                width: '500%',
-                height: '500%',
-                x: '-200%',
-                y: '-200%',
-            }
-        },
-        path: 'exports/bm/data.json',
-        /* animationData: {"v":"5.1.6","fr":60,"ip":0,"op":300,"w":800,"h":600,"nm":"xmas_lights","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"orange","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10,"x":"var $bm_rt;\nvar pathToTrace = thisComp.layer('wire')('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathTan = pathToTrace.tangentOnPath(progress);\n$bm_rt = radiansToDegrees(Math.atan2(pathTan[1], pathTan[0]));"},"p":{"a":0,"k":[400,300,0],"ix":2,"x":"var $bm_rt;\nvar pathLayer = thisComp.layer('wire');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathToTrace = pathLayer('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\n$bm_rt = pathLayer.toComp(pathToTrace.pointOnPath(progress));"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Trace Path","np":4,"mn":"Pseudo/ADBE Trace Path","ix":1,"en":1,"ef":[{"ty":0,"nm":"Progress","mn":"Pseudo/ADBE Trace Path-0001","ix":1,"v":{"a":0,"k":2,"ix":1,"x":"var $bm_rt;\nif (thisProperty.propertyGroup(1)('Pseudo/ADBE Trace Path-0002') == true && thisProperty.numKeys > 1) {\n    $bm_rt = thisProperty.loopOut('cycle');\n} else {\n    $bm_rt = value;\n}"}},{"ty":7,"nm":"Loop","mn":"Pseudo/ADBE Trace Path-0002","ix":2,"v":{"a":0,"k":1,"ix":2}}]}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":3,"nm":"Shape Layer 1: Path 1 [1.1.2]","cl":"1 2","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[728,276,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":3,"nm":"Shape Layer 1: Path 1 [1.1.1]","cl":"1 1","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.92,"y":0},"n":"0p833_0p833_0p92_0","t":0,"s":[397,276,0],"e":[397,397,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":60,"s":[397,397,0],"e":[397,397,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.53,"y":0},"n":"0p833_0p833_0p53_0","t":180,"s":[397,397,0],"e":[397,276,0],"to":[0,0,0],"ti":[0,0,0]},{"t":190}],"ix":2,"x":"var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n    amp = div(effect('Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":20,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":40,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Position - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":40,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":3,"nm":"Shape Layer 1: Path 1 [1.1.0]","cl":"1 0","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[97,276,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":3,"nm":"red","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10,"x":"var $bm_rt;\nvar pathToTrace = thisComp.layer('wire')('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathTan = pathToTrace.tangentOnPath(progress);\n$bm_rt = radiansToDegrees(Math.atan2(pathTan[1], pathTan[0]));"},"p":{"a":0,"k":[400,300,0],"ix":2,"x":"var $bm_rt;\nvar pathLayer = thisComp.layer('wire');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathToTrace = pathLayer('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\n$bm_rt = pathLayer.toComp(pathToTrace.pointOnPath(progress));"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Trace Path","np":4,"mn":"Pseudo/ADBE Trace Path","ix":1,"en":1,"ef":[{"ty":0,"nm":"Progress","mn":"Pseudo/ADBE Trace Path-0001","ix":1,"v":{"a":0,"k":97,"ix":1,"x":"var $bm_rt;\nif (thisProperty.propertyGroup(1)('Pseudo/ADBE Trace Path-0002') == true && thisProperty.numKeys > 1) {\n    $bm_rt = thisProperty.loopOut('cycle');\n} else {\n    $bm_rt = value;\n}"}},{"ty":7,"nm":"Loop","mn":"Pseudo/ADBE Trace Path-0002","ix":2,"v":{"a":0,"k":1,"ix":2}}]}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":3,"nm":"green","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10,"x":"var $bm_rt;\nvar pathToTrace = thisComp.layer('wire')('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathTan = pathToTrace.tangentOnPath(progress);\n$bm_rt = radiansToDegrees(Math.atan2(pathTan[1], pathTan[0]));"},"p":{"a":0,"k":[400,300,0],"ix":2,"x":"var $bm_rt;\nvar pathLayer = thisComp.layer('wire');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathToTrace = pathLayer('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\n$bm_rt = pathLayer.toComp(pathToTrace.pointOnPath(progress));"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Trace Path","np":4,"mn":"Pseudo/ADBE Trace Path","ix":1,"en":1,"ef":[{"ty":0,"nm":"Progress","mn":"Pseudo/ADBE Trace Path-0001","ix":1,"v":{"a":0,"k":74,"ix":1,"x":"var $bm_rt;\nif (thisProperty.propertyGroup(1)('Pseudo/ADBE Trace Path-0002') == true && thisProperty.numKeys > 1) {\n    $bm_rt = thisProperty.loopOut('cycle');\n} else {\n    $bm_rt = value;\n}"}},{"ty":7,"nm":"Loop","mn":"Pseudo/ADBE Trace Path-0002","ix":2,"v":{"a":0,"k":1,"ix":2}}]}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":3,"nm":"yellow","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10,"x":"var $bm_rt;\nvar pathToTrace = thisComp.layer('wire')('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathTan = pathToTrace.tangentOnPath(progress);\n$bm_rt = radiansToDegrees(Math.atan2(pathTan[1], pathTan[0]));"},"p":{"a":0,"k":[400,300,0],"ix":2,"x":"var $bm_rt;\nvar pathLayer = thisComp.layer('wire');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathToTrace = pathLayer('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\n$bm_rt = pathLayer.toComp(pathToTrace.pointOnPath(progress));"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Trace Path","np":4,"mn":"Pseudo/ADBE Trace Path","ix":1,"en":1,"ef":[{"ty":0,"nm":"Progress","mn":"Pseudo/ADBE Trace Path-0001","ix":1,"v":{"a":0,"k":48,"ix":1,"x":"var $bm_rt;\nif (thisProperty.propertyGroup(1)('Pseudo/ADBE Trace Path-0002') == true && thisProperty.numKeys > 1) {\n    $bm_rt = thisProperty.loopOut('cycle');\n} else {\n    $bm_rt = value;\n}"}},{"ty":7,"nm":"Loop","mn":"Pseudo/ADBE Trace Path-0002","ix":2,"v":{"a":0,"k":1,"ix":2}}]}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":3,"nm":"blue","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10,"x":"var $bm_rt;\nvar pathToTrace = thisComp.layer('wire')('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathTan = pathToTrace.tangentOnPath(progress);\n$bm_rt = radiansToDegrees(Math.atan2(pathTan[1], pathTan[0]));"},"p":{"a":0,"k":[400,300,0],"ix":2,"x":"var $bm_rt;\nvar pathLayer = thisComp.layer('wire');\nvar progress = div(thisLayer.effect('Pseudo/ADBE Trace Path')('Pseudo/ADBE Trace Path-0001'), 100);\nvar pathToTrace = pathLayer('ADBE Root Vectors Group')(1)('ADBE Vectors Group')(1)('ADBE Vector Shape');\n$bm_rt = pathLayer.toComp(pathToTrace.pointOnPath(progress));"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Trace Path","np":4,"mn":"Pseudo/ADBE Trace Path","ix":1,"en":1,"ef":[{"ty":0,"nm":"Progress","mn":"Pseudo/ADBE Trace Path-0001","ix":1,"v":{"a":0,"k":24,"ix":1,"x":"var $bm_rt;\nif (thisProperty.propertyGroup(1)('Pseudo/ADBE Trace Path-0002') == true && thisProperty.numKeys > 1) {\n    $bm_rt = thisProperty.loopOut('cycle');\n} else {\n    $bm_rt = value;\n}"}},{"ty":7,"nm":"Loop","mn":"Pseudo/ADBE Trace Path-0002","ix":2,"v":{"a":0,"k":1,"ix":2}}]}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"wire","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Shape Layer 1: Path 1 [1.1.0]","np":3,"mn":"ADBE Layer Control","ix":1,"en":1,"ef":[{"ty":10,"nm":"Layer","mn":"ADBE Layer Control-0001","ix":1,"v":{"a":0,"k":4,"ix":1}}]},{"ty":5,"nm":"Shape Layer 1: Path 1 [1.1.1]","np":3,"mn":"ADBE Layer Control","ix":2,"en":1,"ef":[{"ty":10,"nm":"Layer","mn":"ADBE Layer Control-0001","ix":1,"v":{"a":0,"k":3,"ix":1}}]},{"ty":5,"nm":"Shape Layer 1: Path 1 [1.1.2]","np":3,"mn":"ADBE Layer Control","ix":3,"en":1,"ef":[{"ty":10,"nm":"Layer","mn":"ADBE Layer Control-0001","ix":1,"v":{"a":0,"k":2,"ix":1}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-178,0],[0,0]],"o":[[0,0],[178,0],[0,0]],"v":[[-303,-24],[-3,-24],[328,-24]],"c":false},"ix":2,"x":"var $bm_rt;\nvar nullLayerNames = [\n        'Shape Layer 1: Path 1 [1.1.0]',\n        'Shape Layer 1: Path 1 [1.1.1]',\n        'Shape Layer 1: Path 1 [1.1.2]'\n    ];\nvar origPath = thisProperty;\nvar origPoints = origPath.points();\nvar origInTang = origPath.inTangents();\nvar origOutTang = origPath.outTangents();\nvar getNullLayers = [];\nfor (var i = 0; i < nullLayerNames.length; i++) {\n    try {\n        getNullLayers.push(effect(nullLayerNames[i])('ADBE Layer Control-0001'));\n    } catch (err) {\n        getNullLayers.push(null);\n    }\n}\nfor (var i = 0; i < getNullLayers.length; i++) {\n    if (getNullLayers[i] != null && getNullLayers[i].index != thisLayer.index) {\n        origPoints[i] = fromCompToSurface(getNullLayers[i].toComp(getNullLayers[i].anchorPoint));\n    }\n}\n$bm_rt = createPath(origPoints, origInTang, origOutTang, origPath.isClosed());"},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.101437908995,0.133333333333,0.10443983639,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"light 4","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-2.547,5.375,0],"ix":2},"a":{"a":0,"k":[-226.723,65.375,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Wayfinder Follower","np":4,"mn":"Pseudo/WayfinderFollower","ix":1,"en":0,"ef":[{"ty":0,"nm":"Position","mn":"Pseudo/WayfinderFollower-0001","ix":1,"v":{"a":0,"k":100,"ix":1}},{"ty":0,"nm":"Offset","mn":"Pseudo/WayfinderFollower-0002","ix":2,"v":{"a":0,"k":0,"ix":2}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[7.75,4.875],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":1,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.239215686275,0.239215686275,0.239215686275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-226.375,67.813],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4,0],[0,0],[0,-5],[-4,-1.5],[-0.5,3]],"o":[[-4,0],[0,0],[0,5],[4,1.5],[0.5,-3]],"v":[[-224,72],[-229.5,72.5],[-236,80.5],[-227.5,98.5],[-217.5,82.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549019608,0.171626296698,0.064836599313,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":481,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"light 3","parent":6,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[4.711,7.375,0],"ix":2},"a":{"a":0,"k":[-226.723,65.375,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Wayfinder Follower","np":4,"mn":"Pseudo/WayfinderFollower","ix":1,"en":0,"ef":[{"ty":0,"nm":"Position","mn":"Pseudo/WayfinderFollower-0001","ix":1,"v":{"a":0,"k":80,"ix":1}},{"ty":0,"nm":"Offset","mn":"Pseudo/WayfinderFollower-0002","ix":2,"v":{"a":0,"k":0,"ix":2}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[7.75,4.875],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":1,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.239215686275,0.239215686275,0.239215686275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-226.375,67.813],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4,0],[0,0],[0,-5],[-4,-1.5],[-0.5,3]],"o":[[-4,0],[0,0],[0,5],[4,1.5],[0.5,-3]],"v":[[-224,72],[-229.5,72.5],[-236,80.5],[-227.5,98.5],[-217.5,82.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.049580929326,0.972549019608,0.31018371582,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":481,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"light 2","parent":7,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0.124,7.383,0],"ix":2},"a":{"a":0,"k":[-226.723,65.375,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Wayfinder Follower","np":4,"mn":"Pseudo/WayfinderFollower","ix":1,"en":0,"ef":[{"ty":0,"nm":"Position","mn":"Pseudo/WayfinderFollower-0001","ix":1,"v":{"a":0,"k":52,"ix":1}},{"ty":0,"nm":"Offset","mn":"Pseudo/WayfinderFollower-0002","ix":2,"v":{"a":0,"k":0,"ix":2}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[7.75,4.875],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":1,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.239215686275,0.239215686275,0.239215686275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-226.375,67.813],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4,0],[0,0],[0,-5],[-4,-1.5],[-0.5,3]],"o":[[-4,0],[0,0],[0,5],[4,1.5],[0.5,-3]],"v":[[-224,72],[-229.5,72.5],[-236,80.5],[-227.5,98.5],[-217.5,82.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549019608,0.961690625957,0.049580929326,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":481,"st":0,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"light","parent":8,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-1.161,7.375,0],"ix":2},"a":{"a":0,"k":[-226.723,65.375,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Wayfinder Follower","np":4,"mn":"Pseudo/WayfinderFollower","ix":1,"en":0,"ef":[{"ty":0,"nm":"Position","mn":"Pseudo/WayfinderFollower-0001","ix":1,"v":{"a":0,"k":31,"ix":1}},{"ty":0,"nm":"Offset","mn":"Pseudo/WayfinderFollower-0002","ix":2,"v":{"a":0,"k":0,"ix":2}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[7.75,4.875],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":1,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.239215686275,0.239215686275,0.239215686275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-226.375,67.813],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4,0],[0,0],[0,-5],[-4,-1.5],[-0.5,3]],"o":[[-4,0],[0,0],[0,5],[4,1.5],[0.5,-3]],"v":[[-224,72],[-229.5,72.5],[-236,80.5],[-227.5,98.5],[-217.5,82.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.04576700996,0.612739413392,0.972549019608,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":481,"st":0,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"light 6","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-4.616,6.133,0],"ix":2},"a":{"a":0,"k":[-226.723,65.375,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[7.75,4.875],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":1,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.239215686275,0.239215686275,0.239215686275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-226.375,67.813],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4,0],[0,0],[0,-5],[-4,-1.5],[-0.5,3]],"o":[[-4,0],[0,0],[0,5],[4,1.5],[0.5,-3]],"v":[[-224,72],[-229.5,72.5],[-236,80.5],[-227.5,98.5],[-217.5,82.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549019608,0.513353355258,0.064836599313,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":481,"st":0,"bm":0}],"markers":[]}, */
-        audioFactory: createAudio,
-    };
-    // lottie.setQuality('low');
-    // anim.setSpeed(0.5)
-    // lottie.useWebWorker(true);
-    setTimeout(() => {
+    import('./js/modules/svg_light.js').then(({default: lottie }) => {
+        var elem = document.getElementById('lottie');
+        var animData = {
+            container: elem,
+            renderer: 'svg',
+            loop: false,
+            autoplay: true,
+            rendererSettings: {
+                progressiveLoad:false,
+                preserveAspectRatio: 'xMidYMid meet',
+                imagePreserveAspectRatio: 'xMidYMid meet',
+                title: 'TEST TITLE',
+                description: 'TEST DESCRIPTION',
+                filterSize: {
+                    width: '500%',
+                    height: '500%',
+                    x: '-200%',
+                    y: '-200%',
+                }
+            },
+            path: 'exports/render/data.json',
+            audioFactory: createAudio,
+        };
+        // lottie.setQuality('low');
+        // anim.setSpeed(0.5)
+        // lottie.useWebWorker(true);
+        window.lottie = lottie;
+        setTimeout(() => {
 
-        anim = lottie.loadAnimation(animData);
-        anim.setSubframe(false);
-        anim.onError = function(errorType, nativeError, errorProps) {
-            console.log(errorType)
-        }
-        
-        anim.addEventListener('error', function(error) {
-            console.log(error)
-        })
-    }, 1)
+            anim = lottie.loadAnimation(animData);
+            anim.setSubframe(false);
+            anim.onError = function(errorType, nativeError, errorProps) {
+                console.log(errorType)
+            }
+            
+            anim.addEventListener('error', function(error) {
+                console.log(error)
+            })
+        }, 1)
+    });
         
     // setTimeout(()=>anim.destroy(), 1000);
 
diff --git a/player/js/3rd_party/BezierEaser.js b/player/js/3rd_party/BezierEaser.js
index dc4d171..602f9c4 100644
--- a/player/js/3rd_party/BezierEaser.js
+++ b/player/js/3rd_party/BezierEaser.js
@@ -1,5 +1,5 @@
 /* eslint-disable */
-var BezierFactory = (function () {
+const BezierFactory = (function () {
   /**
      * BezierEasing - use bezier curve for transition easing function
      * by Gaëtan Renaudeau 2014 - 2015 – MIT License
@@ -154,3 +154,5 @@
 
   return ob;
 }());
+
+export default BezierFactory;
\ No newline at end of file
diff --git a/player/js/3rd_party/seedrandom.js b/player/js/3rd_party/seedrandom.js
index ea58593..becf763 100644
--- a/player/js/3rd_party/seedrandom.js
+++ b/player/js/3rd_party/seedrandom.js
@@ -23,7 +23,7 @@
 
  */
 
-(function (pool, math) {
+function seedRandom(pool, math) {
 //
 // The following constants are related to IEEE 754 limits.
 //
@@ -228,7 +228,10 @@
 //
 
 // End anonymous scope, and pass initial values.
-})(
-    [],     // pool: entropy pool starts empty
-    BMMath    // math: package containing random, pow, and seedrandom
-);
\ No newline at end of file
+};
+
+function initialize(BMMath) {
+    seedRandom([], BMMath);
+}
+
+export default initialize;
diff --git a/player/js/3rd_party/transformation-matrix.js b/player/js/3rd_party/transformation-matrix.js
index c4e53b7..560f5d7 100644
--- a/player/js/3rd_party/transformation-matrix.js
+++ b/player/js/3rd_party/transformation-matrix.js
@@ -1,4 +1,6 @@
-/* global createTypedArray */
+import {
+  createTypedArray,
+} from '../utils/helpers/arrays';
 
 /*!
  Transformation Matrix v2.0
@@ -29,7 +31,7 @@
  * @constructor
  */
 
-var Matrix = (function () {
+const Matrix = (function () {
   var _cos = Math.cos;
   var _sin = Math.sin;
   var _tan = Math.tan;
@@ -420,3 +422,5 @@
     this.reset();
   };
 }());
+
+export default Matrix;
diff --git a/player/js/EffectsManager.js b/player/js/EffectsManager.js
index 20cf2e4..3603538 100644
--- a/player/js/EffectsManager.js
+++ b/player/js/EffectsManager.js
@@ -1,5 +1,17 @@
-/* global extendPrototype, SliderEffect, AngleEffect, ColorEffect, PointEffect, CheckboxEffect, LayerIndexEffect,
-MaskIndexEffect, NoValueEffect, DynamicPropertyContainer */
+import {
+  extendPrototype,
+} from './utils/functionExtensions';
+import {
+  SliderEffect,
+  AngleEffect,
+  ColorEffect,
+  PointEffect,
+  LayerIndexEffect,
+  MaskIndexEffect,
+  CheckboxEffect,
+  NoValueEffect,
+} from './effects/SliderEffect';
+import DynamicPropertyContainer from './utils/helpers/dynamicProperties';
 
 function EffectsManager(data, element) {
   var effects = data.ef || [];
@@ -67,3 +79,5 @@
     }
   }
 };
+
+export default EffectsManager;
diff --git a/player/js/animation/AnimationItem.js b/player/js/animation/AnimationItem.js
index 54d2ef6..e86bca4 100644
--- a/player/js/animation/AnimationItem.js
+++ b/player/js/animation/AnimationItem.js
@@ -1,9 +1,28 @@
-/* global createElementID, subframeEnabled, ProjectInterface, ImagePreloader, audioControllerFactory, extendPrototype, BaseEvent,
-CanvasRenderer, SVGRenderer, HybridRenderer, dataManager, expressionsPlugin, BMEnterFrameEvent, BMCompleteLoopEvent,
-BMCompleteEvent, BMSegmentStartEvent, BMDestroyEvent, BMEnterFrameEvent, BMCompleteLoopEvent, BMCompleteEvent, BMSegmentStartEvent,
-BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, markerParser */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
 
-var AnimationItem = function () {
+import audioControllerFactory from '../utils/audio/AudioController';
+import {
+  getSubframeEnabled,
+  BMEnterFrameEvent,
+  BMCompleteEvent,
+  BMCompleteLoopEvent,
+  BMSegmentStartEvent,
+  BMDestroyEvent,
+  BMRenderFrameErrorEvent,
+  BMConfigErrorEvent,
+  createElementID,
+  getExpressionsPlugin,
+} from '../utils/common';
+import ImagePreloader from '../utils/imagePreloader';
+import BaseEvent from '../utils/BaseEvent';
+import dataManager from '../utils/DataManager';
+import markerParser from '../utils/markers/markerParser';
+import ProjectInterface from '../utils/expressions/ProjectInterface';
+import { getRenderer } from '../renderers/renderersManager';
+
+const AnimationItem = function () {
   this._cbs = [];
   this.name = '';
   this.path = '';
@@ -27,7 +46,7 @@
   this.assetsPath = '';
   this.timeCompleted = 0;
   this.segmentPos = 0;
-  this.isSubframeEnabled = subframeEnabled;
+  this.isSubframeEnabled = getSubframeEnabled();
   this.segments = [];
   this._idle = true;
   this._completedLoop = false;
@@ -52,17 +71,8 @@
   } else if (params.renderer) {
     animType = params.renderer;
   }
-  switch (animType) {
-    case 'canvas':
-      this.renderer = new CanvasRenderer(this, params.rendererSettings);
-      break;
-    case 'svg':
-      this.renderer = new SVGRenderer(this, params.rendererSettings);
-      break;
-    default:
-      this.renderer = new HybridRenderer(this, params.rendererSettings);
-      break;
-  }
+  const RendererClass = getRenderer(animType);
+  this.renderer = new RendererClass(this, params.rendererSettings);
   this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);
   this.renderer.setProjectInterface(this.projectInterface);
   this.animType = animType;
@@ -228,6 +238,7 @@
 
 AnimationItem.prototype.onSegmentComplete = function (data) {
   this.animationData = data;
+  var expressionsPlugin = getExpressionsPlugin();
   if (expressionsPlugin) {
     expressionsPlugin.initExpressions(this);
   }
@@ -323,6 +334,7 @@
         && (this.imagePreloader.loadedFootages())
   ) {
     this.isLoaded = true;
+    var expressionsPlugin = getExpressionsPlugin();
     if (expressionsPlugin) {
       expressionsPlugin.initExpressions(this);
     }
@@ -418,7 +430,7 @@
   var marker;
   for (var i = 0; i < this.markers.length; i += 1) {
     marker = this.markers[i];
-    if (marker.payload && marker.payload.name === markerName) {
+    if (marker.payload && marker.payload.name.cm === markerName) {
       return marker;
     }
   }
@@ -761,3 +773,5 @@
     this.onError.call(this, error);
   }
 };
+
+export default AnimationItem;
diff --git a/player/js/animation/AnimationItemWorkerOverride.js b/player/js/animation/AnimationItemWorkerOverride.js
index bf8c167..07dbe53 100644
--- a/player/js/animation/AnimationItemWorkerOverride.js
+++ b/player/js/animation/AnimationItemWorkerOverride.js
@@ -1,4 +1,9 @@
-/* global CanvasRenderer, dataManager, expressionsPlugin, AnimationItem */
+import AnimationItem from './AnimationItem';
+import CanvasRenderer from '../renderers/CanvasRenderer';
+import dataManager from '../utils/DataManager';
+import {
+  getExpressionsPlugin,
+} from '../utils/common';
 
 AnimationItem.prototype.setParams = function (params) {
   if (params.context) {
@@ -72,6 +77,7 @@
   this.animationData.__complete = false;
   dataManager.completeAnimation(this.animationData);
   this.renderer.includeLayers(data.layers);
+  var expressionsPlugin = getExpressionsPlugin();
   if (expressionsPlugin) {
     expressionsPlugin.initExpressions(this);
   }
@@ -125,6 +131,7 @@
 AnimationItem.prototype.checkLoaded = function () {
   if (!this.isLoaded) {
     this.isLoaded = true;
+    var expressionsPlugin = getExpressionsPlugin();
     if (expressionsPlugin) {
       expressionsPlugin.initExpressions(this);
     }
diff --git a/player/js/animation/AnimationManager.js b/player/js/animation/AnimationManager.js
index b2c194e..0aa2bab 100644
--- a/player/js/animation/AnimationManager.js
+++ b/player/js/animation/AnimationManager.js
@@ -1,7 +1,7 @@
-/* global createTag, AnimationItem */
-/* exported animationManager */
+import createTag from '../utils/helpers/html_elements';
+import AnimationItem from './AnimationItem';
 
-var animationManager = (function () {
+const animationManager = (function () {
   var moduleOb = {};
   var registeredAnimations = [];
   var initTime = 0;
@@ -244,3 +244,5 @@
   moduleOb.getRegisteredAnimations = getRegisteredAnimations;
   return moduleOb;
 }());
+
+export default animationManager;
diff --git a/player/js/animation/AnimationManagerWorkerOverride.js b/player/js/animation/AnimationManagerWorkerOverride.js
index 36ae87f..c0a1cc7 100644
--- a/player/js/animation/AnimationManagerWorkerOverride.js
+++ b/player/js/animation/AnimationManagerWorkerOverride.js
@@ -1,7 +1,6 @@
-/* global AnimationItem */
-/* exported animationManager */
+import AnimationItem from './AnimationItem';
 
-var animationManager = (function () {
+const animationManager = (function () {
   var moduleOb = {};
   var registeredAnimations = [];
   var initTime = 0;
@@ -198,3 +197,5 @@
   moduleOb.getRegisteredAnimations = getRegisteredAnimations;
   return moduleOb;
 }());
+
+export default animationManager;
diff --git a/player/js/effects/EffectsManagerPlaceholder.js b/player/js/effects/EffectsManagerPlaceholder.js
index 7e3fb8b..df9222d 100644
--- a/player/js/effects/EffectsManagerPlaceholder.js
+++ b/player/js/effects/EffectsManagerPlaceholder.js
@@ -1,5 +1,5 @@
-/* exported EffectsManager */
-
 function EffectsManager() {
   this.effectElements = [];
 }
+
+export default EffectsManager;
diff --git a/player/js/effects/SliderEffect.js b/player/js/effects/SliderEffect.js
index 3a3f931..f49a459 100644
--- a/player/js/effects/SliderEffect.js
+++ b/player/js/effects/SliderEffect.js
@@ -1,5 +1,4 @@
-/* global PropertyFactory */
-/* exported SliderEffect, AngleEffect, ColorEffect, PointEffect, LayerIndexEffect, MaskIndexEffect, CheckboxEffect, NoValueEffect */
+import PropertyFactory from '../utils/PropertyFactory';
 
 function SliderEffect(data, elem, container) {
   this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);
@@ -25,3 +24,14 @@
 function NoValueEffect() {
   this.p = {};
 }
+
+export {
+  SliderEffect,
+  AngleEffect,
+  ColorEffect,
+  PointEffect,
+  LayerIndexEffect,
+  MaskIndexEffect,
+  CheckboxEffect,
+  NoValueEffect,
+};
diff --git a/player/js/elements/AudioElement.js b/player/js/elements/AudioElement.js
index f9e52e6..6eda26c 100644
--- a/player/js/elements/AudioElement.js
+++ b/player/js/elements/AudioElement.js
@@ -1,4 +1,10 @@
-/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import PropertyFactory from '../utils/PropertyFactory';
+import RenderableElement from './helpers/RenderableElement';
+import BaseElement from './BaseElement';
+import FrameElement from './helpers/FrameElement';
 
 function AudioElement(data, globalData, comp) {
   this.initFrame();
@@ -80,3 +86,5 @@
 
 AudioElement.prototype.initExpressions = function () {
 };
+
+export default AudioElement;
diff --git a/player/js/elements/BaseElement.js b/player/js/elements/BaseElement.js
index 37dabab..36e588d 100644
--- a/player/js/elements/BaseElement.js
+++ b/player/js/elements/BaseElement.js
@@ -1,5 +1,13 @@
-/* global LayerExpressionInterface, EffectsExpressionInterface, CompExpressionInterface, ShapeExpressionInterface,
-TextExpressionInterface, getBlendMode,createElementID, EffectsManager */
+import {
+  createElementID,
+} from '../utils/common';
+import LayerExpressionInterface from '../utils/expressions/LayerInterface';
+import EffectsExpressionInterface from '../utils/expressions/EffectInterface';
+import CompExpressionInterface from '../utils/expressions/CompInterface';
+import ShapeExpressionInterface from '../utils/expressions/ShapeInterface';
+import TextExpressionInterface from '../utils/expressions/TextInterface';
+import getBlendMode from '../utils/helpers/blendModes';
+import EffectsManager from '../EffectsManager';
 
 function BaseElement() {
 }
@@ -61,3 +69,5 @@
   },
   sourceRectAtTime: function () {},
 };
+
+export default BaseElement;
diff --git a/player/js/elements/BaseTextElement.js b/player/js/elements/BaseTextElement.js
index 03ccacb..34d52cc 100644
--- a/player/js/elements/BaseTextElement.js
+++ b/player/js/elements/BaseTextElement.js
@@ -1,4 +1,4 @@
-/* exported BaseTextElement */
-
-var BaseTextElement = function () {
+const BaseTextElement = function () {
 };
+
+export default BaseTextElement;
diff --git a/player/js/elements/CompElement.js b/player/js/elements/CompElement.js
index df23845..ad8100e 100644
--- a/player/js/elements/CompElement.js
+++ b/player/js/elements/CompElement.js
@@ -1,4 +1,11 @@
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import BaseElement from './BaseElement';
+import TransformElement from './helpers/TransformElement';
+import HierarchyElement from './helpers/HierarchyElement';
+import FrameElement from './helpers/FrameElement';
+import RenderableDOMElement from './helpers/RenderableDOMElement';
 
 function ICompElement() {}
 
@@ -96,3 +103,5 @@
   this.destroyElements();
   this.destroyBaseElement();
 };
+
+export default ICompElement;
diff --git a/player/js/elements/FootageElement.js b/player/js/elements/FootageElement.js
index 54c8036..7f94102 100644
--- a/player/js/elements/FootageElement.js
+++ b/player/js/elements/FootageElement.js
@@ -1,4 +1,10 @@
-/* global extendPrototype, RenderableElement, BaseElement, FrameElement, FootageInterface */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import RenderableElement from './helpers/RenderableElement';
+import BaseElement from './BaseElement';
+import FrameElement from './helpers/FrameElement';
+import FootageInterface from '../utils/expressions/FootageInterface';
 
 function FootageElement(data, globalData, comp) {
   this.initFrame();
@@ -30,3 +36,5 @@
 FootageElement.prototype.getFootageData = function () {
   return this.footageData;
 };
+
+export default FootageElement;
diff --git a/player/js/elements/ImageElement.js b/player/js/elements/ImageElement.js
index 3e3c347..337c358 100644
--- a/player/js/elements/ImageElement.js
+++ b/player/js/elements/ImageElement.js
@@ -1,4 +1,14 @@
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, createNS */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+
+import createNS from '../utils/helpers/svg_elements';
+import BaseElement from './BaseElement';
+import TransformElement from './helpers/TransformElement';
+import SVGBaseElement from './svgElements/SVGBaseElement';
+import HierarchyElement from './helpers/HierarchyElement';
+import FrameElement from './helpers/FrameElement';
+import RenderableDOMElement from './helpers/RenderableDOMElement';
 
 function IImageElement(data, globalData, comp) {
   this.assetData = globalData.getAssetData(data.refId);
@@ -25,3 +35,5 @@
 IImageElement.prototype.sourceRectAtTime = function () {
   return this.sourceRect;
 };
+
+export default IImageElement;
diff --git a/player/js/elements/NullElement.js b/player/js/elements/NullElement.js
index 780ca80..b270b46 100644
--- a/player/js/elements/NullElement.js
+++ b/player/js/elements/NullElement.js
@@ -1,4 +1,10 @@
-/* global extendPrototype, BaseElement, TransformElement, HierarchyElement, FrameElement */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import BaseElement from './BaseElement';
+import TransformElement from './helpers/TransformElement';
+import HierarchyElement from './helpers/HierarchyElement';
+import FrameElement from './helpers/FrameElement';
 
 function NullElement(data, globalData, comp) {
   this.initFrame();
@@ -29,3 +35,5 @@
 };
 
 extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
+
+export default NullElement;
diff --git a/player/js/elements/ShapeElement.js b/player/js/elements/ShapeElement.js
index 84c25c7..4e50b49 100644
--- a/player/js/elements/ShapeElement.js
+++ b/player/js/elements/ShapeElement.js
@@ -1,4 +1,4 @@
-/* global ProcessedElement */
+import ProcessedElement from './helpers/shapes/ProcessedElement';
 
 function IShapeElement() {
 }
@@ -72,3 +72,5 @@
     this.prepareProperties(num, this.isInRange);
   },
 };
+
+export default IShapeElement;
diff --git a/player/js/elements/SolidElement.js b/player/js/elements/SolidElement.js
index 315f085..0c5594a 100644
--- a/player/js/elements/SolidElement.js
+++ b/player/js/elements/SolidElement.js
@@ -1,4 +1,8 @@
-/* global extendPrototype, IImageElement, createNS */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import createNS from '../utils/helpers/svg_elements';
+import IImageElement from './ImageElement';
 
 function ISolidElement(data, globalData, comp) {
   this.initElement(data, globalData, comp);
@@ -15,3 +19,5 @@
   rect.setAttribute('fill', this.data.sc);
   this.layerElement.appendChild(rect);
 };
+
+export default ISolidElement;
diff --git a/player/js/elements/TextElement.js b/player/js/elements/TextElement.js
index ab737d6..18adf1f 100644
--- a/player/js/elements/TextElement.js
+++ b/player/js/elements/TextElement.js
@@ -1,4 +1,7 @@
-/* global TextProperty, TextAnimatorProperty, buildShapeString, LetterProps */
+import LetterProps from '../utils/text/LetterProps';
+import TextProperty from '../utils/text/TextProperty';
+import TextAnimatorProperty from '../utils/text/TextAnimatorProperty';
+import buildShapeString from '../utils/shapes/shapePathBuilder';
 
 function ITextElement() {
 }
@@ -37,8 +40,10 @@
   var pathNodes;
   var shapeStr = '';
   for (j = 0; j < jLen; j += 1) {
-    pathNodes = shapes[j].ks.k;
-    shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+    if (shapes[j].ty === 'sh') {
+      pathNodes = shapes[j].ks.k;
+      shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
+    }
   }
   return shapeStr;
 };
@@ -82,3 +87,5 @@
 ITextElement.prototype.destroy = function () {
 
 };
+
+export default ITextElement;
diff --git a/player/js/elements/canvasElements/CVBaseElement.js b/player/js/elements/canvasElements/CVBaseElement.js
index 7850303..581f7e2 100644
--- a/player/js/elements/canvasElements/CVBaseElement.js
+++ b/player/js/elements/canvasElements/CVBaseElement.js
@@ -1,4 +1,7 @@
-/* global CVEffects, getBlendMode, CVMaskElement, Matrix */
+import getBlendMode from '../../utils/helpers/blendModes';
+import Matrix from '../../3rd_party/transformation-matrix';
+import CVEffects from './CVEffects';
+import CVMaskElement from './CVMaskElement';
 
 function CVBaseElement() {
 }
@@ -64,3 +67,5 @@
 };
 CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
 CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
+
+export default CVBaseElement;
diff --git a/player/js/elements/canvasElements/CVCompBaseElement.js b/player/js/elements/canvasElements/CVCompBaseElement.js
new file mode 100644
index 0000000..369936c
--- /dev/null
+++ b/player/js/elements/canvasElements/CVCompBaseElement.js
@@ -0,0 +1,11 @@
+import BaseRenderer from '../../renderers/BaseRenderer';
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+
+function CVCompBaseElement() {
+
+}
+extendPrototype([BaseRenderer], CVCompBaseElement);
+
+export default CVCompBaseElement;
diff --git a/player/js/elements/canvasElements/CVCompElement.js b/player/js/elements/canvasElements/CVCompElement.js
index 7f32371..7154fb1 100644
--- a/player/js/elements/canvasElements/CVCompElement.js
+++ b/player/js/elements/canvasElements/CVCompElement.js
@@ -1,4 +1,13 @@
-/* global createSizedArray, PropertyFactory, extendPrototype, CanvasRenderer, ICompElement, CVBaseElement */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+import PropertyFactory from '../../utils/PropertyFactory';
+import CanvasRendererBase from '../../renderers/CanvasRendererBase';
+import CVBaseElement from './CVBaseElement';
+import ICompElement from '../CompElement';
 
 function CVCompElement(data, globalData, comp) {
   this.completeLayers = false;
@@ -9,7 +18,7 @@
   this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
 }
 
-extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
+extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);
 
 CVCompElement.prototype.renderInnerContent = function () {
   var ctx = this.canvasContext;
@@ -40,3 +49,9 @@
   this.layers = null;
   this.elements = null;
 };
+
+CVCompElement.prototype.createComp = function (data) {
+  return new CVCompElement(data, this.globalData, this);
+};
+
+export default CVCompElement;
diff --git a/player/js/elements/canvasElements/CVContextData.js b/player/js/elements/canvasElements/CVContextData.js
index efc1bf0..a4f2e7e 100644
--- a/player/js/elements/canvasElements/CVContextData.js
+++ b/player/js/elements/canvasElements/CVContextData.js
@@ -1,4 +1,7 @@
-/* global Matrix, createTypedArray */
+import {
+  createTypedArray,
+} from '../../utils/helpers/arrays';
+import Matrix from '../../3rd_party/transformation-matrix';
 
 function CVContextData() {
   this.saved = [];
@@ -31,3 +34,5 @@
   this.cTr.reset();
   this.cO = 1;
 };
+
+export default CVContextData;
diff --git a/player/js/elements/canvasElements/CVEffects.js b/player/js/elements/canvasElements/CVEffects.js
index 9a4467d..494e8af 100644
--- a/player/js/elements/canvasElements/CVEffects.js
+++ b/player/js/elements/canvasElements/CVEffects.js
@@ -2,3 +2,5 @@
 
 }
 CVEffects.prototype.renderFrame = function () {};
+
+export default CVEffects;
diff --git a/player/js/elements/canvasElements/CVImageElement.js b/player/js/elements/canvasElements/CVImageElement.js
index 82c827c..126e119 100644
--- a/player/js/elements/canvasElements/CVImageElement.js
+++ b/player/js/elements/canvasElements/CVImageElement.js
@@ -1,5 +1,15 @@
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement,HierarchyElement, FrameElement,
-RenderableElement, SVGShapeElement, IImageElement, createTag */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import createTag from '../../utils/helpers/html_elements';
+import RenderableElement from '../helpers/RenderableElement';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import CVBaseElement from './CVBaseElement';
+import IImageElement from '../ImageElement';
+import SVGShapeElement from '../svgElements/SVGShapeElement';
 
 function CVImageElement(data, globalData, comp) {
   this.assetData = globalData.getAssetData(data.refId);
@@ -44,3 +54,5 @@
 CVImageElement.prototype.destroy = function () {
   this.img = null;
 };
+
+export default CVImageElement;
diff --git a/player/js/elements/canvasElements/CVMaskElement.js b/player/js/elements/canvasElements/CVMaskElement.js
index bf3f658..32f84e7 100644
--- a/player/js/elements/canvasElements/CVMaskElement.js
+++ b/player/js/elements/canvasElements/CVMaskElement.js
@@ -1,4 +1,9 @@
-/* global createSizedArray, ShapePropertyFactory, MaskElement */
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+
+import ShapePropertyFactory from '../../utils/shapes/ShapeProperty';
+import MaskElement from '../../mask';
 
 function CVMaskElement(data, element) {
   this.data = data;
@@ -63,3 +68,5 @@
 CVMaskElement.prototype.destroy = function () {
   this.element = null;
 };
+
+export default CVMaskElement;
diff --git a/player/js/elements/canvasElements/CVShapeElement.js b/player/js/elements/canvasElements/CVShapeElement.js
index 22b6975..323823e 100644
--- a/player/js/elements/canvasElements/CVShapeElement.js
+++ b/player/js/elements/canvasElements/CVShapeElement.js
@@ -1,6 +1,30 @@
-/* global ShapeTransformManager, extendPrototype, BaseElement, TransformElement, CVBaseElement, IShapeElement,
-HierarchyElement, FrameElement, RenderableElement, RenderableDOMElement, PropertyFactory, degToRads, GradientProperty,
-DashProperty, TransformPropertyFactory, CVShapeData, ShapeModifiers, bmFloor, lineCapEnum, lineJoinEnum */
+import {
+  degToRads,
+  bmFloor,
+} from '../../utils/common';
+
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import PropertyFactory from '../../utils/PropertyFactory';
+import RenderableElement from '../helpers/RenderableElement';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import RenderableDOMElement from '../helpers/RenderableDOMElement';
+import ShapeTransformManager from '../helpers/shapes/ShapeTransformManager';
+import CVBaseElement from './CVBaseElement';
+import IShapeElement from '../ShapeElement';
+import GradientProperty from '../../utils/shapes/GradientProperty';
+import DashProperty from '../../utils/shapes/DashProperty';
+import TransformPropertyFactory from '../../utils/TransformProperty';
+import CVShapeData from '../helpers/shapes/CVShapeData';
+import { ShapeModifiers } from '../../utils/shapes/ShapeModifiers';
+import {
+  lineCapEnum,
+  lineJoinEnum,
+} from '../../utils/helpers/shapeEnums';
 
 function CVShapeElement(data, globalData, comp) {
   this.shapes = [];
@@ -485,3 +509,5 @@
   this.stylesList.length = 0;
   this.itemsData.length = 0;
 };
+
+export default CVShapeElement;
diff --git a/player/js/elements/canvasElements/CVSolidElement.js b/player/js/elements/canvasElements/CVSolidElement.js
index 9cde44a..61eadd8 100644
--- a/player/js/elements/canvasElements/CVSolidElement.js
+++ b/player/js/elements/canvasElements/CVSolidElement.js
@@ -1,5 +1,14 @@
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement,
-SVGShapeElement, IImageElement */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import RenderableElement from '../helpers/RenderableElement';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import CVBaseElement from './CVBaseElement';
+import IImageElement from '../ImageElement';
+import SVGShapeElement from '../svgElements/SVGShapeElement';
 
 function CVSolidElement(data, globalData, comp) {
   this.initElement(data, globalData, comp);
@@ -15,3 +24,5 @@
   ctx.fillRect(0, 0, this.data.sw, this.data.sh);
   //
 };
+
+export default CVSolidElement;
diff --git a/player/js/elements/canvasElements/CVTextElement.js b/player/js/elements/canvasElements/CVTextElement.js
index 75979a7..c58adb9 100644
--- a/player/js/elements/canvasElements/CVTextElement.js
+++ b/player/js/elements/canvasElements/CVTextElement.js
@@ -1,5 +1,17 @@
-/* global extendPrototype, BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement,
-RenderableElement, ITextElement, createTag, createSizedArray */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+import createTag from '../../utils/helpers/html_elements';
+import RenderableElement from '../helpers/RenderableElement';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import ITextElement from '../TextElement';
+import CVBaseElement from './CVBaseElement';
 
 function CVTextElement(data, globalData, comp) {
   this.textSpans = [];
@@ -77,26 +89,29 @@
       yPos += firstLine ? 1 : 0;
       firstLine = false;
     }
-
     shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
     jLen = shapes.length;
     matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
     if (singleShape) {
       this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
     }
-    commands = createSizedArray(jLen);
+    commands = createSizedArray(jLen - 1);
+    var commandsCounter = 0;
     for (j = 0; j < jLen; j += 1) {
-      kLen = shapes[j].ks.k.i.length;
-      pathNodes = shapes[j].ks.k;
-      pathArr = [];
-      for (k = 1; k < kLen; k += 1) {
-        if (k === 1) {
-          pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+      if (shapes[j].ty === 'sh') {
+        kLen = shapes[j].ks.k.i.length;
+        pathNodes = shapes[j].ks.k;
+        pathArr = [];
+        for (k = 1; k < kLen; k += 1) {
+          if (k === 1) {
+            pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));
+          }
+          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));
         }
-        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));
+        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));
+        commands[commandsCounter] = pathArr;
+        commandsCounter += 1;
       }
-      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));
-      commands[j] = pathArr;
     }
     if (singleShape) {
       xPos += letters[i].l;
@@ -212,3 +227,5 @@
     }
   }
 };
+
+export default CVTextElement;
diff --git a/player/js/elements/helpers/FrameElement.js b/player/js/elements/helpers/FrameElement.js
index 2443883..cb37450 100644
--- a/player/js/elements/helpers/FrameElement.js
+++ b/player/js/elements/helpers/FrameElement.js
@@ -50,3 +50,5 @@
     }
   },
 };
+
+export default FrameElement;
diff --git a/player/js/elements/helpers/HierarchyElement.js b/player/js/elements/helpers/HierarchyElement.js
index 9e51560..6d44896 100644
--- a/player/js/elements/helpers/HierarchyElement.js
+++ b/player/js/elements/helpers/HierarchyElement.js
@@ -48,3 +48,5 @@
     }
   },
 };
+
+export default HierarchyElement;
diff --git a/player/js/elements/helpers/RenderableDOMElement.js b/player/js/elements/helpers/RenderableDOMElement.js
index 7b444d9..efc201b 100644
--- a/player/js/elements/helpers/RenderableDOMElement.js
+++ b/player/js/elements/helpers/RenderableDOMElement.js
@@ -1,4 +1,8 @@
-/* global extendPrototype, RenderableElement, createProxyFunction */
+import {
+  extendPrototype,
+  createProxyFunction,
+} from '../../utils/functionExtensions';
+import RenderableElement from './RenderableElement';
 
 function RenderableDOMElement() {}
 
@@ -17,6 +21,7 @@
       this.hide();
     },
     hide: function () {
+      // console.log('HIDE', this);
       if (!this.hidden && (!this.isInRange || this.isTransparent)) {
         var elem = this.baseElement || this.layerElement;
         elem.style.display = 'none';
@@ -24,6 +29,7 @@
       }
     },
     show: function () {
+      // console.log('SHOW', this);
       if (this.isInRange && !this.isTransparent) {
         if (!this.data.hd) {
           var elem = this.baseElement || this.layerElement;
@@ -61,3 +67,5 @@
   };
   extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
 }());
+
+export default RenderableDOMElement;
diff --git a/player/js/elements/helpers/RenderableElement.js b/player/js/elements/helpers/RenderableElement.js
index 1be12ab..876bb0c 100644
--- a/player/js/elements/helpers/RenderableElement.js
+++ b/player/js/elements/helpers/RenderableElement.js
@@ -83,3 +83,5 @@
     return { w: this.data.width, h: this.data.height };
   },
 };
+
+export default RenderableElement;
diff --git a/player/js/elements/helpers/TransformElement.js b/player/js/elements/helpers/TransformElement.js
index 055cc50..c0050ca 100644
--- a/player/js/elements/helpers/TransformElement.js
+++ b/player/js/elements/helpers/TransformElement.js
@@ -1,4 +1,5 @@
-/* global TransformPropertyFactory, Matrix */
+import Matrix from '../../3rd_party/transformation-matrix';
+import TransformPropertyFactory from '../../utils/TransformProperty';
 
 function TransformElement() {}
 
@@ -76,3 +77,5 @@
   },
   mHelper: new Matrix(),
 };
+
+export default TransformElement;
diff --git a/player/js/elements/helpers/shapes/CVShapeData.js b/player/js/elements/helpers/shapes/CVShapeData.js
index 37f0aff..9340159 100644
--- a/player/js/elements/helpers/shapes/CVShapeData.js
+++ b/player/js/elements/helpers/shapes/CVShapeData.js
@@ -1,4 +1,5 @@
-/* global ShapePropertyFactory, SVGShapeData */
+import ShapePropertyFactory from '../../../utils/shapes/ShapeProperty';
+import SVGShapeData from './SVGShapeData';
 
 function CVShapeData(element, data, styles, transformsManager) {
   this.styledShapes = [];
@@ -28,3 +29,5 @@
 }
 
 CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
+
+export default CVShapeData;
diff --git a/player/js/elements/helpers/shapes/ProcessedElement.js b/player/js/elements/helpers/shapes/ProcessedElement.js
index 9d24684..6cad9b3 100644
--- a/player/js/elements/helpers/shapes/ProcessedElement.js
+++ b/player/js/elements/helpers/shapes/ProcessedElement.js
@@ -1,6 +1,6 @@
-/* exported ProcessedElement */
-
 function ProcessedElement(element, position) {
   this.elem = element;
   this.pos = position;
 }
+
+export default ProcessedElement;
diff --git a/player/js/elements/helpers/shapes/SVGElementsRenderer.js b/player/js/elements/helpers/shapes/SVGElementsRenderer.js
index 8d2e131..5638f55 100644
--- a/player/js/elements/helpers/shapes/SVGElementsRenderer.js
+++ b/player/js/elements/helpers/shapes/SVGElementsRenderer.js
@@ -1,7 +1,8 @@
-/* global Matrix, buildShapeString, bmFloor */
-/* exported SVGElementsRenderer */
+import Matrix from '../../../3rd_party/transformation-matrix';
+import buildShapeString from '../../../utils/shapes/shapePathBuilder';
+import { bmFloor } from '../../../utils/common';
 
-var SVGElementsRenderer = (function () {
+const SVGElementsRenderer = (function () {
   var _identityMatrix = new Matrix();
   var _matrixHelper = new Matrix();
 
@@ -26,6 +27,8 @@
         return renderPath;
       case 'tr':
         return renderContentTransform;
+      case 'no':
+        return renderNoop;
       default:
         return null;
     }
@@ -40,6 +43,10 @@
     }
   }
 
+  function renderNoop() {
+
+  }
+
   function renderPath(styleData, itemData, isFirstFrame) {
     var j;
     var jLen;
@@ -230,3 +237,5 @@
 
   return ob;
 }());
+
+export default SVGElementsRenderer;
diff --git a/player/js/elements/helpers/shapes/SVGFillStyleData.js b/player/js/elements/helpers/shapes/SVGFillStyleData.js
index 47751cc..26ab798 100644
--- a/player/js/elements/helpers/shapes/SVGFillStyleData.js
+++ b/player/js/elements/helpers/shapes/SVGFillStyleData.js
@@ -1,4 +1,9 @@
-/* global PropertyFactory, extendPrototype, DynamicPropertyContainer */
+import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties';
+
+import {
+  extendPrototype,
+} from '../../../utils/functionExtensions';
+import PropertyFactory from '../../../utils/PropertyFactory';
 
 function SVGFillStyleData(elem, data, styleOb) {
   this.initDynamicPropertyContainer(elem);
@@ -9,3 +14,5 @@
 }
 
 extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
+
+export default SVGFillStyleData;
diff --git a/player/js/elements/helpers/shapes/SVGGradientFillStyleData.js b/player/js/elements/helpers/shapes/SVGGradientFillStyleData.js
index 9452eb5..4ae0ab6 100644
--- a/player/js/elements/helpers/shapes/SVGGradientFillStyleData.js
+++ b/player/js/elements/helpers/shapes/SVGGradientFillStyleData.js
@@ -1,5 +1,19 @@
-/* global PropertyFactory, degToRads, GradientProperty, createElementID, createNS, locationHref,
-extendPrototype, DynamicPropertyContainer, lineCapEnum, lineJoinEnum */
+import {
+  degToRads,
+  createElementID,
+} from '../../../utils/common';
+import { getLocationHref } from '../../../main';
+import {
+  extendPrototype,
+} from '../../../utils/functionExtensions';
+import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties';
+import PropertyFactory from '../../../utils/PropertyFactory';
+import createNS from '../../../utils/helpers/svg_elements';
+import GradientProperty from '../../../utils/shapes/GradientProperty';
+import {
+  lineCapEnum,
+  lineJoinEnum,
+} from '../../../utils/helpers/shapeEnums';
 
 function SVGGradientFillStyleData(elem, data, styleOb) {
   this.initDynamicPropertyContainer(elem);
@@ -37,7 +51,7 @@
     gfill.appendChild(stop);
     stops.push(stop);
   }
-  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + gradientId + ')');
+  pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');
   this.gf = gfill;
   this.cst = stops;
 };
@@ -65,7 +79,7 @@
       opFill.appendChild(stop);
       stops.push(stop);
     }
-    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + locationHref + '#' + opacityId + ')');
+    maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');
     if (data.ty === 'gs') {
       maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);
       maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);
@@ -82,3 +96,5 @@
 };
 
 extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
+
+export default SVGGradientFillStyleData;
diff --git a/player/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js b/player/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js
index 85d1d84..22adf24 100644
--- a/player/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js
+++ b/player/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js
@@ -1,4 +1,10 @@
-/* global PropertyFactory, DashProperty, extendPrototype, SVGGradientFillStyleData, DynamicPropertyContainer */
+import {
+  extendPrototype,
+} from '../../../utils/functionExtensions';
+import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties';
+import PropertyFactory from '../../../utils/PropertyFactory';
+import DashProperty from '../../../utils/shapes/DashProperty';
+import SVGGradientFillStyleData from './SVGGradientFillStyleData';
 
 function SVGGradientStrokeStyleData(elem, data, styleOb) {
   this.initDynamicPropertyContainer(elem);
@@ -10,3 +16,5 @@
 }
 
 extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
+
+export default SVGGradientStrokeStyleData;
diff --git a/player/js/elements/helpers/shapes/SVGNoStyleData.js b/player/js/elements/helpers/shapes/SVGNoStyleData.js
new file mode 100644
index 0000000..7b7d06c
--- /dev/null
+++ b/player/js/elements/helpers/shapes/SVGNoStyleData.js
@@ -0,0 +1,15 @@
+import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties';
+
+import {
+  extendPrototype,
+} from '../../../utils/functionExtensions';
+
+function SVGNoStyleData(elem, data, styleOb) {
+  this.initDynamicPropertyContainer(elem);
+  this.getValue = this.iterateDynamicProperties;
+  this.style = styleOb;
+}
+
+extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
+
+export default SVGNoStyleData;
diff --git a/player/js/elements/helpers/shapes/SVGShapeData.js b/player/js/elements/helpers/shapes/SVGShapeData.js
index 896c612..f4e1320 100644
--- a/player/js/elements/helpers/shapes/SVGShapeData.js
+++ b/player/js/elements/helpers/shapes/SVGShapeData.js
@@ -24,3 +24,5 @@
 SVGShapeData.prototype.setAsAnimated = function () {
   this._isAnimated = true;
 };
+
+export default SVGShapeData;
diff --git a/player/js/elements/helpers/shapes/SVGStrokeStyleData.js b/player/js/elements/helpers/shapes/SVGStrokeStyleData.js
index 0a598d5..fa24359 100644
--- a/player/js/elements/helpers/shapes/SVGStrokeStyleData.js
+++ b/player/js/elements/helpers/shapes/SVGStrokeStyleData.js
@@ -1,4 +1,9 @@
-/* global DashProperty, PropertyFactory, extendPrototype, DynamicPropertyContainer */
+import {
+  extendPrototype,
+} from '../../../utils/functionExtensions';
+import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties';
+import PropertyFactory from '../../../utils/PropertyFactory';
+import DashProperty from '../../../utils/shapes/DashProperty';
 
 function SVGStrokeStyleData(elem, data, styleOb) {
   this.initDynamicPropertyContainer(elem);
@@ -12,3 +17,5 @@
 }
 
 extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
+
+export default SVGStrokeStyleData;
diff --git a/player/js/elements/helpers/shapes/SVGStyleData.js b/player/js/elements/helpers/shapes/SVGStyleData.js
index fbb363a..08267c7 100644
--- a/player/js/elements/helpers/shapes/SVGStyleData.js
+++ b/player/js/elements/helpers/shapes/SVGStyleData.js
@@ -1,4 +1,4 @@
-/* global createNS */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGStyleData(data, level) {
   this.data = data;
@@ -15,3 +15,5 @@
   this.d = '';
   this._mdf = false;
 };
+
+export default SVGStyleData;
diff --git a/player/js/elements/helpers/shapes/SVGTransformData.js b/player/js/elements/helpers/shapes/SVGTransformData.js
index 20bd6ab..f032012 100644
--- a/player/js/elements/helpers/shapes/SVGTransformData.js
+++ b/player/js/elements/helpers/shapes/SVGTransformData.js
@@ -1,5 +1,3 @@
-/* exported SVGTransformData */
-
 function SVGTransformData(mProps, op, container) {
   this.transform = {
     mProps: mProps,
@@ -9,3 +7,5 @@
   this.elements = [];
   this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
 }
+
+export default SVGTransformData;
diff --git a/player/js/elements/helpers/shapes/ShapeElement.js b/player/js/elements/helpers/shapes/ShapeElement.js
index 86100db..7f0e7ef 100644
--- a/player/js/elements/helpers/shapes/ShapeElement.js
+++ b/player/js/elements/helpers/shapes/ShapeElement.js
@@ -1,5 +1,5 @@
-/* exported ShapeElementData */
-
 function ShapeElementData() {
 
 }
+
+export default ShapeElementData;
diff --git a/player/js/elements/helpers/shapes/ShapeGroupData.js b/player/js/elements/helpers/shapes/ShapeGroupData.js
index 0370aa3..46a0c83 100644
--- a/player/js/elements/helpers/shapes/ShapeGroupData.js
+++ b/player/js/elements/helpers/shapes/ShapeGroupData.js
@@ -1,8 +1,9 @@
-/* global createNS */
-/* exported ShapeGroupData */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function ShapeGroupData() {
   this.it = [];
   this.prevViewData = [];
   this.gr = createNS('g');
 }
+
+export default ShapeGroupData;
diff --git a/player/js/elements/helpers/shapes/ShapeTransformManager.js b/player/js/elements/helpers/shapes/ShapeTransformManager.js
index cc246fb..421eea4 100644
--- a/player/js/elements/helpers/shapes/ShapeTransformManager.js
+++ b/player/js/elements/helpers/shapes/ShapeTransformManager.js
@@ -1,4 +1,4 @@
-/* global Matrix */
+import Matrix from '../../../3rd_party/transformation-matrix';
 
 function ShapeTransformManager() {
   this.sequences = {};
@@ -59,3 +59,5 @@
     return '_' + this.transform_key_count;
   },
 };
+
+export default ShapeTransformManager;
diff --git a/player/js/elements/htmlElements/HBaseElement.js b/player/js/elements/htmlElements/HBaseElement.js
index 5f5a207..1e4e2df 100644
--- a/player/js/elements/htmlElements/HBaseElement.js
+++ b/player/js/elements/htmlElements/HBaseElement.js
@@ -1,4 +1,12 @@
-/* global createTag, createNS, styleDiv, CVEffects, MaskElement, SVGBaseElement, HybridRenderer */
+import {
+  styleDiv,
+} from '../../utils/common';
+import createNS from '../../utils/helpers/svg_elements';
+import createTag from '../../utils/helpers/html_elements';
+import BaseRenderer from '../../renderers/BaseRenderer';
+import SVGBaseElement from '../svgElements/SVGBaseElement';
+import CVEffects from '../canvasElements/CVEffects';
+import MaskElement from '../../mask';
 
 function HBaseElement() {}
 HBaseElement.prototype = {
@@ -75,4 +83,6 @@
 };
 HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
 HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
-HBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;
+HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;
+
+export default HBaseElement;
diff --git a/player/js/elements/htmlElements/HCameraElement.js b/player/js/elements/htmlElements/HCameraElement.js
index 1c27ce0..cd3d345 100644
--- a/player/js/elements/htmlElements/HCameraElement.js
+++ b/player/js/elements/htmlElements/HCameraElement.js
@@ -1,4 +1,14 @@
-/* global PropertyFactory, degToRads, Matrix, extendPrototype, BaseElement, FrameElement, HierarchyElement */
+import {
+  degToRads,
+} from '../../utils/common';
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import PropertyFactory from '../../utils/PropertyFactory';
+import BaseElement from '../BaseElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import Matrix from '../../3rd_party/transformation-matrix';
 
 function HCameraElement(data, globalData, comp) {
   this.initFrame();
@@ -156,3 +166,5 @@
 HCameraElement.prototype.destroy = function () {
 };
 HCameraElement.prototype.getBaseElement = function () { return null; };
+
+export default HCameraElement;
diff --git a/player/js/elements/htmlElements/HCompElement.js b/player/js/elements/htmlElements/HCompElement.js
index 25bc103..bac6856 100644
--- a/player/js/elements/htmlElements/HCompElement.js
+++ b/player/js/elements/htmlElements/HCompElement.js
@@ -1,4 +1,14 @@
-/* global createSizedArray, PropertyFactory, extendPrototype, HybridRenderer, ICompElement, HBaseElement */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+import PropertyFactory from '../../utils/PropertyFactory';
+import HybridRendererBase from '../../renderers/HybridRendererBase';
+import HBaseElement from './HBaseElement';
+import ICompElement from '../CompElement';
+import SVGCompElement from '../svgElements/SVGCompElement';
 
 function HCompElement(data, globalData, comp) {
   this.layers = data.layers;
@@ -10,7 +20,7 @@
   this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
 }
 
-extendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);
+extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);
 HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
 
 HCompElement.prototype.createContainerElements = function () {
@@ -40,3 +50,12 @@
     this.layerElement.appendChild(elem);
   }
 };
+
+HCompElement.prototype.createComp = function (data) {
+  if (!this.supports3d) {
+    return new SVGCompElement(data, this.globalData, this);
+  }
+  return new HCompElement(data, this.globalData, this);
+};
+
+export default HCompElement;
diff --git a/player/js/elements/htmlElements/HImageElement.js b/player/js/elements/htmlElements/HImageElement.js
index 0340866..445e26b 100644
--- a/player/js/elements/htmlElements/HImageElement.js
+++ b/player/js/elements/htmlElements/HImageElement.js
@@ -1,5 +1,14 @@
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement,
-FrameElement, RenderableElement, createNS */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import createNS from '../../utils/helpers/svg_elements';
+import RenderableElement from '../helpers/RenderableElement';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import HBaseElement from './HBaseElement';
+import HSolidElement from './HSolidElement';
 
 function HImageElement(data, globalData, comp) {
   this.assetData = globalData.getAssetData(data.refId);
@@ -29,3 +38,5 @@
     this.baseElement.setAttribute('id', this.data.ln);
   }
 };
+
+export default HImageElement;
diff --git a/player/js/elements/htmlElements/HShapeElement.js b/player/js/elements/htmlElements/HShapeElement.js
index e8e7f94..7f1dfa4 100644
--- a/player/js/elements/htmlElements/HShapeElement.js
+++ b/player/js/elements/htmlElements/HShapeElement.js
@@ -1,5 +1,21 @@
-/* global createNS, extendPrototype, BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement,
-HierarchyElement, FrameElement, RenderableElement, createNS, bmMin, bmSqrt, bmMin, bmMax, bmPow */
+import {
+  bmPow,
+  bmMax,
+  bmMin,
+  bmSqrt,
+} from '../../utils/common';
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import createNS from '../../utils/helpers/svg_elements';
+import RenderableElement from '../helpers/RenderableElement';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import HBaseElement from './HBaseElement';
+import HSolidElement from './HSolidElement';
+import SVGShapeElement from '../svgElements/SVGShapeElement';
 
 function HShapeElement(data, globalData, comp) {
   // List of drawable elements
@@ -219,3 +235,5 @@
     }
   }
 };
+
+export default HShapeElement;
diff --git a/player/js/elements/htmlElements/HSolidElement.js b/player/js/elements/htmlElements/HSolidElement.js
index afc802e..9d8a021 100644
--- a/player/js/elements/htmlElements/HSolidElement.js
+++ b/player/js/elements/htmlElements/HSolidElement.js
@@ -1,5 +1,14 @@
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, createNS, createTag */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import createNS from '../../utils/helpers/svg_elements';
+import createTag from '../../utils/helpers/html_elements';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import RenderableDOMElement from '../helpers/RenderableDOMElement';
+import HBaseElement from './HBaseElement';
 
 function HSolidElement(data, globalData, comp) {
   this.initElement(data, globalData, comp);
@@ -23,3 +32,5 @@
   }
   this.layerElement.appendChild(rect);
 };
+
+export default HSolidElement;
diff --git a/player/js/elements/htmlElements/HTextElement.js b/player/js/elements/htmlElements/HTextElement.js
index 2e87a2c..040a4ea 100644
--- a/player/js/elements/htmlElements/HTextElement.js
+++ b/player/js/elements/htmlElements/HTextElement.js
@@ -1,5 +1,25 @@
-/* global extendPrototype, BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createTag, styleDiv, createNS, lineJoinEnum, lineCapEnum */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+import createNS from '../../utils/helpers/svg_elements';
+import createTag from '../../utils/helpers/html_elements';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import RenderableDOMElement from '../helpers/RenderableDOMElement';
+import ITextElement from '../TextElement';
+import HBaseElement from './HBaseElement';
+import {
+  lineCapEnum,
+  lineJoinEnum,
+} from '../../utils/helpers/shapeEnums';
+import {
+  styleDiv,
+} from '../../utils/common';
 
 function HTextElement(data, globalData, comp) {
   this.textSpans = [];
@@ -118,7 +138,7 @@
         shapeData = null;
       }
       matrixHelper.reset();
-      if (shapeData && shapeData.shapes) {
+      if (shapeData && shapeData.shapes && shapeData.shapes.length) {
         shapes = shapeData.shapes[0].it;
         matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
         shapeStr = this.createPathShape(matrixHelper, shapes);
@@ -265,3 +285,5 @@
     }
   }
 };
+
+export default HTextElement;
diff --git a/player/js/elements/svgElements/SVGBaseElement.js b/player/js/elements/svgElements/SVGBaseElement.js
index 8861bae..8c32723 100644
--- a/player/js/elements/svgElements/SVGBaseElement.js
+++ b/player/js/elements/svgElements/SVGBaseElement.js
@@ -1,4 +1,12 @@
-/* global filtersFactory, featureSupport, filtersFactory, createElementID, createNS, MaskElement, SVGEffects, locationHref */
+import { getLocationHref } from '../../main';
+import {
+  createElementID,
+} from '../../utils/common';
+import createNS from '../../utils/helpers/svg_elements';
+import MaskElement from '../../mask';
+import filtersFactory from '../../utils/filters';
+import featureSupport from '../../utils/featureSupport';
+import SVGEffects from './SVGEffects';
 
 function SVGBaseElement() {
 }
@@ -36,7 +44,7 @@
           gg.appendChild(this.layerElement);
           layerElementParent = gg;
           masker.appendChild(gg);
-          gg.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
+          gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
         }
       } else if (this.data.td == 2) { // eslint-disable-line eqeqeq
         var maskGroup = createNS('mask');
@@ -71,7 +79,7 @@
         alphaRect.setAttribute('y', '0');
         alphaRect.setAttribute('fill', '#ffffff');
         alphaRect.setAttribute('opacity', '0');
-        maskGrouper.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
+        maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
         maskGrouper.appendChild(alphaRect);
         maskGrouper.appendChild(this.layerElement);
         layerElementParent = maskGrouper;
@@ -111,7 +119,7 @@
 
       if (this.checkMasks()) {
         var cpGroup = createNS('g');
-        cpGroup.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
+        cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
         cpGroup.appendChild(this.layerElement);
         this.transformedElement = cpGroup;
         if (layerElementParent) {
@@ -120,7 +128,7 @@
           this.baseElement = this.transformedElement;
         }
       } else {
-        this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + clipId + ')');
+        this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');
       }
     }
     if (this.data.bm !== 0) {
@@ -154,6 +162,8 @@
     if (!this.matteElement) {
       return;
     }
-    this.matteElement.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
+    this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
   },
 };
+
+export default SVGBaseElement;
diff --git a/player/js/elements/svgElements/SVGCompElement.js b/player/js/elements/svgElements/SVGCompElement.js
index f6417b5..fb31ea1 100644
--- a/player/js/elements/svgElements/SVGCompElement.js
+++ b/player/js/elements/svgElements/SVGCompElement.js
@@ -1,4 +1,13 @@
-/* global createSizedArray, PropertyFactory, extendPrototype, SVGRenderer, ICompElement, SVGBaseElement */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+import PropertyFactory from '../../utils/PropertyFactory';
+import SVGRendererBase from '../../renderers/SVGRendererBase'; // eslint-disable-line
+import SVGBaseElement from './SVGBaseElement';
+import ICompElement from '../CompElement';
 
 function SVGCompElement(data, globalData, comp) {
   this.layers = data.layers;
@@ -6,9 +15,14 @@
   this.completeLayers = false;
   this.pendingElements = [];
   this.elements = this.layers ? createSizedArray(this.layers.length) : [];
-  // this.layerElement = createNS('g');
   this.initElement(data, globalData, comp);
   this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true };
 }
 
-extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
+extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);
+
+SVGCompElement.prototype.createComp = function (data) {
+  return new SVGCompElement(data, this.globalData, this);
+};
+
+export default SVGCompElement;
diff --git a/player/js/elements/svgElements/SVGEffects.js b/player/js/elements/svgElements/SVGEffects.js
index c5b5f63..7a43d79 100644
--- a/player/js/elements/svgElements/SVGEffects.js
+++ b/player/js/elements/svgElements/SVGEffects.js
@@ -1,5 +1,18 @@
-/* global createElementID, filtersFactory, SVGTintFilter, SVGFillFilter, SVGStrokeEffect, SVGTritoneFilter,
-SVGProLevelsFilter, SVGDropShadowEffect, SVGMatte3Effect, SVGGaussianBlurEffect, locationHref */
+import { getLocationHref } from '../../main';
+import {
+  createElementID,
+} from '../../utils/common';
+import filtersFactory from '../../utils/filters';
+import SVGTintFilter from './effects/SVGTintEffect';
+import SVGFillFilter from './effects/SVGFillFilter';
+import SVGStrokeEffect from './effects/SVGStrokeEffect';
+import SVGTritoneFilter from './effects/SVGTritoneFilter';
+import SVGProLevelsFilter from './effects/SVGProLevelsFilter';
+import SVGDropShadowEffect from './effects/SVGDropShadowEffect';
+import SVGMatte3Effect from './effects/SVGMatte3Effect';
+import SVGGaussianBlurEffect from './effects/SVGGaussianBlurEffect';
+
+var registeredEffects = {};
 
 function SVGEffects(elem) {
   var i;
@@ -11,6 +24,14 @@
   var filterManager;
   for (i = 0; i < len; i += 1) {
     filterManager = null;
+    var type = elem.data.ef[i].ty;
+    if (registeredEffects[type]) {
+      var Effect = registeredEffects[type].effect;
+      filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem);
+      if (registeredEffects[type].countsAsEffect) {
+        count += 1;
+      }
+    }
     if (elem.data.ef[i].ty === 20) {
       count += 1;
       filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
@@ -41,7 +62,7 @@
   }
   if (count) {
     elem.globalData.defs.appendChild(fil);
-    elem.layerElement.setAttribute('filter', 'url(' + locationHref + '#' + filId + ')');
+    elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');
   }
   if (this.filters.length) {
     elem.addRenderableComponent(this);
@@ -55,3 +76,12 @@
     this.filters[i].renderFrame(_isFirstFrame);
   }
 };
+
+export function registerEffect(id, effect, countsAsEffect) {
+  registeredEffects[id] = {
+    effect,
+    countsAsEffect,
+  };
+}
+
+export default SVGEffects;
diff --git a/player/js/elements/svgElements/SVGEffectsPlaceholder.js b/player/js/elements/svgElements/SVGEffectsPlaceholder.js
index 80c14c1..e63b89c 100644
--- a/player/js/elements/svgElements/SVGEffectsPlaceholder.js
+++ b/player/js/elements/svgElements/SVGEffectsPlaceholder.js
@@ -1,3 +1,3 @@
-/* exported SVGEffects */
-
 function SVGEffects() {}
+
+export default SVGEffects;
diff --git a/player/js/elements/svgElements/SVGShapeElement.js b/player/js/elements/svgElements/SVGShapeElement.js
index 9bba5d5..8dd408a 100644
--- a/player/js/elements/svgElements/SVGShapeElement.js
+++ b/player/js/elements/svgElements/SVGShapeElement.js
@@ -1,8 +1,33 @@
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement,
-FrameElement, RenderableDOMElement, Matrix, SVGStyleData, SVGStrokeStyleData, SVGFillStyleData,
-SVGGradientFillStyleData, SVGGradientStrokeStyleData, locationHref, getBlendMode, ShapeGroupData,
-TransformPropertyFactory, SVGTransformData, ShapePropertyFactory, SVGShapeData, SVGElementsRenderer, ShapeModifiers,
-lineCapEnum, lineJoinEnum */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import { getLocationHref } from '../../main';
+import ShapePropertyFactory from '../../utils/shapes/ShapeProperty';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import SVGBaseElement from './SVGBaseElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import RenderableDOMElement from '../helpers/RenderableDOMElement';
+import getBlendMode from '../../utils/helpers/blendModes';
+import Matrix from '../../3rd_party/transformation-matrix';
+import IShapeElement from '../ShapeElement';
+import TransformPropertyFactory from '../../utils/TransformProperty';
+import { ShapeModifiers } from '../../utils/shapes/ShapeModifiers';
+import {
+  lineCapEnum,
+  lineJoinEnum,
+} from '../../utils/helpers/shapeEnums';
+import SVGShapeData from '../helpers/shapes/SVGShapeData';
+import SVGStyleData from '../helpers/shapes/SVGStyleData';
+import SVGStrokeStyleData from '../helpers/shapes/SVGStrokeStyleData';
+import SVGFillStyleData from '../helpers/shapes/SVGFillStyleData';
+import SVGNoStyleData from '../helpers/shapes/SVGNoStyleData';
+import SVGGradientFillStyleData from '../helpers/shapes/SVGGradientFillStyleData';
+import SVGGradientStrokeStyleData from '../helpers/shapes/SVGGradientStrokeStyleData';
+import ShapeGroupData from '../helpers/shapes/ShapeGroupData';
+import SVGTransformData from '../helpers/shapes/SVGTransformData';
+import SVGElementsRenderer from '../helpers/shapes/SVGElementsRenderer';
 
 function SVGShapeElement(data, globalData, comp) {
   // List of drawable elements
@@ -94,8 +119,10 @@
     if (elementData.maskId) {
       this.globalData.defs.appendChild(elementData.ms);
       this.globalData.defs.appendChild(elementData.of);
-      pathElement.setAttribute('mask', 'url(' + locationHref + '#' + elementData.maskId + ')');
+      pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');
     }
+  } else if (data.ty === 'no') {
+    elementData = new SVGNoStyleData(this, data, styleOb);
   }
 
   if (data.ty === 'st' || data.ty === 'gs') {
@@ -224,7 +251,7 @@
     } else {
       itemsData[i] = prevViewData[processedPos - 1];
     }
-    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {
+    if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {
       if (!processedPos) {
         itemsData[i] = this.createStyleElement(arr[i], level);
       } else {
@@ -306,7 +333,6 @@
     this.stylesList[i].reset();
   }
   this.renderShape();
-
   for (i = 0; i < len; i += 1) {
     if (this.stylesList[i]._mdf || this._isFirstFrame) {
       if (this.stylesList[i].msElem) {
@@ -336,3 +362,5 @@
   this.shapesData = null;
   this.itemsData = null;
 };
+
+export default SVGShapeElement;
diff --git a/player/js/elements/svgElements/SVGTextElement.js b/player/js/elements/svgElements/SVGTextElement.js
index 859b0b0..e580b02 100644
--- a/player/js/elements/svgElements/SVGTextElement.js
+++ b/player/js/elements/svgElements/SVGTextElement.js
@@ -1,5 +1,23 @@
-/* global extendPrototype, BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement,
-RenderableDOMElement, ITextElement, createSizedArray, createNS */
+import {
+  extendPrototype,
+} from '../../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../../utils/helpers/arrays';
+import createNS from '../../utils/helpers/svg_elements';
+import BaseElement from '../BaseElement';
+import TransformElement from '../helpers/TransformElement';
+import SVGBaseElement from './SVGBaseElement';
+import HierarchyElement from '../helpers/HierarchyElement';
+import FrameElement from '../helpers/FrameElement';
+import RenderableDOMElement from '../helpers/RenderableDOMElement';
+import ITextElement from '../TextElement';
+import SVGCompElement from './SVGCompElement'; // eslint-disable-line
+import SVGShapeElement from './SVGShapeElement';
+
+var emptyShapeData = {
+  shapes: [],
+};
 
 function SVGTextLottieElement(data, globalData, comp) {
   this.textSpans = [];
@@ -34,6 +52,7 @@
 };
 
 SVGTextLottieElement.prototype.buildNewText = function () {
+  this.addDynamicProperty(this);
   var i;
   var len;
 
@@ -67,7 +86,6 @@
 
   var tSpan;
   var matrixHelper = this.mHelper;
-  var shapes;
   var shapeStr = '';
   var singleShape = this.data.singleShape;
   var xPos = 0;
@@ -94,29 +112,47 @@
     len = textContent.length;
     yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
     for (i = 0; i < len; i += 1) {
-      tSpan = this.textSpans[i] || createNS('tspan');
+      tSpan = this.textSpans[i].span || createNS('tspan');
       tSpan.textContent = textContent[i];
       tSpan.setAttribute('x', 0);
       tSpan.setAttribute('y', yPos);
       tSpan.style.display = 'inherit';
       tElement.appendChild(tSpan);
-      this.textSpans[i] = tSpan;
+      if (!this.textSpans[i]) {
+        this.textSpans[i] = {
+          span: null,
+          glyph: null,
+        };
+      }
+      this.textSpans[i].span = tSpan;
       yPos += documentData.finalLineHeight;
     }
 
     this.layerElement.appendChild(tElement);
   } else {
     var cachedSpansLength = this.textSpans.length;
-    var shapeData;
     var charData;
     for (i = 0; i < len; i += 1) {
+      if (!this.textSpans[i]) {
+        this.textSpans[i] = {
+          span: null,
+          childSpan: null,
+          glyph: null,
+        };
+      }
       if (!usesGlyphs || !singleShape || i === 0) {
-        tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs ? 'path' : 'text');
+        tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');
         if (cachedSpansLength <= i) {
           tSpan.setAttribute('stroke-linecap', 'butt');
           tSpan.setAttribute('stroke-linejoin', 'round');
           tSpan.setAttribute('stroke-miterlimit', '4');
-          this.textSpans[i] = tSpan;
+          this.textSpans[i].span = tSpan;
+          if (usesGlyphs) {
+            var childSpan = createNS('g');
+            tSpan.appendChild(childSpan);
+            this.textSpans[i].childSpan = childSpan;
+          }
+          this.textSpans[i].span = tSpan;
           this.layerElement.appendChild(tSpan);
         }
         tSpan.style.display = 'inherit';
@@ -138,13 +174,22 @@
       }
       if (usesGlyphs) {
         charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
-        shapeData = (charData && charData.data) || {};
-        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
-        if (!singleShape) {
-          tSpan.setAttribute('d', this.createPathShape(matrixHelper, shapes));
+        var glyphElement;
+        if (charData.t === 1) {
+          glyphElement = new SVGCompElement(charData.data, this.globalData, this);
         } else {
-          shapeStr += this.createPathShape(matrixHelper, shapes);
+          var data = emptyShapeData;
+          if (charData.data && charData.data.shapes) {
+            data = charData.data;
+          }
+          glyphElement = new SVGShapeElement(data, this.globalData, this);
         }
+        this.textSpans[i].glyph = glyphElement;
+        glyphElement._debug = true;
+        glyphElement.prepareFrame(0);
+        glyphElement.renderFrame();
+        this.textSpans[i].childSpan.appendChild(glyphElement.layerElement);
+        this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');
       } else {
         if (singleShape) {
           tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');
@@ -159,7 +204,7 @@
     }
   }
   while (i < this.textSpans.length) {
-    this.textSpans[i].style.display = 'none';
+    this.textSpans[i].span.style.display = 'none';
     i += 1;
   }
 
@@ -182,8 +227,24 @@
   return this.bbox;
 };
 
+SVGTextLottieElement.prototype.getValue = function () {
+  var i;
+  var len = this.textSpans.length;
+  var glyphElement;
+  this.renderedFrame = this.comp.renderedFrame;
+  for (i = 0; i < len; i += 1) {
+    glyphElement = this.textSpans[i].glyph;
+    if (glyphElement) {
+      glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);
+      if (glyphElement._mdf) {
+        this._mdf = true;
+      }
+    }
+  }
+};
+
 SVGTextLottieElement.prototype.renderInnerContent = function () {
-  if (!this.data.singleShape) {
+  if (!this.data.singleShape || this._mdf) {
     this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
     if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {
       this._sizeChanged = true;
@@ -196,10 +257,15 @@
       len = letters.length;
       var renderedLetter;
       var textSpan;
+      var glyphElement;
       for (i = 0; i < len; i += 1) {
         if (!letters[i].n) {
           renderedLetter = renderedLetters[i];
-          textSpan = this.textSpans[i];
+          textSpan = this.textSpans[i].span;
+          glyphElement = this.textSpans[i].glyph;
+          if (glyphElement) {
+            glyphElement.renderFrame();
+          }
           if (renderedLetter._mdf.m) {
             textSpan.setAttribute('transform', renderedLetter.m);
           }
@@ -220,3 +286,5 @@
     }
   }
 };
+
+export default SVGTextLottieElement;
diff --git a/player/js/elements/svgElements/effects/SVGDropShadowEffect.js b/player/js/elements/svgElements/effects/SVGDropShadowEffect.js
index 17af0c8..fc72c1c 100644
--- a/player/js/elements/svgElements/effects/SVGDropShadowEffect.js
+++ b/player/js/elements/svgElements/effects/SVGDropShadowEffect.js
@@ -1,4 +1,8 @@
-/* global createNS, rgbToHex, degToRads */
+import {
+  degToRads,
+  rgbToHex,
+} from '../../../utils/common';
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGDropShadowEffect(filter, filterManager) {
   var filterSize = filterManager.container.globalData.renderConfig.filterSize;
@@ -80,3 +84,5 @@
         } */
   }
 };
+
+export default SVGDropShadowEffect;
diff --git a/player/js/elements/svgElements/effects/SVGFillFilter.js b/player/js/elements/svgElements/effects/SVGFillFilter.js
index 0816730..b77b48d 100644
--- a/player/js/elements/svgElements/effects/SVGFillFilter.js
+++ b/player/js/elements/svgElements/effects/SVGFillFilter.js
@@ -1,4 +1,4 @@
-/* global createNS */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGFillFilter(filter, filterManager) {
   this.filterManager = filterManager;
@@ -16,3 +16,5 @@
     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');
   }
 };
+
+export default SVGFillFilter;
diff --git a/player/js/elements/svgElements/effects/SVGGaussianBlurEffect.js b/player/js/elements/svgElements/effects/SVGGaussianBlurEffect.js
index b29be04..45b8f2c 100644
--- a/player/js/elements/svgElements/effects/SVGGaussianBlurEffect.js
+++ b/player/js/elements/svgElements/effects/SVGGaussianBlurEffect.js
@@ -1,4 +1,4 @@
-/* global createNS */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGGaussianBlurEffect(filter, filterManager) {
   // Outset the filter region by 100% on all sides to accommodate blur expansion.
@@ -39,3 +39,5 @@
     this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
   }
 };
+
+export default SVGGaussianBlurEffect;
diff --git a/player/js/elements/svgElements/effects/SVGMatte3Effect.js b/player/js/elements/svgElements/effects/SVGMatte3Effect.js
index 993b337..1c331cd 100644
--- a/player/js/elements/svgElements/effects/SVGMatte3Effect.js
+++ b/player/js/elements/svgElements/effects/SVGMatte3Effect.js
@@ -1,4 +1,7 @@
-/* global createElementID, createNS */
+import {
+  createElementID,
+} from '../../../utils/common';
+import createNS from '../../../utils/helpers/svg_elements';
 
 var _svgMatteSymbols = [];
 
@@ -94,3 +97,5 @@
     this.initialize();
   }
 };
+
+export default SVGMatte3Effect;
diff --git a/player/js/elements/svgElements/effects/SVGProLevelsFilter.js b/player/js/elements/svgElements/effects/SVGProLevelsFilter.js
index d937dd7..12270bf 100644
--- a/player/js/elements/svgElements/effects/SVGProLevelsFilter.js
+++ b/player/js/elements/svgElements/effects/SVGProLevelsFilter.js
@@ -1,4 +1,4 @@
-/* global createNS */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGProLevelsFilter(filter, filterManager) {
   this.filterManager = filterManager;
@@ -99,3 +99,5 @@
     }
   }
 };
+
+export default SVGProLevelsFilter;
diff --git a/player/js/elements/svgElements/effects/SVGStrokeEffect.js b/player/js/elements/svgElements/effects/SVGStrokeEffect.js
index f733449..16017be 100644
--- a/player/js/elements/svgElements/effects/SVGStrokeEffect.js
+++ b/player/js/elements/svgElements/effects/SVGStrokeEffect.js
@@ -1,4 +1,9 @@
-/* global createNS, createElementID, locationHref, bmFloor */
+import { getLocationHref } from '../../../main';
+import {
+  createElementID,
+  bmFloor,
+} from '../../../utils/common';
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGStrokeEffect(elem, filterManager) {
   this.initialized = false;
@@ -37,7 +42,7 @@
     mask.appendChild(groupPath);
     this.elem.globalData.defs.appendChild(mask);
     var g = createNS('g');
-    g.setAttribute('mask', 'url(' + locationHref + '#' + id + ')');
+    g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');
     while (elemChildren[0]) {
       g.appendChild(elemChildren[0]);
     }
@@ -110,3 +115,5 @@
     }
   }
 };
+
+export default SVGStrokeEffect;
diff --git a/player/js/elements/svgElements/effects/SVGTintEffect.js b/player/js/elements/svgElements/effects/SVGTintEffect.js
index 1185dba..b1175b5 100644
--- a/player/js/elements/svgElements/effects/SVGTintEffect.js
+++ b/player/js/elements/svgElements/effects/SVGTintEffect.js
@@ -1,4 +1,4 @@
-/* global createNS */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGTintFilter(filter, filterManager) {
   this.filterManager = filterManager;
@@ -36,3 +36,5 @@
     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');
   }
 };
+
+export default SVGTintFilter;
diff --git a/player/js/elements/svgElements/effects/SVGTritoneFilter.js b/player/js/elements/svgElements/effects/SVGTritoneFilter.js
index 1cff5b5..9433b60 100644
--- a/player/js/elements/svgElements/effects/SVGTritoneFilter.js
+++ b/player/js/elements/svgElements/effects/SVGTritoneFilter.js
@@ -1,4 +1,4 @@
-/* global createNS */
+import createNS from '../../../utils/helpers/svg_elements';
 
 function SVGTritoneFilter(filter, filterManager) {
   this.filterManager = filterManager;
@@ -41,3 +41,5 @@
     // 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');
   }
 };
+
+export default SVGTritoneFilter;
diff --git a/player/js/main.js b/player/js/main.js
index 3e6bb0c..0fa5531 100644
--- a/player/js/main.js
+++ b/player/js/main.js
@@ -1,9 +1,21 @@
-/* exported svgNS, locationHref, initialDefaultFrame, _useWebWorker */
+const svgNS = 'http://www.w3.org/2000/svg';
 
-var svgNS = 'http://www.w3.org/2000/svg';
+let locationHref = '';
+let _useWebWorker = false;
 
-var locationHref = '';
+const initialDefaultFrame = -999999;
 
-var initialDefaultFrame = -999999;
+const setWebWorker = (flag) => { _useWebWorker = !!flag; };
+const getWebWorker = () => _useWebWorker;
 
-var _useWebWorker = false;
+const setLocationHref = (value) => { locationHref = value; };
+const getLocationHref = () => locationHref;
+
+export {
+  svgNS,
+  initialDefaultFrame,
+  setWebWorker,
+  getWebWorker,
+  setLocationHref,
+  getLocationHref,
+};
diff --git a/player/js/mask.js b/player/js/mask.js
index b85da03..ab11b80 100644
--- a/player/js/mask.js
+++ b/player/js/mask.js
@@ -1,4 +1,13 @@
-/* global createSizedArray, createElementID, PropertyFactory, ShapePropertyFactory, createNS, locationHref */
+import { getLocationHref } from './main';
+import {
+  createElementID,
+} from './utils/common';
+import {
+  createSizedArray,
+} from './utils/helpers/arrays';
+import PropertyFactory from './utils/PropertyFactory';
+import ShapePropertyFactory from './utils/shapes/ShapeProperty';
+import createNS from './utils/helpers/svg_elements';
 
 function MaskElement(data, element, globalData) {
   this.data = data;
@@ -99,7 +108,7 @@
         mask.setAttribute('id', layerId + '_' + count);
         mask.appendChild(path);
         defs.appendChild(mask);
-        g.setAttribute('mask', 'url(' + locationHref + '#' + layerId + '_' + count + ')');
+        g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');
 
         currentMasks.length = 0;
         currentMasks.push(g);
@@ -132,7 +141,7 @@
 
   if (count > 0) {
     this.maskElement.setAttribute('id', layerId);
-    this.element.maskedElement.setAttribute(maskRef, 'url(' + locationHref + '#' + layerId + ')');
+    this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');
     defs.appendChild(this.maskElement);
   }
   if (this.viewData.length) {
@@ -164,7 +173,7 @@
         if (this.storedData[i].x.v < 0) {
           if (this.storedData[i].lastOperator !== 'erode') {
             this.storedData[i].lastOperator = 'erode';
-            this.storedData[i].elem.setAttribute('filter', 'url(' + locationHref + '#' + this.storedData[i].filterId + ')');
+            this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');
           }
           feMorph.setAttribute('radius', -this.storedData[i].x.v);
         } else {
@@ -226,3 +235,5 @@
   this.data = null;
   this.masksProperties = null;
 };
+
+export default MaskElement;
diff --git a/player/js/module.js b/player/js/module.js
index b211d83..5dd4f6c 100644
--- a/player/js/module.js
+++ b/player/js/module.js
@@ -1,14 +1,22 @@
-/* global locationHref:writable, animationManager, subframeEnabled:writable, defaultCurveSegments:writable, roundValues,
-expressionsPlugin:writable, PropertyFactory, ShapePropertyFactory, Matrix, idPrefix:writable, _useWebWorker:writable */
-/* exported locationHref, subframeEnabled, expressionsPlugin, idPrefix, _useWebWorker */
-
-'use strict';
-
 /* <%= contents %> */
-var lottie = {};
+import { setLocationHref, setWebWorker } from './main';
+import animationManager from './animation/AnimationManager';
+import {
+  setDefaultCurveSegments,
+  getDefaultCurveSegments,
+  roundValues,
+  setIdPrefix,
+  setSubframeEnabled,
+  setExpressionsPlugin,
+} from './utils/common';
+import PropertyFactory from './utils/PropertyFactory';
+import ShapePropertyFactory from './utils/shapes/ShapeProperty';
+import Matrix from './3rd_party/transformation-matrix';
 
-function setLocationHref(href) {
-  locationHref = href;
+const lottie = {};
+
+function setLocation(href) {
+  setLocationHref(href);
 }
 
 function searchAnimations() {
@@ -20,11 +28,11 @@
 }
 
 function setSubframeRendering(flag) {
-  subframeEnabled = flag;
+  setSubframeEnabled(flag);
 }
 
-function setIDPrefix(prefix) {
-  idPrefix = prefix;
+function setPrefix(prefix) {
+  setIdPrefix(prefix);
 }
 
 function loadAnimation(params) {
@@ -38,20 +46,20 @@
   if (typeof value === 'string') {
     switch (value) {
       case 'high':
-        defaultCurveSegments = 200;
+        setDefaultCurveSegments(200);
         break;
       default:
       case 'medium':
-        defaultCurveSegments = 50;
+        setDefaultCurveSegments(50);
         break;
       case 'low':
-        defaultCurveSegments = 10;
+        setDefaultCurveSegments(10);
         break;
     }
   } else if (!isNaN(value) && value > 1) {
-    defaultCurveSegments = value;
+    setDefaultCurveSegments(value);
   }
-  if (defaultCurveSegments >= 50) {
+  if (getDefaultCurveSegments() >= 50) {
     roundValues(false);
   } else {
     roundValues(true);
@@ -64,7 +72,7 @@
 
 function installPlugin(type, plugin) {
   if (type === 'expressions') {
-    expressionsPlugin = plugin;
+    setExpressionsPlugin(plugin);
   }
 }
 
@@ -83,7 +91,7 @@
 
 lottie.play = animationManager.play;
 lottie.pause = animationManager.pause;
-lottie.setLocationHref = setLocationHref;
+lottie.setLocationHref = setLocation;
 lottie.togglePause = animationManager.togglePause;
 lottie.setSpeed = animationManager.setSpeed;
 lottie.setDirection = animationManager.setDirection;
@@ -105,10 +113,8 @@
 lottie.mute = animationManager.mute;
 lottie.unmute = animationManager.unmute;
 lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
-lottie.useWebWorker = function (flag) {
-  _useWebWorker = flag;
-};
-lottie.setIDPrefix = setIDPrefix;
+lottie.useWebWorker = setWebWorker;
+lottie.setIDPrefix = setPrefix;
 lottie.__getFactory = getFactory;
 lottie.version = '[[BM_VERSION]]';
 
@@ -143,3 +149,5 @@
   renderer = getQueryVariable('renderer');
 }
 var readyStateCheckInterval = setInterval(checkReady, 100);
+
+export default lottie;
diff --git a/player/js/module_worker.js b/player/js/module_worker.js
index 0da0b6f..08fcf46 100644
--- a/player/js/module_worker.js
+++ b/player/js/module_worker.js
@@ -1,5 +1,10 @@
-/* global defaultCurveSegments:writable, roundValues, animationManager, idPrefix:writable */
-/* exported idPrefix, document */
+import {
+  setDefaultCurveSegments,
+  getDefaultCurveSegments,
+  roundValues,
+  setIdPrefix,
+} from './utils/common';
+import animationManager from './animation/AnimationManager';
 
 function workerContent() {
   var localIdCounter = 0;
@@ -232,20 +237,20 @@
       if (typeof value === 'string') {
         switch (value) {
           case 'high':
-            defaultCurveSegments = 200;
+            setDefaultCurveSegments(200);
             break;
           case 'medium':
-            defaultCurveSegments = 50;
+            setDefaultCurveSegments(50);
             break;
           case 'low':
           default:
-            defaultCurveSegments = 10;
+            setDefaultCurveSegments(10);
             break;
         }
       } else if (!isNaN(value) && value > 1) {
-        defaultCurveSegments = value;
+        setDefaultCurveSegments(value);
       }
-      if (defaultCurveSegments >= 50) {
+      if (getDefaultCurveSegments() >= 50) {
         roundValues(false);
       } else {
         roundValues(true);
@@ -253,7 +258,7 @@
     }
 
     function setIDPrefix(prefix) {
-      idPrefix = prefix;
+      setIdPrefix(prefix);
     }
 
     lottiejs.play = animationManager.play;
diff --git a/player/js/modules/canvas.js b/player/js/modules/canvas.js
new file mode 100644
index 0000000..794412e
--- /dev/null
+++ b/player/js/modules/canvas.js
@@ -0,0 +1,14 @@
+import lottie from './canvas_light';
+import {
+  setExpressionsPlugin,
+} from '../utils/common';
+import Expressions from '../utils/expressions/Expressions';
+import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator';
+import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator';
+
+// Registering expression plugin
+setExpressionsPlugin(Expressions);
+expressionPropertyDecorator();
+expressionTextPropertyDecorator();
+
+export default lottie;
diff --git a/player/js/modules/canvas_light.js b/player/js/modules/canvas_light.js
new file mode 100644
index 0000000..3a48453
--- /dev/null
+++ b/player/js/modules/canvas_light.js
@@ -0,0 +1,21 @@
+import lottie from './main';
+import { ShapeModifiers } from '../utils/shapes/ShapeModifiers';
+import TrimModifier from '../utils/shapes/TrimModifier';
+import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier';
+import RepeaterModifier from '../utils/shapes/RepeaterModifier';
+import RoundCornersModifier from '../utils/shapes/RoundCornersModifier';
+import CanvasRenderer from '../renderers/CanvasRenderer';
+import {
+  registerRenderer,
+} from '../renderers/renderersManager';
+
+// Registering renderers
+registerRenderer('canvas', CanvasRenderer);
+
+// Registering shape modifiers
+ShapeModifiers.registerModifier('tm', TrimModifier);
+ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+ShapeModifiers.registerModifier('rp', RepeaterModifier);
+ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+export default lottie;
diff --git a/player/js/modules/full.js b/player/js/modules/full.js
new file mode 100644
index 0000000..ae8e7eb
--- /dev/null
+++ b/player/js/modules/full.js
@@ -0,0 +1,56 @@
+import lottie from './main';
+import {
+  setExpressionsPlugin,
+} from '../utils/common';
+import { ShapeModifiers } from '../utils/shapes/ShapeModifiers';
+import TrimModifier from '../utils/shapes/TrimModifier';
+import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier';
+import RepeaterModifier from '../utils/shapes/RepeaterModifier';
+import RoundCornersModifier from '../utils/shapes/RoundCornersModifier';
+import CanvasRenderer from '../renderers/CanvasRenderer';
+import HybridRenderer from '../renderers/HybridRenderer';
+import SVGRenderer from '../renderers/SVGRenderer';
+import {
+  registerRenderer,
+} from '../renderers/renderersManager';
+import Expressions from '../utils/expressions/Expressions';
+import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator';
+import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator';
+// SVG effects
+import { registerEffect } from '../elements/svgElements/SVGEffects';
+import SVGTintFilter from '../elements/svgElements/effects/SVGTintEffect';
+import SVGFillFilter from '../elements/svgElements/effects/SVGFillFilter';
+import SVGStrokeEffect from '../elements/svgElements/effects/SVGStrokeEffect';
+import SVGTritoneFilter from '../elements/svgElements/effects/SVGTritoneFilter';
+import SVGProLevelsFilter from '../elements/svgElements/effects/SVGProLevelsFilter';
+import SVGDropShadowEffect from '../elements/svgElements/effects/SVGDropShadowEffect';
+import SVGMatte3Effect from '../elements/svgElements/effects/SVGMatte3Effect';
+import SVGGaussianBlurEffect from '../elements/svgElements/effects/SVGGaussianBlurEffect';
+
+// Registering renderers
+registerRenderer('canvas', CanvasRenderer);
+registerRenderer('html', HybridRenderer);
+registerRenderer('svg', SVGRenderer);
+
+// Registering shape modifiers
+ShapeModifiers.registerModifier('tm', TrimModifier);
+ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+ShapeModifiers.registerModifier('rp', RepeaterModifier);
+ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+// Registering expression plugin
+setExpressionsPlugin(Expressions);
+expressionPropertyDecorator();
+expressionTextPropertyDecorator();
+
+// Registering svg effects
+registerEffect(20, SVGTintFilter, true);
+registerEffect(21, SVGFillFilter, true);
+registerEffect(22, SVGStrokeEffect, false);
+registerEffect(23, SVGTritoneFilter, true);
+registerEffect(24, SVGProLevelsFilter, true);
+registerEffect(25, SVGDropShadowEffect, true);
+registerEffect(28, SVGMatte3Effect, false);
+registerEffect(29, SVGGaussianBlurEffect, true);
+
+export default lottie;
diff --git a/player/js/modules/full_worker.js b/player/js/modules/full_worker.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/player/js/modules/full_worker.js
diff --git a/player/js/modules/html.js b/player/js/modules/html.js
new file mode 100644
index 0000000..2edd77d
--- /dev/null
+++ b/player/js/modules/html.js
@@ -0,0 +1,32 @@
+import lottie from './html_light';
+import {
+  setExpressionsPlugin,
+} from '../utils/common';
+import Expressions from '../utils/expressions/Expressions';
+import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator';
+import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator';
+// SVG effects
+import { registerEffect } from '../elements/svgElements/SVGEffects';
+import SVGTintFilter from '../elements/svgElements/effects/SVGTintEffect';
+import SVGFillFilter from '../elements/svgElements/effects/SVGFillFilter';
+import SVGStrokeEffect from '../elements/svgElements/effects/SVGStrokeEffect';
+import SVGTritoneFilter from '../elements/svgElements/effects/SVGTritoneFilter';
+import SVGProLevelsFilter from '../elements/svgElements/effects/SVGProLevelsFilter';
+import SVGDropShadowEffect from '../elements/svgElements/effects/SVGDropShadowEffect';
+import SVGMatte3Effect from '../elements/svgElements/effects/SVGMatte3Effect';
+import SVGGaussianBlurEffect from '../elements/svgElements/effects/SVGGaussianBlurEffect';
+
+// Registering expression plugin
+setExpressionsPlugin(Expressions);
+expressionPropertyDecorator();
+expressionTextPropertyDecorator();
+registerEffect(20, SVGTintFilter, true);
+registerEffect(21, SVGFillFilter, true);
+registerEffect(22, SVGStrokeEffect, false);
+registerEffect(23, SVGTritoneFilter, true);
+registerEffect(24, SVGProLevelsFilter, true);
+registerEffect(25, SVGDropShadowEffect, true);
+registerEffect(28, SVGMatte3Effect, false);
+registerEffect(29, SVGGaussianBlurEffect, true);
+
+export default lottie;
diff --git a/player/js/modules/html_light.js b/player/js/modules/html_light.js
new file mode 100644
index 0000000..c22312d
--- /dev/null
+++ b/player/js/modules/html_light.js
@@ -0,0 +1,21 @@
+import lottie from './main';
+import { ShapeModifiers } from '../utils/shapes/ShapeModifiers';
+import TrimModifier from '../utils/shapes/TrimModifier';
+import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier';
+import RepeaterModifier from '../utils/shapes/RepeaterModifier';
+import RoundCornersModifier from '../utils/shapes/RoundCornersModifier';
+import HybridRenderer from '../renderers/HybridRenderer';
+import {
+  registerRenderer,
+} from '../renderers/renderersManager';
+
+// Registering renderers
+registerRenderer('html', HybridRenderer);
+
+// Registering shape modifiers
+ShapeModifiers.registerModifier('tm', TrimModifier);
+ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+ShapeModifiers.registerModifier('rp', RepeaterModifier);
+ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+export default lottie;
diff --git a/player/js/modules/main.js b/player/js/modules/main.js
new file mode 100644
index 0000000..e893488
--- /dev/null
+++ b/player/js/modules/main.js
@@ -0,0 +1,162 @@
+import { setLocationHref, setWebWorker } from '../main';
+import animationManager from '../animation/AnimationManager';
+import {
+  setDefaultCurveSegments,
+  getDefaultCurveSegments,
+  roundValues,
+  setIdPrefix,
+  setSubframeEnabled,
+  setExpressionsPlugin,
+} from '../utils/common';
+import PropertyFactory from '../utils/PropertyFactory';
+import ShapePropertyFactory from '../utils/shapes/ShapeProperty';
+import Matrix from '../3rd_party/transformation-matrix';
+
+const lottie = {};
+var standalone = '__[STANDALONE]__';
+var animationData = '__[ANIMATIONDATA]__';
+var renderer = '';
+
+function setLocation(href) {
+  setLocationHref(href);
+}
+
+function searchAnimations() {
+  if (standalone === true) {
+    animationManager.searchAnimations(animationData, standalone, renderer);
+  } else {
+    animationManager.searchAnimations();
+  }
+}
+
+function setSubframeRendering(flag) {
+  setSubframeEnabled(flag);
+}
+
+function setPrefix(prefix) {
+  setIdPrefix(prefix);
+}
+
+function loadAnimation(params) {
+  if (standalone === true) {
+    params.animationData = JSON.parse(animationData);
+  }
+  return animationManager.loadAnimation(params);
+}
+
+function setQuality(value) {
+  if (typeof value === 'string') {
+    switch (value) {
+      case 'high':
+        setDefaultCurveSegments(200);
+        break;
+      default:
+      case 'medium':
+        setDefaultCurveSegments(50);
+        break;
+      case 'low':
+        setDefaultCurveSegments(10);
+        break;
+    }
+  } else if (!isNaN(value) && value > 1) {
+    setDefaultCurveSegments(value);
+  }
+  if (getDefaultCurveSegments() >= 50) {
+    roundValues(false);
+  } else {
+    roundValues(true);
+  }
+}
+
+function inBrowser() {
+  return typeof navigator !== 'undefined';
+}
+
+function installPlugin(type, plugin) {
+  if (type === 'expressions') {
+    setExpressionsPlugin(plugin);
+  }
+}
+
+function getFactory(name) {
+  switch (name) {
+    case 'propertyFactory':
+      return PropertyFactory;
+    case 'shapePropertyFactory':
+      return ShapePropertyFactory;
+    case 'matrix':
+      return Matrix;
+    default:
+      return null;
+  }
+}
+
+lottie.play = animationManager.play;
+lottie.pause = animationManager.pause;
+lottie.setLocationHref = setLocation;
+lottie.togglePause = animationManager.togglePause;
+lottie.setSpeed = animationManager.setSpeed;
+lottie.setDirection = animationManager.setDirection;
+lottie.stop = animationManager.stop;
+lottie.searchAnimations = searchAnimations;
+lottie.registerAnimation = animationManager.registerAnimation;
+lottie.loadAnimation = loadAnimation;
+lottie.setSubframeRendering = setSubframeRendering;
+lottie.resize = animationManager.resize;
+// lottie.start = start;
+lottie.goToAndStop = animationManager.goToAndStop;
+lottie.destroy = animationManager.destroy;
+lottie.setQuality = setQuality;
+lottie.inBrowser = inBrowser;
+lottie.installPlugin = installPlugin;
+lottie.freeze = animationManager.freeze;
+lottie.unfreeze = animationManager.unfreeze;
+lottie.setVolume = animationManager.setVolume;
+lottie.mute = animationManager.mute;
+lottie.unmute = animationManager.unmute;
+lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;
+lottie.useWebWorker = setWebWorker;
+lottie.setIDPrefix = setPrefix;
+lottie.__getFactory = getFactory;
+lottie.version = '[[BM_VERSION]]';
+
+function checkReady() {
+  if (document.readyState === 'complete') {
+    clearInterval(readyStateCheckInterval);
+    searchAnimations();
+  }
+}
+
+function getQueryVariable(variable) {
+  var vars = queryString.split('&');
+  for (var i = 0; i < vars.length; i += 1) {
+    var pair = vars[i].split('=');
+    if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq
+      return decodeURIComponent(pair[1]);
+    }
+  }
+  return null;
+}
+var queryString;
+if (standalone) {
+  var scripts = document.getElementsByTagName('script');
+  var index = scripts.length - 1;
+  var myScript = scripts[index] || {
+    src: '',
+  };
+  queryString = myScript.src.replace(/^[^\?]+\??/, ''); // eslint-disable-line no-useless-escape
+  renderer = getQueryVariable('renderer');
+}
+var readyStateCheckInterval = setInterval(checkReady, 100);
+
+// this adds bodymovin to the window object for backwards compatibility
+try {
+  if (!(typeof exports === 'object' && typeof module !== 'undefined')
+    && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef
+  ) {
+    window.bodymovin = lottie;
+  }
+} catch (err) {
+  //
+}
+export default lottie;
diff --git a/player/js/modules/svg.js b/player/js/modules/svg.js
new file mode 100644
index 0000000..1a2140d
--- /dev/null
+++ b/player/js/modules/svg.js
@@ -0,0 +1,32 @@
+import lottie from './svg_light';
+import {
+  setExpressionsPlugin,
+} from '../utils/common';
+import Expressions from '../utils/expressions/Expressions';
+import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator';
+import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator';
+// SVG effects
+import { registerEffect } from '../elements/svgElements/SVGEffects';
+import SVGTintFilter from '../elements/svgElements/effects/SVGTintEffect';
+import SVGFillFilter from '../elements/svgElements/effects/SVGFillFilter';
+import SVGStrokeEffect from '../elements/svgElements/effects/SVGStrokeEffect';
+import SVGTritoneFilter from '../elements/svgElements/effects/SVGTritoneFilter';
+import SVGProLevelsFilter from '../elements/svgElements/effects/SVGProLevelsFilter';
+import SVGDropShadowEffect from '../elements/svgElements/effects/SVGDropShadowEffect';
+import SVGMatte3Effect from '../elements/svgElements/effects/SVGMatte3Effect';
+import SVGGaussianBlurEffect from '../elements/svgElements/effects/SVGGaussianBlurEffect';
+
+// Registering expression plugin
+setExpressionsPlugin(Expressions);
+expressionPropertyDecorator();
+expressionTextPropertyDecorator();
+registerEffect(20, SVGTintFilter, true);
+registerEffect(21, SVGFillFilter, true);
+registerEffect(22, SVGStrokeEffect, false);
+registerEffect(23, SVGTritoneFilter, true);
+registerEffect(24, SVGProLevelsFilter, true);
+registerEffect(25, SVGDropShadowEffect, true);
+registerEffect(28, SVGMatte3Effect, false);
+registerEffect(29, SVGGaussianBlurEffect, true);
+
+export default lottie;
diff --git a/player/js/modules/svg_light.js b/player/js/modules/svg_light.js
new file mode 100644
index 0000000..45c4b82
--- /dev/null
+++ b/player/js/modules/svg_light.js
@@ -0,0 +1,21 @@
+import lottie from './main';
+import { ShapeModifiers } from '../utils/shapes/ShapeModifiers';
+import TrimModifier from '../utils/shapes/TrimModifier';
+import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier';
+import RepeaterModifier from '../utils/shapes/RepeaterModifier';
+import RoundCornersModifier from '../utils/shapes/RoundCornersModifier';
+import SVGRenderer from '../renderers/SVGRenderer';
+import {
+  registerRenderer,
+} from '../renderers/renderersManager';
+
+// Registering renderers
+registerRenderer('svg', SVGRenderer);
+
+// Registering shape modifiers
+ShapeModifiers.registerModifier('tm', TrimModifier);
+ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+ShapeModifiers.registerModifier('rp', RepeaterModifier);
+ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+
+export default lottie;
diff --git a/player/js/players/BasicPlayer.js b/player/js/players/BasicPlayer.js
deleted file mode 100644
index d0841ef..0000000
--- a/player/js/players/BasicPlayer.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/* global createTag, animationManager */
-
-function BasicPlayer() {}
-
-BasicPlayer.prototype.setAnimationItem = function () {
-};
-
-BasicPlayer.prototype.playStarted = function () {
-  this.playButton.style.display = 'none';
-  this.pauseButton.style.display = 'block';
-  this.pauseAnimation.goToAndStop(0);
-  this.pauseAnimation.play();
-};
-
-BasicPlayer.prototype.pauseStarted = function () {
-  this.playButton.style.display = 'block';
-  this.pauseButton.style.display = 'none';
-  this.playAnimation.goToAndStop(0);
-  this.playAnimation.play();
-};
-
-BasicPlayer.prototype.buildControls = function (item, wrapper) {
-  var self = this;
-  this.animationItem = item;
-  wrapper.addEventListener('bmPlay', function () { self.playStarted(); });
-  wrapper.addEventListener('bmPause', function () { self.pauseStarted(); });
-
-  this.controls = createTag('div');
-  this.controls.style.width = '100%';
-  this.controls.style.height = '70px';
-  this.controls.style.position = 'absolute';
-  this.controls.style.left = 0;
-  this.controls.style.bottom = 0;
-  this.controls.style.backgroundColor = 'rgba(0,0,0,.3)';
-  wrapper.appendChild(this.controls);
-
-  this.scrollBar = createTag('div');
-  this.scrollBar.style.width = '100%';
-  this.scrollBar.style.height = '14px';
-  this.scrollBar.style.backgroundColor = 'rgba(25,25,25,1)';
-  this.controls.appendChild(this.scrollBar);
-
-  this.scrollBarThumb = createTag('div');
-  var scrollStyle = this.scrollBarThumb.style;
-  scrollStyle.width = '18px';
-  scrollStyle.height = '18px';
-  scrollStyle.position = 'absolute';
-  scrollStyle.transform = 'translate(-7px,0px)';
-  scrollStyle.webkitTransform = 'translate(-7px,0px)';
-  scrollStyle.top = '-3px';
-  scrollStyle.left = '0px';
-  scrollStyle.borderRadius = '11px';
-  scrollStyle.border = 'solid 2px #000000';
-  scrollStyle.backgroundColor = 'rgba(255,255,255,1)';
-  scrollStyle.cursor = 'pointer';
-  this.controls.appendChild(this.scrollBarThumb);
-
-  this.scrollBar.addEventListener('mousedown', function (ev) {
-    var mousePos = ev.layerX;
-    var width = self.scrollBar.clientWidth;
-    self.scrollAnimation(mousePos / width);
-  });
-  this.scrollBarThumb.addEventListener('mousedown', function () {
-    self.scrollAnimation();
-  });
-
-  this.playButton = createTag('div');
-  this.playButton.style.width = '40px';
-  this.playButton.style.height = '30px';
-  this.playButton.style.marginTop = '12px';
-  this.playButton.style.marginLeft = '10px';
-  this.playButton.style.backgroundColor = 'rgba(25,25,25,1)';
-  this.playButton.style.cursor = 'pointer';
-  this.playButton.setAttribute('data-animation-path', 'exports/pause');
-  this.playButton.setAttribute('data-bm-player', '0');
-  this.playButton.setAttribute('data-anim-type', 'svg');
-  this.playButton.setAttribute('data-anim-name', 'play');
-  this.playButton.setAttribute('data-anim-repeat', '0');
-  this.playButton.style.display = 'none';
-  this.playAnimation = animationManager.registerAnimation(this.playButton);
-  this.playAnimation.loop = false;
-  this.controls.appendChild(this.playButton);
-  this.playButton.addEventListener('click', function () {
-    self.animationItem.play();
-  });
-
-  this.pauseButton = createTag('div');
-  this.pauseButton.style.width = '40px';
-  this.pauseButton.style.height = '30px';
-  this.pauseButton.style.marginTop = '12px';
-  this.pauseButton.style.marginLeft = '10px';
-  this.pauseButton.style.backgroundColor = 'rgba(25,25,25,1)';
-  this.pauseButton.style.cursor = 'pointer';
-  this.pauseButton.setAttribute('data-animation-path', 'exports/play');
-  this.pauseButton.setAttribute('data-bm-player', '0');
-  this.pauseButton.setAttribute('data-anim-type', 'svg');
-  this.pauseButton.setAttribute('data-anim-name', 'pause');
-  this.pauseButton.setAttribute('data-anim-repeat', '0');
-  this.pauseAnimation = animationManager.registerAnimation(this.pauseButton);
-  this.pauseAnimation.wrapper.addEventListener('bmLoaded', function () { self.pauseAnimation.goToAndStop(self.pauseAnimation.totalFrames - 1); });
-  this.pauseAnimation.loop = false;
-  this.controls.appendChild(this.pauseButton);
-  this.pauseButton.addEventListener('click', function () {
-    self.animationItem.pause();
-  });
-};
-
-BasicPlayer.prototype.setProgress = function (val) {
-  this.progress = val;
-  this.scrollBarThumb.style.left = (this.progress) * 100 + '%';
-};
-
-BasicPlayer.prototype.scrollAnimation = function (perc) {
-  this.animationItem.isScrolling = true;
-  this.boundingRect = this.scrollBar.getBoundingClientRect();
-  this.scrollBarWidth = this.scrollBar.clientWidth;
-  var self = this;
-  var mouseMoveFunc = function (ev) {
-    var mousePos = ev.pageX - self.boundingRect.left;
-    if (mousePos < 0) {
-      mousePos = 0;
-    } else if (mousePos >= self.scrollBarWidth) {
-      mousePos = self.scrollBarWidth - 1;
-    }
-    self.animationItem.updateAnimation(mousePos / self.scrollBarWidth);
-  };
-  var mouseUpFunc = function () {
-    window.removeEventListener('mousemove', mouseMoveFunc);
-    window.removeEventListener('mouseup', mouseUpFunc);
-    self.animationItem.isScrolling = false;
-  };
-  window.addEventListener('mousemove', mouseMoveFunc);
-  window.addEventListener('mouseup', mouseUpFunc);
-  if (perc !== undefined) {
-    self.animationItem.updateAnimation(perc);
-  }
-};
diff --git a/player/js/players/PlayerManager.js b/player/js/players/PlayerManager.js
deleted file mode 100644
index 51b2b12..0000000
--- a/player/js/players/PlayerManager.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* global BasicPlayer, createElement */
-/* exported playerManager */
-
-function PlayerManager() {}
-
-PlayerManager.prototype.createPlayer = function (type) {
-  switch (type) {
-    case '1':
-      return createElement(BasicPlayer);
-    default:
-      return null;
-  }
-};
-
-var playerManager = createElement(PlayerManager);
diff --git a/player/js/renderers/BaseRenderer.js b/player/js/renderers/BaseRenderer.js
index 14f2570..d13edae 100644
--- a/player/js/renderers/BaseRenderer.js
+++ b/player/js/renderers/BaseRenderer.js
@@ -1,4 +1,6 @@
-/* global AudioElement, FootageElement, FontManager */
+import FontManager from '../utils/FontManager';
+import FootageElement from '../elements/FootageElement';
+import AudioElement from '../elements/AudioElement';
 
 function BaseRenderer() {}
 BaseRenderer.prototype.checkLayers = function (num) {
@@ -147,3 +149,5 @@
     h: animData.h,
   };
 };
+
+export default BaseRenderer;
diff --git a/player/js/renderers/CanvasRenderer.js b/player/js/renderers/CanvasRenderer.js
index 3de4376..d5e9323 100644
--- a/player/js/renderers/CanvasRenderer.js
+++ b/player/js/renderers/CanvasRenderer.js
@@ -1,5 +1,10 @@
-/* global CVContextData, Matrix, extendPrototype, BaseRenderer, CVShapeElement, CVTextElement,
-CVImageElement, CVCompElement, CVSolidElement, SVGRenderer, createTag, createSizedArray */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import Matrix from '../3rd_party/transformation-matrix';
+import CanvasRendererBase from './CanvasRendererBase';
+import CVContextData from '../elements/canvasElements/CVContextData';
+import CVCompElement from '../elements/canvasElements/CVCompElement';
 
 function CanvasRenderer(animationItem, config) {
   this.animationItem = animationItem;
@@ -31,314 +36,10 @@
   this.completeLayers = false;
   this.rendererType = 'canvas';
 }
-extendPrototype([BaseRenderer], CanvasRenderer);
-
-CanvasRenderer.prototype.createShape = function (data) {
-  return new CVShapeElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createText = function (data) {
-  return new CVTextElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createImage = function (data) {
-  return new CVImageElement(data, this.globalData, this);
-};
+extendPrototype([CanvasRendererBase], CanvasRenderer);
 
 CanvasRenderer.prototype.createComp = function (data) {
   return new CVCompElement(data, this.globalData, this);
 };
 
-CanvasRenderer.prototype.createSolid = function (data) {
-  return new CVSolidElement(data, this.globalData, this);
-};
-
-CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-CanvasRenderer.prototype.ctxTransform = function (props) {
-  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
-    return;
-  }
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
-    return;
-  }
-  this.transformMat.cloneFromProps(props);
-  var cProps = this.contextData.cTr.props;
-  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]);
-  // 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]);
-  this.contextData.cTr.cloneFromProps(this.transformMat.props);
-  var trProps = this.contextData.cTr.props;
-  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
-};
-
-CanvasRenderer.prototype.ctxOpacity = function (op) {
-  /* if(op === 1){
-        return;
-    } */
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-    return;
-  }
-  this.contextData.cO *= op < 0 ? 0 : op;
-  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
-    this.canvasContext.globalAlpha = this.contextData.cO;
-    this.globalData.currentGlobalAlpha = this.contextData.cO;
-  }
-};
-
-CanvasRenderer.prototype.reset = function () {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  this.contextData.reset();
-};
-
-CanvasRenderer.prototype.save = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.save();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.save();
-  }
-  var props = this.contextData.cTr.props;
-  if (this.contextData._length <= this.contextData.cArrPos) {
-    this.contextData.duplicate();
-  }
-  var i;
-  var arr = this.contextData.saved[this.contextData.cArrPos];
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = props[i];
-  }
-  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
-  this.contextData.cArrPos += 1;
-};
-
-CanvasRenderer.prototype.restore = function (actionFlag) {
-  if (!this.renderConfig.clearCanvas) {
-    this.canvasContext.restore();
-    return;
-  }
-  if (actionFlag) {
-    this.canvasContext.restore();
-    this.globalData.blendMode = 'source-over';
-  }
-  this.contextData.cArrPos -= 1;
-  var popped = this.contextData.saved[this.contextData.cArrPos];
-  var i;
-  var arr = this.contextData.cTr.props;
-  for (i = 0; i < 16; i += 1) {
-    arr[i] = popped[i];
-  }
-  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
-  popped = this.contextData.savedOp[this.contextData.cArrPos];
-  this.contextData.cO = popped;
-  if (this.globalData.currentGlobalAlpha !== popped) {
-    this.canvasContext.globalAlpha = popped;
-    this.globalData.currentGlobalAlpha = popped;
-  }
-};
-
-CanvasRenderer.prototype.configAnimation = function (animData) {
-  if (this.animationItem.wrapper) {
-    this.animationItem.container = createTag('canvas');
-    var containerStyle = this.animationItem.container.style;
-    containerStyle.width = '100%';
-    containerStyle.height = '100%';
-    var origin = '0px 0px 0px';
-    containerStyle.transformOrigin = origin;
-    containerStyle.mozTransformOrigin = origin;
-    containerStyle.webkitTransformOrigin = origin;
-    containerStyle['-webkit-transform'] = origin;
-    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
-    this.animationItem.wrapper.appendChild(this.animationItem.container);
-    this.canvasContext = this.animationItem.container.getContext('2d');
-    if (this.renderConfig.className) {
-      this.animationItem.container.setAttribute('class', this.renderConfig.className);
-    }
-    if (this.renderConfig.id) {
-      this.animationItem.container.setAttribute('id', this.renderConfig.id);
-    }
-  } else {
-    this.canvasContext = this.renderConfig.context;
-  }
-  this.data = animData;
-  this.layers = animData.layers;
-  this.transformCanvas = {
-    w: animData.w,
-    h: animData.h,
-    sx: 0,
-    sy: 0,
-    tx: 0,
-    ty: 0,
-  };
-  this.setupGlobalData(animData, document.body);
-  this.globalData.canvasContext = this.canvasContext;
-  this.globalData.renderer = this;
-  this.globalData.isDashed = false;
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.globalData.transformCanvas = this.transformCanvas;
-  this.elements = createSizedArray(animData.layers.length);
-
-  this.updateContainerSize();
-};
-
-CanvasRenderer.prototype.updateContainerSize = function () {
-  this.reset();
-  var elementWidth;
-  var elementHeight;
-  if (this.animationItem.wrapper && this.animationItem.container) {
-    elementWidth = this.animationItem.wrapper.offsetWidth;
-    elementHeight = this.animationItem.wrapper.offsetHeight;
-    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
-    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
-  } else {
-    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
-    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
-  }
-  var elementRel;
-  var animationRel;
-  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
-    var par = this.renderConfig.preserveAspectRatio.split(' ');
-    var fillType = par[1] || 'meet';
-    var pos = par[0] || 'xMidYMid';
-    var xPos = pos.substr(0, 4);
-    var yPos = pos.substr(4);
-    elementRel = elementWidth / elementHeight;
-    animationRel = this.transformCanvas.w / this.transformCanvas.h;
-    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
-      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    } else {
-      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    }
-
-    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
-    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
-      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.tx = 0;
-    }
-    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
-    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
-      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
-    } else {
-      this.transformCanvas.ty = 0;
-    }
-  } else if (this.renderConfig.preserveAspectRatio === 'none') {
-    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
-    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  } else {
-    this.transformCanvas.sx = this.renderConfig.dpr;
-    this.transformCanvas.sy = this.renderConfig.dpr;
-    this.transformCanvas.tx = 0;
-    this.transformCanvas.ty = 0;
-  }
-  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];
-  /* var i, len = this.elements.length;
-    for(i=0;i<len;i+=1){
-        if(this.elements[i] && this.elements[i].data.ty === 0){
-            this.elements[i].resize(this.globalData.transformCanvas);
-        }
-    } */
-  this.ctxTransform(this.transformCanvas.props);
-  this.canvasContext.beginPath();
-  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-  this.canvasContext.closePath();
-  this.canvasContext.clip();
-
-  this.renderFrame(this.renderedFrame, true);
-};
-
-CanvasRenderer.prototype.destroy = function () {
-  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.globalData.canvasContext = null;
-  this.animationItem.container = null;
-  this.destroyed = true;
-};
-
-CanvasRenderer.prototype.renderFrame = function (num, forceRender) {
-  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
-    return;
-  }
-  this.renderedFrame = num;
-  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
-  this.globalData.frameId += 1;
-  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
-  this.globalData.projectInterface.currentFrame = num;
-
-  // console.log('--------');
-  // console.log('NEW: ',num);
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-
-  for (i = 0; i < len; i += 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    if (this.renderConfig.clearCanvas === true) {
-      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
-    } else {
-      this.save();
-    }
-    for (i = len - 1; i >= 0; i -= 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-    if (this.renderConfig.clearCanvas !== true) {
-      this.restore();
-    }
-  }
-};
-
-CanvasRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  var element = this.createItem(this.layers[pos], this, this.globalData);
-  elements[pos] = element;
-  element.initExpressions();
-  /* if(this.layers[pos].ty === 0){
-        element.resize(this.globalData.transformCanvas);
-    } */
-};
-
-CanvasRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-CanvasRenderer.prototype.hide = function () {
-  this.animationItem.container.style.display = 'none';
-};
-
-CanvasRenderer.prototype.show = function () {
-  this.animationItem.container.style.display = 'block';
-};
+export default CanvasRenderer;
diff --git a/player/js/renderers/CanvasRendererBase.js b/player/js/renderers/CanvasRendererBase.js
new file mode 100644
index 0000000..6a0b097
--- /dev/null
+++ b/player/js/renderers/CanvasRendererBase.js
@@ -0,0 +1,355 @@
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../utils/helpers/arrays';
+import createTag from '../utils/helpers/html_elements';
+import SVGRenderer from './SVGRenderer';
+import Matrix from '../3rd_party/transformation-matrix';
+import BaseRenderer from './BaseRenderer';
+import CVContextData from '../elements/canvasElements/CVContextData';
+import CVShapeElement from '../elements/canvasElements/CVShapeElement';
+import CVTextElement from '../elements/canvasElements/CVTextElement';
+import CVImageElement from '../elements/canvasElements/CVImageElement';
+import CVSolidElement from '../elements/canvasElements/CVSolidElement';
+
+function CanvasRendererBase(animationItem, config) {
+  this.animationItem = animationItem;
+  this.renderConfig = {
+    clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
+    context: (config && config.context) || null,
+    progressiveLoad: (config && config.progressiveLoad) || false,
+    preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
+    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
+    contentVisibility: (config && config.contentVisibility) || 'visible',
+    className: (config && config.className) || '',
+    id: (config && config.id) || '',
+  };
+  this.renderConfig.dpr = (config && config.dpr) || 1;
+  if (this.animationItem.wrapper) {
+    this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
+  }
+  this.renderedFrame = -1;
+  this.globalData = {
+    frameNum: -1,
+    _mdf: false,
+    renderConfig: this.renderConfig,
+    currentGlobalAlpha: -1,
+  };
+  this.contextData = new CVContextData();
+  this.elements = [];
+  this.pendingElements = [];
+  this.transformMat = new Matrix();
+  this.completeLayers = false;
+  this.rendererType = 'canvas';
+}
+extendPrototype([BaseRenderer], CanvasRendererBase);
+
+CanvasRendererBase.prototype.createShape = function (data) {
+  return new CVShapeElement(data, this.globalData, this);
+};
+
+CanvasRendererBase.prototype.createText = function (data) {
+  return new CVTextElement(data, this.globalData, this);
+};
+
+CanvasRendererBase.prototype.createImage = function (data) {
+  return new CVImageElement(data, this.globalData, this);
+};
+
+CanvasRendererBase.prototype.createSolid = function (data) {
+  return new CVSolidElement(data, this.globalData, this);
+};
+
+CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+CanvasRendererBase.prototype.ctxTransform = function (props) {
+  if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {
+    return;
+  }
+  if (!this.renderConfig.clearCanvas) {
+    this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);
+    return;
+  }
+  this.transformMat.cloneFromProps(props);
+  var cProps = this.contextData.cTr.props;
+  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]);
+  // 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]);
+  this.contextData.cTr.cloneFromProps(this.transformMat.props);
+  var trProps = this.contextData.cTr.props;
+  this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);
+};
+
+CanvasRendererBase.prototype.ctxOpacity = function (op) {
+  /* if(op === 1){
+        return;
+    } */
+  if (!this.renderConfig.clearCanvas) {
+    this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
+    this.globalData.currentGlobalAlpha = this.contextData.cO;
+    return;
+  }
+  this.contextData.cO *= op < 0 ? 0 : op;
+  if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {
+    this.canvasContext.globalAlpha = this.contextData.cO;
+    this.globalData.currentGlobalAlpha = this.contextData.cO;
+  }
+};
+
+CanvasRendererBase.prototype.reset = function () {
+  if (!this.renderConfig.clearCanvas) {
+    this.canvasContext.restore();
+    return;
+  }
+  this.contextData.reset();
+};
+
+CanvasRendererBase.prototype.save = function (actionFlag) {
+  if (!this.renderConfig.clearCanvas) {
+    this.canvasContext.save();
+    return;
+  }
+  if (actionFlag) {
+    this.canvasContext.save();
+  }
+  var props = this.contextData.cTr.props;
+  if (this.contextData._length <= this.contextData.cArrPos) {
+    this.contextData.duplicate();
+  }
+  var i;
+  var arr = this.contextData.saved[this.contextData.cArrPos];
+  for (i = 0; i < 16; i += 1) {
+    arr[i] = props[i];
+  }
+  this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
+  this.contextData.cArrPos += 1;
+};
+
+CanvasRendererBase.prototype.restore = function (actionFlag) {
+  if (!this.renderConfig.clearCanvas) {
+    this.canvasContext.restore();
+    return;
+  }
+  if (actionFlag) {
+    this.canvasContext.restore();
+    this.globalData.blendMode = 'source-over';
+  }
+  this.contextData.cArrPos -= 1;
+  var popped = this.contextData.saved[this.contextData.cArrPos];
+  var i;
+  var arr = this.contextData.cTr.props;
+  for (i = 0; i < 16; i += 1) {
+    arr[i] = popped[i];
+  }
+  this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);
+  popped = this.contextData.savedOp[this.contextData.cArrPos];
+  this.contextData.cO = popped;
+  if (this.globalData.currentGlobalAlpha !== popped) {
+    this.canvasContext.globalAlpha = popped;
+    this.globalData.currentGlobalAlpha = popped;
+  }
+};
+
+CanvasRendererBase.prototype.configAnimation = function (animData) {
+  if (this.animationItem.wrapper) {
+    this.animationItem.container = createTag('canvas');
+    var containerStyle = this.animationItem.container.style;
+    containerStyle.width = '100%';
+    containerStyle.height = '100%';
+    var origin = '0px 0px 0px';
+    containerStyle.transformOrigin = origin;
+    containerStyle.mozTransformOrigin = origin;
+    containerStyle.webkitTransformOrigin = origin;
+    containerStyle['-webkit-transform'] = origin;
+    containerStyle.contentVisibility = this.renderConfig.contentVisibility;
+    this.animationItem.wrapper.appendChild(this.animationItem.container);
+    this.canvasContext = this.animationItem.container.getContext('2d');
+    if (this.renderConfig.className) {
+      this.animationItem.container.setAttribute('class', this.renderConfig.className);
+    }
+    if (this.renderConfig.id) {
+      this.animationItem.container.setAttribute('id', this.renderConfig.id);
+    }
+  } else {
+    this.canvasContext = this.renderConfig.context;
+  }
+  this.data = animData;
+  this.layers = animData.layers;
+  this.transformCanvas = {
+    w: animData.w,
+    h: animData.h,
+    sx: 0,
+    sy: 0,
+    tx: 0,
+    ty: 0,
+  };
+  this.setupGlobalData(animData, document.body);
+  this.globalData.canvasContext = this.canvasContext;
+  this.globalData.renderer = this;
+  this.globalData.isDashed = false;
+  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+  this.globalData.transformCanvas = this.transformCanvas;
+  this.elements = createSizedArray(animData.layers.length);
+
+  this.updateContainerSize();
+};
+
+CanvasRendererBase.prototype.updateContainerSize = function () {
+  this.reset();
+  var elementWidth;
+  var elementHeight;
+  if (this.animationItem.wrapper && this.animationItem.container) {
+    elementWidth = this.animationItem.wrapper.offsetWidth;
+    elementHeight = this.animationItem.wrapper.offsetHeight;
+    this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);
+    this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);
+  } else {
+    elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+    elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
+  }
+  var elementRel;
+  var animationRel;
+  if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {
+    var par = this.renderConfig.preserveAspectRatio.split(' ');
+    var fillType = par[1] || 'meet';
+    var pos = par[0] || 'xMidYMid';
+    var xPos = pos.substr(0, 4);
+    var yPos = pos.substr(4);
+    elementRel = elementWidth / elementHeight;
+    animationRel = this.transformCanvas.w / this.transformCanvas.h;
+    if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) {
+      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+    } else {
+      this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+    }
+
+    if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
+      this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr;
+    } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) {
+      this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;
+    } else {
+      this.transformCanvas.tx = 0;
+    }
+    if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
+      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr;
+    } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) {
+      this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr;
+    } else {
+      this.transformCanvas.ty = 0;
+    }
+  } else if (this.renderConfig.preserveAspectRatio === 'none') {
+    this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);
+    this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);
+    this.transformCanvas.tx = 0;
+    this.transformCanvas.ty = 0;
+  } else {
+    this.transformCanvas.sx = this.renderConfig.dpr;
+    this.transformCanvas.sy = this.renderConfig.dpr;
+    this.transformCanvas.tx = 0;
+    this.transformCanvas.ty = 0;
+  }
+  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];
+  /* var i, len = this.elements.length;
+    for(i=0;i<len;i+=1){
+        if(this.elements[i] && this.elements[i].data.ty === 0){
+            this.elements[i].resize(this.globalData.transformCanvas);
+        }
+    } */
+  this.ctxTransform(this.transformCanvas.props);
+  this.canvasContext.beginPath();
+  this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+  this.canvasContext.closePath();
+  this.canvasContext.clip();
+
+  this.renderFrame(this.renderedFrame, true);
+};
+
+CanvasRendererBase.prototype.destroy = function () {
+  if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {
+    this.animationItem.wrapper.innerText = '';
+  }
+  var i;
+  var len = this.layers ? this.layers.length : 0;
+  for (i = len - 1; i >= 0; i -= 1) {
+    if (this.elements[i]) {
+      this.elements[i].destroy();
+    }
+  }
+  this.elements.length = 0;
+  this.globalData.canvasContext = null;
+  this.animationItem.container = null;
+  this.destroyed = true;
+};
+
+CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {
+  if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) {
+    return;
+  }
+  this.renderedFrame = num;
+  this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+  this.globalData.frameId += 1;
+  this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
+  this.globalData.projectInterface.currentFrame = num;
+
+  // console.log('--------');
+  // console.log('NEW: ',num);
+  var i;
+  var len = this.layers.length;
+  if (!this.completeLayers) {
+    this.checkLayers(num);
+  }
+
+  for (i = 0; i < len; i += 1) {
+    if (this.completeLayers || this.elements[i]) {
+      this.elements[i].prepareFrame(num - this.layers[i].st);
+    }
+  }
+  if (this.globalData._mdf) {
+    if (this.renderConfig.clearCanvas === true) {
+      this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+    } else {
+      this.save();
+    }
+    for (i = len - 1; i >= 0; i -= 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+    if (this.renderConfig.clearCanvas !== true) {
+      this.restore();
+    }
+  }
+};
+
+CanvasRendererBase.prototype.buildItem = function (pos) {
+  var elements = this.elements;
+  if (elements[pos] || this.layers[pos].ty === 99) {
+    return;
+  }
+  var element = this.createItem(this.layers[pos], this, this.globalData);
+  elements[pos] = element;
+  element.initExpressions();
+  /* if(this.layers[pos].ty === 0){
+        element.resize(this.globalData.transformCanvas);
+    } */
+};
+
+CanvasRendererBase.prototype.checkPendingElements = function () {
+  while (this.pendingElements.length) {
+    var element = this.pendingElements.pop();
+    element.checkParenting();
+  }
+};
+
+CanvasRendererBase.prototype.hide = function () {
+  this.animationItem.container.style.display = 'none';
+};
+
+CanvasRendererBase.prototype.show = function () {
+  this.animationItem.container.style.display = 'block';
+};
+
+export default CanvasRendererBase;
diff --git a/player/js/renderers/CanvasRendererWorkerOverride.js b/player/js/renderers/CanvasRendererWorkerOverride.js
index 141e215..f3e6f5c 100644
--- a/player/js/renderers/CanvasRendererWorkerOverride.js
+++ b/player/js/renderers/CanvasRendererWorkerOverride.js
@@ -1,4 +1,8 @@
-/* global CanvasRenderer, createTag, createSizedArray */
+import {
+  createSizedArray,
+} from '../utils/helpers/arrays';
+import CanvasRenderer from './CanvasRenderer';
+import createTag from '../utils/helpers/html_elements';
 
 CanvasRenderer.prototype.configAnimation = function (animData) {
   if (this.animationItem.wrapper) {
@@ -45,3 +49,6 @@
 
   this.updateContainerSize();
 };
+
+// TODO: review export
+export default CanvasRenderer;
diff --git a/player/js/renderers/HybridRenderer.js b/player/js/renderers/HybridRenderer.js
index 45ac0b1..aa01bb5 100644
--- a/player/js/renderers/HybridRenderer.js
+++ b/player/js/renderers/HybridRenderer.js
@@ -1,6 +1,9 @@
-/* global extendPrototype, BaseRenderer, SVGRenderer, SVGShapeElement, HShapeElement, SVGTextLottieElement,
-HTextElement, HCameraElement, IImageElement, HImageElement, SVGCompElement, HCompElement, ISolidElement,
-HSolidElement, styleDiv, createTag, createNS */
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import HybridRendererBase from './HybridRendererBase';
+import HCompElement from '../elements/htmlElements/HCompElement';
+import SVGCompElement from '../elements/svgElements/SVGCompElement';
 
 function HybridRenderer(animationItem, config) {
   this.animationItem = animationItem;
@@ -31,77 +34,7 @@
   this.rendererType = 'html';
 }
 
-extendPrototype([BaseRenderer], HybridRenderer);
-
-HybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;
-
-HybridRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-  }
-};
-
-HybridRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newDOMElement = element.getBaseElement();
-  if (!newDOMElement) {
-    return;
-  }
-  var layer = this.layers[pos];
-  if (!layer.ddd || !this.supports3d) {
-    if (this.threeDElements) {
-      this.addTo3dContainer(newDOMElement, pos);
-    } else {
-      var i = 0;
-      var nextDOMElement;
-      var nextLayer;
-      var tmpDOMElement;
-      while (i < pos) {
-        if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
-          nextLayer = this.elements[i];
-          tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
-          nextDOMElement = tmpDOMElement || nextDOMElement;
-        }
-        i += 1;
-      }
-      if (nextDOMElement) {
-        if (!layer.ddd || !this.supports3d) {
-          this.layerElement.insertBefore(newDOMElement, nextDOMElement);
-        }
-      } else if (!layer.ddd || !this.supports3d) {
-        this.layerElement.appendChild(newDOMElement);
-      }
-    }
-  } else {
-    this.addTo3dContainer(newDOMElement, pos);
-  }
-};
-
-HybridRenderer.prototype.createShape = function (data) {
-  if (!this.supports3d) {
-    return new SVGShapeElement(data, this.globalData, this);
-  }
-  return new HShapeElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createText = function (data) {
-  if (!this.supports3d) {
-    return new SVGTextLottieElement(data, this.globalData, this);
-  }
-  return new HTextElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createCamera = function (data) {
-  this.camera = new HCameraElement(data, this.globalData, this);
-  return this.camera;
-};
-
-HybridRenderer.prototype.createImage = function (data) {
-  if (!this.supports3d) {
-    return new IImageElement(data, this.globalData, this);
-  }
-  return new HImageElement(data, this.globalData, this);
-};
+extendPrototype([HybridRendererBase], HybridRenderer);
 
 HybridRenderer.prototype.createComp = function (data) {
   if (!this.supports3d) {
@@ -110,222 +43,4 @@
   return new HCompElement(data, this.globalData, this);
 };
 
-HybridRenderer.prototype.createSolid = function (data) {
-  if (!this.supports3d) {
-    return new ISolidElement(data, this.globalData, this);
-  }
-  return new HSolidElement(data, this.globalData, this);
-};
-
-HybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
-
-HybridRenderer.prototype.getThreeDContainerByPos = function (pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
-      return this.threeDElements[i].perspectiveElem;
-    }
-    i += 1;
-  }
-  return null;
-};
-
-HybridRenderer.prototype.createThreeDContainer = function (pos, type) {
-  var perspectiveElem = createTag('div');
-  var style;
-  var containerStyle;
-  styleDiv(perspectiveElem);
-  var container = createTag('div');
-  styleDiv(container);
-  if (type === '3d') {
-    style = perspectiveElem.style;
-    style.width = this.globalData.compSize.w + 'px';
-    style.height = this.globalData.compSize.h + 'px';
-    var center = '50% 50%';
-    style.webkitTransformOrigin = center;
-    style.mozTransformOrigin = center;
-    style.transformOrigin = center;
-    containerStyle = container.style;
-    var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
-    containerStyle.transform = matrix;
-    containerStyle.webkitTransform = matrix;
-  }
-
-  perspectiveElem.appendChild(container);
-  // this.resizerElem.appendChild(perspectiveElem);
-  var threeDContainerData = {
-    container: container,
-    perspectiveElem: perspectiveElem,
-    startPos: pos,
-    endPos: pos,
-    type: type,
-  };
-  this.threeDElements.push(threeDContainerData);
-  return threeDContainerData;
-};
-
-HybridRenderer.prototype.build3dContainers = function () {
-  var i;
-  var len = this.layers.length;
-  var lastThreeDContainerData;
-  var currentContainer = '';
-  for (i = 0; i < len; i += 1) {
-    if (this.layers[i].ddd && this.layers[i].ty !== 3) {
-      if (currentContainer !== '3d') {
-        currentContainer = '3d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '3d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
-    } else {
-      if (currentContainer !== '2d') {
-        currentContainer = '2d';
-        lastThreeDContainerData = this.createThreeDContainer(i, '2d');
-      }
-      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
-    }
-  }
-  len = this.threeDElements.length;
-  for (i = len - 1; i >= 0; i -= 1) {
-    this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
-  }
-};
-
-HybridRenderer.prototype.addTo3dContainer = function (elem, pos) {
-  var i = 0;
-  var len = this.threeDElements.length;
-  while (i < len) {
-    if (pos <= this.threeDElements[i].endPos) {
-      var j = this.threeDElements[i].startPos;
-      var nextElement;
-      while (j < pos) {
-        if (this.elements[j] && this.elements[j].getBaseElement) {
-          nextElement = this.elements[j].getBaseElement();
-        }
-        j += 1;
-      }
-      if (nextElement) {
-        this.threeDElements[i].container.insertBefore(elem, nextElement);
-      } else {
-        this.threeDElements[i].container.appendChild(elem);
-      }
-      break;
-    }
-    i += 1;
-  }
-};
-
-HybridRenderer.prototype.configAnimation = function (animData) {
-  var resizerElem = createTag('div');
-  var wrapper = this.animationItem.wrapper;
-  var style = resizerElem.style;
-  style.width = animData.w + 'px';
-  style.height = animData.h + 'px';
-  this.resizerElem = resizerElem;
-  styleDiv(resizerElem);
-  style.transformStyle = 'flat';
-  style.mozTransformStyle = 'flat';
-  style.webkitTransformStyle = 'flat';
-  if (this.renderConfig.className) {
-    resizerElem.setAttribute('class', this.renderConfig.className);
-  }
-  wrapper.appendChild(resizerElem);
-
-  style.overflow = 'hidden';
-  var svg = createNS('svg');
-  svg.setAttribute('width', '1');
-  svg.setAttribute('height', '1');
-  styleDiv(svg);
-  this.resizerElem.appendChild(svg);
-  var defs = createNS('defs');
-  svg.appendChild(defs);
-  this.data = animData;
-  // Mask animation
-  this.setupGlobalData(animData, svg);
-  this.globalData.defs = defs;
-  this.layers = animData.layers;
-  this.layerElement = this.resizerElem;
-  this.build3dContainers();
-  this.updateContainerSize();
-};
-
-HybridRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.animationItem.container = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    this.elements[i].destroy();
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
-
-HybridRenderer.prototype.updateContainerSize = function () {
-  var elementWidth = this.animationItem.wrapper.offsetWidth;
-  var elementHeight = this.animationItem.wrapper.offsetHeight;
-  var elementRel = elementWidth / elementHeight;
-  var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
-  var sx;
-  var sy;
-  var tx;
-  var ty;
-  if (animationRel > elementRel) {
-    sx = elementWidth / (this.globalData.compSize.w);
-    sy = elementWidth / (this.globalData.compSize.w);
-    tx = 0;
-    ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2);
-  } else {
-    sx = elementHeight / (this.globalData.compSize.h);
-    sy = elementHeight / (this.globalData.compSize.h);
-    tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
-    ty = 0;
-  }
-  var style = this.resizerElem.style;
-  style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
-  style.transform = style.webkitTransform;
-};
-
-HybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
-
-HybridRenderer.prototype.hide = function () {
-  this.resizerElem.style.display = 'none';
-};
-
-HybridRenderer.prototype.show = function () {
-  this.resizerElem.style.display = 'block';
-};
-
-HybridRenderer.prototype.initItems = function () {
-  this.buildAllItems();
-  if (this.camera) {
-    this.camera.setup();
-  } else {
-    var cWidth = this.globalData.compSize.w;
-    var cHeight = this.globalData.compSize.h;
-    var i;
-    var len = this.threeDElements.length;
-    for (i = 0; i < len; i += 1) {
-      var style = this.threeDElements[i].perspectiveElem.style;
-      style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
-      style.perspective = style.webkitPerspective;
-    }
-  }
-};
-
-HybridRenderer.prototype.searchExtraCompositions = function (assets) {
-  var i;
-  var len = assets.length;
-  var floatingContainer = createTag('div');
-  for (i = 0; i < len; i += 1) {
-    if (assets[i].xt) {
-      var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
-      comp.initExpressions();
-      this.globalData.projectInterface.registerComposition(comp);
-    }
-  }
-};
+export default HybridRenderer;
diff --git a/player/js/renderers/HybridRendererBase.js b/player/js/renderers/HybridRendererBase.js
new file mode 100644
index 0000000..2c60260
--- /dev/null
+++ b/player/js/renderers/HybridRendererBase.js
@@ -0,0 +1,342 @@
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import createNS from '../utils/helpers/svg_elements';
+import createTag from '../utils/helpers/html_elements';
+import SVGRenderer from './SVGRenderer';
+import HSolidElement from '../elements/htmlElements/HSolidElement';
+import {
+  styleDiv,
+} from '../utils/common';
+import BaseRenderer from './BaseRenderer';
+import IImageElement from '../elements/ImageElement';
+import SVGShapeElement from '../elements/svgElements/SVGShapeElement';
+import HShapeElement from '../elements/htmlElements/HShapeElement';
+import HTextElement from '../elements/htmlElements/HTextElement';
+import HCameraElement from '../elements/htmlElements/HCameraElement';
+import HImageElement from '../elements/htmlElements/HImageElement';
+import ISolidElement from '../elements/SolidElement';
+import SVGTextLottieElement from '../elements/svgElements/SVGTextElement';
+
+function HybridRendererBase(animationItem, config) {
+  this.animationItem = animationItem;
+  this.layers = null;
+  this.renderedFrame = -1;
+  this.renderConfig = {
+    className: (config && config.className) || '',
+    imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
+    hideOnTransparent: !(config && config.hideOnTransparent === false),
+    filterSize: {
+      width: (config && config.filterSize && config.filterSize.width) || '400%',
+      height: (config && config.filterSize && config.filterSize.height) || '400%',
+      x: (config && config.filterSize && config.filterSize.x) || '-100%',
+      y: (config && config.filterSize && config.filterSize.y) || '-100%',
+    },
+  };
+  this.globalData = {
+    _mdf: false,
+    frameNum: -1,
+    renderConfig: this.renderConfig,
+  };
+  this.pendingElements = [];
+  this.elements = [];
+  this.threeDElements = [];
+  this.destroyed = false;
+  this.camera = null;
+  this.supports3d = true;
+  this.rendererType = 'html';
+}
+
+extendPrototype([BaseRenderer], HybridRendererBase);
+
+HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;
+
+HybridRendererBase.prototype.checkPendingElements = function () {
+  while (this.pendingElements.length) {
+    var element = this.pendingElements.pop();
+    element.checkParenting();
+  }
+};
+
+HybridRendererBase.prototype.appendElementInPos = function (element, pos) {
+  var newDOMElement = element.getBaseElement();
+  if (!newDOMElement) {
+    return;
+  }
+  var layer = this.layers[pos];
+  if (!layer.ddd || !this.supports3d) {
+    if (this.threeDElements) {
+      this.addTo3dContainer(newDOMElement, pos);
+    } else {
+      var i = 0;
+      var nextDOMElement;
+      var nextLayer;
+      var tmpDOMElement;
+      while (i < pos) {
+        if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {
+          nextLayer = this.elements[i];
+          tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+          nextDOMElement = tmpDOMElement || nextDOMElement;
+        }
+        i += 1;
+      }
+      if (nextDOMElement) {
+        if (!layer.ddd || !this.supports3d) {
+          this.layerElement.insertBefore(newDOMElement, nextDOMElement);
+        }
+      } else if (!layer.ddd || !this.supports3d) {
+        this.layerElement.appendChild(newDOMElement);
+      }
+    }
+  } else {
+    this.addTo3dContainer(newDOMElement, pos);
+  }
+};
+
+HybridRendererBase.prototype.createShape = function (data) {
+  if (!this.supports3d) {
+    return new SVGShapeElement(data, this.globalData, this);
+  }
+  return new HShapeElement(data, this.globalData, this);
+};
+
+HybridRendererBase.prototype.createText = function (data) {
+  if (!this.supports3d) {
+    return new SVGTextLottieElement(data, this.globalData, this);
+  }
+  return new HTextElement(data, this.globalData, this);
+};
+
+HybridRendererBase.prototype.createCamera = function (data) {
+  this.camera = new HCameraElement(data, this.globalData, this);
+  return this.camera;
+};
+
+HybridRendererBase.prototype.createImage = function (data) {
+  if (!this.supports3d) {
+    return new IImageElement(data, this.globalData, this);
+  }
+  return new HImageElement(data, this.globalData, this);
+};
+
+HybridRendererBase.prototype.createSolid = function (data) {
+  if (!this.supports3d) {
+    return new ISolidElement(data, this.globalData, this);
+  }
+  return new HSolidElement(data, this.globalData, this);
+};
+
+HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;
+
+HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {
+  var i = 0;
+  var len = this.threeDElements.length;
+  while (i < len) {
+    if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
+      return this.threeDElements[i].perspectiveElem;
+    }
+    i += 1;
+  }
+  return null;
+};
+
+HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {
+  var perspectiveElem = createTag('div');
+  var style;
+  var containerStyle;
+  styleDiv(perspectiveElem);
+  var container = createTag('div');
+  styleDiv(container);
+  if (type === '3d') {
+    style = perspectiveElem.style;
+    style.width = this.globalData.compSize.w + 'px';
+    style.height = this.globalData.compSize.h + 'px';
+    var center = '50% 50%';
+    style.webkitTransformOrigin = center;
+    style.mozTransformOrigin = center;
+    style.transformOrigin = center;
+    containerStyle = container.style;
+    var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
+    containerStyle.transform = matrix;
+    containerStyle.webkitTransform = matrix;
+  }
+
+  perspectiveElem.appendChild(container);
+  // this.resizerElem.appendChild(perspectiveElem);
+  var threeDContainerData = {
+    container: container,
+    perspectiveElem: perspectiveElem,
+    startPos: pos,
+    endPos: pos,
+    type: type,
+  };
+  this.threeDElements.push(threeDContainerData);
+  return threeDContainerData;
+};
+
+HybridRendererBase.prototype.build3dContainers = function () {
+  var i;
+  var len = this.layers.length;
+  var lastThreeDContainerData;
+  var currentContainer = '';
+  for (i = 0; i < len; i += 1) {
+    if (this.layers[i].ddd && this.layers[i].ty !== 3) {
+      if (currentContainer !== '3d') {
+        currentContainer = '3d';
+        lastThreeDContainerData = this.createThreeDContainer(i, '3d');
+      }
+      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+    } else {
+      if (currentContainer !== '2d') {
+        currentContainer = '2d';
+        lastThreeDContainerData = this.createThreeDContainer(i, '2d');
+      }
+      lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);
+    }
+  }
+  len = this.threeDElements.length;
+  for (i = len - 1; i >= 0; i -= 1) {
+    this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
+  }
+};
+
+HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {
+  var i = 0;
+  var len = this.threeDElements.length;
+  while (i < len) {
+    if (pos <= this.threeDElements[i].endPos) {
+      var j = this.threeDElements[i].startPos;
+      var nextElement;
+      while (j < pos) {
+        if (this.elements[j] && this.elements[j].getBaseElement) {
+          nextElement = this.elements[j].getBaseElement();
+        }
+        j += 1;
+      }
+      if (nextElement) {
+        this.threeDElements[i].container.insertBefore(elem, nextElement);
+      } else {
+        this.threeDElements[i].container.appendChild(elem);
+      }
+      break;
+    }
+    i += 1;
+  }
+};
+
+HybridRendererBase.prototype.configAnimation = function (animData) {
+  var resizerElem = createTag('div');
+  var wrapper = this.animationItem.wrapper;
+  var style = resizerElem.style;
+  style.width = animData.w + 'px';
+  style.height = animData.h + 'px';
+  this.resizerElem = resizerElem;
+  styleDiv(resizerElem);
+  style.transformStyle = 'flat';
+  style.mozTransformStyle = 'flat';
+  style.webkitTransformStyle = 'flat';
+  if (this.renderConfig.className) {
+    resizerElem.setAttribute('class', this.renderConfig.className);
+  }
+  wrapper.appendChild(resizerElem);
+
+  style.overflow = 'hidden';
+  var svg = createNS('svg');
+  svg.setAttribute('width', '1');
+  svg.setAttribute('height', '1');
+  styleDiv(svg);
+  this.resizerElem.appendChild(svg);
+  var defs = createNS('defs');
+  svg.appendChild(defs);
+  this.data = animData;
+  // Mask animation
+  this.setupGlobalData(animData, svg);
+  this.globalData.defs = defs;
+  this.layers = animData.layers;
+  this.layerElement = this.resizerElem;
+  this.build3dContainers();
+  this.updateContainerSize();
+};
+
+HybridRendererBase.prototype.destroy = function () {
+  if (this.animationItem.wrapper) {
+    this.animationItem.wrapper.innerText = '';
+  }
+  this.animationItem.container = null;
+  this.globalData.defs = null;
+  var i;
+  var len = this.layers ? this.layers.length : 0;
+  for (i = 0; i < len; i += 1) {
+    this.elements[i].destroy();
+  }
+  this.elements.length = 0;
+  this.destroyed = true;
+  this.animationItem = null;
+};
+
+HybridRendererBase.prototype.updateContainerSize = function () {
+  var elementWidth = this.animationItem.wrapper.offsetWidth;
+  var elementHeight = this.animationItem.wrapper.offsetHeight;
+  var elementRel = elementWidth / elementHeight;
+  var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;
+  var sx;
+  var sy;
+  var tx;
+  var ty;
+  if (animationRel > elementRel) {
+    sx = elementWidth / (this.globalData.compSize.w);
+    sy = elementWidth / (this.globalData.compSize.w);
+    tx = 0;
+    ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2);
+  } else {
+    sx = elementHeight / (this.globalData.compSize.h);
+    sy = elementHeight / (this.globalData.compSize.h);
+    tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;
+    ty = 0;
+  }
+  var style = this.resizerElem.style;
+  style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';
+  style.transform = style.webkitTransform;
+};
+
+HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
+
+HybridRendererBase.prototype.hide = function () {
+  this.resizerElem.style.display = 'none';
+};
+
+HybridRendererBase.prototype.show = function () {
+  this.resizerElem.style.display = 'block';
+};
+
+HybridRendererBase.prototype.initItems = function () {
+  this.buildAllItems();
+  if (this.camera) {
+    this.camera.setup();
+  } else {
+    var cWidth = this.globalData.compSize.w;
+    var cHeight = this.globalData.compSize.h;
+    var i;
+    var len = this.threeDElements.length;
+    for (i = 0; i < len; i += 1) {
+      var style = this.threeDElements[i].perspectiveElem.style;
+      style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';
+      style.perspective = style.webkitPerspective;
+    }
+  }
+};
+
+HybridRendererBase.prototype.searchExtraCompositions = function (assets) {
+  var i;
+  var len = assets.length;
+  var floatingContainer = createTag('div');
+  for (i = 0; i < len; i += 1) {
+    if (assets[i].xt) {
+      var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);
+      comp.initExpressions();
+      this.globalData.projectInterface.registerComposition(comp);
+    }
+  }
+};
+
+export default HybridRendererBase;
diff --git a/player/js/renderers/SVGRenderer.js b/player/js/renderers/SVGRenderer.js
index b6e7c6d..35d614c 100644
--- a/player/js/renderers/SVGRenderer.js
+++ b/player/js/renderers/SVGRenderer.js
@@ -1,5 +1,13 @@
-/* global createElementID, extendPrototype, BaseRenderer, NullElement, SVGShapeElement, SVGTextLottieElement,
-IImageElement, SVGCompElement, ISolidElement, createNS, locationHref, createSizedArray, expressionsPlugin */
+import {
+  createElementID,
+} from '../utils/common';
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import createNS from '../utils/helpers/svg_elements';
+
+import SVGCompElement from '../elements/svgElements/SVGCompElement';
+import SVGRendererBase from './SVGRendererBase';
 
 function SVGRenderer(animationItem, config) {
   this.animationItem = animationItem;
@@ -62,207 +70,10 @@
   this.rendererType = 'svg';
 }
 
-extendPrototype([BaseRenderer], SVGRenderer);
-
-SVGRenderer.prototype.createNull = function (data) {
-  return new NullElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createShape = function (data) {
-  return new SVGShapeElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createText = function (data) {
-  return new SVGTextLottieElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.createImage = function (data) {
-  return new IImageElement(data, this.globalData, this);
-};
+extendPrototype([SVGRendererBase], SVGRenderer);
 
 SVGRenderer.prototype.createComp = function (data) {
   return new SVGCompElement(data, this.globalData, this);
 };
 
-SVGRenderer.prototype.createSolid = function (data) {
-  return new ISolidElement(data, this.globalData, this);
-};
-
-SVGRenderer.prototype.configAnimation = function (animData) {
-  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
-  if (this.renderConfig.viewBoxSize) {
-    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
-  } else {
-    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
-  }
-
-  if (!this.renderConfig.viewBoxOnly) {
-    this.svgElement.setAttribute('width', animData.w);
-    this.svgElement.setAttribute('height', animData.h);
-    this.svgElement.style.width = '100%';
-    this.svgElement.style.height = '100%';
-    this.svgElement.style.transform = 'translate3d(0,0,0)';
-    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
-  }
-  if (this.renderConfig.className) {
-    this.svgElement.setAttribute('class', this.renderConfig.className);
-  }
-  if (this.renderConfig.id) {
-    this.svgElement.setAttribute('id', this.renderConfig.id);
-  }
-  if (this.renderConfig.focusable !== undefined) {
-    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
-  }
-  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
-  // this.layerElement.style.transform = 'translate3d(0,0,0)';
-  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
-  this.animationItem.wrapper.appendChild(this.svgElement);
-  // Mask animation
-  var defs = this.globalData.defs;
-
-  this.setupGlobalData(animData, defs);
-  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
-  this.data = animData;
-
-  var maskElement = createNS('clipPath');
-  var rect = createNS('rect');
-  rect.setAttribute('width', animData.w);
-  rect.setAttribute('height', animData.h);
-  rect.setAttribute('x', 0);
-  rect.setAttribute('y', 0);
-  var maskId = createElementID();
-  maskElement.setAttribute('id', maskId);
-  maskElement.appendChild(rect);
-  this.layerElement.setAttribute('clip-path', 'url(' + locationHref + '#' + maskId + ')');
-
-  defs.appendChild(maskElement);
-  this.layers = animData.layers;
-  this.elements = createSizedArray(animData.layers.length);
-};
-
-SVGRenderer.prototype.destroy = function () {
-  if (this.animationItem.wrapper) {
-    this.animationItem.wrapper.innerText = '';
-  }
-  this.layerElement = null;
-  this.globalData.defs = null;
-  var i;
-  var len = this.layers ? this.layers.length : 0;
-  for (i = 0; i < len; i += 1) {
-    if (this.elements[i]) {
-      this.elements[i].destroy();
-    }
-  }
-  this.elements.length = 0;
-  this.destroyed = true;
-  this.animationItem = null;
-};
-
-SVGRenderer.prototype.updateContainerSize = function () {
-};
-
-SVGRenderer.prototype.buildItem = function (pos) {
-  var elements = this.elements;
-  if (elements[pos] || this.layers[pos].ty === 99) {
-    return;
-  }
-  elements[pos] = true;
-  var element = this.createItem(this.layers[pos]);
-
-  elements[pos] = element;
-  if (expressionsPlugin) {
-    if (this.layers[pos].ty === 0) {
-      this.globalData.projectInterface.registerComposition(element);
-    }
-    element.initExpressions();
-  }
-  this.appendElementInPos(element, pos);
-  if (this.layers[pos].tt) {
-    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
-      this.buildItem(pos - 1);
-      this.addPendingElement(element);
-    } else {
-      element.setMatte(elements[pos - 1].layerId);
-    }
-  }
-};
-
-SVGRenderer.prototype.checkPendingElements = function () {
-  while (this.pendingElements.length) {
-    var element = this.pendingElements.pop();
-    element.checkParenting();
-    if (element.data.tt) {
-      var i = 0;
-      var len = this.elements.length;
-      while (i < len) {
-        if (this.elements[i] === element) {
-          element.setMatte(this.elements[i - 1].layerId);
-          break;
-        }
-        i += 1;
-      }
-    }
-  }
-};
-
-SVGRenderer.prototype.renderFrame = function (num) {
-  if (this.renderedFrame === num || this.destroyed) {
-    return;
-  }
-  if (num === null) {
-    num = this.renderedFrame;
-  } else {
-    this.renderedFrame = num;
-  }
-  // console.log('-------');
-  // console.log('FRAME ',num);
-  this.globalData.frameNum = num;
-  this.globalData.frameId += 1;
-  this.globalData.projectInterface.currentFrame = num;
-  this.globalData._mdf = false;
-  var i;
-  var len = this.layers.length;
-  if (!this.completeLayers) {
-    this.checkLayers(num);
-  }
-  for (i = len - 1; i >= 0; i -= 1) {
-    if (this.completeLayers || this.elements[i]) {
-      this.elements[i].prepareFrame(num - this.layers[i].st);
-    }
-  }
-  if (this.globalData._mdf) {
-    for (i = 0; i < len; i += 1) {
-      if (this.completeLayers || this.elements[i]) {
-        this.elements[i].renderFrame();
-      }
-    }
-  }
-};
-
-SVGRenderer.prototype.appendElementInPos = function (element, pos) {
-  var newElement = element.getBaseElement();
-  if (!newElement) {
-    return;
-  }
-  var i = 0;
-  var nextElement;
-  while (i < pos) {
-    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
-      nextElement = this.elements[i].getBaseElement();
-    }
-    i += 1;
-  }
-  if (nextElement) {
-    this.layerElement.insertBefore(newElement, nextElement);
-  } else {
-    this.layerElement.appendChild(newElement);
-  }
-};
-
-SVGRenderer.prototype.hide = function () {
-  this.layerElement.style.display = 'none';
-};
-
-SVGRenderer.prototype.show = function () {
-  this.layerElement.style.display = 'block';
-};
+export default SVGRenderer;
diff --git a/player/js/renderers/SVGRendererBase.js b/player/js/renderers/SVGRendererBase.js
new file mode 100644
index 0000000..4e0f82f
--- /dev/null
+++ b/player/js/renderers/SVGRendererBase.js
@@ -0,0 +1,224 @@
+import { getLocationHref } from '../main';
+import {
+  createElementID,
+  getExpressionsPlugin,
+} from '../utils/common';
+import {
+  extendPrototype,
+} from '../utils/functionExtensions';
+import {
+  createSizedArray,
+} from '../utils/helpers/arrays';
+import createNS from '../utils/helpers/svg_elements';
+import BaseRenderer from './BaseRenderer';
+import IImageElement from '../elements/ImageElement';
+import SVGShapeElement from '../elements/svgElements/SVGShapeElement';
+import SVGTextLottieElement from '../elements/svgElements/SVGTextElement'; // eslint-disable-line import/no-cycle
+import ISolidElement from '../elements/SolidElement';
+import NullElement from '../elements/NullElement';
+
+function SVGRendererBase() {
+}
+
+extendPrototype([BaseRenderer], SVGRendererBase);
+
+SVGRendererBase.prototype.createNull = function (data) {
+  return new NullElement(data, this.globalData, this);
+};
+
+SVGRendererBase.prototype.createShape = function (data) {
+  return new SVGShapeElement(data, this.globalData, this);
+};
+
+SVGRendererBase.prototype.createText = function (data) {
+  return new SVGTextLottieElement(data, this.globalData, this);
+};
+
+SVGRendererBase.prototype.createImage = function (data) {
+  return new IImageElement(data, this.globalData, this);
+};
+
+SVGRendererBase.prototype.createSolid = function (data) {
+  return new ISolidElement(data, this.globalData, this);
+};
+
+SVGRendererBase.prototype.configAnimation = function (animData) {
+  this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
+  if (this.renderConfig.viewBoxSize) {
+    this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);
+  } else {
+    this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);
+  }
+
+  if (!this.renderConfig.viewBoxOnly) {
+    this.svgElement.setAttribute('width', animData.w);
+    this.svgElement.setAttribute('height', animData.h);
+    this.svgElement.style.width = '100%';
+    this.svgElement.style.height = '100%';
+    this.svgElement.style.transform = 'translate3d(0,0,0)';
+    this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;
+  }
+  if (this.renderConfig.className) {
+    this.svgElement.setAttribute('class', this.renderConfig.className);
+  }
+  if (this.renderConfig.id) {
+    this.svgElement.setAttribute('id', this.renderConfig.id);
+  }
+  if (this.renderConfig.focusable !== undefined) {
+    this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
+  }
+  this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio);
+  // this.layerElement.style.transform = 'translate3d(0,0,0)';
+  // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+  this.animationItem.wrapper.appendChild(this.svgElement);
+  // Mask animation
+  var defs = this.globalData.defs;
+
+  this.setupGlobalData(animData, defs);
+  this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+  this.data = animData;
+
+  var maskElement = createNS('clipPath');
+  var rect = createNS('rect');
+  rect.setAttribute('width', animData.w);
+  rect.setAttribute('height', animData.h);
+  rect.setAttribute('x', 0);
+  rect.setAttribute('y', 0);
+  var maskId = createElementID();
+  maskElement.setAttribute('id', maskId);
+  maskElement.appendChild(rect);
+  this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');
+
+  defs.appendChild(maskElement);
+  this.layers = animData.layers;
+  this.elements = createSizedArray(animData.layers.length);
+};
+
+SVGRendererBase.prototype.destroy = function () {
+  if (this.animationItem.wrapper) {
+    this.animationItem.wrapper.innerText = '';
+  }
+  this.layerElement = null;
+  this.globalData.defs = null;
+  var i;
+  var len = this.layers ? this.layers.length : 0;
+  for (i = 0; i < len; i += 1) {
+    if (this.elements[i]) {
+      this.elements[i].destroy();
+    }
+  }
+  this.elements.length = 0;
+  this.destroyed = true;
+  this.animationItem = null;
+};
+
+SVGRendererBase.prototype.updateContainerSize = function () {
+};
+
+SVGRendererBase.prototype.buildItem = function (pos) {
+  var elements = this.elements;
+  if (elements[pos] || this.layers[pos].ty === 99) {
+    return;
+  }
+  elements[pos] = true;
+  var element = this.createItem(this.layers[pos]);
+
+  elements[pos] = element;
+  if (getExpressionsPlugin()) {
+    if (this.layers[pos].ty === 0) {
+      this.globalData.projectInterface.registerComposition(element);
+    }
+    element.initExpressions();
+  }
+  this.appendElementInPos(element, pos);
+  if (this.layers[pos].tt) {
+    if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {
+      this.buildItem(pos - 1);
+      this.addPendingElement(element);
+    } else {
+      element.setMatte(elements[pos - 1].layerId);
+    }
+  }
+};
+
+SVGRendererBase.prototype.checkPendingElements = function () {
+  while (this.pendingElements.length) {
+    var element = this.pendingElements.pop();
+    element.checkParenting();
+    if (element.data.tt) {
+      var i = 0;
+      var len = this.elements.length;
+      while (i < len) {
+        if (this.elements[i] === element) {
+          element.setMatte(this.elements[i - 1].layerId);
+          break;
+        }
+        i += 1;
+      }
+    }
+  }
+};
+
+SVGRendererBase.prototype.renderFrame = function (num) {
+  if (this.renderedFrame === num || this.destroyed) {
+    return;
+  }
+  if (num === null) {
+    num = this.renderedFrame;
+  } else {
+    this.renderedFrame = num;
+  }
+  // console.log('-------');
+  // console.log('FRAME ',num);
+  this.globalData.frameNum = num;
+  this.globalData.frameId += 1;
+  this.globalData.projectInterface.currentFrame = num;
+  this.globalData._mdf = false;
+  var i;
+  var len = this.layers.length;
+  if (!this.completeLayers) {
+    this.checkLayers(num);
+  }
+  for (i = len - 1; i >= 0; i -= 1) {
+    if (this.completeLayers || this.elements[i]) {
+      this.elements[i].prepareFrame(num - this.layers[i].st);
+    }
+  }
+  if (this.globalData._mdf) {
+    for (i = 0; i < len; i += 1) {
+      if (this.completeLayers || this.elements[i]) {
+        this.elements[i].renderFrame();
+      }
+    }
+  }
+};
+
+SVGRendererBase.prototype.appendElementInPos = function (element, pos) {
+  var newElement = element.getBaseElement();
+  if (!newElement) {
+    return;
+  }
+  var i = 0;
+  var nextElement;
+  while (i < pos) {
+    if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {
+      nextElement = this.elements[i].getBaseElement();
+    }
+    i += 1;
+  }
+  if (nextElement) {
+    this.layerElement.insertBefore(newElement, nextElement);
+  } else {
+    this.layerElement.appendChild(newElement);
+  }
+};
+
+SVGRendererBase.prototype.hide = function () {
+  this.layerElement.style.display = 'none';
+};
+
+SVGRendererBase.prototype.show = function () {
+  this.layerElement.style.display = 'block';
+};
+
+export default SVGRendererBase;
diff --git a/player/js/renderers/renderersManager.js b/player/js/renderers/renderersManager.js
new file mode 100644
index 0000000..79e3900
--- /dev/null
+++ b/player/js/renderers/renderersManager.js
@@ -0,0 +1,14 @@
+const renderers = {};
+
+const registerRenderer = (key, value) => {
+  renderers[key] = value;
+};
+
+function getRenderer(key) {
+  return renderers[key];
+}
+
+export {
+  registerRenderer,
+  getRenderer,
+};
diff --git a/player/js/utils/BaseEvent.js b/player/js/utils/BaseEvent.js
index 3612690..be894df 100644
--- a/player/js/utils/BaseEvent.js
+++ b/player/js/utils/BaseEvent.js
@@ -38,3 +38,5 @@
     }
   },
 };
+
+export default BaseEvent;
diff --git a/player/js/utils/DataManager.js b/player/js/utils/DataManager.js
index 664649e..fc36d63 100644
--- a/player/js/utils/DataManager.js
+++ b/player/js/utils/DataManager.js
@@ -1,6 +1,6 @@
-/* global _useWebWorker */
+import { getWebWorker } from '../main';
 
-var dataManager = (function () {
+const dataManager = (function () {
   var _counterId = 1;
   var processes = [];
   var workerFn;
@@ -23,7 +23,7 @@
     },
   };
   function createWorker(fn) {
-    if (window.Worker && window.Blob && _useWebWorker) {
+    if (window.Worker && window.Blob && getWebWorker()) {
       var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' });
       // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
       var url = URL.createObjectURL(blob);
@@ -36,11 +36,7 @@
   function setupWorker() {
     if (!workerInstance) {
       workerInstance = createWorker(function workerStart(e) {
-        /* exported dataManager */
-
         function dataFunctionManager() {
-          // var tCanvasHelper = createTag('canvas').getContext('2d');
-
           function completeLayers(layers, comps) {
             var layerData;
             var i;
@@ -87,22 +83,56 @@
             }
           }
 
-          function findCompLayers(id, comps) {
+          function completeChars(chars, assets) {
+            if (chars) {
+              var i = 0;
+              var len = chars.length;
+              for (i = 0; i < len; i += 1) {
+                if (chars[i].t === 1) {
+                  // var compData = findComp(chars[i].data.refId, assets);
+                  chars[i].data.layers = findCompLayers(chars[i].data.refId, assets);
+                  // chars[i].data.ip = 0;
+                  // chars[i].data.op = 99999;
+                  // chars[i].data.st = 0;
+                  // chars[i].data.sr = 1;
+                  // chars[i].w = compData.w;
+                  // chars[i].data.ks = {
+                  //   a: { k: [0, 0, 0], a: 0 },
+                  //   p: { k: [0, -compData.h, 0], a: 0 },
+                  //   r: { k: 0, a: 0 },
+                  //   s: { k: [100, 100], a: 0 },
+                  //   o: { k: 100, a: 0 },
+                  // };
+                  completeLayers(chars[i].data.layers, assets);
+                }
+              }
+            }
+          }
+
+          function findComp(id, comps) {
             var i = 0;
             var len = comps.length;
             while (i < len) {
               if (comps[i].id === id) {
-                if (!comps[i].layers.__used) {
-                  comps[i].layers.__used = true;
-                  return comps[i].layers;
-                }
-                return JSON.parse(JSON.stringify(comps[i].layers));
+                return comps[i];
               }
               i += 1;
             }
             return null;
           }
 
+          function findCompLayers(id, comps) {
+            var comp = findComp(id, comps);
+            if (comp) {
+              if (!comp.layers.__used) {
+                comp.layers.__used = true;
+                return comp.layers;
+              }
+              return JSON.parse(JSON.stringify(comp.layers));
+            }
+            return null;
+          }
+
           function completeShapes(arr) {
             var i;
             var len = arr.length;
@@ -207,21 +237,39 @@
               if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {
                 var i;
                 var len = animationData.chars.length;
-                var j;
-                var jLen;
-                var pathData;
-                var paths;
                 for (i = 0; i < len; i += 1) {
-                  if (animationData.chars[i].data && animationData.chars[i].data.shapes) {
-                    paths = animationData.chars[i].data.shapes[0].it;
-                    jLen = paths.length;
-
-                    for (j = 0; j < jLen; j += 1) {
-                      pathData = paths[j].ks.k;
-                      if (!pathData.__converted) {
-                        convertPathsToAbsoluteValues(paths[j].ks.k);
-                        pathData.__converted = true;
-                      }
+                  var charData = animationData.chars[i];
+                  if (charData.data && charData.data.shapes) {
+                    completeShapes(charData.data.shapes);
+                    charData.data.ip = 0;
+                    charData.data.op = 99999;
+                    charData.data.st = 0;
+                    charData.data.sr = 1;
+                    charData.data.ks = {
+                      p: { k: [0, 0], a: 0 },
+                      s: { k: [100, 100], a: 0 },
+                      a: { k: [0, 0], a: 0 },
+                      r: { k: 0, a: 0 },
+                      o: { k: 100, a: 0 },
+                    };
+                    if (!animationData.chars[i].t) {
+                      charData.data.shapes.push(
+                        {
+                          ty: 'no',
+                        }
+                      );
+                      charData.data.shapes[0].it.push(
+                        {
+                          p: { k: [0, 0], a: 0 },
+                          s: { k: [100, 100], a: 0 },
+                          a: { k: [0, 0], a: 0 },
+                          r: { k: 0, a: 0 },
+                          o: { k: 100, a: 0 },
+                          sk: { k: 0, a: 0 },
+                          sa: { k: 0, a: 0 },
+                          ty: 'tr',
+                        }
+                      );
                     }
                   }
                 }
@@ -434,12 +482,13 @@
             checkPathProperties(animationData);
             checkShapes(animationData);
             completeLayers(animationData.layers, animationData.assets);
+            completeChars(animationData.chars, animationData.assets);
             animationData.__complete = true;
           }
 
           function completeText(data) {
             if (data.t.a.length === 0 && !('m' in data.t.p)) {
-              data.singleShape = true;
+              // data.singleShape = true;
             }
           }
 
@@ -457,7 +506,6 @@
           _workerSelf.dataManager = dataFunctionManager();
         }
 
-        /* exported assetLoader */
         if (!_workerSelf.assetLoader) {
           _workerSelf.assetLoader = (function () {
             function formatResponse(xhr) {
@@ -625,3 +673,5 @@
     completeAnimation: completeAnimation,
   };
 }());
+
+export default dataManager;
diff --git a/player/js/utils/DataManagerWorkerOverrides.js b/player/js/utils/DataManagerWorkerOverrides.js
index e6ac799..ba549c5 100644
--- a/player/js/utils/DataManagerWorkerOverrides.js
+++ b/player/js/utils/DataManagerWorkerOverrides.js
@@ -1,4 +1,4 @@
-/* global dataManager */
+import dataManager from './DataManager';
 
 dataManager.completeData = function (animationData) {
   if (animationData.__complete) {
diff --git a/player/js/utils/FontManager.js b/player/js/utils/FontManager.js
index 6def07c..a2e7434 100644
--- a/player/js/utils/FontManager.js
+++ b/player/js/utils/FontManager.js
@@ -1,12 +1,16 @@
-/* global createNS, createTag, getFontProperties */
-/* exported FontManager */
+import createNS from './helpers/svg_elements';
+import createTag from './helpers/html_elements';
+import getFontProperties from './getFontProperties';
 
-var FontManager = (function () {
+const FontManager = (function () {
   var maxWaitingTime = 5000;
   var emptyChar = {
     w: 0,
     size: 0,
     shapes: [],
+    data: {
+      shapes: [],
+    },
   };
   var combinedCharacters = [];
   // Hindi characters
@@ -350,3 +354,5 @@
 
   return Font;
 }());
+
+export default FontManager;
diff --git a/player/js/utils/FontManagerWorkerOverride.js b/player/js/utils/FontManagerWorkerOverride.js
index fa0121c..061894d 100644
--- a/player/js/utils/FontManagerWorkerOverride.js
+++ b/player/js/utils/FontManagerWorkerOverride.js
@@ -1,5 +1,6 @@
-/* global FontManager:writable */
-/* exported FontManager */
+import FontManager from './FontManager';
+
+// TODO: fix overwrite
 
 FontManager = (function () {
   var Font = function () {
@@ -11,3 +12,5 @@
   };
   return Font;
 }());
+
+export default FontManager;
diff --git a/player/js/utils/PropertyFactory.js b/player/js/utils/PropertyFactory.js
index b071e02..435b5de 100644
--- a/player/js/utils/PropertyFactory.js
+++ b/player/js/utils/PropertyFactory.js
@@ -1,7 +1,16 @@
-/* global initialDefaultFrame, BezierFactory, degToRads, bez, createTypedArray */
-/* exported PropertyFactory */
+import {
+  degToRads,
+} from './common';
+import {
+  createTypedArray,
+} from './helpers/arrays';
+import BezierFactory from '../3rd_party/BezierEaser';
+import {
+  initialDefaultFrame,
+} from '../main';
+import bez from './bez';
 
-var PropertyFactory = (function () {
+const PropertyFactory = (function () {
   var initFrame = initialDefaultFrame;
   var mathAbs = Math.abs;
 
@@ -473,3 +482,5 @@
   };
   return ob;
 }());
+
+export default PropertyFactory;
diff --git a/player/js/utils/TransformProperty.js b/player/js/utils/TransformProperty.js
index 7727acf..2284d42 100644
--- a/player/js/utils/TransformProperty.js
+++ b/player/js/utils/TransformProperty.js
@@ -1,7 +1,14 @@
-/* global Matrix, degToRads, PropertyFactory, extendPrototype, DynamicPropertyContainer */
-/* exported TransformPropertyFactory */
+import {
+  degToRads,
+} from './common';
+import {
+  extendPrototype,
+} from './functionExtensions';
+import DynamicPropertyContainer from './helpers/dynamicProperties';
+import Matrix from '../3rd_party/transformation-matrix';
+import PropertyFactory from './PropertyFactory';
 
-var TransformPropertyFactory = (function () {
+const TransformPropertyFactory = (function () {
   var defaultVector = [0, 0];
 
   function applyToMatrix(mat) {
@@ -237,3 +244,5 @@
     getTransformProperty: getTransformProperty,
   };
 }());
+
+export default TransformPropertyFactory;
diff --git a/player/js/utils/asset_loader.js b/player/js/utils/asset_loader.js
index 011b748..fbf354e 100644
--- a/player/js/utils/asset_loader.js
+++ b/player/js/utils/asset_loader.js
@@ -1,6 +1,4 @@
-/* exported assetLoader */
-
-var assetLoader = (function () {
+const assetLoader = (function () {
   function formatResponse(xhr) {
     // using typeof doubles the time of execution of this method,
     // so if available, it's better to use the header to validate the type
@@ -50,3 +48,5 @@
     load: loadAsset,
   };
 }());
+
+export default assetLoader;
diff --git a/player/js/utils/asset_loader_worker_override.js b/player/js/utils/asset_loader_worker_override.js
index fedf965..1746f63 100644
--- a/player/js/utils/asset_loader_worker_override.js
+++ b/player/js/utils/asset_loader_worker_override.js
@@ -1,3 +1,3 @@
-/* exported assetLoader */
+const assetLoader = null;
 
-var assetLoader = null;
+export default assetLoader;
diff --git a/player/js/utils/audio/AudioController.js b/player/js/utils/audio/AudioController.js
index d84a816..17d5682 100644
--- a/player/js/utils/audio/AudioController.js
+++ b/player/js/utils/audio/AudioController.js
@@ -1,7 +1,6 @@
-/* global Howl */
-/* exported audioControllerFactory */
+// import Howl from '../../3rd_party/howler';
 
-var audioControllerFactory = (function () {
+const audioControllerFactory = (function () {
   function AudioController(audioFactory) {
     this.audios = [];
     this.audioFactory = audioFactory;
@@ -37,8 +36,8 @@
     createAudio: function (assetPath) {
       if (this.audioFactory) {
         return this.audioFactory(assetPath);
-      } if (Howl) {
-        return new Howl({
+      } if (window.Howl) {
+        return new window.Howl({
           src: [assetPath],
         });
       }
@@ -82,3 +81,5 @@
     return new AudioController();
   };
 }());
+
+export default audioControllerFactory;
diff --git a/player/js/utils/audio/AudioElement.js b/player/js/utils/audio/AudioElement.js
index 683ad94..af95936 100644
--- a/player/js/utils/audio/AudioElement.js
+++ b/player/js/utils/audio/AudioElement.js
@@ -1,5 +1,6 @@
-/* exported AudioElement */
-
+// TODO: fix Overwrite
 function AudioElement(data) {
   this.audioData = data;
 }
+
+export default AudioElement;
diff --git a/player/js/utils/bez.js b/player/js/utils/bez.js
index 703cdf9..658d32f 100644
--- a/player/js/utils/bez.js
+++ b/player/js/utils/bez.js
@@ -1,5 +1,15 @@
-/* global segmentsLengthPool, defaultCurveSegments, createSizedArray, bmPow, bmSqrt, bmFloor, createTypedArray, bezierLengthPool */
-/* exported bez */
+import {
+  bmPow,
+  bmFloor,
+  bmSqrt,
+  getDefaultCurveSegments,
+} from './common';
+import {
+  createSizedArray,
+  createTypedArray,
+} from './helpers/arrays';
+import segmentsLengthPool from './pooling/segments_length_pool';
+import bezierLengthPool from './pooling/bezier_length_pool';
 
 function bezFunction() {
   var math = Math;
@@ -33,7 +43,7 @@
 
   var getBezierLength = (function () {
     return function (pt1, pt2, pt3, pt4) {
-      var curveSegments = defaultCurveSegments;
+      var curveSegments = getDefaultCurveSegments();
       var k;
       var i;
       var len;
@@ -106,7 +116,7 @@
     return function (pt1, pt2, pt3, pt4) {
       var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p');
       if (!storedData[bezierName]) {
-        var curveSegments = defaultCurveSegments;
+        var curveSegments = getDefaultCurveSegments();
         var k;
         var i;
         var len;
@@ -236,4 +246,6 @@
   };
 }
 
-var bez = bezFunction();
+const bez = bezFunction();
+
+export default bez;
diff --git a/player/js/utils/common.js b/player/js/utils/common.js
index 6597283..da4946d 100644
--- a/player/js/utils/common.js
+++ b/player/js/utils/common.js
@@ -1,22 +1,19 @@
-/* global createSizedArray */
-/* exported subframeEnabled, expressionsPlugin, isSafari, cachedColors, bmPow, bmSqrt, bmFloor, bmMax, bmMin, ProjectInterface,
-defaultCurveSegments, degToRads, roundCorner, bmRnd, styleDiv, BMEnterFrameEvent, BMCompleteEvent, BMCompleteLoopEvent,
-BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent, BMAnimationConfigErrorEvent, createElementID,
-addSaturationToRGB, addBrightnessToRGB, addHueToRGB, rgbToHex */
+import {
+  createSizedArray,
+} from './helpers/arrays';
 
-var subframeEnabled = true;
-var idPrefix = '';
-var expressionsPlugin;
-var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-var cachedColors = {};
-var bmRnd;
-var bmPow = Math.pow;
-var bmSqrt = Math.sqrt;
-var bmFloor = Math.floor;
-var bmMax = Math.max;
-var bmMin = Math.min;
+let subframeEnabled = true;
+let expressionsPlugin = null;
+let idPrefix = '';
+const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+let _shouldRoundValues = false;
+const bmPow = Math.pow;
+const bmSqrt = Math.sqrt;
+const bmFloor = Math.floor;
+const bmMax = Math.max;
+const bmMin = Math.min;
 
-var BMMath = {};
+const BMMath = {};
 (function () {
   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'];
   var i;
@@ -27,7 +24,6 @@
 }());
 
 function ProjectInterface() { return {}; }
-
 BMMath.random = Math.random;
 BMMath.abs = function (val) {
   var tOfVal = typeof val;
@@ -42,20 +38,20 @@
   }
   return Math.abs(val);
 };
-var defaultCurveSegments = 150;
-var degToRads = Math.PI / 180;
-var roundCorner = 0.5519;
+let defaultCurveSegments = 150;
+const degToRads = Math.PI / 180;
+const roundCorner = 0.5519;
 
 function roundValues(flag) {
-  if (flag) {
-    bmRnd = Math.round;
-  } else {
-    bmRnd = function (val) {
-      return val;
-    };
-  }
+  _shouldRoundValues = !!flag;
 }
-roundValues(false);
+
+function bmRnd(value) {
+  if (_shouldRoundValues) {
+    return Math.round(value);
+  }
+  return value;
+}
 
 function styleDiv(element) {
   element.style.position = 'absolute';
@@ -117,7 +113,7 @@
   this.nativeError = nativeError;
 }
 
-var createElementID = (function () {
+const createElementID = (function () {
   var _count = 0;
   return function createID() {
     _count += 1;
@@ -209,7 +205,7 @@
   return HSVtoRGB(hsv[0], hsv[1], hsv[2]);
 }
 
-var rgbToHex = (function () {
+const rgbToHex = (function () {
   var colorMap = [];
   var i;
   var hex;
@@ -231,3 +227,49 @@
     return '#' + colorMap[r] + colorMap[g] + colorMap[b];
   };
 }());
+
+const setSubframeEnabled = (flag) => { subframeEnabled = !!flag; };
+const getSubframeEnabled = () => subframeEnabled;
+const setExpressionsPlugin = (value) => { expressionsPlugin = value; };
+const getExpressionsPlugin = () => expressionsPlugin;
+const setDefaultCurveSegments = (value) => { defaultCurveSegments = value; };
+const getDefaultCurveSegments = () => defaultCurveSegments;
+const setIdPrefix = (value) => { idPrefix = value; };
+const getIdPrefix = () => idPrefix;
+
+export {
+  setSubframeEnabled,
+  getSubframeEnabled,
+  setExpressionsPlugin,
+  getExpressionsPlugin,
+  setDefaultCurveSegments,
+  getDefaultCurveSegments,
+  isSafari,
+  bmPow,
+  bmSqrt,
+  bmFloor,
+  bmMax,
+  bmMin,
+  degToRads,
+  roundCorner,
+  styleDiv,
+  bmRnd,
+  roundValues,
+  BMEnterFrameEvent,
+  BMCompleteEvent,
+  BMCompleteLoopEvent,
+  BMSegmentStartEvent,
+  BMDestroyEvent,
+  BMRenderFrameErrorEvent,
+  BMConfigErrorEvent,
+  BMAnimationConfigErrorEvent,
+  createElementID,
+  addSaturationToRGB,
+  addBrightnessToRGB,
+  addHueToRGB,
+  rgbToHex,
+  setIdPrefix,
+  getIdPrefix,
+  BMMath,
+  ProjectInterface,
+};
diff --git a/player/js/utils/expressions/CompInterface.js b/player/js/utils/expressions/CompInterface.js
index 87bbb8b..179e26e 100644
--- a/player/js/utils/expressions/CompInterface.js
+++ b/player/js/utils/expressions/CompInterface.js
@@ -1,6 +1,4 @@
-/* exported CompExpressionInterface */
-
-var CompExpressionInterface = (function () {
+const CompExpressionInterface = (function () {
   return function (comp) {
     function _thisLayerFunction(name) {
       var i = 0;
@@ -26,3 +24,5 @@
     return _thisLayerFunction;
   };
 }());
+
+export default CompExpressionInterface;
diff --git a/player/js/utils/expressions/EffectInterface.js b/player/js/utils/expressions/EffectInterface.js
index feb5040..94e13b9 100644
--- a/player/js/utils/expressions/EffectInterface.js
+++ b/player/js/utils/expressions/EffectInterface.js
@@ -1,7 +1,8 @@
-/* global propertyGroupFactory, ExpressionPropertyInterface, PropertyInterface */
-/* exported EffectsExpressionInterface */
+import ExpressionPropertyInterface from './ExpressionValueFactory';
+import propertyGroupFactory from './PropertyGroupFactory';
+import PropertyInterface from './PropertyInterface';
 
-var EffectsExpressionInterface = (function () {
+const EffectsExpressionInterface = (function () {
   var ob = {
     createEffectsInterface: createEffectsInterface,
   };
@@ -106,3 +107,5 @@
 
   return ob;
 }());
+
+export default EffectsExpressionInterface;
diff --git a/player/js/utils/expressions/ExpressionManager.js b/player/js/utils/expressions/ExpressionManager.js
index a2304cc..1198523 100644
--- a/player/js/utils/expressions/ExpressionManager.js
+++ b/player/js/utils/expressions/ExpressionManager.js
@@ -1,7 +1,18 @@
-/* eslint-disable camelcase, no-unused-vars */
-/* global BMMath, BezierFactory, createTypedArray, degToRads, shapePool */
+/* eslint-disable camelcase */
 
-var ExpressionManager = (function () {
+import {
+  degToRads,
+  BMMath,
+} from '../common';
+import {
+  createTypedArray,
+} from '../helpers/arrays';
+import BezierFactory from '../../3rd_party/BezierEaser';
+import shapePool from '../pooling/shape_pool';
+import seedrandom from '../../3rd_party/seedrandom';
+import propTypes from '../helpers/propTypes';
+
+const ExpressionManager = (function () {
   'use strict';
 
   var ob = {};
@@ -11,6 +22,7 @@
   var XMLHttpRequest = null;
   var fetch = null;
   var frames = null;
+  seedrandom(BMMath);
 
   function $bm_isInstanceOfArray(arr) {
     return arr.constructor === Array || arr.constructor === Float32Array;
@@ -708,15 +720,20 @@
       this.frameExpressionId = elem.globalData.frameId;
 
       // TODO: Check if it's possible to return on ShapeInterface the .v value
-      if (scoped_bm_rt.propType === 'shape') {
-        scoped_bm_rt = scoped_bm_rt.v;
-      }
-      // globalData.popExpression();
+      // Changed this to a ternary operation because Rollup failed compiling it correctly
+      scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE
+        ? scoped_bm_rt.v
+        : scoped_bm_rt;
       return scoped_bm_rt;
     }
+    // Bundlers will see these as dead code and unless we reference them
+    executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];
     return executeExpression;
   }
 
   ob.initiateExpression = initiateExpression;
+  ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];
   return ob;
 }());
+
+export default ExpressionManager;
diff --git a/player/js/utils/expressions/ExpressionPropertyDecorator.js b/player/js/utils/expressions/ExpressionPropertyDecorator.js
index 9b1d4a1..4c4ead3 100644
--- a/player/js/utils/expressions/ExpressionPropertyDecorator.js
+++ b/player/js/utils/expressions/ExpressionPropertyDecorator.js
@@ -1,7 +1,23 @@
-/* global createTypedArray, Matrix, TransformPropertyFactory, expressionHelpers, PropertyFactory, expressionHelpers,
-initialDefaultFrame, shapePool, ShapePropertyFactory, bez, extendPrototype, ExpressionManager, createSizedArray */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import {
+  createSizedArray,
+  createTypedArray,
+} from '../helpers/arrays';
+import ShapePropertyFactory from '../shapes/ShapeProperty';
+import PropertyFactory from '../PropertyFactory';
+import shapePool from '../pooling/shape_pool';
+import {
+  initialDefaultFrame,
+} from '../../main';
+import bez from '../bez';
+import Matrix from '../../3rd_party/transformation-matrix';
+import TransformPropertyFactory from '../TransformProperty';
+import expressionHelpers from './expressionHelpers';
+import ExpressionManager from './ExpressionManager';
 
-(function addPropertyDecorator() {
+function addPropertyDecorator() {
   function loopOut(type, duration, durationFlag) {
     if (!this.k || !this.keyframes) {
       return this.pv;
@@ -438,4 +454,10 @@
     }
     return prop;
   };
-}());
+}
+
+function initialize() {
+  addPropertyDecorator();
+}
+
+export default initialize;
diff --git a/player/js/utils/expressions/ExpressionTextPropertyDecorator.js b/player/js/utils/expressions/ExpressionTextPropertyDecorator.js
index 2024926..d777c63 100644
--- a/player/js/utils/expressions/ExpressionTextPropertyDecorator.js
+++ b/player/js/utils/expressions/ExpressionTextPropertyDecorator.js
@@ -1,6 +1,7 @@
-/* global ExpressionManager, TextProperty */
+import TextProperty from '../text/TextProperty';
+import ExpressionManager from './ExpressionManager';
 
-(function addDecorator() {
+function addDecorator() {
   function searchExpressions() {
     if (this.data.d.x) {
       this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
@@ -30,4 +31,10 @@
   };
 
   TextProperty.prototype.searchExpressions = searchExpressions;
-}());
+}
+
+function initialize() {
+  addDecorator();
+}
+
+export default initialize;
diff --git a/player/js/utils/expressions/ExpressionValue.js b/player/js/utils/expressions/ExpressionValue.js
index 66cdd14..7088e48 100644
--- a/player/js/utils/expressions/ExpressionValue.js
+++ b/player/js/utils/expressions/ExpressionValue.js
@@ -1,5 +1,6 @@
-/* global createTypedArray */
-/* exported ExpressionValue */
+import {
+  createTypedArray,
+} from '../helpers/arrays';
 
 function ExpressionValue(elementProp, mult, type) {
   mult = mult || 1;
@@ -56,3 +57,5 @@
   });
   return expressionValue;
 }
+
+export default ExpressionValue;
diff --git a/player/js/utils/expressions/ExpressionValueFactory.js b/player/js/utils/expressions/ExpressionValueFactory.js
index 414f189..ea90b4e 100644
--- a/player/js/utils/expressions/ExpressionValueFactory.js
+++ b/player/js/utils/expressions/ExpressionValueFactory.js
@@ -1,7 +1,8 @@
-/* global createTypedArray */
-/* exported ExpressionPropertyInterface */
+import {
+  createTypedArray,
+} from '../helpers/arrays';
 
-var ExpressionPropertyInterface = (function () {
+const ExpressionPropertyInterface = (function () {
   var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 };
   var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
 
@@ -96,3 +97,5 @@
     return MultidimensionalPropertyInterface(property);
   };
 }());
+
+export default ExpressionPropertyInterface;
diff --git a/player/js/utils/expressions/Expressions.js b/player/js/utils/expressions/Expressions.js
index 2d79c90..8355a73 100644
--- a/player/js/utils/expressions/Expressions.js
+++ b/player/js/utils/expressions/Expressions.js
@@ -1,7 +1,6 @@
-/* global CompExpressionInterface, expressionsPlugin: writable */
-/* exported expressionsPlugin */
+import CompExpressionInterface from './CompInterface';
 
-var Expressions = (function () {
+const Expressions = (function () {
   var ob = {};
   ob.initExpressions = initExpressions;
 
@@ -44,4 +43,4 @@
   return ob;
 }());
 
-expressionsPlugin = Expressions;
+export default Expressions;
diff --git a/player/js/utils/expressions/FootageInterface.js b/player/js/utils/expressions/FootageInterface.js
index a1e5ee7..27b8be9 100644
--- a/player/js/utils/expressions/FootageInterface.js
+++ b/player/js/utils/expressions/FootageInterface.js
@@ -1,7 +1,4 @@
-/* global */
-/* exported FootageInterface */
-
-var FootageInterface = (function () {
+const FootageInterface = (function () {
   var outlineInterfaceFactory = (function (elem) {
     var currentPropertyName = '';
     var currentProperty = elem.getFootageData();
@@ -59,3 +56,5 @@
     return _interfaceFunction;
   };
 }());
+
+export default FootageInterface;
diff --git a/player/js/utils/expressions/LayerInterface.js b/player/js/utils/expressions/LayerInterface.js
index 658725a..e1a17cd 100644
--- a/player/js/utils/expressions/LayerInterface.js
+++ b/player/js/utils/expressions/LayerInterface.js
@@ -1,7 +1,11 @@
-/* global Matrix, MaskManagerInterface, TransformExpressionInterface, getDescriptor */
-/* exported LayerExpressionInterface */
+import {
+  getDescriptor,
+} from '../functionExtensions';
+import Matrix from '../../3rd_party/transformation-matrix';
+import MaskManagerInterface from './MaskInterface';
+import TransformExpressionInterface from './TransformInterface';
 
-var LayerExpressionInterface = (function () {
+const LayerExpressionInterface = (function () {
   function getMatrix(time) {
     var toWorldMat = new Matrix();
     if (time !== undefined) {
@@ -171,3 +175,5 @@
     return _thisLayerFunction;
   };
 }());
+
+export default LayerExpressionInterface;
diff --git a/player/js/utils/expressions/MaskInterface.js b/player/js/utils/expressions/MaskInterface.js
index 1f33fa6..f3232d6 100644
--- a/player/js/utils/expressions/MaskInterface.js
+++ b/player/js/utils/expressions/MaskInterface.js
@@ -1,7 +1,8 @@
-/* global createSizedArray */
-/* exported MaskManagerInterface */
+import {
+  createSizedArray,
+} from '../helpers/arrays';
 
-var MaskManagerInterface = (function () {
+const MaskManagerInterface = (function () {
   function MaskInterface(mask, data) {
     this._mask = mask;
     this._data = data;
@@ -45,3 +46,5 @@
   };
   return MaskManager;
 }());
+
+export default MaskManagerInterface;
diff --git a/player/js/utils/expressions/ProjectInterface.js b/player/js/utils/expressions/ProjectInterface.js
index 98fee55..db59500 100644
--- a/player/js/utils/expressions/ProjectInterface.js
+++ b/player/js/utils/expressions/ProjectInterface.js
@@ -1,6 +1,4 @@
-/* exported ProjectInterface */
-
-var ProjectInterface = (function () {
+const ProjectInterface = (function () {
   function registerComposition(comp) {
     this.compositions.push(comp);
   }
@@ -29,3 +27,5 @@
     return _thisProjectFunction;
   };
 }());
+
+export default ProjectInterface;
diff --git a/player/js/utils/expressions/PropertyGroupFactory.js b/player/js/utils/expressions/PropertyGroupFactory.js
index 002b420..bd9b632 100644
--- a/player/js/utils/expressions/PropertyGroupFactory.js
+++ b/player/js/utils/expressions/PropertyGroupFactory.js
@@ -1,6 +1,4 @@
-/* exported propertyGroupFactory */
-
-var propertyGroupFactory = (function () {
+const propertyGroupFactory = (function () {
   return function (interfaceFunction, parentPropertyGroup) {
     return function (val) {
       val = val === undefined ? 1 : val;
@@ -11,3 +9,5 @@
     };
   };
 }());
+
+export default propertyGroupFactory;
diff --git a/player/js/utils/expressions/PropertyInterface.js b/player/js/utils/expressions/PropertyInterface.js
index 011b81d..5e8a096 100644
--- a/player/js/utils/expressions/PropertyInterface.js
+++ b/player/js/utils/expressions/PropertyInterface.js
@@ -1,6 +1,4 @@
-/* exported PropertyInterface */
-
-var PropertyInterface = (function () {
+const PropertyInterface = (function () {
   return function (propertyName, propertyGroup) {
     var interfaceFunction = {
       _name: propertyName,
@@ -17,3 +15,5 @@
     return _propertyGroup;
   };
 }());
+
+export default PropertyInterface;
diff --git a/player/js/utils/expressions/ShapeInterface.js b/player/js/utils/expressions/ShapeInterface.js
index aac5bef..b2c6c8f 100644
--- a/player/js/utils/expressions/ShapeInterface.js
+++ b/player/js/utils/expressions/ShapeInterface.js
@@ -1,7 +1,9 @@
-/* global ExpressionPropertyInterface, PropertyInterface, propertyGroupFactory, ShapePathInterface */
-/* exported ShapeExpressionInterface */
+import ExpressionPropertyInterface from './ExpressionValueFactory';
+import propertyGroupFactory from './PropertyGroupFactory';
+import PropertyInterface from './PropertyInterface';
+import ShapePathInterface from './shapes/ShapePathInterface';
 
-var ShapeExpressionInterface = (function () {
+const ShapeExpressionInterface = (function () {
   function iterateElements(shapes, view, propertyGroup) {
     var arr = [];
     var i;
@@ -537,3 +539,5 @@
     return _interfaceFunction;
   };
 }());
+
+export default ShapeExpressionInterface;
diff --git a/player/js/utils/expressions/TextInterface.js b/player/js/utils/expressions/TextInterface.js
index c8a473c..e5f1956 100644
--- a/player/js/utils/expressions/TextInterface.js
+++ b/player/js/utils/expressions/TextInterface.js
@@ -1,6 +1,4 @@
-/* exported TextExpressionInterface */
-
-var TextExpressionInterface = (function () {
+const TextExpressionInterface = (function () {
   return function (elem) {
     var _prevValue;
     var _sourceText;
@@ -28,3 +26,5 @@
     return _thisLayerFunction;
   };
 }());
+
+export default TextExpressionInterface;
diff --git a/player/js/utils/expressions/TextSelectorPropertyDecorator.js b/player/js/utils/expressions/TextSelectorPropertyDecorator.js
index f7f9519..5b4c000 100644
--- a/player/js/utils/expressions/TextSelectorPropertyDecorator.js
+++ b/player/js/utils/expressions/TextSelectorPropertyDecorator.js
@@ -1,7 +1,8 @@
-/* global expressionHelpers, TextSelectorProp, ExpressionManager */
-/* exported TextExpressionSelectorPropFactory */
+import ExpressionManager from './ExpressionManager';
+import expressionHelpers from './expressionHelpers';
+import TextSelectorProp from '../text/TextSelectorProperty';
 
-var TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
+const TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars
   function getValueProxy(index, total) {
     this.textIndex = index + 1;
     this.textTotal = total;
@@ -39,3 +40,5 @@
   }
   return propertyGetTextProp(elem, data, arr);
 };
+
+export default TextExpressionSelectorPropFactory;
diff --git a/player/js/utils/expressions/TransformInterface.js b/player/js/utils/expressions/TransformInterface.js
index ba16447..147bddd 100644
--- a/player/js/utils/expressions/TransformInterface.js
+++ b/player/js/utils/expressions/TransformInterface.js
@@ -1,7 +1,6 @@
-/* global ExpressionPropertyInterface */
-/* exported TransformExpressionInterface */
+import ExpressionPropertyInterface from './ExpressionValueFactory';
 
-var TransformExpressionInterface = (function () {
+const TransformExpressionInterface = (function () {
   return function (transform) {
     function _thisFunction(name) {
       switch (name) {
@@ -123,3 +122,5 @@
     return _thisFunction;
   };
 }());
+
+export default TransformExpressionInterface;
diff --git a/player/js/utils/expressions/expressionHelpers.js b/player/js/utils/expressions/expressionHelpers.js
index 3251b73..a431687 100644
--- a/player/js/utils/expressions/expressionHelpers.js
+++ b/player/js/utils/expressions/expressionHelpers.js
@@ -1,7 +1,9 @@
-/* global ExpressionManager, createTypedArray */
-/* exported expressionHelpers */
+import {
+  createTypedArray,
+} from '../helpers/arrays';
+import ExpressionManager from './ExpressionManager';
 
-var expressionHelpers = (function () {
+const expressionHelpers = (function () {
   function searchExpressions(elem, data, prop) {
     if (data.x) {
       prop.k = true;
@@ -80,3 +82,5 @@
     setGroupProperty: setGroupProperty,
   };
 }());
+
+export default expressionHelpers;
diff --git a/player/js/utils/expressions/shapes/ShapePathInterface.js b/player/js/utils/expressions/shapes/ShapePathInterface.js
index b70106e..4a95149 100644
--- a/player/js/utils/expressions/shapes/ShapePathInterface.js
+++ b/player/js/utils/expressions/shapes/ShapePathInterface.js
@@ -1,7 +1,7 @@
-/* global propertyGroupFactory, PropertyInterface */
-/* exported ShapePathInterface */
+import propertyGroupFactory from '../PropertyGroupFactory';
+import PropertyInterface from '../PropertyInterface';
 
-var ShapePathInterface = (
+const ShapePathInterface = (
 
   function () {
     return function pathInterfaceFactory(shape, view, propertyGroup) {
@@ -43,3 +43,5 @@
     };
   }()
 );
+
+export default ShapePathInterface;
diff --git a/player/js/utils/featureSupport.js b/player/js/utils/featureSupport.js
index b7fd647..6be62ce 100644
--- a/player/js/utils/featureSupport.js
+++ b/player/js/utils/featureSupport.js
@@ -1,6 +1,4 @@
-/* exported featureSupport */
-
-var featureSupport = (function () {
+const featureSupport = (function () {
   var ob = {
     maskType: true,
   };
@@ -9,3 +7,5 @@
   }
   return ob;
 }());
+
+export default featureSupport;
diff --git a/player/js/utils/filters.js b/player/js/utils/filters.js
index e969d22..b3c2a43 100644
--- a/player/js/utils/filters.js
+++ b/player/js/utils/filters.js
@@ -1,7 +1,6 @@
-/* global createNS */
-/* exported filtersFactory */
+import createNS from './helpers/svg_elements';
 
-var filtersFactory = (function () {
+const filtersFactory = (function () {
   var ob = {};
   ob.createFilter = createFilter;
   ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
@@ -29,3 +28,5 @@
 
   return ob;
 }());
+
+export default filtersFactory;
diff --git a/player/js/utils/functionExtensions.js b/player/js/utils/functionExtensions.js
index 7e70f44..f2281e2 100644
--- a/player/js/utils/functionExtensions.js
+++ b/player/js/utils/functionExtensions.js
@@ -1,5 +1,3 @@
-/* exported extendPrototype, getDescriptor, createProxyFunction */
-
 function extendPrototype(sources, destination) {
   var i;
   var len = sources.length;
@@ -21,3 +19,9 @@
   ProxyFunction.prototype = prototype;
   return ProxyFunction;
 }
+
+export {
+  extendPrototype,
+  getDescriptor,
+  createProxyFunction,
+};
diff --git a/player/js/utils/getFontProperties.js b/player/js/utils/getFontProperties.js
index c1ffc23..9d8595b 100644
--- a/player/js/utils/getFontProperties.js
+++ b/player/js/utils/getFontProperties.js
@@ -1,5 +1,3 @@
-/* exported getFontProperties */
-
 function getFontProperties(fontData) {
   var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
 
@@ -40,3 +38,5 @@
     weight: fontData.fWeight || fWeight,
   };
 }
+
+export default getFontProperties;
diff --git a/player/js/utils/helpers/arrays.js b/player/js/utils/helpers/arrays.js
index f66dc44..87caf58 100644
--- a/player/js/utils/helpers/arrays.js
+++ b/player/js/utils/helpers/arrays.js
@@ -1,6 +1,4 @@
-/* exported createTypedArray, createSizedArray */
-
-var createTypedArray = (function () {
+const createTypedArray = (function () {
   function createRegularArray(type, len) {
     var i = 0;
     var arr = [];
@@ -38,3 +36,8 @@
 function createSizedArray(len) {
   return Array.apply(null, { length: len });
 }
+
+export {
+  createTypedArray,
+  createSizedArray,
+};
diff --git a/player/js/utils/helpers/blendModes.js b/player/js/utils/helpers/blendModes.js
index ac71779..55acdf5 100644
--- a/player/js/utils/helpers/blendModes.js
+++ b/player/js/utils/helpers/blendModes.js
@@ -1,6 +1,4 @@
-/* exported getBlendMode */
-
-var getBlendMode = (function () {
+const getBlendMode = (function () {
   var blendModeEnums = {
     0: 'source-over',
     1: 'multiply',
@@ -24,3 +22,5 @@
     return blendModeEnums[mode] || '';
   };
 }());
+
+export default getBlendMode;
diff --git a/player/js/utils/helpers/dynamicProperties.js b/player/js/utils/helpers/dynamicProperties.js
index 670bbd5..621bf4e 100644
--- a/player/js/utils/helpers/dynamicProperties.js
+++ b/player/js/utils/helpers/dynamicProperties.js
@@ -25,3 +25,5 @@
     this._isAnimated = false;
   },
 };
+
+export default DynamicPropertyContainer;
diff --git a/player/js/utils/helpers/html_elements.js b/player/js/utils/helpers/html_elements.js
index 0ab0c78..7c4cce4 100644
--- a/player/js/utils/helpers/html_elements.js
+++ b/player/js/utils/helpers/html_elements.js
@@ -1,6 +1,6 @@
-/* exported createTag */
-
 function createTag(type) {
   // return {appendChild:function(){},setAttribute:function(){},style:{}}
   return document.createElement(type);
 }
+
+export default createTag;
diff --git a/player/js/utils/helpers/propTypes.js b/player/js/utils/helpers/propTypes.js
new file mode 100644
index 0000000..6a1c570
--- /dev/null
+++ b/player/js/utils/helpers/propTypes.js
@@ -0,0 +1,3 @@
+export default {
+  SHAPE: 'shape',
+};
diff --git a/player/js/utils/helpers/shapeEnums.js b/player/js/utils/helpers/shapeEnums.js
index 3833acb..581a1cd 100644
--- a/player/js/utils/helpers/shapeEnums.js
+++ b/player/js/utils/helpers/shapeEnums.js
@@ -1,13 +1,16 @@
-/* exported lineCapEnum, lineJoinEnum */
-
-var lineCapEnum = {
+const lineCapEnum = {
   1: 'butt',
   2: 'round',
   3: 'square',
 };
 
-var lineJoinEnum = {
+const lineJoinEnum = {
   1: 'miter',
   2: 'round',
   3: 'bevel',
 };
+
+export {
+  lineCapEnum,
+  lineJoinEnum,
+};
diff --git a/player/js/utils/helpers/svg_elements.js b/player/js/utils/helpers/svg_elements.js
index 2c60ec0..1657d26 100644
--- a/player/js/utils/helpers/svg_elements.js
+++ b/player/js/utils/helpers/svg_elements.js
@@ -1,7 +1,8 @@
-/* global svgNS */
-/* exported createNS */
+import { svgNS } from '../../main';
 
 function createNS(type) {
   // return {appendChild:function(){},setAttribute:function(){},style:{}}
   return document.createElementNS(svgNS, type);
 }
+
+export default createNS;
diff --git a/player/js/utils/imagePreloader.js b/player/js/utils/imagePreloader.js
index 2bda18b..8a09f04 100644
--- a/player/js/utils/imagePreloader.js
+++ b/player/js/utils/imagePreloader.js
@@ -1,7 +1,9 @@
-/* global createTag, createNS, isSafari, dataManager */
-/* exported ImagePreloader */
+import { isSafari } from './common';
+import createNS from './helpers/svg_elements';
+import dataManager from './DataManager';
+import createTag from './helpers/html_elements';
 
-var ImagePreloader = (function () {
+const ImagePreloader = (function () {
   var proxyImage = (function () {
     var canvas = createTag('canvas');
     canvas.width = 1;
@@ -207,3 +209,5 @@
 
   return ImagePreloaderFactory;
 }());
+
+export default ImagePreloader;
diff --git a/player/js/utils/imagePreloaderWorkerOverride.js b/player/js/utils/imagePreloaderWorkerOverride.js
index 754932f..a73c8c7 100644
--- a/player/js/utils/imagePreloaderWorkerOverride.js
+++ b/player/js/utils/imagePreloaderWorkerOverride.js
@@ -1,3 +1,3 @@
-/* exported ImagePreloader */
+const ImagePreloader = function () {};
 
-var ImagePreloader = function () {};
+export default ImagePreloader;
diff --git a/player/js/utils/markers/markerParser.js b/player/js/utils/markers/markerParser.js
index 89d6ea4..7ccc3e6 100644
--- a/player/js/utils/markers/markerParser.js
+++ b/player/js/utils/markers/markerParser.js
@@ -1,6 +1,4 @@
-/* exported markerParser */
-
-var markerParser = (
+const markerParser = (
 
   function () {
     function parsePayloadLines(payload) {
@@ -45,3 +43,5 @@
       return markers;
     };
   }());
+
+export default markerParser;
diff --git a/player/js/utils/pooling/bezier_length_pool.js b/player/js/utils/pooling/bezier_length_pool.js
index 7648fb6..bd38b8b 100644
--- a/player/js/utils/pooling/bezier_length_pool.js
+++ b/player/js/utils/pooling/bezier_length_pool.js
@@ -1,13 +1,20 @@
-/* global createTypedArray, defaultCurveSegments, poolFactory */
-/* exported bezierLengthPool */
+import {
+  getDefaultCurveSegments,
+} from '../common';
+import {
+  createTypedArray,
+} from '../helpers/arrays';
+import poolFactory from './pool_factory';
 
-var bezierLengthPool = (function () {
+const bezierLengthPool = (function () {
   function create() {
     return {
       addedLength: 0,
-      percents: createTypedArray('float32', defaultCurveSegments),
-      lengths: createTypedArray('float32', defaultCurveSegments),
+      percents: createTypedArray('float32', getDefaultCurveSegments()),
+      lengths: createTypedArray('float32', getDefaultCurveSegments()),
     };
   }
   return poolFactory(8, create);
 }());
+
+export default bezierLengthPool;
diff --git a/player/js/utils/pooling/point_pool.js b/player/js/utils/pooling/point_pool.js
index 56ba125..79eeacb 100644
--- a/player/js/utils/pooling/point_pool.js
+++ b/player/js/utils/pooling/point_pool.js
@@ -1,9 +1,13 @@
-/* global createTypedArray, poolFactory */
-/* exported pointPool */
+import {
+  createTypedArray,
+} from '../helpers/arrays';
+import poolFactory from './pool_factory';
 
-var pointPool = (function () {
+const pointPool = (function () {
   function create() {
     return createTypedArray('float32', 2);
   }
   return poolFactory(8, create);
 }());
+
+export default pointPool;
diff --git a/player/js/utils/pooling/pool_factory.js b/player/js/utils/pooling/pool_factory.js
index 1f1c8c8..5538c65 100644
--- a/player/js/utils/pooling/pool_factory.js
+++ b/player/js/utils/pooling/pool_factory.js
@@ -1,7 +1,9 @@
-/* global createSizedArray, pooling */
-/* exported poolFactory */
+import {
+  createSizedArray,
+} from '../helpers/arrays';
+import pooling from './pooling';
 
-var poolFactory = (function () {
+const poolFactory = (function () {
   return function (initialLength, _create, _release) {
     var _length = 0;
     var _maxLength = initialLength;
@@ -38,3 +40,5 @@
     return ob;
   };
 }());
+
+export default poolFactory;
diff --git a/player/js/utils/pooling/pooling.js b/player/js/utils/pooling/pooling.js
index da3f0c9..44e0695 100644
--- a/player/js/utils/pooling/pooling.js
+++ b/player/js/utils/pooling/pooling.js
@@ -1,7 +1,8 @@
-/* global createSizedArray */
-/* exported pooling */
+import {
+  createSizedArray,
+} from '../helpers/arrays';
 
-var pooling = (function () {
+const pooling = (function () {
   function double(arr) {
     return arr.concat(createSizedArray(arr.length));
   }
@@ -10,3 +11,5 @@
     double: double,
   };
 }());
+
+export default pooling;
diff --git a/player/js/utils/pooling/segments_length_pool.js b/player/js/utils/pooling/segments_length_pool.js
index 3662498..e7c69dd 100644
--- a/player/js/utils/pooling/segments_length_pool.js
+++ b/player/js/utils/pooling/segments_length_pool.js
@@ -1,7 +1,7 @@
-/* global poolFactory, bezierLengthPool */
-/* exported segmentsLengthPool */
+import bezierLengthPool from './bezier_length_pool';
+import poolFactory from './pool_factory';
 
-var segmentsLengthPool = (function () {
+const segmentsLengthPool = (function () {
   function create() {
     return {
       lengths: [],
@@ -20,3 +20,5 @@
 
   return poolFactory(8, create, release);
 }());
+
+export default segmentsLengthPool;
diff --git a/player/js/utils/pooling/shapeCollection_pool.js b/player/js/utils/pooling/shapeCollection_pool.js
index fbdaa12..ae31fd9 100644
--- a/player/js/utils/pooling/shapeCollection_pool.js
+++ b/player/js/utils/pooling/shapeCollection_pool.js
@@ -1,7 +1,11 @@
-/* global createSizedArray, ShapeCollection, shapePool, pooling */
-/* exported shapeCollectionPool */
+import {
+  createSizedArray,
+} from '../helpers/arrays';
+import shapePool from './shape_pool';
+import pooling from './pooling';
+import ShapeCollection from '../shapes/ShapeCollection';
 
-var shapeCollectionPool = (function () {
+const shapeCollectionPool = (function () {
   var ob = {
     newShapeCollection: newShapeCollection,
     release: release,
@@ -40,3 +44,5 @@
 
   return ob;
 }());
+
+export default shapeCollectionPool;
diff --git a/player/js/utils/pooling/shape_pool.js b/player/js/utils/pooling/shape_pool.js
index 93c74a9..cbcbb1e 100644
--- a/player/js/utils/pooling/shape_pool.js
+++ b/player/js/utils/pooling/shape_pool.js
@@ -1,7 +1,8 @@
-/* global ShapePath, pointPool, poolFactory */
-/* exported shapePool */
+import poolFactory from './pool_factory';
+import pointPool from './point_pool';
+import ShapePath from '../shapes/ShapePath';
 
-var shapePool = (function () {
+const shapePool = (function () {
   function create() {
     return new ShapePath();
   }
@@ -39,3 +40,5 @@
 
   return factory;
 }());
+
+export default shapePool;
diff --git a/player/js/utils/shapes/DashProperty.js b/player/js/utils/shapes/DashProperty.js
index 14e77d3..f0594e3 100644
--- a/player/js/utils/shapes/DashProperty.js
+++ b/player/js/utils/shapes/DashProperty.js
@@ -1,4 +1,12 @@
-/* global createSizedArray, createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import DynamicPropertyContainer from '../helpers/dynamicProperties';
+import {
+  createSizedArray,
+  createTypedArray,
+} from '../helpers/arrays';
+import PropertyFactory from '../PropertyFactory';
 
 function DashProperty(elem, data, renderer, container) {
   this.elem = elem;
@@ -51,3 +59,5 @@
   }
 };
 extendPrototype([DynamicPropertyContainer], DashProperty);
+
+export default DashProperty;
diff --git a/player/js/utils/shapes/GradientProperty.js b/player/js/utils/shapes/GradientProperty.js
index e38bc68..a96d9ee 100644
--- a/player/js/utils/shapes/GradientProperty.js
+++ b/player/js/utils/shapes/GradientProperty.js
@@ -1,4 +1,12 @@
-/* global createTypedArray, PropertyFactory, extendPrototype, DynamicPropertyContainer */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import DynamicPropertyContainer from '../helpers/dynamicProperties';
+import {
+  createTypedArray,
+} from '../helpers/arrays';
+import PropertyFactory from '../PropertyFactory';
+
 function GradientProperty(elem, data, container) {
   this.data = data;
   this.c = createTypedArray('uint8c', data.p * 4);
@@ -81,3 +89,5 @@
 };
 
 extendPrototype([DynamicPropertyContainer], GradientProperty);
+
+export default GradientProperty;
diff --git a/player/js/utils/shapes/MouseModifier.js b/player/js/utils/shapes/MouseModifier.js
index 8baae42..b202dea 100644
--- a/player/js/utils/shapes/MouseModifier.js
+++ b/player/js/utils/shapes/MouseModifier.js
@@ -1,4 +1,10 @@
-/* global extendPrototype, ShapeModifiers, ShapeModifier */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import {
+  ShapeModifiers,
+  ShapeModifier,
+} from './ShapeModifiers';
 
 function MouseModifier() {}
 extendPrototype([ShapeModifier], MouseModifier);
@@ -212,3 +218,5 @@
 };
 
 ShapeModifiers.registerModifier('ms', MouseModifier);
+
+export default MouseModifier;
diff --git a/player/js/utils/shapes/PuckerAndBloatModifier.js b/player/js/utils/shapes/PuckerAndBloatModifier.js
index 4f4dca0..5586c28 100644
--- a/player/js/utils/shapes/PuckerAndBloatModifier.js
+++ b/player/js/utils/shapes/PuckerAndBloatModifier.js
@@ -1,4 +1,11 @@
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, ShapeModifiers */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import PropertyFactory from '../PropertyFactory';
+import shapePool from '../pooling/shape_pool';
+import {
+  ShapeModifier,
+} from './ShapeModifiers';
 
 function PuckerAndBloatModifier() {}
 extendPrototype([ShapeModifier], PuckerAndBloatModifier);
@@ -69,4 +76,5 @@
     this._mdf = false;
   }
 };
-ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);
+
+export default PuckerAndBloatModifier;
diff --git a/player/js/utils/shapes/RepeaterModifier.js b/player/js/utils/shapes/RepeaterModifier.js
index 062f3cf..8284b7a 100644
--- a/player/js/utils/shapes/RepeaterModifier.js
+++ b/player/js/utils/shapes/RepeaterModifier.js
@@ -1,4 +1,12 @@
-/* global extendPrototype, ShapeModifier, TransformPropertyFactory, PropertyFactory, Matrix, ShapeModifiers */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import PropertyFactory from '../PropertyFactory';
+import Matrix from '../../3rd_party/transformation-matrix';
+import TransformPropertyFactory from '../TransformProperty';
+import {
+  ShapeModifier,
+} from './ShapeModifiers';
 
 function RepeaterModifier() {}
 extendPrototype([ShapeModifier], RepeaterModifier);
@@ -221,4 +229,4 @@
 
 RepeaterModifier.prototype.addShape = function () {};
 
-ShapeModifiers.registerModifier('rp', RepeaterModifier);
+export default RepeaterModifier;
diff --git a/player/js/utils/shapes/RoundCornersModifier.js b/player/js/utils/shapes/RoundCornersModifier.js
index aa453e0..b45c3fb 100644
--- a/player/js/utils/shapes/RoundCornersModifier.js
+++ b/player/js/utils/shapes/RoundCornersModifier.js
@@ -1,4 +1,14 @@
-/* global extendPrototype, ShapeModifier, PropertyFactory, shapePool, roundCorner, ShapeModifiers */
+import {
+  roundCorner,
+} from '../common';
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import PropertyFactory from '../PropertyFactory';
+import shapePool from '../pooling/shape_pool';
+import {
+  ShapeModifier,
+} from './ShapeModifiers';
 
 function RoundCornersModifier() {}
 extendPrototype([ShapeModifier], RoundCornersModifier);
@@ -109,4 +119,4 @@
   }
 };
 
-ShapeModifiers.registerModifier('rd', RoundCornersModifier);
+export default RoundCornersModifier;
diff --git a/player/js/utils/shapes/ShapeCollection.js b/player/js/utils/shapes/ShapeCollection.js
index 9c03b36..ea4be62 100644
--- a/player/js/utils/shapes/ShapeCollection.js
+++ b/player/js/utils/shapes/ShapeCollection.js
@@ -1,4 +1,7 @@
-/* global createSizedArray, shapePool */
+import {
+  createSizedArray,
+} from '../helpers/arrays';
+import shapePool from '../pooling/shape_pool';
 
 function ShapeCollection() {
   this._length = 0;
@@ -22,3 +25,5 @@
   }
   this._length = 0;
 };
+
+export default ShapeCollection;
diff --git a/player/js/utils/shapes/ShapeModifiers.js b/player/js/utils/shapes/ShapeModifiers.js
index 2f695ad..6340f1f 100644
--- a/player/js/utils/shapes/ShapeModifiers.js
+++ b/player/js/utils/shapes/ShapeModifiers.js
@@ -1,7 +1,13 @@
-/* global shapeCollectionPool, initialDefaultFrame, extendPrototype, DynamicPropertyContainer */
-/* exported ShapeModifiers */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import DynamicPropertyContainer from '../helpers/dynamicProperties';
+import {
+  initialDefaultFrame,
+} from '../../main';
+import shapeCollectionPool from '../pooling/shapeCollection_pool';
 
-var ShapeModifiers = (function () {
+const ShapeModifiers = (function () {
   var ob = {};
   var modifiers = {};
   ob.registerModifier = registerModifier;
@@ -58,3 +64,8 @@
 };
 
 extendPrototype([DynamicPropertyContainer], ShapeModifier);
+
+export {
+  ShapeModifiers,
+  ShapeModifier,
+};
diff --git a/player/js/utils/shapes/ShapePath.js b/player/js/utils/shapes/ShapePath.js
index 9e6ac82..5b06a53 100644
--- a/player/js/utils/shapes/ShapePath.js
+++ b/player/js/utils/shapes/ShapePath.js
@@ -1,4 +1,7 @@
-/* global createSizedArray, createSizedArray, pointPool */
+import {
+  createSizedArray,
+} from '../helpers/arrays';
+import pointPool from '../pooling/point_pool';
 
 function ShapePath() {
   this.c = false;
@@ -89,3 +92,5 @@
   }
   return newPath;
 };
+
+export default ShapePath;
diff --git a/player/js/utils/shapes/ShapeProperty.js b/player/js/utils/shapes/ShapeProperty.js
index 3369289..f06e38f 100644
--- a/player/js/utils/shapes/ShapeProperty.js
+++ b/player/js/utils/shapes/ShapeProperty.js
@@ -1,8 +1,18 @@
-/* global extendPrototype, roundCorner, BezierFactory, shapePool, degToRads,
-  shapeCollectionPool, PropertyFactory, bmMin, DynamicPropertyContainer */
-/* exported ShapePropertyFactory */
+import {
+  degToRads,
+  roundCorner,
+  bmMin,
+} from '../common';
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import DynamicPropertyContainer from '../helpers/dynamicProperties';
+import PropertyFactory from '../PropertyFactory';
+import BezierFactory from '../../3rd_party/BezierEaser';
+import shapePool from '../pooling/shape_pool';
+import shapeCollectionPool from '../pooling/shapeCollection_pool';
 
-var ShapePropertyFactory = (function () {
+const ShapePropertyFactory = (function () {
   var initFrame = -999999;
 
   function interpolateShape(frameNum, previousValue, caching) {
@@ -225,12 +235,6 @@
     var cPoint = roundCorner;
 
     function EllShapePropertyFactory(elem, data) {
-      /* this.v = {
-                v: createSizedArray(4),
-                i: createSizedArray(4),
-                o: createSizedArray(4),
-                c: true
-            }; */
       this.v = shapePool.newElement();
       this.v.setPathData(true, 4);
       this.localShapeCollection = shapeCollectionPool.newShapeCollection();
@@ -538,3 +542,5 @@
   ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
   return ob;
 }());
+
+export default ShapePropertyFactory;
diff --git a/player/js/utils/shapes/TrimModifier.js b/player/js/utils/shapes/TrimModifier.js
index 7f017d5..884d359 100644
--- a/player/js/utils/shapes/TrimModifier.js
+++ b/player/js/utils/shapes/TrimModifier.js
@@ -1,4 +1,13 @@
-/* global extendPrototype, ShapeModifier, PropertyFactory, segmentsLengthPool, bez, shapePool, ShapeModifiers */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import PropertyFactory from '../PropertyFactory';
+import shapePool from '../pooling/shape_pool';
+import bez from '../bez';
+import {
+  ShapeModifier,
+} from './ShapeModifiers';
+import segmentsLengthPool from '../pooling/segments_length_pool';
 
 function TrimModifier() {
 }
@@ -347,4 +356,4 @@
   return shapes;
 };
 
-ShapeModifiers.registerModifier('tm', TrimModifier);
+export default TrimModifier;
diff --git a/player/js/utils/shapes/shapePathBuilder.js b/player/js/utils/shapes/shapePathBuilder.js
index ce21604..36fc102 100644
--- a/player/js/utils/shapes/shapePathBuilder.js
+++ b/player/js/utils/shapes/shapePathBuilder.js
@@ -1,6 +1,4 @@
-/* exported buildShapeString */
-
-var buildShapeString = function (pathNodes, length, closed, mat) {
+const buildShapeString = function (pathNodes, length, closed, mat) {
   if (length === 0) {
     return '';
   }
@@ -18,3 +16,5 @@
   }
   return shapeString;
 };
+
+export default buildShapeString;
diff --git a/player/js/utils/text/LetterProps.js b/player/js/utils/text/LetterProps.js
index 2c11580..1c752d6 100644
--- a/player/js/utils/text/LetterProps.js
+++ b/player/js/utils/text/LetterProps.js
@@ -56,3 +56,5 @@
   }
   return updated;
 };
+
+export default LetterProps;
diff --git a/player/js/utils/text/TextAnimatorDataProperty.js b/player/js/utils/text/TextAnimatorDataProperty.js
index dfc782b..535c882 100644
--- a/player/js/utils/text/TextAnimatorDataProperty.js
+++ b/player/js/utils/text/TextAnimatorDataProperty.js
@@ -1,5 +1,8 @@
-/* global PropertyFactory, degToRads, TextSelectorProp */
-/* exported TextAnimatorDataProperty */
+import {
+  degToRads,
+} from '../common';
+import PropertyFactory from '../PropertyFactory';
+import TextSelectorProp from './TextSelectorProperty';
 
 function TextAnimatorDataProperty(elem, animatorProps, container) {
   var defaultData = { propType: false };
@@ -27,3 +30,5 @@
   this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);
   this.s.t = animatorProps.s.t;
 }
+
+export default TextAnimatorDataProperty;
diff --git a/player/js/utils/text/TextAnimatorProperty.js b/player/js/utils/text/TextAnimatorProperty.js
index ab8a06a..dba1827 100644
--- a/player/js/utils/text/TextAnimatorProperty.js
+++ b/player/js/utils/text/TextAnimatorProperty.js
@@ -1,5 +1,20 @@
-/* global createSizedArray, PropertyFactory, TextAnimatorDataProperty, bez, addHueToRGB,
-  addSaturationToRGB, addBrightnessToRGB, LetterProps, Matrix, extendPrototype, DynamicPropertyContainer */
+import {
+  addSaturationToRGB,
+  addBrightnessToRGB,
+  addHueToRGB,
+} from '../common';
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import DynamicPropertyContainer from '../helpers/dynamicProperties';
+import {
+  createSizedArray,
+} from '../helpers/arrays';
+import PropertyFactory from '../PropertyFactory';
+import bez from '../bez';
+import Matrix from '../../3rd_party/transformation-matrix';
+import TextAnimatorDataProperty from './TextAnimatorDataProperty';
+import LetterProps from './LetterProps';
 
 function TextAnimatorProperty(textData, renderType, elem) {
   this._isFirstFrame = true;
@@ -591,3 +606,5 @@
 TextAnimatorProperty.prototype.mHelper = new Matrix();
 TextAnimatorProperty.prototype.defaultPropsArray = [];
 extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
+
+export default TextAnimatorProperty;
diff --git a/player/js/utils/text/TextProperty.js b/player/js/utils/text/TextProperty.js
index 57d15db..2f088ff 100644
--- a/player/js/utils/text/TextProperty.js
+++ b/player/js/utils/text/TextProperty.js
@@ -1,5 +1,8 @@
-/* global FontManager, initialDefaultFrame, getFontProperties */
-/* exported TextProperty */
+import {
+  initialDefaultFrame,
+} from '../../main';
+import getFontProperties from '../getFontProperties';
+import FontManager from '../FontManager';
 
 function TextProperty(elem, data) {
   this._frameId = initialDefaultFrame;
@@ -440,3 +443,5 @@
   this.recalculate(this.keysIndex);
   this.elem.addDynamicProperty(this);
 };
+
+export default TextProperty;
diff --git a/player/js/utils/text/TextSelectorProperty.js b/player/js/utils/text/TextSelectorProperty.js
index d7a9793..ce3af38 100644
--- a/player/js/utils/text/TextSelectorProperty.js
+++ b/player/js/utils/text/TextSelectorProperty.js
@@ -1,7 +1,11 @@
-/* global extendPrototype, BezierFactory, PropertyFactory, DynamicPropertyContainer */
-/* exported TextSelectorProp */
+import {
+  extendPrototype,
+} from '../functionExtensions';
+import DynamicPropertyContainer from '../helpers/dynamicProperties';
+import PropertyFactory from '../PropertyFactory';
+import BezierFactory from '../../3rd_party/BezierEaser';
 
-var TextSelectorProp = (function () {
+const TextSelectorProp = (function () {
   var max = Math.max;
   var min = Math.min;
   var floor = Math.floor;
@@ -36,7 +40,6 @@
       if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
         this.getValue();
       }
-      // var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
       var x1 = 0;
       var y1 = 0;
       var x2 = 1;
@@ -172,3 +175,5 @@
     getTextSelectorProp: getTextSelectorProp,
   };
 }());
+
+export default TextSelectorProp;
diff --git a/player/js/worker_wrapper.js b/player/js/worker_wrapper.js
new file mode 100644
index 0000000..598289b
--- /dev/null
+++ b/player/js/worker_wrapper.js
@@ -0,0 +1,629 @@
+function workerContent() {
+  var localIdCounter = 0;
+  var animations = {};
+
+  var styleProperties = ['width', 'height', 'display', 'transform', 'opacity', 'contentVisibility'];
+  function createElement(namespace, type) {
+    var style = {
+      serialize: function () {
+        var obj = {};
+        for (var i = 0; i < styleProperties.length; i += 1) {
+          var propertyKey = styleProperties[i];
+          var keyName = '_' + propertyKey;
+          if (keyName in this) {
+            obj[propertyKey] = this[keyName];
+          }
+        }
+        return obj;
+      },
+    };
+    styleProperties.forEach(function (propertyKey) {
+      Object.defineProperty(style, propertyKey, {
+        set: function (value) {
+          if (!element._isDirty) {
+            element._isDirty = true;
+          }
+          element._changedStyles.push(propertyKey);
+          var keyName = '_' + propertyKey;
+          this[keyName] = value;
+        },
+        get: function () {
+          var keyName = '_' + propertyKey;
+          return this[keyName];
+        },
+      });
+    });
+    localIdCounter += 1;
+    var element = {
+      _state: 'init',
+      _isDirty: false,
+      _changedStyles: [],
+      _changedAttributes: [],
+      _changedElements: [],
+      type: type,
+      namespace: namespace,
+      children: [],
+      attributes: {
+        id: 'l_d_' + localIdCounter,
+      },
+      style: style,
+      appendChild: function (child) {
+        child.parentNode = this;
+        this.children.push(child);
+        this._isDirty = true;
+        this._changedElements.push([child, this.attributes.id]);
+      },
+      insertBefore: function (newElement, nextElement) {
+        var children = this.children;
+        for (var i = 0; i < children.length; i += 1) {
+          if (children[i] === nextElement) {
+            children.splice(i, 0, newElement);
+            this._isDirty = true;
+            this._changedElements.push([newElement, this.attributes.id, nextElement.attributes.id]);
+            return;
+          }
+        }
+        children.push(nextElement);
+      },
+      setAttribute: function (attribute, value) {
+        this.attributes[attribute] = value;
+        if (!element._isDirty) {
+          element._isDirty = true;
+        }
+        element._changedAttributes.push(attribute);
+      },
+      serialize: function () {
+        return {
+          type: this.type,
+          namespace: this.namespace,
+          style: this.style.serialize(),
+          attributes: this.attributes,
+          children: this.children.map(function (child) { return child.serialize(); }),
+        };
+      },
+      getContext: function () { return { fillRect: function () {} }; },
+      addEventListener: function (_, callback) {
+        setTimeout(callback, 1);
+      },
+      setAttributeNS: function (_, attribute, value) {
+        this.attributes[attribute] = value;
+        if (!element._isDirty) {
+          element._isDirty = true;
+        }
+        element._changedAttributes.push(attribute);
+      },
+    };
+    element.style = style;
+    return element;
+  }
+
+  var window = self; // eslint-disable-line no-redeclare, no-unused-vars
+
+  var document = { // eslint-disable-line no-redeclare
+    createElementNS: function (namespace, type) {
+      return createElement(namespace, type);
+    },
+    createElement: function (type) {
+      return createElement('', type);
+    },
+    getElementsByTagName: function () {
+      return [];
+    },
+  };
+  /* eslint-enable */
+  var lottieInternal = (function () {
+    'use strict';
+
+    /* <%= contents %> */
+
+    function addElementToList(element, list) {
+      list.push(element);
+      element._isDirty = false;
+      element._changedStyles.length = 0;
+      element._changedAttributes.length = 0;
+      element._changedElements.length = 0;
+      element.children.forEach(function (child) {
+        addElementToList(child, list);
+      });
+    }
+
+    function addChangedAttributes(element) {
+      var changedAttributes = element._changedAttributes;
+      var attributes = [];
+      var attribute;
+      for (var i = 0; i < changedAttributes.length; i += 1) {
+        attribute = changedAttributes[i];
+        attributes.push([attribute, element.attributes[attribute]]);
+      }
+      return attributes;
+    }
+
+    function addChangedStyles(element) {
+      var changedStyles = element._changedStyles;
+      var styles = [];
+      var style;
+      for (var i = 0; i < changedStyles.length; i += 1) {
+        style = changedStyles[i];
+        styles.push([style, element.style[style]]);
+      }
+      return styles;
+    }
+
+    function addChangedElements(element, elements) {
+      var changedElements = element._changedElements;
+      var elementsList = [];
+      var elementData;
+      for (var i = 0; i < changedElements.length; i += 1) {
+        elementData = changedElements[i];
+        elementsList.push([elementData[0].serialize(), elementData[1], elementData[2]]);
+        addElementToList(elementData[0], elements);
+      }
+      return elementsList;
+    }
+
+    function loadAnimation(payload) {
+      var params = payload.params;
+      var wrapper;
+      var animation;
+      var elements = [];
+      if (params.renderer === 'svg') {
+        wrapper = document.createElement('div');
+        params.container = wrapper;
+      } else {
+        var canvas = params.rendererSettings.canvas;
+        var ctx = canvas.getContext('2d');
+        params.rendererSettings.context = ctx;
+      }
+      animation = lottie.loadAnimation(params);
+      animation.addEventListener('error', function (error) {
+        console.log(error); // eslint-disable-line
+      });
+      animation.onError = function (error) {
+        console.log('ERRORO', error); // eslint-disable-line
+      };
+      if (params.renderer === 'svg') {
+        animation.addEventListener('DOMLoaded', function () {
+          var serialized = wrapper.serialize();
+          addElementToList(wrapper, elements);
+          self.postMessage({
+            type: 'loaded',
+            payload: {
+              id: payload.id,
+              tree: serialized.children[0],
+              totalFrames: animation.totalFrames,
+              frameRate: animation.frameRate,
+            },
+          });
+        });
+        animation.addEventListener('drawnFrame', function (event) {
+          var changedElements = [];
+          var element;
+          for (var i = 0; i < elements.length; i += 1) {
+            element = elements[i];
+            if (element._isDirty) {
+              var changedElement = {
+                id: element.attributes.id,
+                styles: addChangedStyles(element),
+                attributes: addChangedAttributes(element),
+                elements: addChangedElements(element, elements),
+              };
+              changedElements.push(changedElement);
+              element._isDirty = false;
+              element._changedAttributes.length = 0;
+              element._changedStyles.length = 0;
+              element._changedElements.length = 0;
+            }
+          }
+          self.postMessage({
+            type: 'updated',
+            payload: {
+              elements: changedElements,
+              id: payload.id,
+              currentTime: event.currentTime,
+            },
+          });
+        });
+      }
+      animations[payload.id] = animation;
+    }
+
+    return {
+      loadAnimation: loadAnimation,
+    };
+  }({}));
+  onmessage = function (evt) {
+    var data = evt.data;
+    var type = data.type;
+    var payload = data.payload;
+    if (type === 'load') {
+      lottieInternal.loadAnimation(payload);
+    } else if (type === 'pause') {
+      if (animations[payload.id]) {
+        animations[payload.id].pause();
+      }
+    } else if (type === 'play') {
+      if (animations[payload.id]) {
+        animations[payload.id].play();
+      }
+    } else if (type === 'stop') {
+      if (animations[payload.id]) {
+        animations[payload.id].stop();
+      }
+    } else if (type === 'setSpeed') {
+      if (animations[payload.id]) {
+        animations[payload.id].setSpeed(payload.value);
+      }
+    } else if (type === 'setDirection') {
+      if (animations[payload.id]) {
+        animations[payload.id].setDirection(payload.value);
+      }
+    } else if (type === 'setDirection') {
+      if (animations[payload.id]) {
+        animations[payload.id].setDirection(payload.value);
+      }
+    } else if (type === 'goToAndPlay') {
+      if (animations[payload.id]) {
+        animations[payload.id].goToAndPlay(payload.value, payload.isFrame);
+      }
+    } else if (type === 'goToAndStop') {
+      if (animations[payload.id]) {
+        animations[payload.id].goToAndStop(payload.value, payload.isFrame);
+      }
+    } else if (type === 'setSubframe') {
+      if (animations[payload.id]) {
+        animations[payload.id].setSubframe(payload.value);
+      }
+    } else if (type === 'addEventListener') {
+      if (animations[payload.id]) {
+        animations[payload.id].addEventListener(payload.eventName, function () {
+          self.postMessage({
+            type: 'event',
+            payload: {
+              id: payload.id,
+              callbackId: payload.callbackId,
+              argument: arguments[0],
+            },
+          });
+        });
+      }
+    } else if (type === 'destroy') {
+      if (animations[payload.id]) {
+        animations[payload.id].destroy();
+        animations[payload.id] = null;
+      }
+    } else if (type === 'resize') {
+      if (animations[payload.id]) {
+        animations[payload.id].resize();
+      }
+    }
+  };
+}
+
+function createWorker(fn) {
+  var blob = new Blob(['(' + fn.toString() + '())'], { type: 'text/javascript' });
+  var url = URL.createObjectURL(blob);
+  return new Worker(url);
+}
+// eslint-disable-next-line no-unused-vars
+var lottie = (function () {
+  'use strict';
+
+  var workerInstance = createWorker(workerContent);
+  var animationIdCounter = 0;
+  var eventsIdCounter = 0;
+  var animations = {};
+  var defaultSettings = {
+    rendererSettings: {},
+  };
+
+  function createTree(data, container, map, afterElement) {
+    var elem;
+    if (data.type === 'div') {
+      elem = document.createElement('div');
+    } else {
+      elem = document.createElementNS(data.namespace, data.type);
+    }
+    for (var attr in data.attributes) {
+      if (Object.prototype.hasOwnProperty.call(data.attributes, attr)) {
+        if (attr === 'href') {
+          elem.setAttributeNS('http://www.w3.org/1999/xlink', attr, data.attributes[attr]);
+        } else {
+          elem.setAttribute(attr, data.attributes[attr]);
+        }
+        if (attr === 'id') {
+          map[data.attributes[attr]] = elem;
+        }
+      }
+    }
+    for (var style in data.style) {
+      if (Object.prototype.hasOwnProperty.call(data.style, style)) {
+        elem.style[style] = data.style[style];
+      }
+    }
+    data.children.forEach(function (element) {
+      createTree(element, elem, map);
+    });
+    if (!afterElement) {
+      container.appendChild(elem);
+    } else {
+      container.insertBefore(elem, afterElement);
+    }
+  }
+
+  var handleAnimationLoaded = (function () {
+    return function (payload) {
+      var animation = animations[payload.id];
+      animation._loaded = true;
+      // if callbacks have been added before the animation has loaded
+      animation.pendingCallbacks.forEach(function (callbackData) {
+        animation.animInstance.addEventListener(callbackData.eventName, callbackData.callback);
+        if (callbackData.eventName === 'DOMLoaded') {
+          callbackData.callback();
+        }
+      });
+      animation.animInstance.totalFrames = payload.totalFrames;
+      animation.animInstance.frameRate = payload.frameRate;
+      var container = animation.container;
+      var elements = animation.elements;
+      createTree(payload.tree, container, elements);
+    };
+  }());
+
+  function addNewElements(newElements, elements) {
+    var element;
+    for (var i = 0; i < newElements.length; i += 1) {
+      element = newElements[i];
+      var parent = elements[element[1]];
+      if (parent) {
+        var sibling;
+        if (element[2]) {
+          sibling = elements[element[2]];
+        }
+        createTree(element[0], parent, elements, sibling);
+        newElements.splice(i, 1);
+        i -= 1;
+      }
+    }
+  }
+
+  function updateElementStyles(element, styles) {
+    var style;
+    for (var i = 0; i < styles.length; i += 1) {
+      style = styles[i];
+      element.style[style[0]] = style[1];
+    }
+  }
+
+  function updateElementAttributes(element, attributes) {
+    var attribute;
+    for (var i = 0; i < attributes.length; i += 1) {
+      attribute = attributes[i];
+      element.setAttribute(attribute[0], attribute[1]);
+    }
+  }
+
+  function handleAnimationUpdate(payload) {
+    var changedElements = payload.elements;
+    var animation = animations[payload.id];
+    if (animation) {
+      var elements = animation.elements;
+      var elementData;
+      for (var i = 0; i < changedElements.length; i += 1) {
+        elementData = changedElements[i];
+        var element = elements[elementData.id];
+        addNewElements(elementData.elements, elements);
+        updateElementStyles(element, elementData.styles);
+        updateElementAttributes(element, elementData.attributes);
+      }
+      animation.animInstance.currentFrame = payload.currentTime;
+    }
+  }
+
+  function handleEvent(payload) {
+    var animation = animations[payload.id];
+    if (animation) {
+      var callbacks = animation.callbacks;
+      if (callbacks[payload.callbackId]) {
+        callbacks[payload.callbackId](payload.argument);
+      }
+    }
+  }
+
+  workerInstance.onmessage = function (event) {
+    if (event.data.type === 'loaded') {
+      handleAnimationLoaded(event.data.payload);
+    } else if (event.data.type === 'updated') {
+      handleAnimationUpdate(event.data.payload);
+    } else if (event.data.type === 'event') {
+      handleEvent(event.data.payload);
+    }
+  };
+
+  function resolveAnimationData(params) {
+    return new Promise(function (resolve, reject) {
+      var paramsCopy = Object.assign({}, defaultSettings, params);
+      if (paramsCopy.animType && !paramsCopy.renderer) {
+        paramsCopy.renderer = paramsCopy.animType;
+      }
+      if (paramsCopy.wrapper) {
+        if (!paramsCopy.container) {
+          paramsCopy.container = paramsCopy.wrapper;
+        }
+        delete paramsCopy.wrapper;
+      }
+      if (paramsCopy.animationData) {
+        resolve(paramsCopy);
+      } else if (paramsCopy.path) {
+        fetch(paramsCopy.path)
+          .then(function (response) {
+            return response.json();
+          })
+          .then(function (animationData) {
+            paramsCopy.animationData = animationData;
+            delete paramsCopy.path;
+            resolve(paramsCopy);
+          });
+      } else {
+        reject();
+      }
+    });
+  }
+
+  function loadAnimation(params) {
+    animationIdCounter += 1;
+    var animationId = 'lottie_animationId_' + animationIdCounter;
+    var animation = {
+      elements: {},
+      callbacks: {},
+      pendingCallbacks: [],
+    };
+    var animInstance = {
+      id: animationId,
+      pause: function () {
+        workerInstance.postMessage({
+          type: 'pause',
+          payload: {
+            id: animationId,
+          },
+        });
+      },
+      play: function () {
+        workerInstance.postMessage({
+          type: 'play',
+          payload: {
+            id: animationId,
+          },
+        });
+      },
+      stop: function () {
+        workerInstance.postMessage({
+          type: 'stop',
+          payload: {
+            id: animationId,
+          },
+        });
+      },
+      setSpeed: function (value) {
+        workerInstance.postMessage({
+          type: 'setSpeed',
+          payload: {
+            id: animationId,
+            value: value,
+          },
+        });
+      },
+      setDirection: function (value) {
+        workerInstance.postMessage({
+          type: 'setDirection',
+          payload: {
+            id: animationId,
+            value: value,
+          },
+        });
+      },
+      goToAndStop: function (value, isFrame) {
+        workerInstance.postMessage({
+          type: 'goToAndStop',
+          payload: {
+            id: animationId,
+            value: value,
+            isFrame: isFrame,
+          },
+        });
+      },
+      goToAndPlay: function (value, isFrame) {
+        workerInstance.postMessage({
+          type: 'goToAndPlay',
+          payload: {
+            id: animationId,
+            value: value,
+            isFrame: isFrame,
+          },
+        });
+      },
+      setSubframe: function (value) {
+        workerInstance.postMessage({
+          type: 'setSubframe',
+          payload: {
+            id: animationId,
+            value: value,
+          },
+        });
+      },
+      addEventListener: function (eventName, callback) {
+        if (!animation._loaded) {
+          animation.pendingCallbacks.push({
+            eventName: eventName,
+            callback: callback,
+          });
+        } else {
+          eventsIdCounter += 1;
+          var callbackId = 'callback_' + eventsIdCounter;
+          animation.callbacks[callbackId] = callback;
+          workerInstance.postMessage({
+            type: 'addEventListener',
+            payload: {
+              id: animationId,
+              callbackId: callbackId,
+              eventName: eventName,
+            },
+          });
+        }
+      },
+      destroy: function () {
+        animations[animationId] = null;
+        if (animation.container) {
+          animation.container.innerHTML = '';
+        }
+        workerInstance.postMessage({
+          type: 'destroy',
+          payload: {
+            id: animationId,
+          },
+        });
+      },
+      resize: function () {
+        workerInstance.postMessage({
+          type: 'resize',
+          payload: {
+            id: animationId,
+          },
+        });
+      },
+    };
+    animation.animInstance = animInstance;
+    resolveAnimationData(params)
+      .then(function (animationParams) {
+        var transferedObjects = [];
+        if (animationParams.container) {
+          animation.container = animationParams.container;
+          delete animationParams.container;
+        }
+        if (animationParams.renderer === 'canvas' && !animationParams.rendererSettings.canvas) {
+          var canvas = document.createElement('canvas');
+          animation.container.appendChild(canvas);
+          canvas.width = animationParams.animationData.w;
+          canvas.height = animationParams.animationData.h;
+          canvas.style.width = '100%';
+          canvas.style.height = '100%';
+          var offscreen = canvas.transferControlToOffscreen();
+          transferedObjects.push(offscreen);
+          animationParams.rendererSettings.canvas = offscreen;
+        }
+        animations[animationId] = animation;
+        workerInstance.postMessage({
+          type: 'load',
+          payload: {
+            params: animationParams,
+            id: animationId,
+          },
+        }, transferedObjects);
+      });
+    return animInstance;
+  }
+
+  var lottiejs = {
+    loadAnimation: loadAnimation,
+  };
+  return lottiejs;
+}());
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 0000000..0d7ad02
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,205 @@
+import { nodeResolve } from '@rollup/plugin-node-resolve';
+import { terser } from 'rollup-plugin-terser';
+import babel from '@rollup/plugin-babel';
+import {version} from './package.json'
+
+const injectVersion = (options = {}) => {
+  return {
+    name: 'inject-version',
+    renderChunk: (code) => {
+      return code.replace('[[BM_VERSION]]', version)
+    },
+  }
+}
+
+const addNavigatorValidation = (options = {}) => {
+  return {
+    name: 'inject-version',
+    renderChunk: (code) => {
+      return '(typeof navigator !== "undefined") && '  + code
+    },
+  }
+}
+
+const noTreeShakingForStandalonePlugin = () => {
+  return {
+    name: 'no-treeshaking-for-standalone',
+    transform(code) {
+        // This is very fast but can produce lots of false positives.
+        // Use a good regular expression or parse an AST and analyze scoping to improve as needed.
+        if (code.indexOf('__[STANDALONE]__') >= 0) return {moduleSideEffects: 'no-treeshake'};
+    }
+  }
+}
+
+const destinationBuildFolder = 'build/player/';
+
+const builds = [
+  {
+    input: 'player/js/modules/full.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/full.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie.js',
+    esm: false,
+    skipTerser: true,
+  },
+  {
+    input: 'player/js/modules/svg_light.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_light.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/svg_light.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_light.js',
+    esm: false,
+    skipTerser: true,
+  },
+  {
+    input: 'player/js/modules/svg.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_svg.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/svg.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_svg.js',
+    esm: false,
+    skipTerser: true,
+  },
+  {
+    input: 'player/js/modules/canvas.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_canvas.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/canvas_light.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_light_canvas.js',
+    esm: false,
+    skipTerser: true,
+  },
+  {
+    input: 'player/js/modules/canvas_light.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_light_canvas.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/canvas.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_canvas.js',
+    esm: false,
+    skipTerser: true,
+  },
+  {
+    input: 'player/js/modules/html_light.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_light_html.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/html_light.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_light_html.js',
+    esm: false,
+    skipTerser: true,
+  },
+  {
+    input: 'player/js/modules/html.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_html.min.js',
+    esm: true,
+  },
+  {
+    input: 'player/js/modules/html.js',
+    dest: `${destinationBuildFolder}`,
+    file: 'lottie_html.js',
+    esm: false,
+    skipTerser: true,
+  },
+];
+
+const plugins = [
+  nodeResolve(),
+  babel({
+    babelHelpers: 'runtime',
+    skipPreflightCheck: true,
+  }),
+  // noTreeShakingForStandalonePlugin(),
+  injectVersion(),
+  addNavigatorValidation(),
+]
+const pluginsWithTerser = [
+  ...plugins,
+  terser(),
+]
+
+const UMDModule = {
+  output: {
+    format: 'umd',
+    name: 'lottie', // this is the name of the global object
+    esModule: false,
+    exports: 'default',
+    sourcemap: false,
+    compact: false,
+  },
+  treeshake: false,
+};
+
+const ESMModule = {
+  plugins: [nodeResolve()],
+  treeshake: false,
+  output: [
+    {
+      format: 'esm',
+      exports: 'named',
+    },
+    {
+      format: 'cjs',
+      exports: 'named',
+    },
+  ],
+};
+
+const exports = builds.reduce((acc, build) => {
+  const builds = [];
+  builds.push({
+    ...UMDModule,
+    plugins: !build.skipTerser ? pluginsWithTerser : plugins,
+    input: build.input,
+    output: {
+      ...UMDModule.output,
+      file: `${build.dest}${build.file}`,
+    }
+  });
+  if (build.esm) {
+    builds.push({
+      ...ESMModule,
+      input: build.input,
+      output: [
+        {
+          ...ESMModule.output[0],
+          file: 'dist/esm/' + build.file,
+          file: `${destinationBuildFolder}esm/${build.file}`,
+        },
+        {
+          ...ESMModule.output[1],
+          file: `${destinationBuildFolder}cjs/${build.file}`,
+        }
+      ]
+    });
+  }
+  
+  acc = acc.concat(builds);
+  return acc;
+}, []);
+export default exports;
diff --git a/tasks/build_worker.js b/tasks/build_worker.js
new file mode 100644
index 0000000..c11a3bf
--- /dev/null
+++ b/tasks/build_worker.js
@@ -0,0 +1,164 @@
+const fs = require('fs');
+const UglifyJS = require("uglify-js");
+const packageFile = require("../package.json");
+
+const buildFolder = 'build/player/';
+const rootFolder = 'player/';
+const bm_version = packageFile.version;
+const defaultBuilds = [ 'canvas_worker', 'lottie_worker']
+
+const scripts = [
+	
+]
+
+function wrapScriptWithModule(code, build) {
+	return new Promise((resolve, reject)=>{
+		try {
+			// Wrapping with module
+			let moduleFileName = 'worker_wrapper';
+			let wrappedCode = fs.readFileSync(`${rootFolder}js/${moduleFileName}.js`, "utf8");
+			wrappedCode = wrappedCode.replace('/* <%= contents %> */',code);
+			wrappedCode = wrappedCode.replace('[[BM_VERSION]]',bm_version);
+			resolve(wrappedCode);
+		} catch(err) {
+			reject(err);
+		}
+	});
+}
+
+function uglifyCode(code) {
+	return new Promise((resolve, reject)=>{
+		try {
+			const result = UglifyJS.minify(code, {
+				output: 
+					{
+						ascii_only:true
+					},
+					toplevel:true,
+					mangle: {
+						reserved: ['lottie']
+					}
+				});
+			if (result.error) {
+				reject(result.error)
+			} else {
+				resolve(result.code)
+			}
+		} catch(err) {
+			reject(err)
+		}
+	})
+}
+
+async function modularizeCode(code, build) {
+	const globalScope = (build =='canvas_worker' || build =='lottie_worker') ? 'self' : 'window'
+	return `(typeof navigator !== "undefined") && (function(root, factory) {
+    if (typeof define === "function" && define.amd) {
+        define(function() {
+            return factory(root);
+        });
+    } else if (typeof module === "object" && module.exports) {
+        module.exports = factory(root);
+    } else {
+        root.lottie = factory(root);
+        root.bodymovin = root.lottie;
+    }
+}((${globalScope} || {}), function(window) {
+	${code}
+return lottie;
+}));`
+}
+
+async function getCode() {
+	try {
+		let scriptsString = '';
+		scriptsString += fs.readFileSync(`${buildFolder}lottie.js`, {encoding: 'utf8'});
+		scriptsString += '\r\n';
+		return scriptsString;
+	} catch(err) {
+		throw err;
+	}
+}
+
+async function buildVersion(version) {
+	try {
+		const code = await getCode(version.build)
+		const wrappedCode = await wrapScriptWithModule(code, version.build)
+		const processedCode = await version.process(wrappedCode)
+		const modularizedCode = await modularizeCode(processedCode, version.build)
+		const saved = await save(modularizedCode, version.fileName)
+		return saved
+	} catch (error) {
+		console.log(error);
+		return null;
+	}
+}
+
+function save(code, fileName) {
+	return new Promise((resolve, reject)=> {
+		fs.writeFile(`${buildFolder}${fileName}`, code, (err) => {
+			if (err) {
+				reject(err)
+			} else {
+				resolve(true)
+			}
+		});
+	})
+}
+
+function noop(code) {
+	return Promise.resolve(code)
+}
+
+function buildVersions() {
+	return new Promise((resolve, reject) => {
+		let versions = [
+			{
+				fileName: 'lottie_canvas_worker.js',
+				build: 'canvas_worker',
+				process: noop
+			},
+			{
+				fileName: 'lottie_canvas_worker.min.js',
+				build: 'canvas_worker',
+				process: uglifyCode
+			},
+			{
+				fileName: 'lottie_worker.js',
+				build: 'lottie_worker',
+				process: noop
+			},
+			{
+				fileName: 'lottie_worker.min.js',
+				build: 'lottie_worker',
+				process: uglifyCode
+			}
+		];
+
+		const buildProcesses = versions.map((version)=>{
+			return buildVersion(version)
+		})
+		Promise.all(buildProcesses)
+		.then(() => {
+			resolve('Build Process Ended')
+		})
+		.catch((err)=>{
+			reject(err)
+		})
+	})
+}
+
+function handleError(err) {
+	console.log(err);
+}
+
+async function build() {
+	try {
+		const result = await buildVersions();
+
+	} catch(err) {
+		handleError(err);
+	}
+}
+
+build()